00001 using Microsoft.VisualBasic; 00002 using Microsoft.VisualBasic.Compatibility; 00003 using System; 00004 using System.Collections; 00005 using System.Collections.Generic; 00006 using System.Data; 00007 using System.Drawing; 00008 using System.Diagnostics; 00009 using System.Windows.Forms; 00010 using System.Linq; 00011 using System.Xml.Linq; 00012 namespace SoundsSharpNameSpace.fmodex 00013 { 00014 public static class DSP 00015 { 00016 00017 // ============================================================================================= ' 00018 // FMOD Ex - DSP Visual Basic Module. Copyright (c), Firelight Technologies Pty, Ltd. 2004-2008. ' 00019 // ' 00020 // Use this module if you are interested in delving deeper into the FMOD software mixing / ' 00021 // DSP engine. In this module you can find parameter structures for FMOD system reigstered ' 00022 // DSP effects and generators. ' 00023 // ' 00024 // ============================================================================================= ' 00025 00026 // 00027 //[Structure] 00028 //[ 00029 //[Description] 00030 //Structure that is passed into each callback. 00031 00032 //[REMARKS] 00033 //Members marked with '[in] mean the user sets the value before passing it to the function. 00034 //Members marked with '[out] mean FMOD sets the value to be used after the function exits. 00035 00036 //[PLATFORMS] 00037 //Win32, Win64, WinCE, Linux, Macintosh, XBox, PlayStation 2, GameCube 00038 00039 //[SEE_ALSO] 00040 //FMOD_DSP_DESCRIPTION 00041 //] 00042 // 00043 public struct FMOD_DSP 00044 { 00045 // '[in]'[out] User created data the dsp plugin writer wants to attach to this object. ' 00046 public int userdata; 00047 } 00048 00049 00050 // 00051 //DSP callbacks 00052 // 00053 //typedef FMOD_RESULT (F_CALLBACK *FMOD_DSP_CREATECALLBACK) (FMOD_DSP *dsp); 00054 //typedef FMOD_RESULT (F_CALLBACK *FMOD_DSP_RELEASECALLBACK) (FMOD_DSP *dsp); 00055 //typedef FMOD_RESULT (F_CALLBACK *FMOD_DSP_RESETCALLBACK) (FMOD_DSP *dsp); 00056 //typedef FMOD_RESULT (F_CALLBACK *FMOD_DSP_READCALLBACK) (FMOD_DSP *dsp, float *inbuffer, float *outbuffer, unsigned int length, int inchannels, int outchannels); 00057 //typedef FMOD_RESULT (F_CALLBACK *FMOD_DSP_SETPOSITIONCALLBACK) (FMOD_DSP *dsp, unsigned int seeklen); 00058 //typedef FMOD_RESULT (F_CALLBACK *FMOD_DSP_SETPARAMCALLBACK)(FMOD_DSP *dsp, int index, float value); 00059 //typedef FMOD_RESULT (F_CALLBACK *FMOD_DSP_GETPARAMCALLBACK)(FMOD_DSP *dsp, int index, float *value, char *valuestr); 00060 //typedef FMOD_RESULT (F_CALLBACK *FMOD_DSP_DIALOGCALLBACK) (FMOD_DSP *dsp, void *hwnd, int show); 00061 00062 // 00063 //[ENUM] 00064 //[ 00065 //[Description] 00066 //These definitions can be used for creating FMOD defined special effects or DSP units. 00067 00068 //[REMARKS] 00069 //To get them to be active, first create the unit, then add it somewhere into the DSP network, either at the front of the network near the soundcard unit to affect the global output (by using FMOD_System_GetDSPHead), or on a single channel (using FMOD_Channel_GetDSPHead). 00070 00071 //[PLATFORMS] 00072 //Win32, Win64, WinCE, Linux, Macintosh, XBox, PlayStation 2, GameCube 00073 00074 //[SEE_ALSO] 00075 //FMOD_System_CreateDSPByType 00076 //] 00077 // 00078 public enum FMOD_DSP_TYPE 00079 { 00080 FMOD_DSP_TYPE_UNKNOWN, 00081 // This unit was created via a non FMOD plugin so has an unknown purpose. ' 00082 FMOD_DSP_TYPE_MIXER, 00083 // This unit does nothing but take inputs and mix them together then feed the result to the soundcard unit. ' 00084 FMOD_DSP_TYPE_OSCILLATOR, 00085 // This unit generates sine/square/saw/triangle or noise tones. ' 00086 FMOD_DSP_TYPE_LOWPASS, 00087 // This unit filters sound using a high quality, resonant lowpass filter algorithm but consumes more CPU time. ' 00088 FMOD_DSP_TYPE_ITLOWPASS, 00089 // This unit filters sound using a resonant lowpass filter algorithm that is used in Impulse Tracker, but with limited cutoff range (0 to 8060hz). ' 00090 FMOD_DSP_TYPE_HIGHPASS, 00091 // This unit filters sound using a resonant highpass filter algorithm. ' 00092 FMOD_DSP_TYPE_ECHO, 00093 // This unit produces an echo on the sound and fades out at the desired rate. ' 00094 FMOD_DSP_TYPE_FLANGE, 00095 // This unit produces a flange effect on the sound. ' 00096 FMOD_DSP_TYPE_DISTORTION, 00097 // This unit distorts the sound. ' 00098 FMOD_DSP_TYPE_NORMALIZE, 00099 // This unit normalizes or amplifies the sound to a certain level. ' 00100 FMOD_DSP_TYPE_PARAMEQ, 00101 // This unit attenuates or amplifies a selected frequency range. ' 00102 FMOD_DSP_TYPE_PITCHSHIFT, 00103 // This unit bends the pitch of a sound without changing the speed of playback. ' 00104 FMOD_DSP_TYPE_CHORUS, 00105 // This unit produces a chorus effect on the sound. ' 00106 FMOD_DSP_TYPE_REVERB, 00107 // This unit produces a reverb effect on the sound. ' 00108 FMOD_DSP_TYPE_VSTPLUGIN, 00109 // This unit allows the use of Steinberg VST plugins ' 00110 FMOD_DSP_TYPE_WINAMPPLUGIN, 00111 // This unit allows the use of Nullsoft Winamp plugins ' 00112 FMOD_DSP_TYPE_ITECHO, 00113 // This unit produces an echo on the sound and fades out at the desired rate as is used in Impulse Tracker. ' 00114 FMOD_DSP_TYPE_COMPRESSOR, 00115 // This unit implements dynamic compression (linked multichannel, wideband) ' 00116 FMOD_DSP_TYPE_SFXREVERB, 00117 // This unit implements SFX reverb ' 00118 FMOD_DSP_TYPE_LOWPASS_SIMPLE 00119 // This unit filters sound using a simple lowpass with no resonance, but has flexible cutoff and is fast. ' 00120 } 00121 00122 00123 // 00124 //[STRUCTURE] 00125 //[ 00126 //[description] 00127 00128 //[REMARKS] 00129 //Members marked with [in] mean the user sets the value before passing it to the function. 00130 //Members marked with [out] mean FMOD sets the value to be used after the function exits. 00131 // 00132 //The step parameter tells the gui or application that the parameter has a certain granularity. 00133 //For example in the example of cutoff frequency with a range from 100.0 to 22050.0 you might only want the selection to be in 10hz increments. For this you would simply use 10.0 as the step value. 00134 //For a boolean, you can use min = 0.0, max = 1.0, step = 1.0. This way the only possible values are 0.0 and 1.0. 00135 //Some applications may detect min = 0.0, max = 1.0, step = 1.0 and replace a graphical slider bar with a checkbox instead. 00136 //A step value of 1.0 would simulate integer values only. 00137 //A step value of 0.0 would mean the full floating point range is accessable. 00138 00139 //[PLATFORMS] 00140 //Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii 00141 00142 //[SEE_ALSO] 00143 //FMOD_System_CreateDSP 00144 //FMOD_DSP_SetParameter 00145 //] 00146 // 00147 public struct FMOD_DSP_PARAMETERDESC 00148 { 00149 // [in] Minimum value of the parameter (ie 100.0). ' 00150 public float min; 00151 // [in] Maximum value of the parameter (ie 22050.0). ' 00152 public float max; 00153 // [in] Default value of parameter. ' 00154 public float defaultval; 00155 // [in] Name of the parameter to be displayed (ie "Cutoff frequency"). ' 00156 public string name; 00157 // [in] Short string to be put next to value to denote the unit type (ie "hz"). ' 00158 public string label; 00159 // [in] Description of the parameter to be displayed as a help item / tooltip for this parameter. ' 00160 public string description; 00161 } 00162 00163 00164 // 00165 //[Structure] 00166 //[ 00167 //[Description] 00168 //Strcture to define the parameters for a DSP unit. 00169 00170 //[REMARKS] 00171 //Members marked with '[in] mean the user sets the value before passing it to the function. 00172 //Members marked with '[out] mean FMOD sets the value to be used after the function exits. 00173 // 00174 //There are 2 different ways to change a parameter in this architecture. 00175 //One is to use FMOD_DSP_SetParameter / FMOD_DSP_GetParameter. This is platform independant and is dynamic, so new unknown plugins can have their parameters enumerated and used. 00176 //The other is to use FMOD_DSP_ShowConfigDialog. This is platform specific and requires a GUI, and will display a dialog box to configure the plugin. 00177 00178 //[PLATFORMS] 00179 //Win32, Win64, WinCE, Linux, Macintosh, XBox, PlayStation 2, GameCube 00180 00181 //[SEE_ALSO] 00182 //FMOD_DSP_CATEGORY 00183 //FMOD_System_CreateDSP 00184 //FMOD_System_GetDSP 00185 //] 00186 // 00187 //Public Type FMOD_DSP_DESCRIPTION 00188 // name As String ' [in] Name of the unit to be displayed in the network. ' 00189 // version As Long ' [in] Plugin writer's version number. ' 00190 // channels As Long ' [in] Number of channels. Use 0 to process whatever number of channels is currently in the network. >0 would be mostly used if the unit is a fixed format generator and not a filter. ' 00191 // create As Long ' [in] Create callback. This is called when DSP unit is created. Can be null. ' 00192 // release As Long ' [in] Release callback. This is called just before the unit is freed so the user can do any cleanup needed for the unit. Can be null. ' 00193 // reset As Long ' [in] Reset callback. This is called by the user to reset any history buffers that may need resetting for a filter, when it is to be used or re-used for the first time to its initial clean state. Use to avoid clicks or artifacts. ' 00194 // read As Long ' [in] Read callback. Processing is done here. Can be null. ' 00195 // setposition As Long ' [in] Set position callback. This is called if the unit becomes virtualized and needs to simply update positions etc. Can be null. ' 00196 00197 // numparameters As Long ' [in] Number of parameters used in this filter. The user finds this with FMOD_DSP_GetNumParameters ' 00198 // paramdesc As Long ' [in] Variable number of parameter structures. ' 00199 // setparameter As Long ' [in] This is called when the user calls FMOD_DSP_SetParameter. Can be null. ' 00200 // getparameter As Long ' [in] This is called when the user calls FMOD_DSP_GetParameter. Can be null. ' 00201 // config As Long ' [in] This is called when the user calls FMOD_DSP_ShowConfigDialog. Can be used to display a dialog to configure the filter. Can be null. ' 00202 // configwidth As Long ' [in] Width of config dialog graphic if there is one. 0 otherwise. ' 00203 // configheight As Long ' [in] Height of config dialog graphic if there is one. 0 otherwise. ' 00204 // userdata as Long ' [in] Optional. Specify 0 to ignore. This is user data to be attached to the DSP unit during creation. Access via FMOD_DSP_GetUserData.' 00205 //End Type 00206 00207 00208 // 00209 // =================================================================================================== 00210 // 00211 // FMOD built in effect parameters. 00212 // Use FMOD_DSP_SetParameter with these enums for the 'index' parameter. 00213 // 00214 // =================================================================================================== 00215 // 00216 00217 // 00218 //[ENUM] 00219 //[ 00220 //[description] 00221 //Parameter types for the FMOD_DSP_TYPE_OSCILLATOR filter. 00222 00223 //[REMARKS] 00224 00225 //[PLATFORMS] 00226 //Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii 00227 00228 //[SEE_ALSO] 00229 //FMOD_DSP_SetParameter 00230 //FMOD_DSP_GetParameter 00231 //FMOD_DSP_TYPE 00232 //] 00233 // 00234 public enum FMOD_DSP_OSCILLATOR 00235 { 00236 FMOD_DSP_OSCILLATOR_TYPE, 00237 // Waveform type. 0 = sine. 1 = square. 2 = sawup. 3 = sawdown. 4 = triangle. 5 = noise. ' 00238 FMOD_DSP_OSCILLATOR_RATE 00239 // Frequency of the sinewave in hz. 1.0 to 22000.0. Default = 220.0. ' 00240 } 00241 00242 00243 // 00244 //[ENUM] 00245 //[ 00246 //[description] 00247 //Parameter types for the FMOD_DSP_TYPE_LOWPASS filter. 00248 00249 //[REMARKS] 00250 00251 //[PLATFORMS] 00252 //Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii 00253 00254 //[SEE_ALSO] 00255 //FMOD_DSP_SetParameter 00256 //FMOD_DSP_GetParameter 00257 //FMOD_DSP_TYPE 00258 //] 00259 // 00260 public enum FMOD_DSP_LOWPASS 00261 { 00262 FMOD_DSP_LOWPASS_CUTOFF, 00263 // Lowpass cutoff frequency in hz. 1.0 to 22000.0. Default = 5000.0. ' 00264 FMOD_DSP_LOWPASS_RESONANCE 00265 // Lowpass resonance Q value. 1.0 to 10.0. Default = 1.0. ' 00266 } 00267 00268 00269 // 00270 //[ENUM] 00271 //[ 00272 //[description] 00273 //Parameter types for the FMOD_DSP_TYPE_LOWPASS2 filter. 00274 00275 //[REMARKS] 00276 00277 //[PLATFORMS] 00278 //Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii 00279 00280 //[SEE_ALSO] 00281 //FMOD_DSP_SetParameter 00282 //FMOD_DSP_GetParameter 00283 //FMOD_DSP_TYPE 00284 //] 00285 // 00286 public enum FMOD_DSP_ITLOWPASS 00287 { 00288 FMOD_DSP_ITLOWPASS_CUTOFF, 00289 // Lowpass cutoff frequency in hz. 1.0 to 22000.0. Default = 5000.0/ ' 00290 FMOD_DSP_ITLOWPASS_RESONANCE 00291 // Lowpass resonance Q value. 0.0 to 127.0. Default = 1.0. ' 00292 } 00293 00294 00295 // 00296 //[ENUM] 00297 //[ 00298 //[description] 00299 //Parameter types for the FMOD_DSP_TYPE_HIGHPASS filter. 00300 00301 //[REMARKS] 00302 00303 //[PLATFORMS] 00304 //Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii 00305 00306 //[SEE_ALSO] 00307 //FMOD_DSP_SetParameter 00308 //FMOD_DSP_GetParameter 00309 //FMOD_DSP_TYPE 00310 //] 00311 // 00312 public enum FMOD_DSP_HIGHPASS 00313 { 00314 FMOD_DSP_HIGHPASS_CUTOFF, 00315 // Highpass cutoff frequency in hz. 10.0 to output 22000.0. Default = 5000.0. ' 00316 FMOD_DSP_HIGHPASS_RESONANCE 00317 // Highpass resonance Q value. 1.0 to 10.0. Default = 1.0. ' 00318 } 00319 00320 00321 // 00322 //[ENUM] 00323 //[ 00324 //[description] 00325 //Parameter types for the FMOD_DSP_TYPE_ECHO filter. 00326 00327 //[REMARKS] 00328 //Note. Every time the delay is changed, the plugin re-allocates the echo buffer. This means the echo will dissapear at that time while it refills its new buffer. 00329 //Larger echo delays result in larger amounts of memory allocated. 00330 // 00331 //<i>maxchannels</i>' also dictates the amount of memory allocated. By default, the maxchannels value is 0. If FMOD is set to stereo, the echo unit will allocate enough memory for 2 channels. If it is 5.1, it will allocate enough memory for a 6 channel echo, etc. 00332 //If the echo effect is only ever applied to the global mix (ie it was added with FMOD_System_AddDSP), then 0 is the value to set as it will be enough to handle all speaker modes. 00333 //When the echo is added to a channel (ie FMOD_Channel_AddDSP) then the channel count that comes in could be anything from 1 to 8 possibly. It is only in this case where you might want to increase the channel count above the output's channel count. 00334 //If a channel echo is set to a lower number than the sound's channel count that is coming in, it will not echo the sound. 00335 00336 //[PLATFORMS] 00337 //Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii 00338 00339 //[SEE_ALSO] 00340 //FMOD_DSP_SetParameter 00341 //FMOD_DSP_GetParameter 00342 //FMOD_DSP_TYPE 00343 //] 00344 // 00345 public enum FMOD_DSP_ECHO 00346 { 00347 FMOD_DSP_ECHO_DELAY, 00348 // Echo delay in ms. 10 to 5000. Default = 500. ' 00349 FMOD_DSP_ECHO_DECAYRATIO, 00350 // Echo decay per delay. 0 to 1. 1.0 = No decay, 0.0 = total decay. Default = 0.5. ' 00351 FMOD_DSP_ECHO_MAXCHANNELS, 00352 // Maximum channels supported. 0 to 16. 0 = same as fmod's default output polyphony, 1 = mono, 2 = stereo etc. See remarks for more. Default = 0. It is suggested to leave at 0! ' 00353 FMOD_DSP_ECHO_DRYMIX, 00354 // Volume of original signal to pass to output. 0.0 to 1.0. Default = 1.0. ' 00355 FMOD_DSP_ECHO_WETMIX 00356 // Volume of echo signal to pass to output. 0.0 to 1.0. Default = 1.0. ' 00357 } 00358 00359 00360 // 00361 //[ENUM] 00362 //[ 00363 //[description] 00364 //Parameter types for the FMOD_DSP_TYPE_FLANGE filter. 00365 00366 //[REMARKS] 00367 //Flange is an effect where the signal is played twice at the same time, and one copy slides back and forth creating a whooshing or flanging effect. 00368 //As there are 2 copies of the same signal, by default each signal is given 50% mix, so that the total is not louder than the original unaffected signal. 00369 // 00370 //Flange depth is a percentage of a 10ms shift from the original signal. Anything above 10ms is not considered flange because to the ear it begins to 'echo' so 10ms is the highest value possible. 00371 00372 //[PLATFORMS] 00373 //Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii 00374 00375 //[SEE_ALSO] 00376 //FMOD_DSP_SetParameter 00377 //FMOD_DSP_GetParameter 00378 //FMOD_DSP_TYPE 00379 //] 00380 // 00381 public enum FMOD_DSP_FLANGE 00382 { 00383 FMOD_DSP_FLANGE_DRYMIX, 00384 // Volume of original signal to pass to output. 0.0 to 1.0. Default = 0.45. ' 00385 FMOD_DSP_FLANGE_WETMIX, 00386 // Volume of flange signal to pass to output. 0.0 to 1.0. Default = 0.55. ' 00387 FMOD_DSP_FLANGE_DEPTH, 00388 // Flange depth. 0.01 to 1.0. Default = 1.0. ' 00389 FMOD_DSP_FLANGE_RATE 00390 // Flange speed in hz. 0.0 to 20.0. Default = 0.1. ' 00391 } 00392 00393 00394 // 00395 //[ENUM] 00396 //[ 00397 //[description] 00398 //Parameter types for the FMOD_DSP_TYPE_DISTORTION filter. 00399 00400 //[REMARKS] 00401 00402 //[PLATFORMS] 00403 //Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii 00404 00405 //[SEE_ALSO] 00406 //FMOD_DSP_SetParameter 00407 //FMOD_DSP_GetParameter 00408 //FMOD_DSP_TYPE 00409 //] 00410 // 00411 public enum FMOD_DSP_DISTORTION 00412 { 00413 FMOD_DSP_DISTORTION_LEVEL 00414 // Distortion value. 0.0 to 1.0. Default = 0.5. ' 00415 } 00416 00417 00418 // 00419 //[ENUM] 00420 //[ 00421 //[description] 00422 //Parameter types for the FMOD_DSP_TYPE_NORMALIZE filter. 00423 00424 //[REMARKS] 00425 //Normalize amplifies the sound based on the maximum peaks within the signal. 00426 //For example if the maximum peaks in the signal were 50% of the bandwidth, it would scale the whole sound by 2. 00427 //The lower threshold value makes the normalizer ignores peaks below a certain point, to avoid over-amplification if a loud signal suddenly came in, and also to avoid amplifying to maximum things like background hiss. 00428 // 00429 //Because FMOD is a realtime audio processor, it doesn't have the luxury of knowing the peak for the whole sound (ie it can't see into the future), so it has to process data as it comes in. 00430 //To avoid very sudden changes in volume level based on small samples of new data, fmod fades towards the desired amplification which makes for smooth gain control. The fadetime parameter can control this. 00431 00432 //[PLATFORMS] 00433 //Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii 00434 00435 //[SEE_ALSO] 00436 //FMOD_DSP_SetParameter 00437 //FMOD_DSP_GetParameter 00438 //FMOD_DSP_TYPE 00439 //] 00440 // 00441 public enum FMOD_DSP_NORMALIZE 00442 { 00443 FMOD_DSP_NORMALIZE_FADETIME, 00444 // Time to ramp the silence to full in ms. 0.0 to 20000.0. Default = 5000.0. ' 00445 FMOD_DSP_NORMALIZE_THRESHHOLD, 00446 // Lower volume range threshold to ignore. 0.0 to 1.0. Default = 0.1. Raise higher to stop amplification of very quiet signals. ' 00447 FMOD_DSP_NORMALIZE_MAXAMP 00448 // Maximum amplification allowed. 1.0 to 100000.0. Default = 20.0. 1.0 = no amplifaction, higher values allow more boost. ' 00449 } 00450 00451 00452 // 00453 //[ENUM] 00454 //[ 00455 //[description] 00456 //Parameter types for the FMOD_DSP_TYPE_PARAMEQ filter. 00457 00458 //[REMARKS] 00459 //Parametric EQ is a bandpass filter that attenuates or amplifies a selected frequency and its neighbouring frequencies. 00460 // 00461 //To create a multi-band EQ create multiple FMOD_DSP_TYPE_PARAMEQ units and set each unit to different frequencies, for example 1000hz, 2000hz, 4000hz, 8000hz, 16000hz with a range of 1 octave each. 00462 // 00463 //When a frequency has its gain set to 1.0, the sound will be unaffected and represents the original signal exactly. 00464 00465 //[PLATFORMS] 00466 //Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii 00467 00468 //[SEE_ALSO] 00469 //FMOD_DSP_SetParameter 00470 //FMOD_DSP_GetParameter 00471 //FMOD_DSP_TYPE 00472 //] 00473 // 00474 public enum FMOD_DSP_PARAMEQ 00475 { 00476 FMOD_DSP_PARAMEQ_CENTER, 00477 // Frequency center. 20.0 to 22000.0. Default = 8000.0. ' 00478 FMOD_DSP_PARAMEQ_BANDWIDTH, 00479 // Octave range around the center frequency to filter. 0.2 to 5.0. Default = 1.0. ' 00480 FMOD_DSP_PARAMEQ_GAIN 00481 // Frequency Gain. 0.05 to 3.0. Default = 1.0. ' 00482 } 00483 00484 00485 // 00486 //[ENUM] 00487 //[ 00488 //[description] 00489 //Parameter types for the FMOD_DSP_TYPE_PITCHSHIFT filter. 00490 00491 //[REMARKS] 00492 //This pitch shifting unit can be used to change the pitch of a sound without speeding it up or slowing it down. 00493 //It can also be used for time stretching or scaling, for example if the pitch was doubled, and the frequency of the sound was halved, the pitch of the sound would sound correct but it would be twice as slow. 00494 // 00495 //<b>Warning!</b> This filter is very computationally expensive! Similar to a vocoder, it requires several overlapping FFT and IFFT's to produce smooth output, and can require around 440mhz for 1 stereo 48khz signal using the default settings. 00496 //Reducing the signal to mono will half the cpu usage, as will the overlap count. 00497 //Reducing this will lower audio quality, but what settings to use are largely dependant on the sound being played. A noisy polyphonic signal will need higher overlap and fft size compared to a speaking voice for example. 00498 // 00499 //This pitch shifter is based on the pitch shifter code at http://www.dspdimension.com, written by Stephan M. Bernsee. 00500 //The original code is COPYRIGHT 1999-2003 Stephan M. Bernsee <smb@dspdimension.com>. 00501 // 00502 //<i>maxchannels</i>' dictates the amount of memory allocated. By default, the maxchannels value is 0. If FMOD is set to stereo, the pitch shift unit will allocate enough memory for 2 channels. If it is 5.1, it will allocate enough memory for a 6 channel pitch shift, etc. 00503 //If the pitch shift effect is only ever applied to the global mix (ie it was added with FMOD_System_AddDSP), then 0 is the value to set as it will be enough to handle all speaker modes. 00504 //When the pitch shift is added to a channel (ie FMOD_Channel_AddDSP) then the channel count that comes in could be anything from 1 to 8 possibly. It is only in this case where you might want to increase the channel count above the output's channel count. 00505 //If a channel pitch shift is set to a lower number than the sound's channel count that is coming in, it will not pitch shift the sound. 00506 00507 //[PLATFORMS] 00508 //Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii 00509 00510 //[SEE_ALSO] 00511 //FMOD_DSP_SetParameter 00512 //FMOD_DSP_GetParameter 00513 //FMOD_DSP_TYPE 00514 //] 00515 // 00516 public enum FMOD_DSP_PITCHSHIFT 00517 { 00518 FMOD_DSP_PITCHSHIFT_PITCH, 00519 // Pitch value. 0.5 to 2.0. Default = 1.0. 0.5 = one octave down, 2.0 = one octave up. 1.0 does not change the pitch. ' 00520 FMOD_DSP_PITCHSHIFT_FFTSIZE, 00521 // FFT window size. 256, 512, 1024, 2048, 4096. Default = 1024. Increase this to reduce 'smearing'. This effect is a warbling sound similar to when an mp3 is encoded at very low bitrates. ' 00522 FMOD_DSP_PITCHSHIFT_OVERLAP, 00523 // Window overlap. 1 to 32. Default = 4. Increase this to reduce 'tremolo' effect. Increasing it by a factor of 2 doubles the CPU usage. ' 00524 FMOD_DSP_PITCHSHIFT_MAXCHANNELS 00525 // Maximum channels supported. 0 to 16. 0 = same as fmod's default output polyphony, 1 = mono, 2 = stereo etc. See remarks for more. Default = 0. It is suggested to leave at 0! ' 00526 } 00527 00528 00529 // 00530 //[ENUM] 00531 //[ 00532 //[description] 00533 //Parameter types for the FMOD_DSP_TYPE_CHORUS filter. 00534 00535 //[REMARKS] 00536 //Chrous is an effect where the sound is more 'spacious' due to 1 to 3 versions of the sound being played along side the original signal but with the pitch of each copy modulating on a sine wave. 00537 //This is a highly configurable chorus unit. It supports 3 taps, small and large delay times and also feedback. 00538 //This unit also could be used to do a simple echo, or a flange effect. 00539 00540 //[PLATFORMS] 00541 //Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii 00542 00543 //[SEE_ALSO] 00544 //FMOD_DSP_SetParameter 00545 //FMOD_DSP_GetParameter 00546 //FMOD_DSP_TYPE 00547 //] 00548 // 00549 public enum FMOD_DSP_CHORUS 00550 { 00551 FMOD_DSP_CHORUS_DRYMIX, 00552 // Volume of original signal to pass to output. 0.0 to 1.0. Default = 0.5. ' 00553 FMOD_DSP_CHORUS_WETMIX1, 00554 // Volume of 1st chorus tap. 0.0 to 1.0. Default = 0.5. ' 00555 FMOD_DSP_CHORUS_WETMIX2, 00556 // Volume of 2nd chorus tap. This tap is 90 degrees out of phase of the first tap. 0.0 to 1.0. Default = 0.5. ' 00557 FMOD_DSP_CHORUS_WETMIX3, 00558 // Volume of 3rd chorus tap. This tap is 90 degrees out of phase of the second tap. 0.0 to 1.0. Default = 0.5. ' 00559 FMOD_DSP_CHORUS_DELAY, 00560 // Chorus delay in ms. 0.1 to 100.0. Default = 40.0 ms. ' 00561 FMOD_DSP_CHORUS_RATE, 00562 // Chorus modulation rate in hz. 0.0 to 20.0. Default = 0.8 hz. ' 00563 FMOD_DSP_CHORUS_DEPTH, 00564 // Chorus modulation depth. 0.0 to 1.0. Default = 0.03. ' 00565 FMOD_DSP_CHORUS_FEEDBACK 00566 // Chorus feedback. Controls how much of the wet signal gets fed back into the chorus buffer. 0.0 to 1.0. Default = 0.0. ' 00567 } 00568 00569 00570 // 00571 //[ENUM] 00572 //[ 00573 //[DESCRIPTION] 00574 //Parameter types for the FMOD_DSP_TYPE_REVERB filter. 00575 00576 //[REMARKS] 00577 00578 //[PLATFORMS] 00579 //Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii 00580 00581 //[SEE_ALSO] 00582 //FMOD_DSP_SetParameter 00583 //FMOD_DSP_GetParameter 00584 //FMOD_DSP_TYPE 00585 //] 00586 // 00587 public enum FMOD_DSP_REVERB 00588 { 00589 FMOD_DSP_REVERB_ROOMSIZE, 00590 // Roomsize. 0.0 to 1.0. Default = 0.5 ' 00591 FMOD_DSP_REVERB_DAMP, 00592 // Damp. 0.0 to 1.0. Default = 0.5 ' 00593 FMOD_DSP_REVERB_WETMIX, 00594 // Wet mix. 0.0 to 1.0. Default = 0.33 ' 00595 FMOD_DSP_REVERB_DRYMIX, 00596 // Dry mix. 0.0 to 1.0. Default = 0.0 ' 00597 FMOD_DSP_REVERB_WIDTH, 00598 // Width. 0.0 to 1.0. Default = 1.0 ' 00599 FMOD_DSP_REVERB_MODE 00600 // Mode. 0 (normal), 1 (freeze). Default = 0 ' 00601 } 00602 00603 00604 // 00605 //[ENUM] 00606 //[ 00607 //[DESCRIPTION] 00608 //Parameter types for the FMOD_DSP_TYPE_ITECHO filter. 00609 //This is effectively a software based echo filter that emulates the DirectX DMO echo effect. Impulse tracker files can support this, and FMOD will produce the effect on ANY platform, not just those that support DirectX effects! 00610 00611 //[REMARKS] 00612 //Note. Every time the delay is changed, the plugin re-allocates the echo buffer. This means the echo will dissapear at that time while it refills its new buffer. 00613 //Larger echo delays result in larger amounts of memory allocated. 00614 // 00615 //For stereo signals only! This will not work on mono or multichannel signals. This is fine for .IT format purposes, and also if you use FMOD_System_AddDSP with a standard stereo output. 00616 00617 //[PLATFORMS] 00618 //Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii 00619 00620 //[SEE_ALSO] 00621 //FMOD_DSP_SetParameter 00622 //FMOD_DSP_GetParameter 00623 //FMOD_DSP_TYPE 00624 //FMOD_System_AddDSP 00625 //] 00626 // 00627 public enum FMOD_DSP_ITECHO 00628 { 00629 FMOD_DSP_ITECHO_WETDRYMIX, 00630 // Ratio of wet (processed) signal to dry (unprocessed) signal. Must be in the range from 0.0 through 100.0 (all wet). The default value is 50. ' 00631 FMOD_DSP_ITECHO_FEEDBACK, 00632 // Percentage of output fed back into input, in the range from 0.0 through 100.0. The default value is 50. ' 00633 FMOD_DSP_ITECHO_LEFTDELAY, 00634 // Delay for left channel, in milliseconds, in the range from 1.0 through 2000.0. The default value is 500 ms. ' 00635 FMOD_DSP_ITECHO_RIGHTDELAY, 00636 // Delay for right channel, in milliseconds, in the range from 1.0 through 2000.0. The default value is 500 ms. ' 00637 FMOD_DSP_ITECHO_PANDELAY 00638 // Value that specifies whether to swap left and right delays with each successive echo. The default value is zero, meaning no swap. Possible values are defined as 0.0 (equivalent to FALSE) and 1.0 (equivalent to TRUE). ' 00639 } 00640 00641 00642 // 00643 //[ENUM] 00644 //[ 00645 //[description] 00646 //Parameter types for the FMOD_DSP_TYPE_COMPRESSOR unit. 00647 //This is a simple linked multichannel software limiter that is uniform across the whole spectrum. 00648 00649 //[REMARKS] 00650 //The parameters are as follows: 00651 //Threshold: [-60dB to 0dB, default 0dB] 00652 //Attack Time: [10ms to 200ms, default 50ms] 00653 //release Time: [20ms to 1000ms, default 50ms] 00654 //Gain Make Up: [0dB to +30dB, default 0dB] 00655 // 00656 //The limiter is not guaranteed to catch every peak above the threshold level, 00657 //because it cannot apply gain reduction instantaneously - the time delay is 00658 //determined by the attack time. However setting the attack time too short will 00659 //distort the sound, so it is a compromise. High level peaks can be avoided by 00660 //using a short attack time - but not too short, and setting the threshold a few 00661 //decibels below the critical level. 00662 // 00663 00664 //[PLATFORMS] 00665 //Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii 00666 00667 //[SEE_ALSO] 00668 //FMOD_DSP_Setparameter 00669 //FMOD_DSP_Getparameter 00670 //FMOD_DSP_TYPE 00671 //FMOD_System_addDSP 00672 //] 00673 // 00674 public enum FMOD_DSP_COMPRESSOR 00675 { 00676 FMOD_DSP_COMPRESSOR_THRESHOLD, 00677 // Threshold level (dB)in the range from -60 through 0. The default value is 50. ' 00678 FMOD_DSP_COMPRESSOR_ATTACK, 00679 // Gain reduction attack time (milliseconds), in the range from 10 through 200. The default value is 50. ' 00680 FMOD_DSP_COMPRESSOR_RELEASE, 00681 // Gain reduction release time (milliseconds), in the range from 20 through 1000. The default value is 50. ' 00682 FMOD_DSP_COMPRESSOR_GAINMAKEUP 00683 // Make-up gain applied after limiting, in the range from 0.0 through 100.0. The default value is 50. ' 00684 } 00685 00686 00687 // 00688 //[ENUM] 00689 //[ 00690 //[DESCRIPTION] 00691 //Parameter types for the FMOD_DSP_TYPE_SFXREVERB unit. 00692 00693 //[REMARKS] 00694 //This is a high quality I3DL2 based reverb which improves greatly on FMOD_DSP_REVERB. 00695 //On top of the I3DL2 property set, "Dry Level" is also included to allow the dry mix to be changed. 00696 // 00697 //Currently FMOD_DSP_SFXREVERB_REFLECTIONSLEVEL, FMOD_DSP_SFXREVERB_REFLECTIONSDELAY and FMOD_DSP_SFXREVERB_REVERBDELAY are not enabled but will come in future versions. 00698 // 00699 //These properties can be set with presets in FMOD_REVERB_PRESETS. 00700 00701 //[PLATFORMS] 00702 //Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii 00703 00704 //[SEE_ALSO] 00705 //FMOD_DSP_SetParameter 00706 //FMOD_DSP_GetParameter 00707 //FMOD_DSP_TYPE 00708 //FMOD_System_AddDSP 00709 //FMOD_REVERB_PRESETS 00710 //] 00711 //*/ 00712 public enum FMOD_DSP_SFXREVERB 00713 { 00714 FMOD_DSP_SFXREVERB_DRYLEVEL, 00715 // Dry Level : Mix level of dry signal in output in mB. Ranges from -10000.0 to 0.0. Default is 0.0. ' 00716 FMOD_DSP_SFXREVERB_ROOM, 00717 // Room : Room effect level at low frequencies in mB. Ranges from -10000.0 to 0.0. Default is 0.0. ' 00718 FMOD_DSP_SFXREVERB_ROOMHF, 00719 // Room HF : Room effect high-frequency level re. low frequency level in mB. Ranges from -10000.0 to 0.0. Default is 0.0. ' 00720 FMOD_DSP_SFXREVERB_ROOMROLLOFFFACTOR, 00721 // Room Rolloff : Like DS3D flRolloffFactor but for room effect. Ranges from 0.0 to 10.0. Default is 10.0 ' 00722 FMOD_DSP_SFXREVERB_DECAYTIME, 00723 // Decay Time : Reverberation decay time at low-frequencies in seconds. Ranges from 0.1 to 20.0. Default is 1.0. ' 00724 FMOD_DSP_SFXREVERB_DECAYHFRATIO, 00725 // Decay HF Ratio : High-frequency to low-frequency decay time ratio. Ranges from 0.1 to 2.0. Default is 0.5. ' 00726 FMOD_DSP_SFXREVERB_REFLECTIONSLEVEL, 00727 // Reflections : Early reflections level relative to room effect in mB. Ranges from -10000.0 to 1000.0. Default is -10000.0. ' 00728 FMOD_DSP_SFXREVERB_REFLECTIONSDELAY, 00729 // Reflect Delay : Delay time of first reflection in seconds. Ranges from 0.0 to 0.3. Default is 0.02. ' 00730 FMOD_DSP_SFXREVERB_REVERBLEVEL, 00731 // Reverb : Late reverberation level relative to room effect in mB. Ranges from -10000.0 to 2000.0. Default is 0.0. ' 00732 FMOD_DSP_SFXREVERB_REVERBDELAY, 00733 // Reverb Delay : Late reverberation delay time relative to first reflection in seconds. Ranges from 0.0 to 0.1. Default is 0.04. ' 00734 FMOD_DSP_SFXREVERB_DIFFUSION, 00735 // Diffusion : Reverberation diffusion (echo density) in percent. Ranges from 0.0 to 100.0. Default is 100.0. ' 00736 FMOD_DSP_SFXREVERB_DENSITY, 00737 // Density : Reverberation density (modal density) in percent. Ranges from 0.0 to 100.0. Default is 100.0. ' 00738 FMOD_DSP_SFXREVERB_HFREFERENCE 00739 // HF Reference : Reference high frequency in Hz. Ranges from 20.0 to 20000.0. Default is 5000.0. ' 00740 } 00741 00742 00743 // 00744 //[ENUM] 00745 //[ 00746 // [DESCRIPTION] 00747 // Parameter types for the FMOD_DSP_TYPE_LOWPASS_SIMPLE filter. 00748 // This is a very simple low pass filter, based on two single-pole RC time-constant modules. 00749 // The emphasis is on speed rather than accuracy, so this should not be used for task requiring critical filtering. 00750 // 00751 // [REMARKS] 00752 // 00753 // [PLATFORMS] 00754 // Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii 00755 // 00756 // [SEE_ALSO] 00757 // FMOD_DSP_SetParameter 00758 // FMOD_DSP_GetParameter 00759 // FMOD_DSP_TYPE 00760 //] 00761 // 00762 public enum FMOD_DSP_LOWPASS_SIMPLE 00763 { 00764 FMOD_DSP_LOWPASS_SIMPLE_CUTOFF 00765 // Lowpass cutoff frequency in hz. 10.0 to 22000.0. Default = 5000.0 ' 00766 } 00767 00768 } 00769 }