Version
menu_open
link
Wwise SDK 2021.1.14
AkMidiTypes.h
Go to the documentation of this file.
1 /*******************************************************************************
2 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
3 released in source code form as part of the SDK installer package.
4 
5 Commercial License Usage
6 
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
11 
12 Apache License Usage
13 
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
17 http://www.apache.org/licenses/LICENSE-2.0.
18 
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
23 
24  Version: v2021.1.14 Build: 6590
25  Copyright (c) 2006-2023 Audiokinetic Inc.
26 *******************************************************************************/
27 
28 // AkMidiTypes.h
29 
30 /// \file
31 /// Data type definitions.
32 
33 #ifndef _AK_MIDI_TYPES_H_
34 #define _AK_MIDI_TYPES_H_
35 
36 // Include standard types
38 
39 //-----------------------------------------------------------------------------
40 // Types.
41 //-----------------------------------------------------------------------------
42 
43 typedef AkUInt8 AkMidiChannelNo; ///< MIDI channel number, usually 0-15.
44 typedef AkUInt8 AkMidiNoteNo; ///< MIDI note number.
45 
46 //-----------------------------------------------------------------------------
47 // Constants.
48 //-----------------------------------------------------------------------------
49 
50 // Invalid values
51 static const AkMidiChannelNo AK_INVALID_MIDI_CHANNEL = (AkMidiChannelNo)-1; ///< Not a valid midi channel
52 static const AkMidiNoteNo AK_INVALID_MIDI_NOTE = (AkUInt8)-1; ///< Not a valid midi note
53 
54 // List of event types
55 #define AK_MIDI_EVENT_TYPE_INVALID 0x00
56 #define AK_MIDI_EVENT_TYPE_NOTE_OFF 0x80
57 #define AK_MIDI_EVENT_TYPE_NOTE_ON 0x90
58 #define AK_MIDI_EVENT_TYPE_NOTE_AFTERTOUCH 0xa0
59 #define AK_MIDI_EVENT_TYPE_CONTROLLER 0xb0
60 #define AK_MIDI_EVENT_TYPE_PROGRAM_CHANGE 0xc0
61 #define AK_MIDI_EVENT_TYPE_CHANNEL_AFTERTOUCH 0xd0
62 #define AK_MIDI_EVENT_TYPE_PITCH_BEND 0xe0
63 #define AK_MIDI_EVENT_TYPE_SYSEX 0xf0
64 #define AK_MIDI_EVENT_TYPE_ESCAPE 0xf7
65 #define AK_MIDI_EVENT_TYPE_WWISE_CMD 0xfe
66 #define AK_MIDI_EVENT_TYPE_META 0xff
67 
68 // List of Continuous Controller (cc) values
69 #define AK_MIDI_CC_BANK_SELECT_COARSE 0
70 #define AK_MIDI_CC_MOD_WHEEL_COARSE 1
71 #define AK_MIDI_CC_BREATH_CTRL_COARSE 2
72 #define AK_MIDI_CC_CTRL_3_COARSE 3
73 #define AK_MIDI_CC_FOOT_PEDAL_COARSE 4
74 #define AK_MIDI_CC_PORTAMENTO_COARSE 5
75 #define AK_MIDI_CC_DATA_ENTRY_COARSE 6
76 #define AK_MIDI_CC_VOLUME_COARSE 7
77 #define AK_MIDI_CC_BALANCE_COARSE 8
78 #define AK_MIDI_CC_CTRL_9_COARSE 9
79 #define AK_MIDI_CC_PAN_POSITION_COARSE 10
80 #define AK_MIDI_CC_EXPRESSION_COARSE 11
81 #define AK_MIDI_CC_EFFECT_CTRL_1_COARSE 12
82 #define AK_MIDI_CC_EFFECT_CTRL_2_COARSE 13
83 #define AK_MIDI_CC_CTRL_14_COARSE 14
84 #define AK_MIDI_CC_CTRL_15_COARSE 15
85 #define AK_MIDI_CC_GEN_SLIDER_1 16
86 #define AK_MIDI_CC_GEN_SLIDER_2 17
87 #define AK_MIDI_CC_GEN_SLIDER_3 18
88 #define AK_MIDI_CC_GEN_SLIDER_4 19
89 #define AK_MIDI_CC_CTRL_20_COARSE 20
90 #define AK_MIDI_CC_CTRL_21_COARSE 21
91 #define AK_MIDI_CC_CTRL_22_COARSE 22
92 #define AK_MIDI_CC_CTRL_23_COARSE 23
93 #define AK_MIDI_CC_CTRL_24_COARSE 24
94 #define AK_MIDI_CC_CTRL_25_COARSE 25
95 #define AK_MIDI_CC_CTRL_26_COARSE 26
96 #define AK_MIDI_CC_CTRL_27_COARSE 27
97 #define AK_MIDI_CC_CTRL_28_COARSE 28
98 #define AK_MIDI_CC_CTRL_29_COARSE 29
99 #define AK_MIDI_CC_CTRL_30_COARSE 30
100 #define AK_MIDI_CC_CTRL_31_COARSE 31
101 #define AK_MIDI_CC_BANK_SELECT_FINE 32
102 #define AK_MIDI_CC_MOD_WHEEL_FINE 33
103 #define AK_MIDI_CC_BREATH_CTRL_FINE 34
104 #define AK_MIDI_CC_CTRL_3_FINE 35
105 #define AK_MIDI_CC_FOOT_PEDAL_FINE 36
106 #define AK_MIDI_CC_PORTAMENTO_FINE 37
107 #define AK_MIDI_CC_DATA_ENTRY_FINE 38
108 #define AK_MIDI_CC_VOLUME_FINE 39
109 #define AK_MIDI_CC_BALANCE_FINE 40
110 #define AK_MIDI_CC_CTRL_9_FINE 41
111 #define AK_MIDI_CC_PAN_POSITION_FINE 42
112 #define AK_MIDI_CC_EXPRESSION_FINE 43
113 #define AK_MIDI_CC_EFFECT_CTRL_1_FINE 44
114 #define AK_MIDI_CC_EFFECT_CTRL_2_FINE 45
115 #define AK_MIDI_CC_CTRL_14_FINE 46
116 #define AK_MIDI_CC_CTRL_15_FINE 47
117 
118 #define AK_MIDI_CC_CTRL_20_FINE 52
119 #define AK_MIDI_CC_CTRL_21_FINE 53
120 #define AK_MIDI_CC_CTRL_22_FINE 54
121 #define AK_MIDI_CC_CTRL_23_FINE 55
122 #define AK_MIDI_CC_CTRL_24_FINE 56
123 #define AK_MIDI_CC_CTRL_25_FINE 57
124 #define AK_MIDI_CC_CTRL_26_FINE 58
125 #define AK_MIDI_CC_CTRL_27_FINE 59
126 #define AK_MIDI_CC_CTRL_28_FINE 60
127 #define AK_MIDI_CC_CTRL_29_FINE 61
128 #define AK_MIDI_CC_CTRL_30_FINE 62
129 #define AK_MIDI_CC_CTRL_31_FINE 63
130 
131 #define AK_MIDI_CC_HOLD_PEDAL 64
132 #define AK_MIDI_CC_PORTAMENTO_ON_OFF 65
133 #define AK_MIDI_CC_SUSTENUTO_PEDAL 66
134 #define AK_MIDI_CC_SOFT_PEDAL 67
135 #define AK_MIDI_CC_LEGATO_PEDAL 68
136 #define AK_MIDI_CC_HOLD_PEDAL_2 69
137 
138 #define AK_MIDI_CC_SOUND_VARIATION 70
139 #define AK_MIDI_CC_SOUND_TIMBRE 71
140 #define AK_MIDI_CC_SOUND_RELEASE_TIME 72
141 #define AK_MIDI_CC_SOUND_ATTACK_TIME 73
142 #define AK_MIDI_CC_SOUND_BRIGHTNESS 74
143 #define AK_MIDI_CC_SOUND_CTRL_6 75
144 #define AK_MIDI_CC_SOUND_CTRL_7 76
145 #define AK_MIDI_CC_SOUND_CTRL_8 77
146 #define AK_MIDI_CC_SOUND_CTRL_9 78
147 #define AK_MIDI_CC_SOUND_CTRL_10 79
148 
149 #define AK_MIDI_CC_GENERAL_BUTTON_1 80
150 #define AK_MIDI_CC_GENERAL_BUTTON_2 81
151 #define AK_MIDI_CC_GENERAL_BUTTON_3 82
152 #define AK_MIDI_CC_GENERAL_BUTTON_4 83
153 
154 #define AK_MIDI_CC_REVERB_LEVEL 91
155 #define AK_MIDI_CC_TREMOLO_LEVEL 92
156 #define AK_MIDI_CC_CHORUS_LEVEL 93
157 #define AK_MIDI_CC_CELESTE_LEVEL 94
158 #define AK_MIDI_CC_PHASER_LEVEL 95
159 #define AK_MIDI_CC_DATA_BUTTON_P1 96
160 #define AK_MIDI_CC_DATA_BUTTON_M1 97
161 
162 #define AK_MIDI_CC_NON_REGISTER_COARSE 98
163 #define AK_MIDI_CC_NON_REGISTER_FINE 99
164 
165 #define AK_MIDI_CC_ALL_SOUND_OFF 120
166 #define AK_MIDI_CC_ALL_CONTROLLERS_OFF 121
167 #define AK_MIDI_CC_LOCAL_KEYBOARD 122
168 #define AK_MIDI_CC_ALL_NOTES_OFF 123
169 #define AK_MIDI_CC_OMNI_MODE_OFF 124
170 #define AK_MIDI_CC_OMNI_MODE_ON 125
171 #define AK_MIDI_CC_OMNI_MONOPHONIC_ON 126
172 #define AK_MIDI_CC_OMNI_POLYPHONIC_ON 127
173 
174 //-----------------------------------------------------------------------------
175 // Structs.
176 //-----------------------------------------------------------------------------
177 
178 struct AkMIDIEvent
179 {
180  AkUInt8 byType; ///< See AK_MIDI_EVENT_TYPE_* pre-processor definitions
182 
183  struct tGen
184  {
187  };
188  struct tNoteOnOff
189  {
192  };
193  struct tCc
194  {
197  };
198  struct tPitchBend
199  {
202  };
204  {
207  };
209  {
211  };
213  {
215  };
216  struct tWwiseCmd
217  {
218  AkUInt16 uCmd; ///< See AK_MIDI_WWISE_CMD_* pre-processor definitions
219  AkUInt32 uArg; ///< Optional argument for some commands
220  };
221 
222  union
223  {
232  };
233 };
234 
235 #pragma pack(push, 4)
236 
237 struct AkMIDIPost : public AkMIDIEvent
238 {
239  AkUInt64 uOffset; ///< Frame offset (in samples) for MIDI event post
240 };
241 
242 #pragma pack(pop)
243 
244 #endif //_AK_MIDI_TYPES_H_
AkUInt8 AkMidiChannelNo
MIDI channel number, usually 0-15.
Definition: AkMidiTypes.h:43
AkUInt8 byType
See AK_MIDI_EVENT_TYPE_* pre-processor definitions.
Definition: AkMidiTypes.h:180
tNoteAftertouch NoteAftertouch
Definition: AkMidiTypes.h:228
AkUInt8 byParam2
Definition: AkMidiTypes.h:186
AkUInt16 uCmd
See AK_MIDI_WWISE_CMD_* pre-processor definitions.
Definition: AkMidiTypes.h:218
AkMidiNoteNo byNote
Definition: AkMidiTypes.h:190
tProgramChange ProgramChange
Definition: AkMidiTypes.h:230
AkMidiChannelNo byChan
Definition: AkMidiTypes.h:181
uint8_t AkUInt8
Unsigned 8-bit integer.
Definition: AkTypes.h:57
static const AkMidiChannelNo AK_INVALID_MIDI_CHANNEL
Not a valid midi channel.
Definition: AkMidiTypes.h:51
tNoteOnOff NoteOnOff
Definition: AkMidiTypes.h:226
uint64_t AkUInt64
Unsigned 64-bit integer.
Definition: AkTypes.h:60
tPitchBend PitchBend
Definition: AkMidiTypes.h:227
tWwiseCmd WwiseCmd
Definition: AkMidiTypes.h:231
tChanAftertouch ChanAftertouch
Definition: AkMidiTypes.h:229
AkUInt8 byCc
Definition: AkMidiTypes.h:195
uint16_t AkUInt16
Unsigned 16-bit integer.
Definition: AkTypes.h:58
AkUInt32 uArg
Optional argument for some commands.
Definition: AkMidiTypes.h:219
AkUInt8 byValue
Definition: AkMidiTypes.h:196
uint32_t AkUInt32
Unsigned 32-bit integer.
Definition: AkTypes.h:59
static const AkMidiNoteNo AK_INVALID_MIDI_NOTE
Not a valid midi note.
Definition: AkMidiTypes.h:52
AkUInt8 byParam1
Definition: AkMidiTypes.h:185
AkUInt8 AkMidiNoteNo
MIDI note number.
Definition: AkMidiTypes.h:44
tGen Gen
Definition: AkMidiTypes.h:224
Definition: AkMidiTypes.h:238
tCc Cc
Definition: AkMidiTypes.h:225
AkUInt64 uOffset
Frame offset (in samples) for MIDI event post.
Definition: AkMidiTypes.h:239

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise