版本
menu_open
link
Wwise SDK 2018.1.11
AkMidiTypes.h
浏览该文件的文档.
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: <VERSION> Build: <BUILDNUMBER>
25  Copyright (c) <COPYRIGHTYEAR> 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_META 0xff
66 
67 // List of Continuous Controller (cc) values
68 #define AK_MIDI_CC_BANK_SELECT_COARSE 0
69 #define AK_MIDI_CC_MOD_WHEEL_COARSE 1
70 #define AK_MIDI_CC_BREATH_CTRL_COARSE 2
71 #define AK_MIDI_CC_CTRL_3_COARSE 3
72 #define AK_MIDI_CC_FOOT_PEDAL_COARSE 4
73 #define AK_MIDI_CC_PORTAMENTO_COARSE 5
74 #define AK_MIDI_CC_DATA_ENTRY_COARSE 6
75 #define AK_MIDI_CC_VOLUME_COARSE 7
76 #define AK_MIDI_CC_BALANCE_COARSE 8
77 #define AK_MIDI_CC_CTRL_9_COARSE 9
78 #define AK_MIDI_CC_PAN_POSITION_COARSE 10
79 #define AK_MIDI_CC_EXPRESSION_COARSE 11
80 #define AK_MIDI_CC_EFFECT_CTRL_1_COARSE 12
81 #define AK_MIDI_CC_EFFECT_CTRL_2_COARSE 13
82 #define AK_MIDI_CC_CTRL_14_COARSE 14
83 #define AK_MIDI_CC_CTRL_15_COARSE 15
84 #define AK_MIDI_CC_GEN_SLIDER_1 16
85 #define AK_MIDI_CC_GEN_SLIDER_2 17
86 #define AK_MIDI_CC_GEN_SLIDER_3 18
87 #define AK_MIDI_CC_GEN_SLIDER_4 19
88 #define AK_MIDI_CC_CTRL_20_COARSE 20
89 #define AK_MIDI_CC_CTRL_21_COARSE 21
90 #define AK_MIDI_CC_CTRL_22_COARSE 22
91 #define AK_MIDI_CC_CTRL_23_COARSE 23
92 #define AK_MIDI_CC_CTRL_24_COARSE 24
93 #define AK_MIDI_CC_CTRL_25_COARSE 25
94 #define AK_MIDI_CC_CTRL_26_COARSE 26
95 #define AK_MIDI_CC_CTRL_27_COARSE 27
96 #define AK_MIDI_CC_CTRL_28_COARSE 28
97 #define AK_MIDI_CC_CTRL_29_COARSE 29
98 #define AK_MIDI_CC_CTRL_30_COARSE 30
99 #define AK_MIDI_CC_CTRL_31_COARSE 31
100 #define AK_MIDI_CC_BANK_SELECT_FINE 32
101 #define AK_MIDI_CC_MOD_WHEEL_FINE 33
102 #define AK_MIDI_CC_BREATH_CTRL_FINE 34
103 #define AK_MIDI_CC_CTRL_3_FINE 35
104 #define AK_MIDI_CC_FOOT_PEDAL_FINE 36
105 #define AK_MIDI_CC_PORTAMENTO_FINE 37
106 #define AK_MIDI_CC_DATA_ENTRY_FINE 38
107 #define AK_MIDI_CC_VOLUME_FINE 39
108 #define AK_MIDI_CC_BALANCE_FINE 40
109 #define AK_MIDI_CC_CTRL_9_FINE 41
110 #define AK_MIDI_CC_PAN_POSITION_FINE 42
111 #define AK_MIDI_CC_EXPRESSION_FINE 43
112 #define AK_MIDI_CC_EFFECT_CTRL_1_FINE 44
113 #define AK_MIDI_CC_EFFECT_CTRL_2_FINE 45
114 #define AK_MIDI_CC_CTRL_14_FINE 46
115 #define AK_MIDI_CC_CTRL_15_FINE 47
116 
117 #define AK_MIDI_CC_CTRL_20_FINE 52
118 #define AK_MIDI_CC_CTRL_21_FINE 53
119 #define AK_MIDI_CC_CTRL_22_FINE 54
120 #define AK_MIDI_CC_CTRL_23_FINE 55
121 #define AK_MIDI_CC_CTRL_24_FINE 56
122 #define AK_MIDI_CC_CTRL_25_FINE 57
123 #define AK_MIDI_CC_CTRL_26_FINE 58
124 #define AK_MIDI_CC_CTRL_27_FINE 59
125 #define AK_MIDI_CC_CTRL_28_FINE 60
126 #define AK_MIDI_CC_CTRL_29_FINE 61
127 #define AK_MIDI_CC_CTRL_30_FINE 62
128 #define AK_MIDI_CC_CTRL_31_FINE 63
129 
130 #define AK_MIDI_CC_HOLD_PEDAL 64
131 #define AK_MIDI_CC_PORTAMENTO_ON_OFF 65
132 #define AK_MIDI_CC_SUSTENUTO_PEDAL 66
133 #define AK_MIDI_CC_SOFT_PEDAL 67
134 #define AK_MIDI_CC_LEGATO_PEDAL 68
135 #define AK_MIDI_CC_HOLD_PEDAL_2 69
136 
137 #define AK_MIDI_CC_SOUND_VARIATION 70
138 #define AK_MIDI_CC_SOUND_TIMBRE 71
139 #define AK_MIDI_CC_SOUND_RELEASE_TIME 72
140 #define AK_MIDI_CC_SOUND_ATTACK_TIME 73
141 #define AK_MIDI_CC_SOUND_BRIGHTNESS 74
142 #define AK_MIDI_CC_SOUND_CTRL_6 75
143 #define AK_MIDI_CC_SOUND_CTRL_7 76
144 #define AK_MIDI_CC_SOUND_CTRL_8 77
145 #define AK_MIDI_CC_SOUND_CTRL_9 78
146 #define AK_MIDI_CC_SOUND_CTRL_10 79
147 
148 #define AK_MIDI_CC_GENERAL_BUTTON_1 80
149 #define AK_MIDI_CC_GENERAL_BUTTON_2 81
150 #define AK_MIDI_CC_GENERAL_BUTTON_3 82
151 #define AK_MIDI_CC_GENERAL_BUTTON_4 83
152 
153 #define AK_MIDI_CC_REVERB_LEVEL 91
154 #define AK_MIDI_CC_TREMOLO_LEVEL 92
155 #define AK_MIDI_CC_CHORUS_LEVEL 93
156 #define AK_MIDI_CC_CELESTE_LEVEL 94
157 #define AK_MIDI_CC_PHASER_LEVEL 95
158 #define AK_MIDI_CC_DATA_BUTTON_P1 96
159 #define AK_MIDI_CC_DATA_BUTTON_M1 97
160 
161 #define AK_MIDI_CC_NON_REGISTER_COARSE 98
162 #define AK_MIDI_CC_NON_REGISTER_FINE 99
163 
164 #define AK_MIDI_CC_ALL_SOUND_OFF 120
165 #define AK_MIDI_CC_ALL_CONTROLLERS_OFF 121
166 #define AK_MIDI_CC_LOCAL_KEYBOARD 122
167 #define AK_MIDI_CC_ALL_NOTES_OFF 123
168 #define AK_MIDI_CC_OMNI_MODE_OFF 124
169 #define AK_MIDI_CC_OMNI_MODE_ON 125
170 #define AK_MIDI_CC_OMNI_MONOPHONIC_ON 126
171 #define AK_MIDI_CC_OMNI_POLYPHONIC_ON 127
172 
173 //-----------------------------------------------------------------------------
174 // Structs.
175 //-----------------------------------------------------------------------------
176 
177 struct AkMIDIEvent
178 {
179  AkUInt8 byType; // (Ak_MIDI_EVENT_TYPE_)
181 
182  struct tGen
183  {
186  };
187  struct tNoteOnOff
188  {
191  };
192  struct tCc
193  {
196  };
197  struct tPitchBend
198  {
201  };
203  {
206  };
208  {
210  };
212  {
214  };
215 
216  union
217  {
225  };
226 };
227 
228 struct AkMIDIPost : public AkMIDIEvent
229 {
230  AkUInt32 uOffset; // Frame offset for MIDI event post
231 };
232 
233 #endif //_AK_MIDI_TYPES_H_
AkUInt32 uOffset
Definition: AkMidiTypes.h:230
uint8_t AkUInt8
Unsigned 8-bit integer
Definition: AkTypes.h:77
tChanAftertouch ChanAftertouch
Definition: AkMidiTypes.h:223
AkMidiNoteNo byNote
Definition: AkMidiTypes.h:189
static const AkMidiChannelNo AK_INVALID_MIDI_CHANNEL
Not a valid midi channel
Definition: AkMidiTypes.h:51
tPitchBend PitchBend
Definition: AkMidiTypes.h:221
AkUInt8 AkMidiNoteNo
MIDI note number.
Definition: AkMidiTypes.h:44
AkUInt8 AkMidiChannelNo
MIDI channel number, usually 0-15.
Definition: AkMidiTypes.h:43
tNoteOnOff NoteOnOff
Definition: AkMidiTypes.h:220
Definition: AkMidiTypes.h:228
AkUInt8 byCc
Definition: AkMidiTypes.h:194
tProgramChange ProgramChange
Definition: AkMidiTypes.h:224
AkUInt8 byType
Definition: AkMidiTypes.h:179
AkMidiChannelNo byChan
Definition: AkMidiTypes.h:180
uint32_t AkUInt32
Unsigned 32-bit integer
Definition: AkTypes.h:79
tGen Gen
Definition: AkMidiTypes.h:218
tNoteAftertouch NoteAftertouch
Definition: AkMidiTypes.h:222
AkUInt8 byParam2
Definition: AkMidiTypes.h:185
static const AkMidiNoteNo AK_INVALID_MIDI_NOTE
Not a valid midi note
Definition: AkMidiTypes.h:52
tCc Cc
Definition: AkMidiTypes.h:219
AkUInt8 byValue
Definition: AkMidiTypes.h:195
AkUInt8 byParam1
Definition: AkMidiTypes.h:184

此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅