-
Notifications
You must be signed in to change notification settings - Fork 0
class_sampleplayer
####Inherits: Node ####Category: Core
Sample Player node.
- void set_sample_library ( SampleLibrary library )
- SampleLibrary get_sample_library ( ) const
- void set_voice_count ( int max_voices )
- int get_voice_count ( ) const
- int play ( String name, bool unique=false )
- void stop ( int voice )
- void stop_all ( )
- void set_mix_rate ( int voice, int hz )
- void set_pitch_scale ( int voice, float ratio )
- void set_volume ( int voice, float nrg )
- void set_volume_db ( int voice, float nrg )
- void set_pan ( int voice, float pan, float depth=0, float height=0 )
- void set_filter ( int voice, int type, float cutoff_hz, float resonance, float gain=0 )
- void set_chorus ( int voice, float send )
- void set_reverb ( int voice, int room_type, float send )
- int get_mix_rate ( int voice ) const
- float get_pitch_scale ( int voice ) const
- float get_volume ( int voice ) const
- float get_volume_db ( int voice ) const
- float get_pan ( int voice ) const
- float get_pan_depth ( int voice ) const
- float get_pan_height ( int voice ) const
- int get_filter_type ( int voice ) const
- float get_filter_cutoff ( int voice ) const
- float get_filter_resonance ( int voice ) const
- float get_filter_gain ( int voice ) const
- float get_chorus ( int voice ) const
- float get_reverb_room ( int voice ) const
- float get_reverb ( int voice ) const
- void set_default_pitch_scale ( float ratio )
- void set_default_volume ( float nrg )
- void set_default_volume_db ( float db )
- void set_default_pan ( float pan, float depth=0, float height=0 )
- void set_default_filter ( int type, float cutoff_hz, float resonance, float gain=0 )
- void set_default_chorus ( float send )
- void set_default_reverb ( int room_type, float send )
- float get_default_pitch_scale ( ) const
- float get_default_volume ( ) const
- float get_default_volume_db ( ) const
- float get_default_pan ( ) const
- float get_default_pan_depth ( ) const
- float get_default_pan_height ( ) const
- int get_default_filter_type ( ) const
- float get_default_filter_cutoff ( ) const
- float get_default_filter_resonance ( ) const
- float get_default_filter_gain ( ) const
- float get_default_chorus ( ) const
- float get_default_reverb_room ( ) const
- float get_default_reverb ( ) const
- bool is_active ( ) const
- bool is_voice_active ( int voice ) const
- FILTER_NONE = 0 - Filter is disabled for voice.
- FILTER_LOWPASS = 1 - Lowpass filter is used for voice.
- FILTER_BANDPASS = 2 - Bandpass filter is used for voice.
- FILTER_HIPASS = 3 - HighPass filter is used for voice.
- FILTER_NOTCH = 4 - Notch filter is used for voice.
- FILTER_PEAK = 5
- FILTER_BANDLIMIT = 6 - Band-Limit filter is used for voice, in this case resonance is the highpass cutoff.
- FILTER_LOW_SHELF = 7
- FILTER_HIGH_SHELF = 8
- REVERB_SMALL = 0 - Small reverb room (house room).
- REVERB_MEDIUM = 1 - Medium reverb room (street)
- REVERB_LARGE = 2 - Large reverb room (Theather)
- REVERB_HALL = 3 - Huge reverb room (cathedral, warehouse).
SamplePlayer is a Node meant for simple sample playback. A library of samples is loaded and played back "as is", without positioning or anything.
- void set_voice_count ( int max_voices )
Set the amount of simultaneous voices that will be used for playback.
- int get_voice_count ( ) const
Return the amount of simultaneous voices that will be used for playback.
Play back sample, given it"apos;s identifier "name". if "unique" is true, all othere previous samples will be stopped. The voice allocated for playback will be returned.
- void stop ( int voice )
Stop a voice "voice". (see play).
Change the mix rate of a voice "voice" to given "hz".
Scale the pitch (mix rate) of a voice by a ratio value "ratio". A ratio of 1.0 means the voice is unscaled.
Set the volume of a voice, 0db is maximum volume (every about -6db, volume is reduced in half). "db" does in fact go from zero to negative.
Set the panning of a voice. Panning goes from -1 (left) to +1 (right). Optionally, if the hardware supports 3D sound, also set depth and height (also in range -1 to +1).
Set and enable a filter of a voice, with type "type" (see FILTER_* enum), cutoff (0 to 22khz) frequency and resonance (0+).
Set the chorus send level of a voice (0 to 1). For setting chorus parameters, see AudioServer.
Set the reverb send level and type of a voice (0 to 1). (see REVERB_* enum for type).
Return the current mix rate for a given voice.
Return the current pitch scale for a given voice.
Return the current volume (in db) for a given voice. 0db is maximum volume (every about -6db, volume is reduced in half). "db" does in fact go from zero to negative.
Return the current panning for a given voice. Panning goes from -1 (left) to +1 (right).
Return the current pan depth for a given voice (not used unless the hardware supports 3D sound)
Return the current pan height for a given voice (not used unless the hardware supports 3D sound)
Return the current filter type in use (see FILTER_* enum) for a given voice.
Return the current filter cutoff for a given voice. Cutoff goes from 0 to 22khz.
Return the current filter resonance for a given voice. Resonance goes from 0 up.
Return the current chorus send level for a given voice. (0 to 1).
Return the current reverb room type for a given voice (see REVERB_* enum).
Return the current reverb send level for a given voice. (0 to 1).