fabuloso_mocoso
Member
Hi, I'm working on a wavetable oscillator with the audio library...I have inverting op amps to scale my inputs to the teensy range for the freq and amp and I'm trying to figure out how to invert the values again in the code.
I've found ways to do it online with int's but not with floats so Im stumped. I can add another inverting op amp to the input but I'd prefer not to. Any ideas?
Thanks
P.S. the code is the standard one like in the example for the waveform synth
Edit: nevermind i figured it out. For anyone else with this prob, in the loop, something like this:
waveform1.frequency(20000 - (analogFreqSmooth1 * 20000));
I've found ways to do it online with int's but not with floats so Im stumped. I can add another inverting op amp to the input but I'd prefer not to. Any ideas?
Thanks
P.S. the code is the standard one like in the example for the waveform synth
Edit: nevermind i figured it out. For anyone else with this prob, in the loop, something like this:
waveform1.frequency(20000 - (analogFreqSmooth1 * 20000));
Last edited: