AudioKit / AudioKitUI

Controls and Visualization for AudioKit apps
MIT License
187 stars 52 forks source link

FFTView: Remove Magic Numbers (also fixed the incorrect FFT_SIZE) #7

Closed Matt54 closed 3 years ago

Matt54 commented 3 years ago

Now that we are getting the appropriate output from FFTTap, we can remove the magic numbers from FFTView and adjust the mapping to the new FFTTap output data.

We should think about how we might want to add minimum and maximum adjustment factors to FFTView which would adjust the -150 and -10.0 values in the map function. This would compress or expand the range of the amplitude bars - I think developers will want that control. I picked good default values for now.

I'm thinking something like minFactor will adjust the current -150 value within a range of -200 to -100 and the max factor will adjust the -10.0 within the range of -50 to -0.