-
Notifications
You must be signed in to change notification settings - Fork 5
Sound
Kannagi edited this page Aug 31, 2024
·
11 revisions
Allows you to send a command with 3 arguments
Allows you to send a command with 2 arguments (unint8
, uint16
)
Allows you to send data
uint16 adrs
address data
uint16 bank
bank data
uint16 size
size to transfer (multiple of 0x200)
Example:
//load DIR SFX
call SNDK_SPC_Set2: LKS_SPC_ADDR,0xA80
call SNDK_SPC_SetData: $SFX_DIR:,#SFX_DIR:,0x200
//load BRR SFX
call SNDK_SPC_Set2: LKS_SPC_ADDR,0x8000
call SNDK_SPC_SetData: $SFX_BRR:,#SFX_BRR:,0x5000
//Volume global ,volume SFX
call SNDK_SPC_Set: LKS_SPC_VOLUME,0x7F,0x7F
call SNDK_SPC_Set: LKS_SPC_BRR_VOLUME,0x7F,0x7F
0xA80
DIR Sample SFX
0x3000
Sample for music
0x8000-0xB000
Sample for SFX
-
LKS_SPC_VOLUME
global volume -
LKS_SPC_PLAY
play music -
LKS_SPC_ADDR
set address -
LKS_SPC_BRR_VOLUME
volume SFX
-
LKS_SPC_STOP
stop music -
LKS_SPC_ON
enable music -
LKS_SPC_REPLAY
enable music and replay -
LKS_SPC_PAUSE
pause music
Allows you to manage 4 SFX automatically
unit8 delay
Delay in frame between each SFX
SNDK_SFX_Engine: 12
SNDK_SFX1
, SNDK_SFX2
, SNDK_SFX3
, SNDK_SFX4
4 variable to play in each channel.
SNDK_SFX1 = 0 // play SFX 0
SNDK_SFX2 = 7 // play SFX 7
SNDK v0.3