00001 /******************************************************************************* 00002 The content of this file includes portions of the AUDIOKINETIC Wwise Technology 00003 released in source code form as part of the SDK installer package. 00004 00005 Commercial License Usage 00006 00007 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology 00008 may use this file in accordance with the end user license agreement provided 00009 with the software or, alternatively, in accordance with the terms contained in a 00010 written agreement between you and Audiokinetic Inc. 00011 00012 Apache License Usage 00013 00014 Alternatively, this file may be used under the Apache License, Version 2.0 (the 00015 "Apache License"); you may not use this file except in compliance with the 00016 Apache License. You may obtain a copy of the Apache License at 00017 http://www.apache.org/licenses/LICENSE-2.0. 00018 00019 Unless required by applicable law or agreed to in writing, software distributed 00020 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 00021 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for 00022 the specific language governing permissions and limitations under the License. 00023 00024 Version: <VERSION> Build: <BUILDNUMBER> 00025 Copyright (c) <COPYRIGHTYEAR> Audiokinetic Inc. 00026 *******************************************************************************/ 00027 00028 // AkMidiTypes.h 00029 00032 00033 #ifndef _AK_MIDI_TYPES_H_ 00034 #define _AK_MIDI_TYPES_H_ 00035 00036 // Include standard types 00037 #include <AK/SoundEngine/Common/AkTypes.h> 00038 00039 //----------------------------------------------------------------------------- 00040 // Types. 00041 //----------------------------------------------------------------------------- 00042 00043 typedef AkUInt8 AkMidiChannelNo; 00044 typedef AkUInt8 AkMidiNoteNo; 00045 00046 //----------------------------------------------------------------------------- 00047 // Constants. 00048 //----------------------------------------------------------------------------- 00049 00050 // Invalid values 00051 static const AkMidiChannelNo AK_INVALID_MIDI_CHANNEL = (AkMidiChannelNo)-1; 00052 static const AkMidiNoteNo AK_INVALID_MIDI_NOTE = (AkUInt8)-1; 00053 00054 // List of event types 00055 #define AK_MIDI_EVENT_TYPE_INVALID 0x00 00056 #define AK_MIDI_EVENT_TYPE_NOTE_OFF 0x80 00057 #define AK_MIDI_EVENT_TYPE_NOTE_ON 0x90 00058 #define AK_MIDI_EVENT_TYPE_NOTE_AFTERTOUCH 0xa0 00059 #define AK_MIDI_EVENT_TYPE_CONTROLLER 0xb0 00060 #define AK_MIDI_EVENT_TYPE_PROGRAM_CHANGE 0xc0 00061 #define AK_MIDI_EVENT_TYPE_CHANNEL_AFTERTOUCH 0xd0 00062 #define AK_MIDI_EVENT_TYPE_PITCH_BEND 0xe0 00063 #define AK_MIDI_EVENT_TYPE_SYSEX 0xf0 00064 #define AK_MIDI_EVENT_TYPE_ESCAPE 0xf7 00065 #define AK_MIDI_EVENT_TYPE_META 0xff 00066 00067 // List of Continuous Controller (cc) values 00068 #define AK_MIDI_CC_BANK_SELECT_COARSE 0 00069 #define AK_MIDI_CC_MOD_WHEEL_COARSE 1 00070 #define AK_MIDI_CC_BREATH_CTRL_COARSE 2 00071 #define AK_MIDI_CC_CTRL_3_COARSE 3 00072 #define AK_MIDI_CC_FOOT_PEDAL_COARSE 4 00073 #define AK_MIDI_CC_PORTAMENTO_COARSE 5 00074 #define AK_MIDI_CC_DATA_ENTRY_COARSE 6 00075 #define AK_MIDI_CC_VOLUME_COARSE 7 00076 #define AK_MIDI_CC_BALANCE_COARSE 8 00077 #define AK_MIDI_CC_CTRL_9_COARSE 9 00078 #define AK_MIDI_CC_PAN_POSITION_COARSE 10 00079 #define AK_MIDI_CC_EXPRESSION_COARSE 11 00080 #define AK_MIDI_CC_EFFECT_CTRL_1_COARSE 12 00081 #define AK_MIDI_CC_EFFECT_CTRL_2_COARSE 13 00082 #define AK_MIDI_CC_CTRL_14_COARSE 14 00083 #define AK_MIDI_CC_CTRL_15_COARSE 15 00084 #define AK_MIDI_CC_GEN_SLIDER_1 16 00085 #define AK_MIDI_CC_GEN_SLIDER_2 17 00086 #define AK_MIDI_CC_GEN_SLIDER_3 18 00087 #define AK_MIDI_CC_GEN_SLIDER_4 19 00088 #define AK_MIDI_CC_CTRL_20_COARSE 20 00089 #define AK_MIDI_CC_CTRL_21_COARSE 21 00090 #define AK_MIDI_CC_CTRL_22_COARSE 22 00091 #define AK_MIDI_CC_CTRL_23_COARSE 23 00092 #define AK_MIDI_CC_CTRL_24_COARSE 24 00093 #define AK_MIDI_CC_CTRL_25_COARSE 25 00094 #define AK_MIDI_CC_CTRL_26_COARSE 26 00095 #define AK_MIDI_CC_CTRL_27_COARSE 27 00096 #define AK_MIDI_CC_CTRL_28_COARSE 28 00097 #define AK_MIDI_CC_CTRL_29_COARSE 29 00098 #define AK_MIDI_CC_CTRL_30_COARSE 30 00099 #define AK_MIDI_CC_CTRL_31_COARSE 31 00100 #define AK_MIDI_CC_BANK_SELECT_FINE 32 00101 #define AK_MIDI_CC_MOD_WHEEL_FINE 33 00102 #define AK_MIDI_CC_BREATH_CTRL_FINE 34 00103 #define AK_MIDI_CC_CTRL_3_FINE 35 00104 #define AK_MIDI_CC_FOOT_PEDAL_FINE 36 00105 #define AK_MIDI_CC_PORTAMENTO_FINE 37 00106 #define AK_MIDI_CC_DATA_ENTRY_FINE 38 00107 #define AK_MIDI_CC_VOLUME_FINE 39 00108 #define AK_MIDI_CC_BALANCE_FINE 40 00109 #define AK_MIDI_CC_CTRL_9_FINE 41 00110 #define AK_MIDI_CC_PAN_POSITION_FINE 42 00111 #define AK_MIDI_CC_EXPRESSION_FINE 43 00112 #define AK_MIDI_CC_EFFECT_CTRL_1_FINE 44 00113 #define AK_MIDI_CC_EFFECT_CTRL_2_FINE 45 00114 #define AK_MIDI_CC_CTRL_14_FINE 46 00115 #define AK_MIDI_CC_CTRL_15_FINE 47 00116 00117 #define AK_MIDI_CC_CTRL_20_FINE 52 00118 #define AK_MIDI_CC_CTRL_21_FINE 53 00119 #define AK_MIDI_CC_CTRL_22_FINE 54 00120 #define AK_MIDI_CC_CTRL_23_FINE 55 00121 #define AK_MIDI_CC_CTRL_24_FINE 56 00122 #define AK_MIDI_CC_CTRL_25_FINE 57 00123 #define AK_MIDI_CC_CTRL_26_FINE 58 00124 #define AK_MIDI_CC_CTRL_27_FINE 59 00125 #define AK_MIDI_CC_CTRL_28_FINE 60 00126 #define AK_MIDI_CC_CTRL_29_FINE 61 00127 #define AK_MIDI_CC_CTRL_30_FINE 62 00128 #define AK_MIDI_CC_CTRL_31_FINE 63 00129 00130 #define AK_MIDI_CC_HOLD_PEDAL 64 00131 #define AK_MIDI_CC_PORTAMENTO_ON_OFF 65 00132 #define AK_MIDI_CC_SUSTENUTO_PEDAL 66 00133 #define AK_MIDI_CC_SOFT_PEDAL 67 00134 #define AK_MIDI_CC_LEGATO_PEDAL 68 00135 #define AK_MIDI_CC_HOLD_PEDAL_2 69 00136 00137 #define AK_MIDI_CC_SOUND_VARIATION 70 00138 #define AK_MIDI_CC_SOUND_TIMBRE 71 00139 #define AK_MIDI_CC_SOUND_RELEASE_TIME 72 00140 #define AK_MIDI_CC_SOUND_ATTACK_TIME 73 00141 #define AK_MIDI_CC_SOUND_BRIGHTNESS 74 00142 #define AK_MIDI_CC_SOUND_CTRL_6 75 00143 #define AK_MIDI_CC_SOUND_CTRL_7 76 00144 #define AK_MIDI_CC_SOUND_CTRL_8 77 00145 #define AK_MIDI_CC_SOUND_CTRL_9 78 00146 #define AK_MIDI_CC_SOUND_CTRL_10 79 00147 00148 #define AK_MIDI_CC_GENERAL_BUTTON_1 80 00149 #define AK_MIDI_CC_GENERAL_BUTTON_2 81 00150 #define AK_MIDI_CC_GENERAL_BUTTON_3 82 00151 #define AK_MIDI_CC_GENERAL_BUTTON_4 83 00152 00153 #define AK_MIDI_CC_REVERB_LEVEL 91 00154 #define AK_MIDI_CC_TREMOLO_LEVEL 92 00155 #define AK_MIDI_CC_CHORUS_LEVEL 93 00156 #define AK_MIDI_CC_CELESTE_LEVEL 94 00157 #define AK_MIDI_CC_PHASER_LEVEL 95 00158 #define AK_MIDI_CC_DATA_BUTTON_P1 96 00159 #define AK_MIDI_CC_DATA_BUTTON_M1 97 00160 00161 #define AK_MIDI_CC_NON_REGISTER_COARSE 98 00162 #define AK_MIDI_CC_NON_REGISTER_FINE 99 00163 00164 #define AK_MIDI_CC_ALL_SOUND_OFF 120 00165 #define AK_MIDI_CC_ALL_CONTROLLERS_OFF 121 00166 #define AK_MIDI_CC_LOCAL_KEYBOARD 122 00167 #define AK_MIDI_CC_ALL_NOTES_OFF 123 00168 #define AK_MIDI_CC_OMNI_MODE_OFF 124 00169 #define AK_MIDI_CC_OMNI_MODE_ON 125 00170 #define AK_MIDI_CC_OMNI_MONOPHONIC_ON 126 00171 #define AK_MIDI_CC_OMNI_POLYPHONIC_ON 127 00172 00173 //----------------------------------------------------------------------------- 00174 // Structs. 00175 //----------------------------------------------------------------------------- 00176 00177 struct AkMIDIEvent 00178 { 00179 AkUInt8 byType; // (Ak_MIDI_EVENT_TYPE_) 00180 AkMidiChannelNo byChan; 00181 00182 struct tGen 00183 { 00184 AkUInt8 byParam1; 00185 AkUInt8 byParam2; 00186 }; 00187 struct tNoteOnOff 00188 { 00189 AkMidiNoteNo byNote; 00190 AkUInt8 byVelocity; 00191 }; 00192 struct tCc 00193 { 00194 AkUInt8 byCc; 00195 AkUInt8 byValue; 00196 }; 00197 struct tPitchBend 00198 { 00199 AkUInt8 byValueLsb; 00200 AkUInt8 byValueMsb; 00201 }; 00202 struct tNoteAftertouch 00203 { 00204 AkUInt8 byNote; 00205 AkUInt8 byValue; 00206 }; 00207 struct tChanAftertouch 00208 { 00209 AkUInt8 byValue; 00210 }; 00211 struct tProgramChange 00212 { 00213 AkUInt8 byProgramNum; 00214 }; 00215 00216 union 00217 { 00218 tGen Gen; 00219 tCc Cc; 00220 tNoteOnOff NoteOnOff; 00221 tPitchBend PitchBend; 00222 tNoteAftertouch NoteAftertouch; 00223 tChanAftertouch ChanAftertouch; 00224 tProgramChange ProgramChange; 00225 }; 00226 }; 00227 00228 struct AkMIDIPost : public AkMIDIEvent 00229 { 00230 AkUInt32 uOffset; // Frame offset for MIDI event post 00231 }; 00232 00233 #endif //_AK_MIDI_TYPES_H_