PROGRAMMER'S GUIDESound I / F library
BackForward
Sound I / F Library / 2. Reference

2.2 Data specifications

[common]


 List
 Title

Data specifications

 Data

System boot data type

 Data name

SndIniDt

 No

1

A data type that indicates the source of the data required for the sound system. The transfer destination is sound memory (fixed). Please set the following contents respectively.

Access macro
SndIniDt sys_ini
 Access macro
 Mold
 explanation
 SND_INI_PRG_ADR (sys_ini)
 Uint16 *
 68K program storage start address
 SND_INI_PRG_SZ (sys_ini)
 Uint16
 68K program storage start size
 SND_INI_ARA_ADR (sys_ini)
 Uint16 *
 Sound area map storage start address
 SND_INI_ARA_SZ (sys_ini)
 Uint16
 Sound area map size (word specification) 


 List
 Title

Data specifications

 Data

Sound area map data type

 Data name

SndAreaMap

 No

2

A data type that indicates a sound area map.

Meaning of value
 value
 meaning
 0-255
 Any 


 List
 Title

Data specifications

 Data

Overall volume data type

 Data name

SndTlVl

 No

3

A data type that indicates the overall volume.

Meaning of value
 value
 meaning
 0 to 15
 0 is OFF, 15 is maximum 


 List
 Title

Data specifications

 Data

Effect bank number data type

 Data name

SndEfctBnkNum

 No

Four

A data type that indicates the effect bank number.

Meaning of value
 value
 meaning
 0 to 15
 Any 


 List
 Title

Data specifications

 Data

Tone bank number data type

 Data name

SndToneBnkNum

 No

Five

A data type that indicates the tone bank number.

Meaning of value
 value
 meaning
 0 to 15
 Any 


 List
 Title

Data specifications

 Data

Mixer number data type

 Data name

SndMixBnkNum

 No

6

A data type that indicates the Mixer number.

Meaning of value
 value
 meaning
 0-127
 Any 


 List
 Title

Data specifications

 Data

Effect out select data type

 Data name

SndEfctOut

 No

7

A data type that indicates Effect out select.

Meaning of value
 value
 meaning
 0 to 15
 Any 


 List
 Title

Data specifications

 Data

Level data type

 Data name

SndLev

 No

8

A data type that indicates Level.

Meaning of value
 value
 meaning
 0-7
 Any 


 List
 Title

Data specifications

 Data

PAN data type

 Data name

SndPan

 No

9

A data type that indicates PAN. Count up from -15 to move the sound to flow from left to right.

Meaning of value
↑, ↓: Volume increases in the direction of the arrow
 value
 meaning
 left
 right
 -15
 maximum
 OFF OFF
 -14 to -1
 maximum
 0
 maximum
 maximum
 0-14
 maximum
 15
 OFF OFF
 maximum 


 List
 Title

Data specifications

 Data

Command execution status data type

 Data name

SndRet

 No

Ten

A data type that indicates the command execution status.

 value
 meaning
 SND_RET_SET
 Command completed normally (command could be set)
 SND_RET_NSET
 Command abend (command could not be set) 


 List
 Title

Data specifications

 Data

Hardware check parameter data type

 Data name

SndHardPrm

 No

11

A data type that indicates the hardware check parameters.

 value
 explanation
 SND_DRAM4
 DRAM 4Mbit read / write
 SND_DRAM8
 DRAM 8Mbit read / write
 SND_SCSP_MIDI
 SCSP MIDI
 SND_SOUND_SRC_LR
 Sound source output (L / R)
 SND_SOUND_SRC_L
 Sound source output (L)
 SND_SOUND_SRC_R
 Sound source output (R) 


 List
 Title

Data specifications

 Data

Hardware check status data type

 Data name

SndHardStat

 No

12

A data type that indicates the hardware check status.

 constant
 explanation
 SND_HARD_OK
 normal
 SND_HARD_ERR
 Abnormal


[sequence]


 List
 Title

Data specifications

 Data

Pronunciation control number data type

 Data name

SndSeqNum

 No

13

A data type that indicates the pronunciation control number.

Meaning of value
 value
 meaning
 0-7
 Any 


 List
 Title

Data specifications

 Data

Sequence bank number data type

 Data name

SndSeqBnkNum

 No

14

A data type that indicates the Sequence bank number.

Meaning of value
 value
 meaning
 0 to 15
 Any 


 List
 Title

Data specifications

 Data

Sequence song number data type

 Data name

SndSeqSongNum

 No

15

A data type that indicates the Sequence song number.

Meaning of value
 value
 meaning
 0-255
 Any 


 List
 Title

Data specifications

 Data

Priorty level data type

 Data name

SndSeqPri

 No

16

A data type that indicates the Priorty level.

Meaning of value
 value
 meaning
 0-7
 0 is the highest priority, 7 is the lowest priority 


 List
 Title

Data specifications

 Data

Sequence Volume data type

 Data name

SndSeqVl

 No

17

A data type that indicates the Sequence Volume.

Meaning of value
 value
 meaning
 0-127
 0 is OFF, 127 is the maximum (original sound) 


 List
 Title

Data specifications

 Data

fade Rate data type

 Data name

SndFadeRate

 No

18

A data type that indicates the fade rate.

Meaning of value
 value
 meaning
 0
 fade Rate is invalid
 1-255
 1 is the longest, 255 is the shortest 


 List
 Title

Data specifications

 Data

Tempo data type

 Data name

Snd Tempo

 No

19

A data type that indicates Tempo.

Meaning of value
 value
 meaning
 +32767 to 32768
 Relative value to the current value + is UP,-is DOWN
+4096 doubles UP, -4096 doubles DOWN


 List
 Title

Data specifications

 Data

Sequence status data type

 Data name

SndSeqStat

 No

20

A data type that indicates the sequence status.

SndSeqStat status
 Access macro
 Mold
 explanation
 SND_SEQ_STAT_MODE (status)
 Uint16
 song mode
 SND_SEQ_STAT_STAT (status)
 Uint16
 song status

SND_SEQ_STAT_MODE (status)
 Constant name
 explanation
 SND_MD_STOP
 stop
 SND_MD_PLAY
 play
 SND_MD_FADE
 fade fade
 SND_MD_PLAY_PS
 play pause
 SND_MD_FADE_PS
 fade pause

SND_SEQ_STAT_STAT (status)
 Value (hexadecimal)
 meaning
 00
 nomal
 01-7F
 error code
 80 ~ FF
 Timing flag 


 List
 Title

Data specifications

 Data

Pronunciation control number Playback position data type

 Data name

SndSeqPlayPos

 No

twenty one

Pronunciation control number A data type that indicates the playback position.

Meaning of value
 Value (hexadecimal)
 meaning
 0 to FFFF
 0 to FFFF


[PCM]


 List
 Title

Data specifications

 Data

PCM start parameter data type

 Data name

SndPcmStartPrm

 No

twenty two

A data type that indicates the PCM start parameter.

SndPcmStPrm prm
 Access macro
 Mold
 explanation
 SND_PRM_MODE (prm)
 Uint8
 Stereo monaural + sampling rate
 SND_PRM_SADR (prm)
 Uint16
 PCM stream buffer start address
 SND_PRM_SIZE (prm)
 Uint16
 PCM stream buffer size
 SND_PRM_OFSET (prm)
 Uint8
 PCM stream playback start offset

SND_PRM_MODE (prm): Specify the following constants by OR.
 Bit position
 constant
 meaning
 Monaural stereo selection bit
 SND_MD_MONO
 monaural
 SND_MD_STEREO
 stereo
 Sampling rate selection bit
 SND_MD_16
 16-bit PCM
 SND_MD_8
 8-bit PCM

SND_PRM_SADR (prm)
 Value (hexadecimal)
 meaning
 0000 ~ FFFF
 PCM stream buffer start address (upper 16 bits of 20 bit data)

SND_PRM_SIZE (prm)
 Value (hexadecimal)
 meaning
 0000 ~ FFFF
 PCM stream buffer size (number of samples for one channel)

SND_PRM_OFSET (prm)
 Value (hexadecimal)
 meaning
 0 to F
1000 units (4K sample)
 PCM stream playback start offset (0000 to F000) 


 List
 Title

Data specifications

 Data

PCM change parameter data type

 Data name

SndPcmChgPrm

 No

twenty three

A data type that indicates PCM change parameters.

SndPcmChgPrm prm
 Access macro
 Mold
 explanation
 SND_PRM_NUM (prm)
 SndPcmNum
 PCM stream playback number
 SND_PRM_LEV (prm)
 SndLev
 Direct sound Level
 SND_PRM_PAN (prm)
 SndPan
 Direct sound Pan
 SND_PRM_PICH (prm)
 Uint8
 PICH word
 SND_R_EFCT_IN (prm)
 SndEfctIn
 Efect in select
 Right output (monaural)
 SND_R_EFCT_LEV (prm)
 SndLev
 Efect send Level
 SND_L_EFCT_IN (prm)
 SndEfctIn
 Efect in select
 Left output (disabled when monaural)
 SND_L_EFCT_LEV (prm)
 SndLev
 Efect send Level

The constants and values that can be used in each access macro are shown below.

SND_PRM_NUM (prm)
 value
 meaning
 0-7
 PCM stream playback number

SND_PRM_PICH (prm)
See the PICH register in the SCSP manual.


 List
 Title

Data specifications

 Data

PCM playback address data type

 Data name

SndPcmPlayAdr

 No

twenty four

A data type that indicates the PCM playback address.

SndPcmPlayAdr (prm)
 Access macro
 Mold
 explanation
 SND_PCM_RADR (prm)
 Uint8
 Right output (monaural)
 SND_PCM_LADR (prm)
 Uint8
 Left output 


 List
 Title

Data specifications

 Data

PCM address update interrupt status data type

 Data name

SndPcmIntStat

 No

twenty five

A data type that indicates the PCM address update interrupt status. The following bit position constants can be specified by OR.

 Bit position constant
 explanation
 SND_PCM_PLAY0
 PCM playback number 0
 SND_PCM_PLAY1
 PCM playback number 1
 SND_PCM_PLAY2
 PCM playback number 2
 SND_PCM_PLAY3
 PCM playback number 3
 SND_PCM_PLAY4
 PCM playback number 4
 SND_PCM_PLAY5
 PCM playback number 5
 SND_PCM_PLAY6
 PCM playback number 6
 SND_PCM_PLAY7
 PCM playback number 7


[CD]


 List
 Title

Data specifications

 Data

Analysis volume data type

 Data name

SndCdVlAnl

 No

26

A data type that indicates the analysis volume.

Meaning of value
 value
 meaning
 0 to 32767
 0 is OFF, 32767 is maximum 


 List
 Title

Data specifications

 Data

Stereo analysis volume data type by frequency band

 Data name

SndCdHzSrVl

 No

27

This is a data type that indicates the stereo analysis volume by frequency band. In the case of monaural, the same value will be entered in the left and right outputs.

SndCdHzSrVl hz_vl
 Access macro
 Mold
 explanation
 SND_CD_LHIGH (hz_vl)
 SndCdVlAnl
 High frequency analysis volume
 Left output
 SND_CD_LMID (hz_vl)
 SndCdVlAnl
 Midrange analysis volume
 SND_CD_LLOW (hz_vl)
 SndCdVlAnl
 Bass analysis volume
 SND_CD_RHIGH (hz_vl)
 SndCdVlAnl
 High frequency analysis volume
 Right output
 SND_CD_RMID (hz_vl)
 SndCdVlAnl
 Midrange analysis volume
 SND_CD_RLOW (hz_vl)
 SndCdVlAnl
 Bass analysis volume


BackForward
PROGRAMMER'S GUIDESound I / F library
Copyright SEGA ENTERPRISES, LTD., 1997