Do you know how I could do that? I’m not sure that’s something that could be done directly with the WaveShaper class, since we need to analyze frequencies with a FFT first (but I’m maybe wrong) and then boost only odd or even harmonics. I’m lacking experience in audio engineering yet.
I’d check out a graphing tool like desmos to play with algorithms in a cool visual way. Even harmonics can be made with a simple y = x^2, and odd with y = x^3. This holds true as you keep raising the power, odds stay odd, evens stay even.
Thanks, that’s a great news because I was really afraid of FFT implementations & performances issues. Actually, I need to understand how it is possible to add odd/even harmonics without determining the fondamental with an FFT, because it is dependent on the fondamental I guess?
I will write Python scripts to try different functions and prototype something simple with numpy before implementing anything with JUCE.
I don’t think it’s possible to accurately discern which are even and odd harmonics of a signal
For example, a saw wave can contain all the harmonics, but it could also be the same wave with twice the frequency with the even harmonics removed. And what if the sound is inharmonic? What about the noise? Those overtones will be intermediate.
If it was a synth waveform generator it would be very easy with additive synthesis, but as an effect, I think adding harmonics to a signal will produce misplaced beeps and artifacts. But it’s just an opinion, I’ll follow the thread to see if you can achieve it and show us the results
Unfortunatly, the author does not provide the saturation algorithm… I think it’s in a separate module. The README is interesting because he says he removes artifacts with oversampling.