Sound (functions)
A list of the functions found in the SOUND namespace, which typically execute tasks relating to sound.
PlaySE
Plays a sound effect. Argument order is SOUND:PlaySE(soundName).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| soundName | String | System.String
|
Sound file name, relative to the Content/SE folder |
PlayBattleSE
Plays a sound effect specifically from the Battle/ subdirectory. Argument order is SOUND:PlayBattleSE(soundName).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| soundName | String | System.String
|
Sound file name, relative to the Content/SE/Battle folder |
WaitSE
Plays a sound effect, and waits for it to complete before continuing.
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| soundName | String | System.String
|
Sound file name, relative to the Content/SE/Battle folder |
Example
SOUND:WaitSE("Battle/Hit")
LoopSE
Plays a continuous sound effect. Argument order is SOUND:LoopSE(soundName).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| soundName | String | System.String
|
Sound file name, relative to the Content/SE folder |
LoopBattleSE
Plays a continuous sound effect. Argument order is SOUND:LoopBattleSE(soundName).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| soundName | String | System.String
|
Sound file name, relative to the Content/SE folder |
StopSE
Stops a continuous sound effect. Argument order is SOUND:StopSE(soundName).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| soundName | String | System.String
|
Sound file name, relative to the Content/SE folder |
StopBattleSE
Stops a continuous sound effect. Argument order is SOUND:StopBattleSE(soundName).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| soundName | String | System.String
|
Sound file name, relative to the Content/SE folder |
FadeInSE
Plays a continuous sound effect, fading in over a specified amount of time. Argument order is SOUND:FadeInSE(name, fadeTime).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| name | String | System.String
|
Sound file name, relative to the Content/SE folder |
| fadeTime | Integer | System.Int32
|
Time in frames for the sound to fade in |
FadeInBattleSE
Plays a continuous sound effect, fading in over a specified amount of time. Argument order is SOUND:FadeInBattleSE(name, fadeTime).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| name | String | System.String
|
Sound file name, relative to the Content/SE/Battle folder |
| fadeTime | Integer | System.Int32)
|
Time in frames for the sound to fade in |
FadeOutSE
Stops a continuous sound effect, fading out over a specified amount of time. Argument order is SOUND:FadeOutSE(soundName, fadeTime).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| soundName | String | System.String
|
Sound file name, relative to the Content/SE folder |
| fadeTime | Integer | System.Int32
|
Time in frames for the sound to fade out |
FadeOutBattleSE
Stops a continuous sound effect, fading out over a specified amount of time. Argument order is SOUND:FadeOutBattleSE(soundName, fadeTime).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| soundName | String | System.String
|
Sound file name, relative to the Content/SE folder |
| fadeTime | Integer | System.Int32
|
Time in frames for the sound to fade out |
PlayFanfare
Plays a sound effect that temporarily mutes the music for its duration. Argument order is SOUND:PlayFanfare(soundName).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| soundName | String | System.String
|
Sound file name, relative to the Content/SE folder |
WaitFanfare
Plays a sound effect that temporarily mutes the music for its duration. This function waits for the sound to complete before continuing.Argument order is SOUND:WaitFanfare(soundName).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| soundName | String | System.String
|
Sound file name, relative to the Content/SE folder |
Example
SOUND:WaitFanfare("Battle/LevelUp")
PlayBGM
Plays a song, replacing the current one. Argument order is SOUND:PlayBGM(songName, fade, fadeTime).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| songName | String | System.String
|
The file name of the song, relative to the Content/Music folder. |
| fade | Boolean | System.Boolean
|
Whether to fade the old song out, or start a new one. |
| fadeTime | Integer | System.Int32
|
The amount of time, in frames, to fade out the old song. |
StopBGM
Stops playing the current song. Takes no arguments.
FadeOutBGM
Fades out the current song.
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| fadeTime | Integer | System.Int32
|
The amount of time, in frames, to fade out the song. |
SetBGMVolume
Sets the current volume of the song. Argument order is SOUND:SetBGMVolume(val).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| val | Single | System.Single
|
A float value between 0 and 1 |
GetCurrentSong
Gets the currently playing song. If the current song is fading out, gets the next song to be played.
Returns
The filename of the song, relative to the Content/Music folder
