00001 #ifndef ICUBEXCODES_H 00002 #define ICUBEXCODES_H 00003 //This file contains the definitions of the commnads that the microdig device can 00004 //understand, and the messages it may send as response 00005 // general commands 00006 #define RESET 0x22 00007 #define SYS_RESET 0xFF 00008 #define MUTE 0x20 00009 #define SET_MUTE 0x32 00010 // 0xxxxxxx xxxxxxx = 0 all sensor inputs unmuted 00011 // 0xxxxxxx xxxxxxx = [1..127] all sensor inputs muted 00012 #define DUMP_VERSION 0x47 00013 #define DUMP_MODE 0x5B 00014 #define SET_MODE 0x5A 00015 #define SET_ID 0x5C 00016 // 0xxxxxxx xxxxxxx = [0..127] new system exclusive dev ID 00017 #define MIDI_THRU 0x5D 00018 // 0xxxxxxx xxxxxxx = 0 MIDI Thru off 00019 // 0xxxxxxx xxxxxxx = 1 MIDI Thru on 00020 #define MIDI_RUNNING_STATUS 0x5E // Ox00 off 0x01 on 00021 00022 // mDig General Messages 00023 #define RESET_ACK 0x23 00024 #define STATUS 0x25 // this message denotes a communication error 00025 // 0x5A configuration setting error 00026 // 0x5C MIDI protocol error (a data byte is > 127) 00027 // 0x5E MIDI byte has been scrambled 00028 // 0x5F receive buffer is full, data may be lost 00029 //too much data is being sent too fast to the mDig 00030 #define VERSION 0x47 00031 // 0xxxxxxx xxxxxxx = [0..127]; firmware version nr. * 10 00032 // 0aaaaaaa aaaaaaa = [0..99] ; hardware board version nr * 10 00033 // 0bbbbbbb bbbbbbb = [0..99] ; hardware board version decimals * 1000 00034 // 0ccccccc ccccccc = [0..99] ; 1st serial nr digits 00035 // 0ddddddd ddddddd = [0..99] ; 2nd serial nr digits 00036 #define MODE 0x5B // 0x00 hostmode 0x01 stand-alone mode 00037 #define MDIG_ID 0x5C 00038 // 0xxxxxxx xxxxxxx = [0..127] new system exclusive dev ID 00039 00040 // Stand-Alone mode commands 00041 #define STREAM 0x01 00042 // 0x000yyy x = 1 on 00043 // x = 0 off 00044 // yyy = [0...7] sensor input number 00045 #define INTERVAL 0x03 //2 bytes [BODY] 00046 // 0xxxxxxx xxxxxxx = [0..127]; sample interval MSB 00047 // 0aaaaaaa aaaaaaa = [0..99] ; sample interval LSB 00048 // where sampling interval = xxxxxxx * 128 + yyyyyyy 00049 #define EDIT_NAME 0x64 00050 // 00000001 1 = configuration number 00051 // 0aaaaaaa aaaaaaa = [0..127] ; 1st character, default = "m" (0x6D) 00052 // 0bbbbbbb bbbbbbb = [0..127] ; 2nd character, default = "i" (0x69) 00053 // 0ccccccc ccccccc = [0..127] ; 3rd character, default = "n" (0x6E) 00054 // 0ddddddd ddddddd = [0..127] ; 4th character, default = "i" (0x69) 00055 // 0eeeeeee eeeeeee = [0..127] ; 5th character, default = "D" (0x44) 00056 // 0fffffff fffffff = [0..127] ; 6th character, default = "i" (0x69) 00057 // 0ggggggg ggggggg = [0..127] ; 7th character, default = "g" (0x67) 00058 // 0hhhhhhh hhhhhhh = [0..127] ; 8th character, default = "" (0x20) 00059 #define DUMP_NAME 0x65 00060 // 00000001 1 = configuration number 00061 #define CLEAR_CONFIG 0x69 00062 // 00000001 1 = configuration number 00063 #define EDIT_CONFIG 0x6A 00064 // 00000001 1 = configuration number 00065 // 00000aaa aaa = [0..7] ; sensor input number 00066 // 0bbbcccc bbb = [0..6] ; MIDI mapping type 00067 // 0 = note-off, 1= note-on, 2=key-pressure, 3=control-change, 00068 // 4 = program-change, 5=after-touch, 6=pitch-bend 00069 // cccc = [0..15] = MIDI channel 00070 // 0ddddddd ddddddd = [0..127] ; note number (mapping type 0..2) 00071 // controller number (mapping type 3), irrelevant (mapping type 4..6) 00072 // 00efghij efghij = [0..127] ; determine signal processing 00073 // (see manual for combining) 00074 // e = [0,1] impulse end notification (0 = off, 1 = on) 00075 // f = [0,1] impulse maximum/minimum constant (0=off, 1=on) 00076 // g = [0,1] continuos and/or impulse signal differentiation(0=off, 1=on) 00077 // h = [0,1] continuous signal averaging (0=off, 1=on) 00078 // i = [0,1] impulse signal analysis (0=off, 1=on) 00079 // j = [0,1] continuous signal analysis (0=off, 1=on) 00080 // 0kkkkkkk kkkkkkk = [0..127] ; sensor input threshold 00081 // 0mmmmmmm mmmmmmm = [0..127] ; sensor input ceiling 00082 // 0nnnnnnn nnnnnnn = [0..127] ; noise gate 00083 // 0pppqqqq ppp = [0..7] ; represents constant value activated with {f} 00084 // qqqq = [0..15] ; time window 00085 #define DUMP_CONFIG 0x6B 00086 // 00000001 1 = configuration number 00087 // 00000aaa aaa = [0..7] ; sensor input number 00088 00089 // Stand-Alone Transmitted Messages 00090 #define NAME 0x65 00091 // 00000001 1 = configuration number 00092 // 0aaaaaaa aaaaaaa = [0..127] ; 1st character, default = "m" (0x6D) 00093 // 0bbbbbbb bbbbbbb = [0..127] ; 2nd character, default = "i" (0x69) 00094 // 0ccccccc ccccccc = [0..127] ; 3rd character, default = "n" (0x6E) 00095 // 0ddddddd ddddddd = [0..127] ; 4th character, default = "i" (0x69) 00096 // 0eeeeeee eeeeeee = [0..127] ; 5th character, default = "D" (0x44) 00097 // 0fffffff fffffff = [0..127] ; 6th character, default = "i" (0x69) 00098 // 0ggggggg ggggggg = [0..127] ; 7th character, default = "g" (0x67) 00099 // 0hhhhhhh hhhhhhh = [0..127] ; 8th character, default = "" (0x20) 00100 #define CONFIG 0x6A 00101 // 00000001 1 = configuration number 00102 // 00000aaa aaa = [0..7] ; sensor input number 00103 // 0bbbcccc bbb = [0..6] ; MIDI mapping type 00104 // 0 = note-off, 1= note-on, 2=key-pressure, 3=control-change, 00105 // 4 = program-change, 5=after-touch, 6=pitch-bend 00106 // cccc = [0..15] = MIDI channel 00107 // 0ddddddd ddddddd = [0..127] ; note number (mapping type 0..2) 00108 // controller number (mapping type 3), irrelevant (mapping type 4..6) 00109 // 00efghij efghij = [0..127] ; determine signal processing 00110 // (see manual for combining) 00111 // e = [0,1] impulse end notification (0 = off, 1 = on) 00112 // f = [0,1] impulse maximum/minimum constant (0=off, 1=on) 00113 // g = [0,1] continuos and/or impulse signal differentiation(0=off, 1=on) 00114 // h = [0,1] continuous signal averaging (0=off, 1=on) 00115 // i = [0,1] impulse signal analysis (0=off, 1=on) 00116 // j = [0,1] continuous signal analysis (0=off, 1=on) 00117 // 0kkkkkkk kkkkkkk = [0..127] ; sensor input threshold 00118 // 0mmmmmmm mmmmmmm = [0..127] ; sensor input ceiling 00119 // 0nnnnnnn nnnnnnn = [0..127] ; noise gate 00120 // 0pppqqqq ppp = [0..7] ; represents constant value activated with {f} 00121 // qqqq = [0..15] ; time window 00122 00123 // Host mode commands 00124 // STREAM is already defined 00125 // 0x000yyy x = 1 on 00126 // x = 0 off 00127 // yyy = [0...7] sensor input number 00128 00129 #define RES 0x02 00130 // 0x000yyy x = 1 ; hi-res 00131 // x = 0 ; lo-res 00132 // yyy = [0...7] sensor input number 00133 // INTERVAL is already defined 00134 // 0xxxxxxx xxxxxxx = [0..127]; sample interval MSB 00135 // 0aaaaaaa aaaaaaa = [0..99] ; sample interval LSB 00136 // where sampling interval = xxxxxxx * 128 + yyyyyyy 00137 #define SAMPLE 0x04 00138 // 00000yyy yyy = [0...7] sensor input number 00139 #define POWER_LEVEL 0x6F 00140 #define I2C_PORT_SET 0x7D 00141 #define I2C_WRITE 0x7E 00142 // 0aaaaaaa aaaaaaa = [0..127] ; I2C address of device 00143 // 0000bbbb 00144 // 0000cccc bbbbcccc = [0..255] ; register number of device 00145 // 0000dddd 00146 // 0000eeee ddddeeee = [0..255] ; data to write 00147 #define I2C_READ 0x7F 00148 // 0aaaaaaa aaaaaaa = [0..127] ; I2C address of device 00149 // 0000bbbb 00150 // 0000cccc bbbbcccc = [0..255] ; register number of device 00151 // 0ddddddd ddddddd = [0..127] ; number of bytes to read 00152 // Host mode transmitted messages 00153 #define STREAM_DATA 0x00 00154 // 0yyyyyyy: 7 bit lo-res mode 00155 // or 00156 // 0yyyyyyy, 00000zzz 10-bit hi-res mode 00157 #define SAMPLE_DATA 0x04 00158 // 00000xxx, 0yyyyyyy: 7 bit lo-res mode 00159 // or 00160 // 00000xxx, 0yyyyyyy, 00000zzz 10-bit hi-res mode 00161 // xxx = [0..7] sensor input number 00162 // yyyyyyy= [0..127] the most significant bits 00163 // zzz = least significant bits if in hi-res 00164 #define I2C_PORT 0x7D 00165 // 0xxxxxxx xxxxxxx = 0 (0x00) to 6 (0x06) defines an opened port 00166 // xxxxxxx = 127 (0xFF) defines no opened port 00167 // I2C_WRITE is already defined 00168 // I2C_READ is already defined 00169 #endif // ICUBEXCODES_H
1.4.6