IEffectParameters.h

00001 // Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
00002 // This file is part of the "cAudio Engine"
00003 // For conditions of distribution and use, see copyright notice in cAudio.h
00004 
00005 #ifndef IEFFECTPARAMETERS_H
00006 #define IEFFECTPARAMETERS_H
00007 
00008 #include "cVector3.h"
00009 #include "cAudioDefines.h"
00010 
00011 #ifdef CAUDIO_EFX_ENABLED
00012 
00013 namespace cAudio
00014 {
00016         struct sEAXReverbParameters
00017         {
00018                 sEAXReverbParameters(
00019                         float density = 1.0f,
00020                         float diffusion = 1.0f, 
00021                         float gain = 0.32f,
00022                         float gainHF = 0.89f, 
00023                         float gainLF = 0.0f, 
00024                         float decayTime = 1.49f, 
00025                         float decayHFRatio = 0.83f, 
00026                         float decayLFRatio = 1.0f, 
00027                         float reflectionsGain = 0.05f, 
00028                         float reflectionsDelay = 0.007f, 
00029                         cVector3 reflectionsPan = cVector3(0.0f, 0.0f, 0.0f), 
00030                         float lateReverbGain = 1.26f, 
00031                         float lateReverbDelay = 0.011f, 
00032                         cVector3 lateReverbPan = cVector3(0.0f, 0.0f, 0.0f), 
00033                         float echoTime = 0.25f, 
00034                         float echoDepth = 0.0f, 
00035                         float modulationTime = 0.25f, 
00036                         float modulationDepth = 0.0f, 
00037                         float airAbsorptionGainHF = 0.994f, 
00038                         float hFReference = 5000.0f, 
00039                         float lFReference = 250.0f, 
00040                         float roomRolloffFactor = 0.0f, 
00041                         bool decayHFLimit = true) : 
00042                         Density(density), Diffusion(diffusion), Gain(gain), GainHF(gainHF), GainLF(gainLF),
00043                         DecayTime(decayTime), DecayHFRatio(decayHFRatio), DecayLFRatio(decayLFRatio), 
00044                         ReflectionsGain(reflectionsGain), ReflectionsDelay(reflectionsDelay),
00045                         ReflectionsPan(reflectionsPan), LateReverbGain(lateReverbGain),
00046                         LateReverbDelay(lateReverbDelay), LateReverbPan(lateReverbPan),
00047                         EchoTime(echoTime), EchoDepth(echoDepth),ModulationTime(modulationTime), 
00048                         ModulationDepth(modulationDepth), AirAbsorptionGainHF(airAbsorptionGainHF), 
00049                         HFReference(hFReference), LFReference(lFReference), 
00050                         RoomRolloffFactor(roomRolloffFactor), DecayHFLimit(decayHFLimit) { }
00051 
00055                 float Density;
00056 
00062                 float Diffusion;
00063 
00070                 float Gain;
00071 
00078                 float GainHF;
00079 
00086                 float GainLF;
00087 
00091                 float DecayTime;
00092 
00101                 float DecayHFRatio;
00102 
00111                 float DecayLFRatio;
00112 
00119                 float ReflectionsGain;
00120 
00126                 float ReflectionsDelay;
00127 
00141                 cVector3 ReflectionsPan;
00142 
00148                 float LateReverbGain;
00149 
00154                 float LateReverbDelay;
00155 
00160                 cVector3 LateReverbPan;
00161 
00167                 float EchoTime;
00168 
00179                 float EchoDepth;
00180                 
00185                 float ModulationTime;
00186 
00191                 float ModulationDepth;
00192 
00201                 float AirAbsorptionGainHF;
00202 
00211                 float HFReference;
00212 
00215                 float LFReference;
00216 
00231                 float RoomRolloffFactor;
00232 
00240                 bool DecayHFLimit;
00241         };
00242 
00244         struct sReverbParameters
00245         {
00246                 sReverbParameters(
00247                         float density = 1.0f,
00248                         float diffusion = 1.0f, 
00249                         float gain = 0.32f,
00250                         float gainHF = 0.89f, 
00251                         float decayTime = 1.49f, 
00252                         float decayHFRatio = 0.83f, 
00253                         float reflectionsGain = 0.05f, 
00254                         float reflectionsDelay = 0.007f, 
00255                         float lateReverbGain = 1.26f, 
00256                         float lateReverbDelay = 0.011f, 
00257                         float airAbsorptionGainHF = 0.994f, 
00258                         float roomRolloffFactor = 0.0f, 
00259                         bool decayHFLimit = true) : 
00260                         Density(density), Diffusion(diffusion), Gain(gain), GainHF(gainHF),
00261                         DecayTime(decayTime), DecayHFRatio(decayHFRatio), 
00262                         ReflectionsGain(reflectionsGain), ReflectionsDelay(reflectionsDelay),
00263                         LateReverbGain(lateReverbGain), LateReverbDelay(lateReverbDelay),
00264                         AirAbsorptionGainHF(airAbsorptionGainHF), RoomRolloffFactor(roomRolloffFactor), 
00265                         DecayHFLimit(decayHFLimit) { }
00266 
00270                 float Density;
00271 
00277                 float Diffusion;
00278 
00285                 float Gain;
00286 
00292                 float GainHF;
00293 
00297                 float DecayTime;
00298 
00307                 float DecayHFRatio;
00308 
00316                 float ReflectionsGain;
00317 
00323                 float ReflectionsDelay;
00324 
00330                 float LateReverbGain;
00331 
00336                 float LateReverbDelay;
00337 
00346                 float AirAbsorptionGainHF;
00347 
00362                 float RoomRolloffFactor;
00363 
00371                 bool DecayHFLimit;
00372         };
00373 
00375         struct sChorusParameters
00376         {
00377                 enum ChorusWaveform
00378                 {
00379                         ECW_SINUSOID,
00380                         ECW_TRIANGLE,
00381                         ECW_COUNT
00382                 };
00383                 sChorusParameters(
00384                         ChorusWaveform waveform = ECW_TRIANGLE,
00385                         int phase = 90,
00386                         float rate = 1.1f, 
00387                         float depth = 0.1f,
00388                         float feedback = 0.25f, 
00389                         float delay = 0.016f) : 
00390                         Waveform(waveform), Phase(phase), Rate(rate), Depth(depth), Feedback(feedback), 
00391                         Delay(delay) { }
00392 
00394                 ChorusWaveform Waveform;
00395 
00400                 int Phase;
00401 
00404                 float Rate;
00405 
00408                 float Depth;
00409 
00415                 float Feedback;
00416 
00422                 float Delay;
00423         };
00424 
00426         struct sDistortionParameters
00427         {
00428                 sDistortionParameters(
00429                         float edge = 0.2f,
00430                         float gain = 0.05f, 
00431                         float lowpassCutoff = 8000.0f,
00432                         float eqCenter = 3600.0f, 
00433                         float eqBandwidth = 3600.0f) : 
00434                         Edge(edge), Gain(gain), LowpassCutoff(lowpassCutoff), EqCenter(eqCenter), 
00435                         EqBandwidth(eqBandwidth) { }
00436 
00439                 float Edge;
00440 
00443                 float Gain;
00444 
00447                 float LowpassCutoff;
00448 
00451                 float EqCenter;
00452 
00455                 float EqBandwidth;
00456         };
00457 
00459         struct sEchoParameters
00460         {
00461                 sEchoParameters(
00462                         float delay = 0.1f,
00463                         float lRDelay = 0.1f, 
00464                         float damping = 0.5f,
00465                         float feedback = 0.5f, 
00466                         float spread = -1.0f) : 
00467                         Delay(delay), LRDelay(lRDelay), Damping(damping), Feedback(feedback), 
00468                         Spread(spread) { }
00469 
00472                 float Delay;
00473 
00476                 float LRDelay;
00477 
00482                 float Damping;
00483 
00488                 float Feedback;
00489 
00494                 float Spread;
00495         };
00496 
00498         struct sFlangerParameters
00499         {
00500                 enum FlangerWaveform
00501                 {
00502                         EFW_SINUSOID,
00503                         EFW_TRIANGLE,
00504                         EFW_COUNT
00505                 };
00506                 sFlangerParameters(
00507                         FlangerWaveform waveform = EFW_TRIANGLE,
00508                         int phase = 0,
00509                         float rate = 0.27f, 
00510                         float depth = 1.0f,
00511                         float feedback = -0.5f, 
00512                         float delay = 0.002f) : 
00513                         Waveform(waveform), Phase(phase), Rate(rate), Depth(depth), Feedback(feedback), 
00514                         Delay(delay) { }
00515 
00517                 FlangerWaveform Waveform;
00518 
00521                 int Phase;
00522 
00525                 float Rate;
00526 
00529                 float Depth;
00530 
00536                 float Feedback;
00537 
00540                 float Delay;
00541         };
00542 
00544         struct sFrequencyShiftParameters
00545         {
00546                 enum ShiftDirection
00547                 {
00548                         ESD_DOWN,
00549                         ESD_UP,
00550                         ESD_OFF,
00551                         ESD_COUNT
00552                 };
00553                 sFrequencyShiftParameters(
00554                         float frequency = 0.0f,
00555                         ShiftDirection left = ESD_DOWN,
00556                         ShiftDirection right = ESD_DOWN) : 
00557                         Frequency(frequency), Left(left), Right(right) { }
00558 
00564                 float Frequency;
00565 
00568                 ShiftDirection Left;
00569 
00572                 ShiftDirection Right;
00573         };
00574 
00576         struct sVocalMorpherParameters
00577         {
00578                 enum MorpherPhoneme
00579                 {
00580                         EMP_A,
00581                         EMP_E,
00582                         EMP_I,
00583                         EMP_O,
00584                         EMP_U,
00585                         EMP_AA,
00586                         EMP_AE,
00587                         EMP_AH,
00588                         EMP_AO,
00589                         EMP_EH,
00590                         EMP_ER,
00591                         EMP_IH,
00592                         EMP_IY,
00593                         EMP_UH,
00594                         EMP_UW,
00595                         EMP_B,
00596                         EMP_D,
00597                         EMP_F,
00598                         EMP_G,
00599                         EMP_J,
00600                         EMP_K,
00601                         EMP_L,
00602                         EMP_M,
00603                         EMP_N,
00604                         EMP_P,
00605                         EMP_R,
00606                         EMP_S,
00607                         EMP_T,
00608                         EMP_V,
00609                         EMP_Z,
00610                         ESD_COUNT
00611                 };
00612 
00613                 enum MorpherWaveform
00614                 {
00615                         EMW_SINUSOID,
00616                         EMW_TRIANGLE,
00617                         EMW_SAW,
00618                         EMW_COUNT
00619                 };
00620                 sVocalMorpherParameters(
00621                         MorpherPhoneme phonemeA = EMP_A,
00622                         MorpherPhoneme phonemeB = EMP_ER,
00623                         int phonemeACoarseTune = 0,
00624                         int phonemeBCoarseTune = 0,
00625                         MorpherWaveform waveform = EMW_SINUSOID,
00626                         float rate = 1.41f) : 
00627                         PhonemeA(phonemeA), PhonemeB(phonemeB), PhonemeACoarseTune(phonemeACoarseTune),
00628                         PhonemeBCoarseTune(phonemeBCoarseTune), Waveform(waveform), Rate(rate) { }
00629 
00633                 MorpherPhoneme PhonemeA;
00634 
00638                 MorpherPhoneme PhonemeB;
00639 
00642                 int PhonemeACoarseTune;
00643 
00646                 int PhonemeBCoarseTune;
00647 
00649                 MorpherWaveform Waveform;
00650 
00653                 float Rate;
00654         };
00655 
00657         struct sPitchShifterParameters
00658         {
00659                 sPitchShifterParameters(
00660                         int coarseTune = 12,
00661                         int fineTune = 0) : 
00662                         CoarseTune(coarseTune), FineTune(fineTune) { }
00663 
00668                 int CoarseTune;
00669 
00674                 int FineTune;
00675         };
00676 
00678         struct sRingModulatorParameters
00679         {
00680                 enum ModulatorWaveform
00681                 {
00682                         EMW_SINUSOID,
00683                         EMW_SAW,
00684                         EMW_SQUARE,
00685                         EMW_COUNT
00686                 };
00687                 sRingModulatorParameters(
00688                         float frequency = 440.0f,
00689                         float highPassCutoff = 800.0f,
00690                         ModulatorWaveform waveform = EMW_SINUSOID) : 
00691                         Frequency(frequency), HighPassCutoff(highPassCutoff), Waveform(waveform) { }
00692 
00698                 float Frequency;
00699 
00705                 float HighPassCutoff;
00706 
00710                 ModulatorWaveform Waveform;
00711         };
00712 
00714         struct sAutowahParameters
00715         {
00716                 sAutowahParameters(
00717                         float attackTime = 0.06f,
00718                         float releaseTime = 0.06f, 
00719                         float resonance = 1000.0f,
00720                         float peakGain = 11.22f) : 
00721                         AttackTime(attackTime), ReleaseTime(releaseTime), Resonance(resonance), 
00722                         PeakGain(peakGain) { }
00723 
00726                 float AttackTime;
00727 
00730                 float ReleaseTime;
00731 
00737                 float Resonance;
00738 
00741                 float PeakGain;
00742         };
00743 
00745         struct sCompressorParameters
00746         {
00747                 sCompressorParameters(
00748                         bool active = true) : 
00749                         Active(active) { }
00750 
00752                 bool Active;
00753         };
00754 
00756         struct sEqualizerParameters
00757         {
00758                 sEqualizerParameters(
00759                         float lowGain = 1.0f,
00760                         float lowCutoff = 200.0f,
00761                         float mid1Gain = 1.0f,
00762                         float mid1Center = 500.0f,
00763                         float mid1Width = 1.0f,
00764                         float mid2Gain = 1.0f,
00765                         float mid2Center = 3000.0f,
00766                         float mid2Width = 1.0f,
00767                         float highGain = 1.0f,
00768                         float highCutoff = 6000.0f) : 
00769                         LowGain(lowGain), LowCutoff(lowCutoff), Mid1Gain(mid1Gain), 
00770                         Mid1Center(mid1Center), Mid1Width(mid1Width), Mid2Gain(mid2Gain), 
00771                         Mid2Center(mid2Center), Mid2Width(mid2Width), HighGain(highGain),
00772                         HighCutoff(highCutoff) { }
00773 
00776                 float LowGain;
00777 
00780                 float LowCutoff;
00781 
00784                 float Mid1Gain;
00785 
00788                 float Mid1Center;
00789 
00792                 float Mid1Width;
00793 
00796                 float Mid2Gain;
00797 
00800                 float Mid2Center;
00801 
00804                 float Mid2Width;
00805 
00808                 float HighGain;
00809 
00812                 float HighCutoff;
00813         };
00814 };
00815 
00816 #endif
00817 
00818 #endif 
 All Classes Namespaces Functions Variables Enumerations

Generated on Sat Feb 20 22:55:08 2010 for cAudio by  doxygen 1.6.2