29 #ifndef SAMPLE_PLAYER_H 30 #define SAMPLE_PLAYER_H 32 #include "scene/main/node.h" 33 #include "scene/resources/sample_library.h" 38 OBJ_CATEGORY(
"Audio Nodes");
64 INVALID_VOICE_ID=0xFFFFFFFF
67 typedef uint32_t VoiceID;
87 float filter_resonance;
90 ReverbRoomType reverb_room;
110 float filter_resonance;
113 ReverbRoomType reverb_room;
133 void set_polyphony(
int p_voice_count);
134 int get_polyphony()
const;
136 VoiceID play(
const String& p_name,
bool unique=
false);
137 void stop(VoiceID p_voice);
139 bool is_voice_active(VoiceID)
const;
140 bool is_active()
const;
142 void set_mix_rate(VoiceID p_voice,
int p_mix_rate);
143 void set_pitch_scale(VoiceID p_voice,
float p_pitch_scale);
144 void set_volume(VoiceID p_voice,
float p_volume);
145 void set_volume_db(VoiceID p_voice,
float p_db);
146 void set_pan(VoiceID p_voice,
float p_pan,
float p_pan_depth=0,
float p_pan_height=0);
147 void set_filter(VoiceID p_voice,
FilterType p_filter,
float p_cutoff,
float p_resonance,
float p_gain);
148 void set_chorus(VoiceID p_voice,
float p_send);
149 void set_reverb(VoiceID p_voice,ReverbRoomType p_room,
float p_send);
151 int get_mix_rate(VoiceID p_voice)
const;
152 float get_pitch_scale(VoiceID p_voice)
const;
153 float get_volume(VoiceID p_voice)
const;
154 float get_volume_db(VoiceID p_voice)
const;
156 float get_pan(VoiceID p_voice)
const;
157 float get_pan_depth(VoiceID p_voice)
const;
158 float get_pan_height(VoiceID p_voice)
const;
159 FilterType get_filter_type(VoiceID p_voice)
const;
160 float get_filter_cutoff(VoiceID p_voice)
const;
161 float get_filter_resonance(VoiceID p_voice)
const;
162 float get_filter_gain(VoiceID p_voice)
const;
163 float get_chorus(VoiceID p_voice)
const;
164 ReverbRoomType get_reverb_room(VoiceID p_voice)
const;
165 float get_reverb(VoiceID p_voice)
const;
169 void set_default_pitch_scale(
float p_pitch_scale);
170 void set_default_volume(
float p_volume);
171 void set_default_volume_db(
float p_db);
172 void set_default_pan(
float p_pan,
float p_pan_depth=0,
float p_pan_height=0);
173 void set_default_filter(
FilterType p_filter,
float p_cutoff,
float p_resonance,
float p_gain);
174 void set_default_chorus(
float p_send);
175 void set_default_reverb(ReverbRoomType p_room,
float p_send);
177 float get_default_volume()
const;
178 float get_default_volume_db()
const;
179 float get_default_pitch_scale()
const;
180 float get_default_pan()
const;
181 float get_default_pan_depth()
const;
182 float get_default_pan_height()
const;
184 float get_default_filter_cutoff()
const;
185 float get_default_filter_resonance()
const;
186 float get_default_filter_gain()
const;
187 float get_default_chorus()
const;
188 ReverbRoomType get_default_reverb_room()
const;
189 float get_default_reverb()
const;
196 VARIANT_ENUM_CAST( SamplePlayer::ReverbRoomType );
198 #endif // SAMPLE_PLAYER_H FilterType
Definition: sample_player.h:42
cutoff is LP resonace is HP
Definition: sample_player.h:49
Definition: sample_player.h:35
Definition: string_db.h:48
static void _bind_methods()
Definition: sample_player.cpp:604