I am working on a audio application wherein I have equalizer band.
Each equalizer has slider for frequency and gain and a combobox for equalizer type(PEQ, HighShelf and LowShelf).
Each slider displays a different value and sends another value.
- For PEQ: display value-> 20Hz to 20000Hz, Slider Range: 20 Hz to 20000 Hz
- For HighShelf: display value-> 1000Hz to 20000Hz, Slider Range: 1000 Hz to 20000 Hz
- For LowShelf: display value-> 20 Hz to 1000Hz, Slider Range: 20 Hz to 1000 Hz
I have written a custom slider and overriden ‘getTextFromValue()’ method for display purpose. It’s working fine for frequency.
Question: The values in the frequency slider needs to change logarithmically rather than the default linear. How can we vary a slider logaritmically?
Display value -> -12 to +12 and slider range: 0 to 24.
Here also, I am using the ‘getTextFromValue()’ method for display purpose and subtract 12 from the slider value for display, so that if slider is a bottom with value as 0, it will display (-12) in the textbox. This is perfect.
Question: The slider’s textbox is editable, so when user enter’s zero in the textbox considering that it will display him zero in the texbox, it represents (-12) in the textbox which is not the user wanted. How can I handle this situation?
Slider Range: 0-24
Display Range: -12 to +12
textbox Range: -12 to +12 ( currently, it displays the value based on slider range and subtracting 12 from it).
Any ideas/ solution is welcome.