Sound (functions): Difference between revisions

From PMDOWiki
Imbion (talk | contribs)
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..."
 
Imbion (talk | contribs)
No edit summary
Line 1: Line 1:
{{Cleanup}}
A list of the functions found in the SOUND namespace, which typically execute tasks relating to sound.


== SOUND:PlaySE(System.String) ==
== SOUND:PlaySE ==
 
 
Plays a sound effect


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
}}
|}


* <code>name</code>: Sound file name, relative to the Content/SE folder
== PlayBattleSE ==
 
== SOUND:PlayBattleSE(System.String) ==
 
 
Plays a sound effect specifically from the Battle/ subdirectory


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
}}
|}


* <code>name</code>: Sound file name, relative to the Content/SE/Battle folder
== WaitSE ==
 
== SOUND: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>


== SOUND:LoopSE(System.String) ==
== LoopSE ==
 
 
Plays a continuous sound effect


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
}}
|}


* <code>name</code>: Sound file name, relative to the Content/SE folder
== LoopBattleSE ==


== SOUND:LoopBattleSE(System.String) ==
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
}}
|}


Plays a continuous sound effect
== 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
}}
|}


* <code>name</code>: Sound file name, relative to the Content/SE/Battle folder
== SOUND:StopSE(System.String) ==
Stops a continuous sound effect


== 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
}}
|}


* <code>name</code>: Sound file name, relative to the Content/SE folder
== FadeInSE ==
 
== SOUND:StopBattleSE(System.String) ==
 
 
Stops a continuous sound effect


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
}}
|}


* <code>name</code>: Sound file name, relative to the Content/SE/Battle folder
== FadeInBattleSE ==
 
== SOUND:FadeInSE(System.String,System.Int32) ==
 
 
Plays a continuous sound effect, fading in over a specified amount of time


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
}}
|}


* <code>name</code>: Sound file name, relative to the Content/SE folder
== FadeOutSE ==
* <code>fadeTime</code>: Time in frames for the sound to fade in
 
== SOUND:FadeInBattleSE(System.String,System.Int32) ==
 
 
Plays a continuous sound effect, fading in over a specified amount of time


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
}}
|}


* <code>name</code>: Sound file name, relative to the Content/SE/Battle folder
== FadeOutBattleSE ==
* <code>fadeTime</code>: Time in frames for the sound to fade in
 
== SOUND:FadeOutSE(System.String,System.Int32) ==
 
 
Stops a continuous sound effect, fading out over a specified amount of time


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
}}
|}


* <code>name</code>: Sound file name, relative to the Content/SE folder
== PlayFanfare ==
* <code>fadeTime</code>: Time in frames for the sound to fade out
 
== SOUND:FadeOutBattleSE(System.String,System.Int32) ==
 
 
Stops a continuous sound effect, fading out over a specified amount of time


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
}}
|}


* <code>name</code>: Sound file name, relative to the Content/SE/Battle folder
== WaitFanfare ==
* <code>fadeTime</code>: Time in frames for the sound to fade out


== SOUND:PlayFanfare(System.String) ==
Plays a sound effect that temporarily mutes the music for its duration


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"
* <code>name</code>: Sound file name, relative to the Content/SE folder
{{ArgHeader}}
 
{{ArgRow
== SOUND:WaitFanfare ==
|name=soundName
 
|type=String
 
|techt=System.String
Plays a sound effect that temporarily mutes the music for its duration.
|purp=Sound file name, relative to the Content/SE folder
This function waits for the sound to complete before continuing.
}}
 
|}


=== Example ===
=== Example ===
<pre>
<pre>


SOUND:WaitFanfare("Battle/LevelUp")
SOUND:WaitFanfare("Battle/LevelUp")
</pre>
</pre>


== SOUND:PlayBGM(System.String,System.Boolean,System.Int32) ==
== PlayBGM ==
 
 
Plays a song, replacing the current one.


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.
}}
|}


* <code>name</code>: The file name of the song, relative to the Content/Music folder.
== StopBGM ==
* <code>fade</code>: Whether to fade the old song out, or start a new one.
* <code>fadeTime</code>: The amount of time, in frames, to fade out the old song.
 
== SOUND:StopBGM ==


Stops playing the current song. Takes no arguments.


Stops playing the current song.
== FadeOutBGM ==
 
 
== SOUND:FadeOutBGM(System.Int32) ==
 


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.
}}
|}


* <code>fadeTime</code>: The amount of time, in frames, to fade out the song.
== SetBGMVolume ==
 
== SOUND:SetBGMVolume(System.Single) ==
 
 
Sets the current volume of the song.


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
}}
|}


* <code>val</code>: A float value between 0 and 1
== GetCurrentSong ==
 
== SOUND: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