This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
speakjet_definition_list [2006/06/08 00:13] audiocommander minor fixes |
speakjet_definition_list [2006/12/05 14:28] (current) audiocommander updated to latest version and removed dev-nfo |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== SCP and MSA #defines for the SpeakJet ====== | ====== SCP and MSA #defines for the SpeakJet ====== | ||
- | This file can be used for your C-based MBHP_IIC_SpeakJet Project: | + | \\ |
- | + | ||
- | Feel free to edit and add defines! | + | |
- | + | ||
<code c> | <code c> | ||
/* | /* | ||
Line 15: | Line 11: | ||
* and ASM-Version of Doug Elliott, VA3DAE | * and ASM-Version of Doug Elliott, VA3DAE | ||
* | * | ||
- | * Released under CreativeCommons 2.5 by-nc-sa | + | * Copyright 2006 Michael Markert, http://www.audiocommander.de |
- | * http://creativecommons.org/licenses/by-nc-sa/2.5/ | + | |
* | * | ||
+ | */ | ||
+ | |||
+ | /* | ||
+ | * Released under GNU General Public License | ||
+ | * http://www.gnu.org/licenses/gpl.html | ||
+ | * | ||
+ | * This program is free software; you can redistribute it and/or modify it under the terms | ||
+ | * of the GNU General Public License as published by the Free Software Foundation | ||
+ | * | ||
+ | * YOU ARE ALLOWED TO COPY AND CHANGE | ||
+ | * BUT YOU MUST RELEASE THE SOURCE TOO (UNDER GNU GPL) IF YOU RELEASE YOUR PRODUCT | ||
+ | * YOU ARE NOT ALLOWED NOT USE IT WITHIN PROPRIETARY CLOSED-SOURCE PROJECTS | ||
*/ | */ | ||
Line 23: | Line 30: | ||
#ifndef _IIC_SPEAKJETDEFINES_H | #ifndef _IIC_SPEAKJETDEFINES_H | ||
#define _IIC_SPEAKJETDEFINES_H | #define _IIC_SPEAKJETDEFINES_H | ||
- | |||
Line 35: | Line 41: | ||
// escape character ('\\') 0x5C to enter SCP Mode | // escape character ('\\') 0x5C to enter SCP Mode | ||
- | #define SCP_ESCAPE 0x5C | + | #define SCP_ESCAPE '\\' |
- | #define SCP_SEL0 0 | + | #define SCP_SEL0 '0' |
- | #define SCP_SEL1 1 | + | #define SCP_SEL1 '1' |
- | #define SCP_SEL2 2 | + | #define SCP_SEL2 '2' |
- | #define SCP_SEL3 3 | + | #define SCP_SEL3 '3' |
- | #define SCP_SEL4 4 | + | #define SCP_SEL4 '4' |
- | #define SCP_SEL5 5 | + | #define SCP_SEL5 '5' |
- | #define SCP_SEL6 6 | + | #define SCP_SEL6 '6' |
- | #define SCP_SEL7 7 | + | #define SCP_SEL7 '7' |
- | #define SCP_EXIT X | + | #define SCP_EXIT 'X' |
+ | |||
+ | #define SCP_READY 'V' | ||
+ | #define SCP_CLEAR_BUFFER 'R' | ||
+ | #define SCP_START 'T' | ||
+ | #define SCP_STOP 'S' | ||
+ | |||
+ | #define SCP_MEMTYPE 'H' | ||
+ | #define SCP_MEMADDR 'J' | ||
+ | #define SCP_MEMWRT 'N' | ||
+ | |||
+ | #define SCP_RESET 'W' | ||
+ | |||
+ | |||
+ | // ********* SPEAKJET SCP REGISTERS **** // | ||
+ | // SCP Registers & MAX Values | ||
+ | #ifdef _DEBUG_C | ||
+ | #pragma mark - | ||
+ | #pragma mark SCP REGISTERS & MAX VALUES | ||
+ | #endif | ||
+ | |||
+ | // == SCP_MEMTYPE (H) == | ||
+ | #define SCP_MEMTYPE_REGISTER '0' | ||
+ | #define SCP_MEMTYPE_EEPROM_H '3' | ||
+ | #define SCP_MEMTYPE_EEPROM_L '2' | ||
+ | |||
+ | // == SCP_MEMADDR (J) == | ||
+ | // Envelope | ||
+ | #define SCP_ENV_FREQ '0' | ||
+ | #define SCP_ENV_CTRL '8' | ||
+ | // Oscillator Frequency Register (not used, calculated) | ||
+ | #define SCP_OSC1_FREQ '1' | ||
+ | #define SCP_OSC2_FREQ '2' | ||
+ | #define SCP_OSC3_FREQ '3' | ||
+ | #define SCP_OSC4_FREQ '4' | ||
+ | #define SCP_OSC5_FREQ '5' | ||
+ | // Oscillator Level Register (not used, calculated) | ||
+ | #define SCP_OSC1_LEVEL 11 | ||
+ | #define SCP_OSC2_LEVEL 12 | ||
+ | #define SCP_OSC3_LEVEL 13 | ||
+ | #define SCP_OSC4_LEVEL 14 | ||
+ | #define SCP_OSC5_LEVEL 15 | ||
+ | // Distortion | ||
+ | #define SCP_DISTORTION '6' | ||
+ | // Master | ||
+ | #define SCP_MASTER_VOLUME '7' | ||
+ | |||
+ | // == SCP_MEMWRT (N) == | ||
+ | // ENVType (send ENVType + ENVState!) | ||
+ | #define SCP_ENV_SAW '2' | ||
+ | #define SCP_ENV_SINE '3' | ||
+ | #define SCP_ENV_TRIANGLE '4' | ||
+ | #define SCP_ENV_SQUARE '5' | ||
+ | // ENVState (send ENVType + ENVState!) | ||
+ | #define SCP_ENV_OSC123 0x40 | ||
+ | #define SCP_ENV_OSC45 0x80 | ||
+ | // Default values | ||
+ | #define SCP_FREQ_DEFAULT 440 | ||
+ | #define SCP_LEVEL_DEFAULT 20 // 63 MAX for Mixer 1: OSC 1, 2 & 3 | ||
+ | // Maximum accepted values | ||
+ | #define SCP_FREQ_MAX 3999 | ||
+ | #define SCP_LEVEL_MAX 31 | ||
+ | #define SCP_DISTORTION_MAX 255 | ||
+ | #define SCP_MASTER_VOLUME_MAX 255 | ||
+ | |||
+ | |||
- | #define SCP_READY V | ||
- | #define SCP_CLEAR_BUFFER R | ||
- | #define SCP_START T | ||
- | #define SCP_STOP S | ||
- | #define SCP_MEMTYPE H | ||
- | #define SCP_MEMADDR J | ||
- | #define SCP_MEMWRT N | ||
- | #define SCP_RESET W | ||
Line 68: | Line 132: | ||
// 0 - 31 CONTROL CODES | // 0 - 31 CONTROL CODES | ||
- | #define SJ_PAUSE0 0 | + | #define MSA_PAUSE0 0 // 0ms |
- | #define SJ_PAUSE1 1 | + | #define MSA_PAUSE1 1 // 100ms |
- | #define SJ_PAUSE2 2 | + | #define MSA_PAUSE2 2 // 200ms |
- | #define SJ_PAUSE3 3 | + | #define MSA_PAUSE3 3 // 700ms |
- | #define SJ_PAUSE4 4 | + | #define MSA_PAUSE4 4 // 30ms |
- | #define SJ_PAUSE5 5 | + | #define MSA_PAUSE5 5 // 60ms |
- | #define SJ_PAUSE6 6 | + | #define MSA_PAUSE6 6 // 90ms |
- | #define SJ_NEXTFAST 7 | + | #define MSA_NEXTFAST 7 |
- | #define SJ_NEXTSLOW 8 | + | #define MSA_NEXTSLOW 8 |
- | #define SJ_NEXTHIGH 14 | + | #define MSA_NEXTHIGH 14 |
- | #define SJ_NEXTLOW 15 | + | #define MSA_NEXTLOW 15 |
- | #define SJ_WAIT 16 | + | #define MSA_WAIT 16 |
- | #define SJ_VOLUME 20 | + | #define MSA_VOLUME 20 |
- | #define SJ_SPEED 21 | + | #define MSA_SPEED 21 |
- | #define SJ_PITCH 22 | + | #define MSA_PITCH 22 |
- | #define SJ_BEND 23 | + | #define MSA_BEND 23 |
- | #define SJ_PORTCTR 24 | + | #define MSA_PORTCTR 24 |
- | #define SJ_PORT 25 | + | #define MSA_PORT 25 |
- | #define SJ_REPEAT 26 | + | #define MSA_REPEAT 26 |
- | #define SJ_CALLPHRASE 28 | + | #define MSA_CALLPHRASE 28 |
- | #define SJ_GOTOPHRASE 29 | + | #define MSA_GOTOPHRASE 29 |
- | #define SJ_DELAY 30 | + | #define MSA_DELAY 30 |
- | #define SJ_RESET 31 | + | #define MSA_RESET 31 |
// 32 - 127 (Reserved) | // 32 - 127 (Reserved) | ||
Line 110: | Line 174: | ||
// MSA Sound Codes: Phonemes | // MSA Sound Codes: Phonemes | ||
- | #define SJP_IY 128 | + | #define MSAPH_IY 128 |
- | #define SJP_IH 129 | + | #define MSAPH_IH 129 |
- | #define SJP_EY 130 | + | #define MSAPH_EY 130 |
- | #define SJP_EH 131 | + | #define MSAPH_EH 131 |
- | #define SJP_AY 132 | + | #define MSAPH_AY 132 |
- | #define SJP_AX 133 | + | #define MSAPH_AX 133 |
- | #define SJP_UX 134 | + | #define MSAPH_UX 134 |
- | #define SJP_OH 135 | + | #define MSAPH_OH 135 |
- | #define SJP_AW 136 | + | #define MSAPH_AW 136 |
- | #define SJP_OW 137 | + | #define MSAPH_OW 137 |
- | #define SJP_UH 138 | + | #define MSAPH_UH 138 |
- | #define SJP_UW 139 | + | #define MSAPH_UW 139 |
- | #define SJP_MM 140 | + | #define MSAPH_MM 140 |
- | #define SJP_NE 141 | + | #define MSAPH_NE 141 |
- | #define SJP_NO 142 | + | #define MSAPH_NO 142 |
- | #define SJP_NGE 143 | + | #define MSAPH_NGE 143 |
- | #define SJP_NGO 144 | + | #define MSAPH_NGO 144 |
- | #define SJP_LE 145 | + | #define MSAPH_LE 145 |
- | #define SJP_LO 146 | + | #define MSAPH_LO 146 |
- | #define SJP_WW 147 | + | #define MSAPH_WW 147 |
- | #define SJP_RR 148 | + | #define MSAPH_RR 148 |
- | #define SJP_IYRR 149 | + | #define MSAPH_IYRR 149 |
- | #define SJP_EYRR 150 | + | #define MSAPH_EYRR 150 |
- | #define SJP_AXRR 151 | + | #define MSAPH_AXRR 151 |
- | #define SJP_AWRR 152 | + | #define MSAPH_AWRR 152 |
- | #define SJP_OWRR 153 | + | #define MSAPH_OWRR 153 |
- | #define SJP_EYIY 154 | + | #define MSAPH_EYIY 154 |
- | #define SJP_OHIY 155 | + | #define MSAPH_OHIY 155 |
- | #define SJP_OWIY 156 | + | #define MSAPH_OWIY 156 |
- | #define SJP_OHIH 157 | + | #define MSAPH_OHIH 157 |
- | #define SJP_IYEH 158 | + | #define MSAPH_IYEH 158 |
- | #define SJP_EHLL 159 | + | #define MSAPH_EHLL 159 |
- | #define SJP_IYUW 160 | + | #define MSAPH_IYUW 160 |
- | #define SJP_AXUW 161 | + | #define MSAPH_AXUW 161 |
- | #define SJP_IHWW 162 | + | #define MSAPH_IHWW 162 |
- | #define SJP_AYWW 163 | + | #define MSAPH_AYWW 163 |
- | #define SJP_OWWW 164 | + | #define MSAPH_OWWW 164 |
- | #define SJP_JH 165 | + | #define MSAPH_JH 165 |
- | #define SJP_VV 166 | + | #define MSAPH_VV 166 |
- | #define SJP_ZZ 167 | + | #define MSAPH_ZZ 167 |
- | #define SJP_ZH 168 | + | #define MSAPH_ZH 168 |
- | #define SJP_DH 169 | + | #define MSAPH_DH 169 |
- | #define SJP_BE 170 | + | #define MSAPH_BE 170 |
- | #define SJP_BO 171 | + | #define MSAPH_BO 171 |
- | #define SJP_EB 172 | + | #define MSAPH_EB 172 |
- | #define SJP_OB 173 | + | #define MSAPH_OB 173 |
- | #define SJP_DE 174 | + | #define MSAPH_DE 174 |
- | #define SJP_DO 175 | + | #define MSAPH_DO 175 |
- | #define SJP_ED 176 | + | #define MSAPH_ED 176 |
- | #define SJP_OD 177 | + | #define MSAPH_OD 177 |
- | #define SJP_GE 178 | + | #define MSAPH_GE 178 |
- | #define SJP_GO 179 | + | #define MSAPH_GO 179 |
- | #define SJP_EG 180 | + | #define MSAPH_EG 180 |
- | #define SJP_OG 181 | + | #define MSAPH_OG 181 |
- | #define SJP_CH 182 | + | #define MSAPH_CH 182 |
- | #define SJP_HE 183 | + | #define MSAPH_HE 183 |
- | #define SJP_HO 184 | + | #define MSAPH_HO 184 |
- | #define SJP_WH 185 | + | #define MSAPH_WH 185 |
- | #define SJP_FF 186 | + | #define MSAPH_FF 186 |
- | #define SJP_SE 187 | + | #define MSAPH_SE 187 |
- | #define SJP_SO 188 | + | #define MSAPH_SO 188 |
- | #define SJP_SH 189 | + | #define MSAPH_SH 189 |
- | #define SJP_TH 190 | + | #define MSAPH_TH 190 |
- | #define SJP_TT 191 | + | #define MSAPH_TT 191 |
- | #define SJP_TU 192 | + | #define MSAPH_TU 192 |
- | #define SJP_TS 193 | + | #define MSAPH_TS 193 |
- | #define SJP_KE 194 | + | #define MSAPH_KE 194 |
- | #define SJP_KO 195 | + | #define MSAPH_KO 195 |
- | #define SJP_EK 196 | + | #define MSAPH_EK 196 |
- | #define SJP_OK 197 | + | #define MSAPH_OK 197 |
- | #define SJP_PE 198 | + | #define MSAPH_PE 198 |
- | #define SJP_PO 199 | + | #define MSAPH_PO 199 |
// MSA Sound Codes: Robot | // MSA Sound Codes: Robot | ||
- | #define SJP_ROBOT_0 200 | + | #define MSAFX_ROBOT_0 200 |
- | #define SJP_ROBOT_1 201 | + | #define MSAFX_ROBOT_1 201 |
- | #define SJP_ROBOT_2 202 | + | #define MSAFX_ROBOT_2 202 |
- | #define SJP_ROBOT_3 203 | + | #define MSAFX_ROBOT_3 203 |
- | #define SJP_ROBOT_4 204 | + | #define MSAFX_ROBOT_4 204 |
- | #define SJP_ROBOT_5 205 | + | #define MSAFX_ROBOT_5 205 |
- | #define SJP_ROBOT_6 206 | + | #define MSAFX_ROBOT_6 206 |
- | #define SJP_ROBOT_7 207 | + | #define MSAFX_ROBOT_7 207 |
- | #define SJP_ROBOT_8 208 | + | #define MSAFX_ROBOT_8 208 |
- | #define SJP_ROBOT_9 209 | + | #define MSAFX_ROBOT_9 209 |
// MSA Sound Codes: Alarms | // MSA Sound Codes: Alarms | ||
- | #define SJP_ALARM_0 210 | + | #define MSAFX_ALARM_0 210 |
- | #define SJP_ALARM_1 211 | + | #define MSAFX_ALARM_1 211 |
- | #define SJP_ALARM_2 212 | + | #define MSAFX_ALARM_2 212 |
- | #define SJP_ALARM_3 213 | + | #define MSAFX_ALARM_3 213 |
- | #define SJP_ALARM_4 214 | + | #define MSAFX_ALARM_4 214 |
- | #define SJP_ALARM_5 215 | + | #define MSAFX_ALARM_5 215 |
- | #define SJP_ALARM_6 216 | + | #define MSAFX_ALARM_6 216 |
- | #define SJP_ALARM_7 217 | + | #define MSAFX_ALARM_7 217 |
- | #define SJP_ALARM_8 218 | + | #define MSAFX_ALARM_8 218 |
- | #define SJP_ALARM_9 219 | + | #define MSAFX_ALARM_9 219 |
// MSA Sound Codes: Beeps | // MSA Sound Codes: Beeps | ||
- | #define SJP_BEEP_0 220 | + | #define MSAFX_BEEP_0 220 |
- | #define SJP_BEEP_1 221 | + | #define MSAFX_BEEP_1 221 |
- | #define SJP_BEEP_2 222 | + | #define MSAFX_BEEP_2 222 |
- | #define SJP_BEEP_3 223 | + | #define MSAFX_BEEP_3 223 |
- | #define SJP_BEEP_4 224 | + | #define MSAFX_BEEP_4 224 |
- | #define SJP_BEEP_5 225 | + | #define MSAFX_BEEP_5 225 |
- | #define SJP_BEEP_6 226 | + | #define MSAFX_BEEP_6 226 |
- | #define SJP_BEEP_7 227 | + | #define MSAFX_BEEP_7 227 |
- | #define SJP_BEEP_8 228 | + | #define MSAFX_BEEP_8 228 |
- | #define SJP_BEEP_9 229 | + | #define MSAFX_BEEP_9 229 |
// MSA Sound Codes: Biological | // MSA Sound Codes: Biological | ||
- | #define SJP_BIO_0 230 | + | #define MSAFX_BIO_0 230 |
- | #define SJP_BIO_1 231 | + | #define MSAFX_BIO_1 231 |
- | #define SJP_BIO_2 232 | + | #define MSAFX_BIO_2 232 |
- | #define SJP_BIO_3 233 | + | #define MSAFX_BIO_3 233 |
- | #define SJP_BIO_4 234 | + | #define MSAFX_BIO_4 234 |
- | #define SJP_BIO_5 235 | + | #define MSAFX_BIO_5 235 |
- | #define SJP_BIO_6 236 | + | #define MSAFX_BIO_6 236 |
- | #define SJP_BIO_7 237 | + | #define MSAFX_BIO_7 237 |
- | #define SJP_BIO_8 238 | + | #define MSAFX_BIO_8 238 |
- | #define SJP_BIO_9 239 | + | #define MSAFX_BIO_9 239 |
// MSA Sound Codes: DTMF | // MSA Sound Codes: DTMF | ||
- | #define SJP_DTMF_0 240 | + | #define MSAFX_DTMF_0 240 |
- | #define SJP_DTMF_1 241 | + | #define MSAFX_DTMF_1 241 |
- | #define SJP_DTMF_2 242 | + | #define MSAFX_DTMF_2 242 |
- | #define SJP_DTMF_3 243 | + | #define MSAFX_DTMF_3 243 |
- | #define SJP_DTMF_4 244 | + | #define MSAFX_DTMF_4 244 |
- | #define SJP_DTMF_5 245 | + | #define MSAFX_DTMF_5 245 |
- | #define SJP_DTMF_6 246 | + | #define MSAFX_DTMF_6 246 |
- | #define SJP_DTMF_7 247 | + | #define MSAFX_DTMF_7 247 |
- | #define SJP_DTMF_8 248 | + | #define MSAFX_DTMF_8 248 |
- | #define SJP_DTMF_9 249 | + | #define MSAFX_DTMF_9 249 |
- | #define SJP_DTMF_S 250 | + | #define MSAFX_DTMF_S 250 |
- | #define SJP_DTMF_R 251 | + | #define MSAFX_DTMF_R 251 |
// MSA Sound Codes: Misc | // MSA Sound Codes: Misc | ||
- | #define SJP_SONAR_PING 252 | + | #define MSAFX_SONAR_PING 252 |
- | #define SJP_PISTOLSHOT 253 | + | #define MSAFX_PISTOLSHOT 253 |
- | #define SJP_WOW 254 | + | #define MSAFX_WOW 254 |
// 255: End of Phrase | // 255: End of Phrase | ||
Line 255: | Line 319: | ||
#endif | #endif | ||
- | #define SJ_EOP 255 | + | #define MSA_EOP 255 |
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | // <<--- Application related defines --->> | ||
+ | |||
+ | // SCP ControlTypes | ||
+ | // realtime announces single SCP messages like "Clear Buffer" | ||
+ | // register is used for 3-part-msgs: select register, select memtype and write value | ||
+ | #define SCP_CTRLTYPE_REALTIME 0x0 | ||
+ | #define SCP_CTRLTYPE_REGISTER 0x1 | ||
+ | |||
+ | // Articulation ControlTypes | ||
+ | #define ARTICULATION_JAW 0x1 | ||
+ | #define ARTICULATION_TONGUE 0x2 | ||
+ | #define ARTICULATION_GLOTTIS 0x3 | ||
+ | |||
+ | // OSC Harmonic Waveshapes | ||
+ | #define OSCSYNTH_WAVE_TRIANGLE 0 | ||
+ | #define OSCSYNTH_WAVE_SQUARE 1 | ||
+ | #define OSCSYNTH_WAVE_SAW 2 | ||