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

2.2 Data specifications

[common]


 one
View
table
 Title

data specifications

 Data

System startup data type

 Data name

SndIniDt

 No

1

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

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) 


 one
View
table
 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 


 one
View
table
 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-15
 0 is OFF, 15 is maximum 


 one
View
table
 Title

data specifications

 Data

Effect bank number data type

 Data name

SndEfctBnkNum

 No

4

Effect Data type indicating bank number.

Meaning of value
 value
 meaning
 0-15
 Any 


 one
View
table
 Title

data specifications

 Data

Tone bank number data type

 Data name

SndToneBnkNum

 No

5

This data type indicates the tone bank number.

Meaning of value
 value
 meaning
 0-15
 Any 


 one
View
table
 Title

data specifications

 Data

Mixer number data type

 Data name

SndMixBnkNum

 No

6

A data type that indicates Mixer number.

Meaning of value
 value
 meaning
 0~127
 Any 


 one
View
table
 Title

data specifications

 Data

Effect out select data type

 Data name

SndEfctOut

 No

7

This data type indicates Effect out select.

Meaning of value
 value
 meaning
 0-15
 Any 


 one
View
table
 Title

data specifications

 Data

Level data type

 Data name

SndLev

 No

8

This is a data type that indicates the level.

Meaning of value
 value
 meaning
 0-7
 Any 


 one
View
table
 Title

data specifications

 Data

PAN data type

 Data name

SndPan

 No

9

A data type that indicates PAN. To move the sound fluidly from left to right, count up from -15.

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


 one
View
table
 Title

data specifications

 Data

Command execution status data type

 Data name

SndRet

 No

10

A data type that indicates the command execution status.

 value
 meaning
 SND_RET_SET
 Command completed successfully (command was set)
 SND_RET_NSET
 Command abnormally terminated (command could not be set) 


 one
View
table
 Title

data specifications

 Data

Hardware check parameter data type

 Data name

SndHardPrm

 No

11

A data type that indicates 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) 


 one
View
table
 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
 abnormality


[sequence]


 one
View
table
 Title

data specifications

 Data

Pronunciation management number data type

 Data name

SndSeqNum

 No

13

This is a data type that indicates the pronunciation control number.

Meaning of value
 value
 meaning
 0-7
 Any 


 one
View
table
 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-15
 Any 


 one
View
table
 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 


 one
View
table
 Title

data specifications

 Data

Priority level data type

 Data name

SndSeqPri

 No

16

A data type that indicates Priority level.

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


 one
View
table
 Title

data specifications

 Data

Sequence Volume data type

 Data name

SndSeqVl

 No

17

A data type that indicates sequence volume.

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


 one
View
table
 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 disabled
 1~255
 1 is longest, 255 is shortest 


 one
View
table
 Title

data specifications

 Data

Tempo data type

 Data name

SndTempo

 No

19

A data type that indicates Tempo.

Meaning of value
 value
 meaning
 +32767~32768
 Relative to current value
+ is UP, - is DOWN
2x UP at +4096, 2x DOWN at -4096


 one
View
table
 Title

data specifications

 Data

Sequence status data type

 Data name

SndSeqStat

 No

20

A data type that indicates 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
 SND_MD_PLAY_PS
 play pause
 SND_MD_FADE_PS
 fade pause

SND_SEQ_STAT_STAT(status)
 value (hex)
 meaning
 00
 normal
 01~7F
 error code
 80~FF
 Timing flag 


 one
View
table
 Title

data specifications

 Data

Pronunciation management number playback position data type

 Data name

SndSeqPlayPos

 No

21

This is a data type that indicates the pronunciation control number playback position.

Meaning of value
 value (hex)
 meaning
 0~FFFF
 0~FFFF


[PCM]


 one
View
table
 Title

data specifications

 Data

PCM start parameter data type

 Data name

SndPcmStartPrm

 No

22

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): Please specify the following constants using logical OR.
 bit position
 constant
 meaning
 Mono/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 (hex)
 meaning
 0000~FFFF
 PCM stream buffer start address
(upper 16 bits of 20 bit data)

SND_PRM_SIZE(prm)
 value (hex)
 meaning
 0000~FFFF
 PCM stream buffer size
(Number of samples for 1 channel)

SND_PRM_OFSET(prm)
 value (hex)
 meaning
 0~F
1000 units (4K sample)
 PCM stream playback start offset
(0000~F000)


 one
View
table
 Title

data specifications

 Data

PCM change parameter data type

 Data name

SndPcmChgPrm

 No

23

A data type that indicates a PCM change parameter.

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
 Effect in select
 right output
(monaural)
 SND_R_EFCT_LEV (prm)
 SndLev
 Effect send Level
 SND_L_EFCT_IN (prm)
 SndEfctIn
 Effect in select
 left output
(Invalid when monaural)
 SND_L_EFCT_LEV (prm)
 SndLev
 Effect 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.


 one
View
table
 Title

data specifications

 Data

PCM playback address data type

 Data name

SndPcmPlayAdr

 No

24

This data type 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 


 one
View
table
 Title

data specifications

 Data

PCM address update interrupt status
data type

 Data name

SndPcmIntStat

 No

25

This data type indicates the PCM address update interrupt status. The following bit position constants can be specified using logical 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]


 one
View
table
 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~32767
 0 is OFF, 32767 is maximum 


 one
View
table
 Title

data specifications

 Data

Stereo analysis volume data type by frequency band

 Data name

SndCdHzSrVl

 No

27

This data type indicates the stereo analysis volume by frequency band. In the case of monaural, the same value will be input to 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