The problem I am having is like this: I am using an aux cord line level output from a smartphone to a MSGEQ7 chip which samples the frequencies and splits it into 7 channels which can be seen as an analog voltage from 0V to Vin based on that frequencies strength. 63Hz, 160Hz, 400Hz, 1kHz, 2.5kHz, 6.25kHz and 16kHz. (Sparkfun info) I am using an Arduino to then take the output and display it on 7 bar graphs.
Now the problem... Unless the output is at around 80% volume, any song playing will either not be strong enough to be displayed, or too far over and will be clipping the top of each bar graph. Unfortunately I don't own an oscilloscope so I can't give the peak to peak voltage. This would be ok if I could always leave the volume at 80% but in this case its much easier to turn down the voltage on my phone rather than going over to the speakers and turning down or up the preamp knob. Ideally at any input volume the signal would be either boosted or decreased to the sweet spot.
I've researched a bunch of different solutions from diode/npn circuits to multi op-amp circuits, to Compandor (compressor/expander) chips like the NE570 (but far too expensive), but I'm not sure what would actually work for my solution. I don't need high fidelity, but I also don't want to lose sensitivity for high and low frequencies. (Is this normalization or dynamic range compression?) I have used the Adafruit auto-gain microphone which uses a MAX9814 which offers an output of 2V peak to peak and a DC offset of 1.25V and it works great, but I'd also like to be able to use an aux cord in.
Thanks ahead for your answer