Size: 2341
Comment:
|
← Revision 4 as of 2012-08-23 21:12:36
Size: 2363
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 7: | Line 7: |
'''FFT_N''' - sets the fft size. possible options are 16, 32, 64, 128, 256. 256 is the defualt. |
'''FFT_N''' - Sets the FFT size. Possible options are 16, 32, 64, 128, 256. 256 is the defualt. |
Line 10: | Line 9: |
'''SCALE''' - sets the scaling factor for fft_mag_lin8(). since 8b resolution is pretty poor, you will want to scale the values to max out the full range. setting SCALE multiplies the output by a constant beefore doing the square root, so you have maximum resolution. it does consume slightly more resources, but is pretty minimal. SCALE can be any number from 1 -> 255. by default it is 1. 1, 2, 4, 128, and 256 consume the least resources. |
'''SCALE''' - Sets the scaling factor for ''fft_mag_lin8()''. Since 8b resolution is pretty poor, you will want to scale the values to max out the full range. Setting SCALE multiplies the output by a constant before doing the square root, so you have maximum resolution. It does consume slightly more resources, but is pretty minimal. SCALE can be any number from 1 -> 255. By default it is 1. 1, 2, 4, 128, and 256 consume the least resources. |
Line 17: | Line 11: |
'''WINDOW''' - turns on or off the window function resources. if you are not using fft_window(), then you should set WINDOW 0 (off). by default its 1 (on). |
'''WINDOW''' - Turns on or off the window function resources. If you are not using ''fft_window()'', then you should set WINDOW 0 (off). By default its 1 (on). |
Line 20: | Line 13: |
'''REORDER''' - turns on or off the reorder function resources. if you are not using fft_reorder(), then you should set REORDER 0 (off). by default its 1 (on). |
'''REORDER''' - Turns on or off the reorder function resources. If you are not using ''fft_reorder()'', then you should set REORDER 0 (off). By default its 1 (on). |
Line 23: | Line 15: |
'''LOG_OUT''' - turns on or off the log function resources. if you are using fft_mag_log(), then you should set LOG_OUT 1 (on). by default its 0 (off). |
'''LOG_OUT''' - Turns on or off the log function resources. If you are using ''fft_mag_log()'', then you should set LOG_OUT 1 (on). By default its 0 (off). |
Line 26: | Line 17: |
'''LIN_OUT''' - turns on or off the lin output function resources. if you are using fft_mag_lin(), then you should set LIN_OUT 1 (on). by default its 0 (off). |
'''LIN_OUT''' - Turns on or off the lin output function resources. If you are using ''fft_mag_lin()'', then you should set LIN_OUT 1 (on). By default its 0 (off). |
Line 29: | Line 19: |
'''LIN_OUT8''' - turns on or off the lin8 output function resources. if you are using fft_mag_lin8(), then you should set LIN_OUT8 1 (on). by default its 0 (off). |
'''LIN_OUT8''' - Turns on or off the lin8 output function resources. If you are using ''fft_mag_lin8()'', then you should set LIN_OUT8 1 (on). By default its 0 (off). |
Line 32: | Line 21: |
'''OCTAVE''' - this turns on or off the octave output function resources. if you are using fft_mag_octave(), then you should set OCTAVE 1 (on). by default it is 0 (off). |
'''OCTAVE''' - This turns on or off the octave output function resources. If you are using ''fft_mag_octave()'', then you should set OCTAVE 1 (on). by default it is 0 (off). |
Line 35: | Line 23: |
'''OCT_NORM''' - this turns on or off the octave normilisation feature. this is the part of fft_mat_octave() that divides each bin grouping by the number of bins. since a lot of sound sources are pink noise (they drop off in amplitude as the frequency increases), the scale tends to slope off rather quickly. this artificially boosts the higher frequencies when off (OCT_NORM 0). by default, the normilisation is on (OCT_NORM 1). |
'''OCT_NORM''' - This turns on or off the octave normilisation feature. This is the part of ''fft_mat_octave()'' that divides each bin grouping by the number of bins averaged. Since a lot of sound sources are pink noise (they drop off in amplitude as the frequency increases), the scale tends to drop off rather quickly. This artificially boosts the higher frequencies when off (OCT_NORM 0). By default, the normilisation is on (OCT_NORM 1). |
Arduino FFT Libarry
#Define options
These values allow you to modify the FFT code to fit your needs. For the most part, they just turn off stuff you aren't using. By default most functions are off, so you will have to turn them on to use them. You must also declare these #defines before the #include statements in your sketch.
FFT_N - Sets the FFT size. Possible options are 16, 32, 64, 128, 256. 256 is the defualt.
SCALE - Sets the scaling factor for fft_mag_lin8(). Since 8b resolution is pretty poor, you will want to scale the values to max out the full range. Setting SCALE multiplies the output by a constant before doing the square root, so you have maximum resolution. It does consume slightly more resources, but is pretty minimal. SCALE can be any number from 1 -> 255. By default it is 1. 1, 2, 4, 128, and 256 consume the least resources.
WINDOW - Turns on or off the window function resources. If you are not using fft_window(), then you should set WINDOW 0 (off). By default its 1 (on).
REORDER - Turns on or off the reorder function resources. If you are not using fft_reorder(), then you should set REORDER 0 (off). By default its 1 (on).
LOG_OUT - Turns on or off the log function resources. If you are using fft_mag_log(), then you should set LOG_OUT 1 (on). By default its 0 (off).
LIN_OUT - Turns on or off the lin output function resources. If you are using fft_mag_lin(), then you should set LIN_OUT 1 (on). By default its 0 (off).
LIN_OUT8 - Turns on or off the lin8 output function resources. If you are using fft_mag_lin8(), then you should set LIN_OUT8 1 (on). By default its 0 (off).
OCTAVE - This turns on or off the octave output function resources. If you are using fft_mag_octave(), then you should set OCTAVE 1 (on). by default it is 0 (off).
OCT_NORM - This turns on or off the octave normilisation feature. This is the part of fft_mat_octave() that divides each bin grouping by the number of bins averaged. Since a lot of sound sources are pink noise (they drop off in amplitude as the frequency increases), the scale tends to drop off rather quickly. This artificially boosts the higher frequencies when off (OCT_NORM 0). By default, the normilisation is on (OCT_NORM 1).