speakjet_definition_list
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
speakjet_definition_list [2006/06/08 00:13] – minor fixes audiocommander | speakjet_definition_list [2006/12/05 14:28] (current) – updated to latest version and removed dev-nfo audiocommander | ||
---|---|---|---|
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: | ||
| | ||
* | * | ||
- | | + | |
- | | + | |
* | * | ||
+ | */ | ||
+ | |||
+ | /* | ||
+ | * Released under GNU General Public License | ||
+ | * http:// | ||
+ | | ||
+ | * 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 (' | // escape character (' | ||
- | #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 ' | ||
+ | #define SCP_CLEAR_BUFFER ' | ||
+ | #define SCP_START ' | ||
+ | #define SCP_STOP ' | ||
+ | |||
+ | #define SCP_MEMTYPE ' | ||
+ | #define SCP_MEMADDR ' | ||
+ | #define SCP_MEMWRT ' | ||
+ | |||
+ | #define SCP_RESET ' | ||
+ | |||
+ | |||
+ | // ********* 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 ' | ||
+ | #define SCP_MEMTYPE_EEPROM_H ' | ||
+ | #define SCP_MEMTYPE_EEPROM_L ' | ||
+ | |||
+ | // == SCP_MEMADDR (J) == | ||
+ | // Envelope | ||
+ | #define SCP_ENV_FREQ ' | ||
+ | #define SCP_ENV_CTRL ' | ||
+ | // Oscillator Frequency Register (not used, calculated) | ||
+ | #define SCP_OSC1_FREQ ' | ||
+ | #define SCP_OSC2_FREQ ' | ||
+ | #define SCP_OSC3_FREQ ' | ||
+ | #define SCP_OSC4_FREQ ' | ||
+ | #define SCP_OSC5_FREQ ' | ||
+ | // 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 ' | ||
+ | // Master | ||
+ | #define SCP_MASTER_VOLUME ' | ||
+ | |||
+ | // == SCP_MEMWRT (N) == | ||
+ | // ENVType (send ENVType + ENVState!) | ||
+ | #define SCP_ENV_SAW ' | ||
+ | #define SCP_ENV_SINE ' | ||
+ | #define SCP_ENV_TRIANGLE ' | ||
+ | #define SCP_ENV_SQUARE ' | ||
+ | // 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 // | ||
+ | // 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 | ||
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
// 32 - 127 (Reserved) | // 32 - 127 (Reserved) | ||
Line 110: | Line 174: | ||
// MSA Sound Codes: Phonemes | // MSA Sound Codes: Phonemes | ||
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
// MSA Sound Codes: Robot | // MSA Sound Codes: Robot | ||
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
// MSA Sound Codes: Alarms | // MSA Sound Codes: Alarms | ||
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
// MSA Sound Codes: Beeps | // MSA Sound Codes: Beeps | ||
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
// MSA Sound Codes: Biological | // MSA Sound Codes: Biological | ||
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
// MSA Sound Codes: DTMF | // MSA Sound Codes: DTMF | ||
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
- | # | + | # |
// MSA Sound Codes: Misc | // MSA Sound Codes: Misc | ||
- | # | + | # |
- | # | + | # |
- | # | + | # |
// 255: End of Phrase | // 255: End of Phrase | ||
Line 255: | Line 319: | ||
#endif | #endif | ||
- | # | + | # |
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | // <<--- Application related defines --->> | ||
+ | |||
+ | // SCP ControlTypes | ||
+ | // realtime announces single SCP messages like "Clear Buffer" | ||
+ | // register is used for 3-part-msgs: | ||
+ | #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 | ||
speakjet_definition_list.1149725581.txt.gz · Last modified: 2006/10/15 09:35 (external edit)