Class for event stream playback.
|float||get_channel_last_note_time ( int channel ) const|
|float||get_channel_volume ( int channel ) const|
|float||get_length ( ) const|
|int||get_loop_count ( ) const|
|float||get_pitch_scale ( ) const|
|float||get_pos ( ) const|
|EventStream||get_stream ( ) const|
|String||get_stream_name ( ) const|
|float||get_tempo_scale ( ) const|
|float||get_volume ( ) const|
|float||get_volume_db ( ) const|
|bool||has_autoplay ( ) const|
|bool||has_loop ( ) const|
|bool||is_paused ( ) const|
|bool||is_playing ( ) const|
|void||play ( )|
|void||seek_pos ( float time )|
|void||set_autoplay ( bool enabled )|
|void||set_channel_volume ( int channel, float channel_volume )|
|void||set_loop ( bool enabled )|
|void||set_paused ( bool paused )|
|void||set_pitch_scale ( float pitch_scale )|
|void||set_stream ( EventStream stream )|
|void||set_tempo_scale ( float tempo_scale )|
|void||set_volume ( float volume )|
|void||set_volume_db ( float db )|
|void||stop ( )|
Class for event stream playback. Event streams are music expressed as a series of events (note on, note off, instrument change...), as opposed to audio streams, which are just audio data. Examples of event-based streams are MIDI files, or MOD music.
Currently, only MOD, S3M, IT, and XM music is supported.
Return the time at which the last note of a given channel in the stream plays.
Return the volume scale for an individual channel of the stream.
Return the song length. May be in seconds, but depends on the stream type.
Return the number of times the playback has looped.
Return the pitch scale factor for this player.
Return the playback position. May be in seconds, but depends on the stream type.
Return the currently assigned stream.
Return the name of the currently assigned stream. This is not the file name, but a field inside the file. If no stream is assigned, if returns “<No Stream>”.
Return the tempo multiplier.
Return the playback volume for this player.
Return the playback volume for this player, in decibels.
Return whether this player will start playing as soon as it enters the scene tree.
Return whether this player will be restart the playback at the end.
Return whether the playback is currently paused.
Return whether this player is playing.
Play the currently assigned stream.
Set the playback position. May be in seconds, but depends on the stream type.
Set whether this player will start playing as soon as it enters the scene tree.
Set the volume scale for an individual channel of the stream, with the same value range as set_volume. The channel number depends on the stream format. For example, MIDIs range from 0 to 15, and MODs from 0 to 63.
Many stream formats are multichannel, so this allows to affect only a part of the music.
Set whether the stream will be restarted at the end.
Pause stream playback.
Set the pitch multiplier for all sounds coming from this stream. A value of 2.0 shifts all pitches one octave up, and a value of 0.5 shifts pitches one octave down.
Set the EventStream this player will play.
Set the tempo multiplier. This allows to slow down or speed up the music, without affecting its pitch.
Set the playback volume for this player. This is a float between 0.0 (silent) and 1.0 (full volume). Values over 1.0 may amplify sound even more, but may introduce distortion. Negative values may just invert the output waveform, which produces no audible difference.
The effect of these special values ultimately depends on the low-level implementation of the file format being played.
Set the playback volume for this player, in decibels. This is a float between -80.0 (silent) and 0.0 (full volume). Values under -79.0 get truncated to -80, but values over 0.0 do not, so the warnings for over amplifying (see set_volume) still apply.
© 2014–2017 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.