Files
godot-docs/classes/class_sampleplayer.rst
Rémi Verschelde 1204e3ea17 Add a warning header to each classref file
To tell potential contributors that they should NOT edit those files but instead should work on the class.xml source of the main Godot repo
2016-02-17 22:04:18 +01:00

480 lines
41 KiB
ReStructuredText

.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
.. _class_SamplePlayer:
SamplePlayer
============
**Inherits:** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
**Category:** Core
Brief Description
-----------------
Sample Player node.
Member Functions
----------------
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_sample_library<class_SamplePlayer_set_sample_library>` **(** :ref:`SampleLibrary<class_samplelibrary>` library **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`SampleLibrary<class_samplelibrary>` | :ref:`get_sample_library<class_SamplePlayer_get_sample_library>` **(** **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_polyphony<class_SamplePlayer_set_polyphony>` **(** :ref:`int<class_int>` max_voices **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_polyphony<class_SamplePlayer_get_polyphony>` **(** **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`play<class_SamplePlayer_play>` **(** :ref:`String<class_string>` name, :ref:`bool<class_bool>` unique=false **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`stop<class_SamplePlayer_stop>` **(** :ref:`int<class_int>` voice **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`stop_all<class_SamplePlayer_stop_all>` **(** **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_mix_rate<class_SamplePlayer_set_mix_rate>` **(** :ref:`int<class_int>` voice, :ref:`int<class_int>` hz **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_pitch_scale<class_SamplePlayer_set_pitch_scale>` **(** :ref:`int<class_int>` voice, :ref:`float<class_float>` ratio **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_volume<class_SamplePlayer_set_volume>` **(** :ref:`int<class_int>` voice, :ref:`float<class_float>` volume **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_volume_db<class_SamplePlayer_set_volume_db>` **(** :ref:`int<class_int>` voice, :ref:`float<class_float>` db **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_pan<class_SamplePlayer_set_pan>` **(** :ref:`int<class_int>` voice, :ref:`float<class_float>` pan, :ref:`float<class_float>` depth=0, :ref:`float<class_float>` height=0 **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_filter<class_SamplePlayer_set_filter>` **(** :ref:`int<class_int>` voice, :ref:`int<class_int>` type, :ref:`float<class_float>` cutoff_hz, :ref:`float<class_float>` resonance, :ref:`float<class_float>` gain=0 **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_chorus<class_SamplePlayer_set_chorus>` **(** :ref:`int<class_int>` voice, :ref:`float<class_float>` send **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_reverb<class_SamplePlayer_set_reverb>` **(** :ref:`int<class_int>` voice, :ref:`int<class_int>` room_type, :ref:`float<class_float>` send **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_mix_rate<class_SamplePlayer_get_mix_rate>` **(** :ref:`int<class_int>` voice **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_pitch_scale<class_SamplePlayer_get_pitch_scale>` **(** :ref:`int<class_int>` voice **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_volume<class_SamplePlayer_get_volume>` **(** :ref:`int<class_int>` voice **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_volume_db<class_SamplePlayer_get_volume_db>` **(** :ref:`int<class_int>` voice **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_pan<class_SamplePlayer_get_pan>` **(** :ref:`int<class_int>` voice **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_pan_depth<class_SamplePlayer_get_pan_depth>` **(** :ref:`int<class_int>` voice **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_pan_height<class_SamplePlayer_get_pan_height>` **(** :ref:`int<class_int>` voice **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_filter_type<class_SamplePlayer_get_filter_type>` **(** :ref:`int<class_int>` voice **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_filter_cutoff<class_SamplePlayer_get_filter_cutoff>` **(** :ref:`int<class_int>` voice **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_filter_resonance<class_SamplePlayer_get_filter_resonance>` **(** :ref:`int<class_int>` voice **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_filter_gain<class_SamplePlayer_get_filter_gain>` **(** :ref:`int<class_int>` voice **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_chorus<class_SamplePlayer_get_chorus>` **(** :ref:`int<class_int>` voice **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_reverb_room<class_SamplePlayer_get_reverb_room>` **(** :ref:`int<class_int>` voice **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_reverb<class_SamplePlayer_get_reverb>` **(** :ref:`int<class_int>` voice **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_default_pitch_scale<class_SamplePlayer_set_default_pitch_scale>` **(** :ref:`float<class_float>` ratio **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_default_volume<class_SamplePlayer_set_default_volume>` **(** :ref:`float<class_float>` volume **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_default_volume_db<class_SamplePlayer_set_default_volume_db>` **(** :ref:`float<class_float>` db **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_default_pan<class_SamplePlayer_set_default_pan>` **(** :ref:`float<class_float>` pan, :ref:`float<class_float>` depth=0, :ref:`float<class_float>` height=0 **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_default_filter<class_SamplePlayer_set_default_filter>` **(** :ref:`int<class_int>` type, :ref:`float<class_float>` cutoff_hz, :ref:`float<class_float>` resonance, :ref:`float<class_float>` gain=0 **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_default_chorus<class_SamplePlayer_set_default_chorus>` **(** :ref:`float<class_float>` send **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_default_reverb<class_SamplePlayer_set_default_reverb>` **(** :ref:`int<class_int>` room_type, :ref:`float<class_float>` send **)** |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_default_pitch_scale<class_SamplePlayer_get_default_pitch_scale>` **(** **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_default_volume<class_SamplePlayer_get_default_volume>` **(** **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_default_volume_db<class_SamplePlayer_get_default_volume_db>` **(** **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_default_pan<class_SamplePlayer_get_default_pan>` **(** **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_default_pan_depth<class_SamplePlayer_get_default_pan_depth>` **(** **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_default_pan_height<class_SamplePlayer_get_default_pan_height>` **(** **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_default_filter_type<class_SamplePlayer_get_default_filter_type>` **(** **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_default_filter_cutoff<class_SamplePlayer_get_default_filter_cutoff>` **(** **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_default_filter_resonance<class_SamplePlayer_get_default_filter_resonance>` **(** **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_default_filter_gain<class_SamplePlayer_get_default_filter_gain>` **(** **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_default_chorus<class_SamplePlayer_get_default_chorus>` **(** **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_default_reverb_room<class_SamplePlayer_get_default_reverb_room>` **(** **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_default_reverb<class_SamplePlayer_get_default_reverb>` **(** **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_active<class_SamplePlayer_is_active>` **(** **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_voice_active<class_SamplePlayer_is_voice_active>` **(** :ref:`int<class_int>` voice **)** const |
+--------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Numeric Constants
-----------------
- **FILTER_NONE** = **0** --- Filter is disabled for voice.
- **FILTER_LOWPASS** = **1** --- Low-pass filter is used for voice.
- **FILTER_BANDPASS** = **2** --- Band-pass filter is used for voice.
- **FILTER_HIPASS** = **3** --- High-pass filter is used for voice.
- **FILTER_NOTCH** = **4** --- Notch (band reject) filter is used for voice.
- **FILTER_PEAK** = **5** --- Peak (exclusive band) filter is used for voice.
- **FILTER_BANDLIMIT** = **6** --- Band-limit filter is used for voice, in this case resonance is the high-pass cutoff. A band-limit filter has a different frequency response than a notch filter, but otherwise both are band-rejecting filters.
- **FILTER_LOW_SHELF** = **7** --- Low-shelf filter is used for voice.
- **FILTER_HIGH_SHELF** = **8** --- High-shelf filter is used for voice.
- **REVERB_SMALL** = **0** --- Small reverberation room (house room).
- **REVERB_MEDIUM** = **1** --- Medium reverberation room (street)
- **REVERB_LARGE** = **2** --- Large reverberation room (theatre)
- **REVERB_HALL** = **3** --- Huge reverberation room (cathedral, warehouse).
- **INVALID_VOICE_ID** = **-1** --- Value returned if the voice ID is invalid.
Description
-----------
SamplePlayer is a :ref:`Node<class_node>` meant for simple sample playback. A library of samples is loaded and played back "as is", without positioning or anything.
Member Function Description
---------------------------
.. _class_SamplePlayer_set_sample_library:
- void **set_sample_library** **(** :ref:`SampleLibrary<class_samplelibrary>` library **)**
Set the sample library for the player.
.. _class_SamplePlayer_get_sample_library:
- :ref:`SampleLibrary<class_samplelibrary>` **get_sample_library** **(** **)** const
Return the sample library used by the player.
.. _class_SamplePlayer_set_polyphony:
- void **set_polyphony** **(** :ref:`int<class_int>` max_voices **)**
Set the polyphony of the player (maximum amount of simultaneous voices).
.. _class_SamplePlayer_get_polyphony:
- :ref:`int<class_int>` **get_polyphony** **(** **)** const
Return the polyphony of the player.
.. _class_SamplePlayer_play:
- :ref:`int<class_int>` **play** **(** :ref:`String<class_string>` name, :ref:`bool<class_bool>` unique=false **)**
Play a sample referenced by its name.
Optionally, the playback can be made "unique" to force stopping all other samples currently played. The voices allocated for playback will then be returned.
.. _class_SamplePlayer_stop:
- void **stop** **(** :ref:`int<class_int>` voice **)**
Stop a given voice.
.. _class_SamplePlayer_stop_all:
- void **stop_all** **(** **)**
Stop all playing voices.
.. _class_SamplePlayer_set_mix_rate:
- void **set_mix_rate** **(** :ref:`int<class_int>` voice, :ref:`int<class_int>` hz **)**
Set the mix rate (in Hz) of a given voice.
.. _class_SamplePlayer_set_pitch_scale:
- void **set_pitch_scale** **(** :ref:`int<class_int>` voice, :ref:`float<class_float>` ratio **)**
Set the pitch scale of a given voice. A ratio of 1.0 is the normal scale.
.. _class_SamplePlayer_set_volume:
- void **set_volume** **(** :ref:`int<class_int>` voice, :ref:`float<class_float>` volume **)**
Set the volume of a given voice using a linear scale.
The "volume" argument should be a positive factor ranging from 0.0 (mute) up to 16.0 (i.e. 24 dB).
A factor of 1.0 means that the voice will be played at normal system volume. Factors above 1.0 might be limited by the platform's audio output.
.. _class_SamplePlayer_set_volume_db:
- void **set_volume_db** **(** :ref:`int<class_int>` voice, :ref:`float<class_float>` db **)**
Set the volume of a given voice in dB.
The "dB" argument can range from -80 to 24 dB, 0 dB being the maximum volume. Every 6 dB (resp. -6 dB), the volume is increased (resp. reduced) by half.
.. _class_SamplePlayer_set_pan:
- void **set_pan** **(** :ref:`int<class_int>` voice, :ref:`float<class_float>` pan, :ref:`float<class_float>` depth=0, :ref:`float<class_float>` height=0 **)**
Set the panning of a voice. Panning goes from -1.0 (left) to +1.0 (right).
Optionally, for hardware than support 3D sound, one can also set depth and height (also in range -1.0 to +1.0).
.. _class_SamplePlayer_set_filter:
- void **set_filter** **(** :ref:`int<class_int>` voice, :ref:`int<class_int>` type, :ref:`float<class_float>` cutoff_hz, :ref:`float<class_float>` resonance, :ref:`float<class_float>` gain=0 **)**
Set the filter for a given voice, using the given type (see FILTER\_\* constants), cutoff frequency (from 20 to 16,384 Hz) and resonance (from 0 to 4.0).
Optionally, a gain can also be given (from 0 to 2.0).
.. _class_SamplePlayer_set_chorus:
- void **set_chorus** **(** :ref:`int<class_int>` voice, :ref:`float<class_float>` send **)**
Set the chorus send level of a voice (from 0 to 1.0). For setting chorus parameters, see :ref:`AudioServer<class_audioserver>`.
.. _class_SamplePlayer_set_reverb:
- void **set_reverb** **(** :ref:`int<class_int>` voice, :ref:`int<class_int>` room_type, :ref:`float<class_float>` send **)**
Set the reverberation type (see REVERB\_\* constants) and send level (from 0 to 1.0) of a voice.
.. _class_SamplePlayer_get_mix_rate:
- :ref:`int<class_int>` **get_mix_rate** **(** :ref:`int<class_int>` voice **)** const
Return the current mix rate for a given voice.
.. _class_SamplePlayer_get_pitch_scale:
- :ref:`float<class_float>` **get_pitch_scale** **(** :ref:`int<class_int>` voice **)** const
Return the current pitch scale for a given voice.
.. _class_SamplePlayer_get_volume:
- :ref:`float<class_float>` **get_volume** **(** :ref:`int<class_int>` voice **)** const
Return the current volume (on a linear scale) for a given voice.
.. _class_SamplePlayer_get_volume_db:
- :ref:`float<class_float>` **get_volume_db** **(** :ref:`int<class_int>` voice **)** const
Return the current volume (in dB) for a given voice.
.. _class_SamplePlayer_get_pan:
- :ref:`float<class_float>` **get_pan** **(** :ref:`int<class_int>` voice **)** const
Return the current panning for a given voice.
.. _class_SamplePlayer_get_pan_depth:
- :ref:`float<class_float>` **get_pan_depth** **(** :ref:`int<class_int>` voice **)** const
Return the current pan depth for a given voice.
.. _class_SamplePlayer_get_pan_height:
- :ref:`float<class_float>` **get_pan_height** **(** :ref:`int<class_int>` voice **)** const
Return the current pan height for a given voice.
.. _class_SamplePlayer_get_filter_type:
- :ref:`int<class_int>` **get_filter_type** **(** :ref:`int<class_int>` voice **)** const
Return the current filter type in use (see FILTER\_\* constants) for a given voice.
.. _class_SamplePlayer_get_filter_cutoff:
- :ref:`float<class_float>` **get_filter_cutoff** **(** :ref:`int<class_int>` voice **)** const
Return the current filter cutoff frequency for a given voice.
.. _class_SamplePlayer_get_filter_resonance:
- :ref:`float<class_float>` **get_filter_resonance** **(** :ref:`int<class_int>` voice **)** const
Return the current filter resonance for a given voice.
.. _class_SamplePlayer_get_filter_gain:
- :ref:`float<class_float>` **get_filter_gain** **(** :ref:`int<class_int>` voice **)** const
Return the current filter gain for a given voice.
.. _class_SamplePlayer_get_chorus:
- :ref:`float<class_float>` **get_chorus** **(** :ref:`int<class_int>` voice **)** const
Return the current chorus send level for a given voice.
.. _class_SamplePlayer_get_reverb_room:
- :ref:`int<class_int>` **get_reverb_room** **(** :ref:`int<class_int>` voice **)** const
Return the current reverberation room type for a given voice (see REVERB\_\* enum).
.. _class_SamplePlayer_get_reverb:
- :ref:`float<class_float>` **get_reverb** **(** :ref:`int<class_int>` voice **)** const
Return the current reverberation send level for a given voice.
.. _class_SamplePlayer_set_default_pitch_scale:
- void **set_default_pitch_scale** **(** :ref:`float<class_float>` ratio **)**
Set the default pitch scale of the player. A ratio of 1.0 is the normal scale.
.. _class_SamplePlayer_set_default_volume:
- void **set_default_volume** **(** :ref:`float<class_float>` volume **)**
Set the default volume of the player using a linear scale.
The "volume" argument should be a positive factor ranging from 0.0 (mute) up to 16.0 (i.e. 24 dB).
A factor of 1.0 means that the voice will be played at normal system volume. Factors above 1.0 might be limited by the platform's audio output.
.. _class_SamplePlayer_set_default_volume_db:
- void **set_default_volume_db** **(** :ref:`float<class_float>` db **)**
Set the default volume of the player in dB.
The "dB" argument can range from -80 to 24 dB, 0 dB being the maximum volume. Every 6 dB (resp. -6 dB), the volume is increased (resp. reduced) by half.
.. _class_SamplePlayer_set_default_pan:
- void **set_default_pan** **(** :ref:`float<class_float>` pan, :ref:`float<class_float>` depth=0, :ref:`float<class_float>` height=0 **)**
Set the default panning of the player. Panning goes from -1.0 (left) to +1.0 (right).
Optionally, for hardware than support 3D sound, one can also set depth and height (also in range -1.0 to +1.0).
.. _class_SamplePlayer_set_default_filter:
- void **set_default_filter** **(** :ref:`int<class_int>` type, :ref:`float<class_float>` cutoff_hz, :ref:`float<class_float>` resonance, :ref:`float<class_float>` gain=0 **)**
Set the default filter for the player, using the given type (see FILTER\_\* constants), cutoff frequency (from 20 to 16,384 Hz) and resonance (from 0 to 4.0).
Optionally, a gain can also be given (from 0 to 2.0).
.. _class_SamplePlayer_set_default_chorus:
- void **set_default_chorus** **(** :ref:`float<class_float>` send **)**
Set the default chorus send level of the player (from 0 to 1.0). For setting chorus parameters, see :ref:`AudioServer<class_audioserver>`.
.. _class_SamplePlayer_set_default_reverb:
- void **set_default_reverb** **(** :ref:`int<class_int>` room_type, :ref:`float<class_float>` send **)**
Set the default reverberation type (see REVERB\_\* constants) and send level (from 0 to 1.0) of the player.
.. _class_SamplePlayer_get_default_pitch_scale:
- :ref:`float<class_float>` **get_default_pitch_scale** **(** **)** const
Return the default pitch scale of the player.
.. _class_SamplePlayer_get_default_volume:
- :ref:`float<class_float>` **get_default_volume** **(** **)** const
Return the default volume (on a linear scale) of the player.
.. _class_SamplePlayer_get_default_volume_db:
- :ref:`float<class_float>` **get_default_volume_db** **(** **)** const
Return the default volume (in dB) of the player.
.. _class_SamplePlayer_get_default_pan:
- :ref:`float<class_float>` **get_default_pan** **(** **)** const
Return the default panning of the player.
.. _class_SamplePlayer_get_default_pan_depth:
- :ref:`float<class_float>` **get_default_pan_depth** **(** **)** const
Return the default pan depth of the player.
.. _class_SamplePlayer_get_default_pan_height:
- :ref:`float<class_float>` **get_default_pan_height** **(** **)** const
Return the default pan height of the player.
.. _class_SamplePlayer_get_default_filter_type:
- :ref:`int<class_int>` **get_default_filter_type** **(** **)** const
Return the default filter type in use (see FILTER\_\* constants) for the player.
.. _class_SamplePlayer_get_default_filter_cutoff:
- :ref:`float<class_float>` **get_default_filter_cutoff** **(** **)** const
Return the default filter cutoff frequency of the player.
.. _class_SamplePlayer_get_default_filter_resonance:
- :ref:`float<class_float>` **get_default_filter_resonance** **(** **)** const
Return the default filter resonance of the player.
.. _class_SamplePlayer_get_default_filter_gain:
- :ref:`float<class_float>` **get_default_filter_gain** **(** **)** const
Return the default filter gain of the player.
.. _class_SamplePlayer_get_default_chorus:
- :ref:`float<class_float>` **get_default_chorus** **(** **)** const
Return the default chorus send level of the player.
.. _class_SamplePlayer_get_default_reverb_room:
- :ref:`int<class_int>` **get_default_reverb_room** **(** **)** const
Return the default reverberation room type of the player (see REVERB\_\* enum).
.. _class_SamplePlayer_get_default_reverb:
- :ref:`float<class_float>` **get_default_reverb** **(** **)** const
Return the default reverberation send level of the player.
.. _class_SamplePlayer_is_active:
- :ref:`bool<class_bool>` **is_active** **(** **)** const
Return whether the player is currently active.
.. _class_SamplePlayer_is_voice_active:
- :ref:`bool<class_bool>` **is_voice_active** **(** :ref:`int<class_int>` voice **)** const
Return whether the given voice is currently active.