Sound (functions): Difference between revisions
Created page with "{{Cleanup}} == SOUND:PlaySE(System.String) == Plays a sound effect === Arguments === * <code>name</code>: Sound file name, relative to the Content/SE folder == SOUND:PlayBattleSE(System.String) == Plays a sound effect specifically from the Battle/ subdirectory === Arguments === * <code>name</code>: Sound file name, relative to the Content/SE/Battle folder == SOUND:WaitSE == Plays a sound effect, and waits for it to complete before continuing. === Example..." |
No edit summary |
||
| Line 1: | Line 1: | ||
A list of the functions found in the SOUND namespace, which typically execute tasks relating to sound. | |||
== SOUND:PlaySE | == SOUND:PlaySE == | ||
Plays a sound effect. {{FuncUsage|nmspace=SOUND|nm=PlaySE|args=soundName}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=soundName | |||
|type=String | |||
|techt=System.String | |||
|purp=Sound file name, relative to the Content/SE folder | |||
}} | |||
|} | |||
== PlayBattleSE == | |||
== | |||
Plays a sound effect specifically from the Battle/ subdirectory. {{FuncUsage|nmspace=SOUND|nm=PlayBattleSE|args=soundName}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=soundName | |||
|type=String | |||
|techt=System.String | |||
|purp=Sound file name, relative to the Content/SE/Battle folder | |||
}} | |||
|} | |||
== WaitSE == | |||
== | |||
Plays a sound effect, and waits for it to complete before continuing. | Plays a sound effect, and waits for it to complete before continuing. | ||
=== Arguments === | |||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=soundName | |||
|type=String | |||
|techt=System.String | |||
|purp=Sound file name, relative to the Content/SE/Battle folder | |||
}} | |||
|} | |||
=== Example === | === Example === | ||
<pre> | <pre> | ||
| Line 35: | Line 52: | ||
</pre> | </pre> | ||
== | == LoopSE == | ||
Plays a continuous sound effect. {{FuncUsage|nmspace=SOUND|nm=LoopSE|args=soundName}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=soundName | |||
|type=String | |||
|techt=System.String | |||
|purp=Sound file name, relative to the Content/SE folder | |||
}} | |||
|} | |||
== LoopBattleSE == | |||
== | Plays a continuous sound effect. {{FuncUsage|nmspace=SOUND|nm=LoopBattleSE|args=soundName}} | ||
=== Arguments === | |||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=soundName | |||
|type=String | |||
|techt=System.String | |||
|purp=Sound file name, relative to the Content/SE folder | |||
}} | |||
|} | |||
== StopSE == | |||
Stops a continuous sound effect. {{FuncUsage|nmspace=SOUND|nm=StopSE|args=soundName}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=soundName | |||
|type=String | |||
|techt=System.String | |||
|purp=Sound file name, relative to the Content/SE folder | |||
}} | |||
|} | |||
== StopBattleSE == | |||
Stops a continuous sound effect. {{FuncUsage|nmspace=SOUND|nm=StopBattleSE|args=soundName}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=soundName | |||
|type=String | |||
|techt=System.String | |||
|purp=Sound file name, relative to the Content/SE folder | |||
}} | |||
|} | |||
== FadeInSE == | |||
== | |||
Plays a continuous sound effect, fading in over a specified amount of time. {{FuncUsage|nmspace=SOUND|nm=FadeInSE|args=name, fadeTime}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=name | |||
|type=String | |||
|techt=System.String | |||
|purp=Sound file name, relative to the Content/SE folder | |||
}} | |||
{{ArgRow | |||
|name=fadeTime | |||
|type=Integer | |||
|techt=System.Int32 | |||
|purp=Time in frames for the sound to fade in | |||
}} | |||
|} | |||
== FadeInBattleSE == | |||
== | |||
Plays a continuous sound effect, fading in over a specified amount of time. {{FuncUsage|nmspace=SOUND|nm=FadeInBattleSE|args=name, fadeTime}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=name | |||
|type=String | |||
|techt=System.String | |||
|purp=Sound file name, relative to the Content/SE/Battle folder | |||
}} | |||
{{ArgRow | |||
|name=fadeTime | |||
|type=Integer | |||
|techt=System.Int32) | |||
|purp=Time in frames for the sound to fade in | |||
}} | |||
|} | |||
== FadeOutSE == | |||
== | |||
Stops a continuous sound effect, fading out over a specified amount of time. {{FuncUsage|nmspace=SOUND|nm=FadeOutSE|args=soundName, fadeTime}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=soundName | |||
|type=String | |||
|techt=System.String | |||
|purp=Sound file name, relative to the Content/SE folder | |||
}} | |||
{{ArgRow | |||
|name=fadeTime | |||
|type=Integer | |||
|techt=System.Int32 | |||
|purp=Time in frames for the sound to fade out | |||
}} | |||
|} | |||
== FadeOutBattleSE == | |||
== | |||
Stops a continuous sound effect, fading out over a specified amount of time. {{FuncUsage|nmspace=SOUND|nm=FadeOutBattleSE|args=soundName, fadeTime}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=soundName | |||
|type=String | |||
|techt=System.String | |||
|purp=Sound file name, relative to the Content/SE folder | |||
}} | |||
{{ArgRow | |||
|name=fadeTime | |||
|type=Integer | |||
|techt=System.Int32 | |||
|purp=Time in frames for the sound to fade out | |||
}} | |||
|} | |||
== PlayFanfare == | |||
== | |||
Plays a sound effect that temporarily mutes the music for its duration. {{FuncUsage|nmspace=SOUND|nm=PlayFanfare|args=soundName}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=soundName | |||
|type=String | |||
|techt=System.String | |||
|purp=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.{{FuncUsage|nmspace=SOUND|nm=WaitFanfare|args=soundName}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=soundName | |||
|type=String | |||
|techt=System.String | |||
|purp=Sound file name, relative to the Content/SE folder | |||
}} | |||
|} | |||
=== Example === | === Example === | ||
<pre> | <pre> | ||
SOUND:WaitFanfare("Battle/LevelUp") | SOUND:WaitFanfare("Battle/LevelUp") | ||
</pre> | </pre> | ||
== | == PlayBGM == | ||
Plays a song, replacing the current one. {{FuncUsage|nmspace=SOUND|nm=PlayBGM|args=songName, fade, fadeTime}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=songName | |||
|type=String | |||
|techt=System.String | |||
|purp=The file name of the song, relative to the Content/Music folder. | |||
}} | |||
{{ArgRow | |||
|name=fade | |||
|type=Boolean | |||
|techt=System.Boolean | |||
|purp=Whether to fade the old song out, or start a new one. | |||
}} | |||
{{ArgRow | |||
|name=fadeTime | |||
|type=Integer | |||
|techt=System.Int32 | |||
|purp=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. | Fades out the current song. | ||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=fadeTime | |||
|type=Integer | |||
|techt=System.Int32 | |||
|purp=The amount of time, in frames, to fade out the song. | |||
}} | |||
|} | |||
== SetBGMVolume == | |||
== | |||
Sets the current volume of the song. {{FuncUsage|nmspace=SOUND|nm=SetBGMVolume|args=val}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=val | |||
|type=Single | |||
|techt=System.Single | |||
|purp=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. | Gets the currently playing song. If the current song is fading out, gets the next song to be played. | ||
=== Returns === | === Returns === | ||
The filename of the song, relative to the Content/Music folder | The filename of the song, relative to the Content/Music folder | ||
Revision as of 19:19, 17 January 2026
A list of the functions found in the SOUND namespace, which typically execute tasks relating to sound.
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
