1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310
|
/***************************************************************************
* Copyright (C) 2005-2019 by the FIFE team *
* http://www.fifengine.net *
* This file is part of FIFE. *
* *
* FIFE is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
%module soundeffect
%{
#include "audio/effects/soundeffect.h"
%}
%include "model/metamodel/modelcoords.i"
namespace FIFE {
class SoundFilter;
enum SoundEffectType {
SE_EFFECT_NULL,
SE_EFFECT_REVERB,
SE_EFFECT_CHORUS,
SE_EFFECT_DISTORTION,
SE_EFFECT_ECHO,
SE_EFFECT_FLANGER,
SE_EFFECT_FREQUENCY_SHIFTER,
SE_EFFECT_VOCAL_MORPHER,
SE_EFFECT_PITCH_SHIFTER,
SE_EFFECT_RING_MODULATOR,
SE_EFFECT_AUTOWAH,
SE_EFFECT_COMPRESSOR,
SE_EFFECT_EQUALIZER,
SE_EFFECT_EAXREVERB
};
class SoundEffect {
public:
SoundEffectType getEffectType() const;
bool isEnabled() const;
protected:
SoundEffect();
};
class Reverb : public SoundEffect {
public:
void setDensity(float value);
float getDensity() const;
void setDiffusion(float value);
float getDiffusion() const;
void setGain(float value);
float getGain() const;
void setGainHf(float value);
float getGainHf() const;
void setDecayTime(float value);
float getDecayTime() const;
void setDecayHfRatio(float value);
float getDecayHfRatio() const;
void setReflectionsGain(float value);
float getReflectionsGain() const;
void setReflectionsDelay(float value);
float getReflectionsDelay() const;
void setLateReverbGain(float value);
float getLateReverbGain() const;
void setLateReverbDelay(float value);
float getLateReverbDelay() const;
void setAirAbsorptionGainHf(float value);
float getAirAbsorptionGainHf() const;
void setRoomRolloffFactor(float value);
float getRoomRolloffFactor() const;
void setDecayHfLimit(bool value);
bool isDecayHfLimit() const;
private:
Reverb();
};
class Chorus : public SoundEffect {
public:
void setWaveformTriangle(bool value);
bool isWaveformTriangle() const;
void setPhase(int32_t value);
int32_t getPhase() const;
void setRate(float value);
float getRate() const;
void setDepth(float value);
float getDepth() const;
void setFeedback(float value);
float getFeedback() const;
void setDelay(float value);
float getDelay() const;
private:
Chorus();
};
class Distortion : public SoundEffect {
public:
void setEdge(float value);
float getEdge() const;
void setGain(float value);
float getGain() const;
void setLowpassCutoff(float value);
float getLowpassCutoff() const;
void setEqCenter(float value);
float getEqCenter() const;
void setEqBandwidth(float value);
float getEqBandwidth() const;
private:
Distortion();
};
class Echo : public SoundEffect {
public:
void setDelay(float value);
float getDelay() const;
void setLrDelay(float value);
float getLrDelay() const;
void setDamping(float value);
float getDamping() const;
void setFeedback(float value);
float getFeedback() const;
void setSpread(float value);
float getSpread() const;
private:
Echo();
};
class Flanger : public SoundEffect {
public:
void setWaveformTriangle(bool value);
bool isWaveformTriangle() const;
void setPhase(int32_t value);
int32_t getPhase() const;
void setRate(float value);
float getRate() const;
void setDepth(float value);
float getDepth() const;
void setFeedback(float value);
float getFeedback() const;
void setDelay(float value);
float getDelay() const;
private:
Flanger();
};
class FrequencyShifter : public SoundEffect {
public:
void setFrequency(float value);
float getFrequency() const;
void setLeftDirection(uint8_t value);
uint8_t getLeftDirection() const;
void setRightDirection(uint8_t value);
uint8_t getRightDirection() const;
private:
FrequencyShifter();
};
class VocalMorpher : public SoundEffect {
public:
void setPhonemeA(uint16_t value);
uint16_t getPhonemeA() const;
void setPhonemeB(uint16_t value);
uint16_t getPhonemeB() const;
void setPhonemeCoarseA(int16_t value);
int16_t getPhonemeCoarseA() const;
void setPhonemeCoarseB(int16_t value);
int16_t getPhonemeCoarseB() const;
void setWaveform(uint8_t value);
uint8_t getWaveform() const;
void setRate(float value);
float getRate() const;
private:
VocalMorpher();
};
class PitchShifter : public SoundEffect {
public:
void setCoarseTune(int16_t value);
int16_t getCoarseTune() const;
void setFineTune(int16_t value);
int16_t getFineTune() const;
private:
PitchShifter();
};
class RingModulator : public SoundEffect {
public:
void setFrequency(float value);
float getFrequency() const;
void setHighpassCutoff(float value);
float getHighpassCutoff() const;
void setWaveform(uint8_t value);
uint8_t getWaveform() const;
private:
RingModulator();
};
class Autowah : public SoundEffect {
public:
void setAttackTime(float value);
float getAttackTime() const;
void setReleaseTime(float value);
float getReleaseTime() const;
void setResonance(float value);
float getResonance() const;
void setPeakGain(float value);
float getPeakGain() const;
private:
Autowah();
};
class Compressor : public SoundEffect {
public:
void setCompressor(bool value);
bool isCompressor() const;
private:
Compressor();
};
class Equalizer : public SoundEffect {
public:
void setLowGain(float value);
float getLowGain() const;
void setLowCutoff(float value);
float getLowCutoff() const;
void setMid1Gain(float value);
float getMid1Gain() const;
void setMid1Center(float value);
float getMid1Center() const;
void setMid1Width(float value);
float getMid1Width() const;
void setMid2Gain(float value);
float getMid2Gain() const;
void setMid2Center(float value);
float getMid2Center() const;
void setMid2Width(float value);
float getMid2Width() const;
void setHighGain(float value);
float getHighGain() const;
void setHighCutoff(float value);
float getHighCutoff() const;
private:
Equalizer();
};
class EaxReverb : public SoundEffect {
public:
void setDensity(float value);
float getDensity() const;
void setDiffusion(float value);
float getDiffusion() const;
void setGain(float value);
float getGain() const;
void setGainHf(float value);
float getGainHf() const;
void setGainLf(float value);
float getGainLf() const;
void setDecayTime(float value);
float getDecayTime() const;
void setDecayHfRatio(float value);
float getDecayHfRatio() const;
void setDecayLfRatio(float value);
float getDecayLfRatio() const;
void setReflectionsGain(float value);
float getReflectionsGain() const;
void setReflectionsDelay(float value);
float getReflectionsDelay() const;
void setReflectionsPan(const AudioSpaceCoordinate& coordinate);
AudioSpaceCoordinate getReflectionsPan() const;
void setLateReverbGain(float value);
float getLateReverbGain() const;
void setLateReverbDelay(float value);
float getLateReverbDelay() const;
void setLateReverbPan(const AudioSpaceCoordinate& coordinate);
AudioSpaceCoordinate getLateReverbPan() const;
void setEchoTime(float value);
float getEchoTime() const;
void setEchoDepth(float value);
float getEchoDepth() const;
void setModulationTime(float value);
float getModulationTime() const;
void setModulationDepth(float value);
float getModulationDepth() const;
void setAirAbsorptionGainHf(float value);
float getAirAbsorptionGainHf() const;
void setHfReference(float value);
float getHfReference() const;
void setLfReference(float value);
float getLfReference() const;
void setRoomRolloffFactor(float value);
float getRoomRolloffFactor() const;
void setDecayHfLimit(bool value);
bool isDecayHfLimit() const;
private:
EaxReverb();
};
}
|