waveTableSynth
playing of a sound
Comment Chunk type for AIFF/AIFF-C files CommonChunk Defines a fundamental characteristic of sampled sound (for AIFF files)
ExtCommonChunk Defines a fundamental characteristic of sampled sound (for AIFF-C files)
ExtSoundHeader Extended sampled sound header used by the sampled sound synthesizer
SndChannel Defines a queue of sound commands managed by the SndCommand Structure of an instruction to the synthesizer SoundDataChunk Contains actual sample frames that make up sampled sound SoundHeader Standard sampled sound header used by the sampled sound synthesizer
typedef pascal void (*SndCallBackProcPtr) (SndChannelPtr chan,
typedef pascal void (*SndDoubleBackProcPtr) (SndChannelPtr channel,
The following type is defined only in THINK C
Gestalt response bit flags
gestaltStereoCapability 0 stereo capability present
gestaltStereoMixing 1 stereo mixing on internal speaker
gestaltSoundIOMgrPresent 3 sound input routines available
gestaltBuiltInSoundInput 4 built-in input device available
gestaltHasSoundInputDevice 5 sound input device available
Channel initialization parameters
initChanLeft 0x0002 left channel--sampledSynth only
initChanRight 0x0003 right channel--sampledSynth only
initChan0 0x0004 channel 1--wave table only
initChan1 0x0005 channel 2--wave table only
initChan2 0x0006 channel 3--wave table only
initChan3 0x0007 channel 4--wave table only
initMono 0x0080 mono channel--sampledSynth only
initStereo 0x00C0 stereo channel--sampledSynth only
initMACE3 0x0300 3:1 compression--sampledSynth only
initMACE6 0x0400 6:1 compression--sampledSynth only
initNoInterp 0x0004 no linear interpolation
initNoDrop 0x0008 no drop-sample con version
initPanMask 0x0003 mask for right/left pan values
initSRateMask 0x0030 mask for sample rate values
initStereoMask 0x00C0 mask for mono/stereo values
initCompMask 0xFF00 mask for compression IDs
nullCmd 0 do nothing
initCmd 1
freeCmd 2
quietCmd 3 stop a sound that is playing
flushCmd 4 flush a sound channel
reInitCmd 5 reinitialize a sound channel
waitCmd 10 suspend processing in a channel
pauseCmd 11 pause processing in a channel
resumeCmd 12 resume processing in a channel
callBackCmd 13 execute a callback procedure
syncCmd 14 synchronize channels
emptyCmd 15
tickleCmd 20
requestNextCmd 21
howOftenCmd 22
wakeUpCmd 23
availableCmd 24 see if initialization option available
versionCmd 25 determine synthesizer version
totalLoadCmd 26 report total CPU load
loadCmd 27 report CPU load for a new channel
scaleCmd 30
tempoCmd 31
freqDurationCmd 40 play a frequency for a specified duration
restCmd 41 rest a channel for specified duration
freqCmd 42 change the pitch of a sound
ampCmd 43 change the amplitude of a sound
timbreCmd 44 change the timbre of a sound
getAmpCmd 45 get the amplitude of a sound
waveTableCmd 60 install a wave table as a voice
phaseCmd 61
soundCmd 80 install a sampled sound as a voice
bufferCmd 81 play a sampled sound
rateCmd 82 set the pitch of a sampled sound
continueCmd 83
doubleBufferCmd 84
getRateCmd 85 get the pitch of a sampled sound
sizeCmd 90
convertCmd 91
Sampled sound header encoding options
stdSH 0x00 standard sound header
extSH 0xFF extended sound header
cmpSH 0xFE compressed sound header
size of data structures
stdQLength 128 default size of standard sound channel
stateBlockSize 64
leftOverBlockSize 32
Sound command mask
dataOffsetFlag 0x8000 sound command data offset bit
waveInitChannelMask 0x07
waveInitChannel0 0x04
waveInitChannel1 0x05
waveInitChannel2 0x06
waveInitChannel3 0x07
synthCodeRsrc 'snth' Resource types used by Sound Manager
soundListRsrc 'snd '
twelfthRootTwo 1.05946309434
rate22khz 0x56EE8BA3 22254.54545 in fixed- point
rate11khz 0x2B7745D1 11127.27273 in fixed- point
Synthesizer resource IDs
squareWaveSynth 1 square-wave synthesizer
waveTableSynth 3 wave-table synthesizer
sampledSynth 5 sampled sound synthesizer
Old Sound Manager MACE synthesizer numbers
MACE3snthID 11
MACE6snthID 13
System beep states
sysBeepDisable 0x0000 system alert sound disabled
sysBeepEnable 0x0001 system alert sound enabled
unitTypeSeconds 0x0000 seconds
unitTypeNoSelection 0xFFFF no selection
Double-buffer status flags
dbBufferReady 0x00000001
dbLastBuffer 0x00000004
notCompressed 0 noncompressed samples
twoToOne 1
eightToThree 2
threeToOne 3 3:1 compressed samples
sixToOne 4 6:1 compressed samples
outsideCmpSH 0 MACE constants
insideCmpSH 1
aceSuccess 0
aceMemFull 1
aceNilBlock 2
aceBadComp 3
aceBadEncode 4
aceBadDest 5
aceBadCmd 6
sixToOnePacketSize 8 packet size for 6:1
threeToOnePacketSize 16 packet size for 3:1
firstSoundFormat 0x0001 general sound format
secondSoundFormat 0x0002 special sampled sound format (HyperCard)
Information selectors for sound input drivers
siActiveChannels 'chac' channels active
siActiveLevels 'lmac' levels active
siInitializeDriver 'init' reserved for internal use only
siCloseDriver 'clos' reserved for internal use only
siPauseRecording 'paus' reserved for internal use only
siUserInterruptProc 'user' reserved for internal use only
siAGCOnOff 'agc ' automatic gain control state
siAsync 'asyn' asynchronous capability
siChannelAvailable 'chav' number of channels available
siCompressionAvailable 'cmav' compression types available
siCompressionFactor 'cmfa' current compression factor
siCompressionHeader 'cmhd' return compression header
siCompressionType 'comp' current compression type
siContinuous 'cont' continuous recording
siDeviceBufferInfo 'dbin' size of interrupt buffer
siDeviceConnected 'dcon' input device connection status
siDeviceIcon 'icon' input device icon
siDeviceName 'name' input device name
siLevelMeterOnOff 'lmet' level meter state
siNumberChannels 'chan' current number of channels
siOptionsDialog 'optd' display options dialog box
siPlayThruOnOff 'plth' play-through state
siRecordingQuality 'qual' recording quality
siSampleRate 'srat' current sample rate
siSampleRateAvailable 'srav' sample rates available
siSampleSize 'ssiz' current sample size
siSampleSizeAvailable 'ssav' sample sizes available
siTwosComplementOnOff 'twos' two's complement state
siVoxRecordInfo 'voxr' VOX record parameters
siVoxStopInfo 'voxs' VOX stop parameters
Sound-recording qualities
siBestQuality 'best' the best quality available
siBetterQuality 'betr' a quality better than good
siGoodQuality 'good' a good quality
Sound input device permissions
siReadPermission 0 open device for reading
siWritePermission 1 open device for reading/ writing
Device-connection states
siDeviceIsConnected 1 device is connected and ready
siDeviceNotConnected 0 device is not connected
siDontKnowIfConnected -1 can not tell if device is connected
IDs for AIFF and AIFF-C file chunks
AIFFID 'AIFF'
AIFCID 'AIFC'
NoLooping 0
ForwardLooping 1
ForwardBackwardLooping 2
Version of AIFC format specification
AIFCVersion1 0xA2805140 2726318400 in decimal
NoneName "\pnot compressed
ACE2to1Name "\pACE 2-to-1
ACE8to3Name "\pACE 8-to-3
MACE3to1Name "\pMACE 3-to-1
MACE6to1Name "\pMACE 6-to-1
Compression Names
NoneType 'NONE'
ACE2Type 'ACE2'
ACE8Type 'ACE8'
MACE3Type 'MAC3'
MACE6Type 'MAC6'
Do not use low memory global variables that are not documented.
No undocumented location below the system heap is guaranteed to be available
for use in future systems.
Name Address Size Description
CurPitch 0x0280 2 Value of count in square-wave synthesizer buffer
SoundPtr 0x0262 4 Pointer to 4-tone record
SoundBase 0x0266 4 Pointer to free-form synthesizer buffer
SoundLevel 0x027F 1 Amplitude in 740-byte buffer