Adding some harmonics to guitar signal

Hi, Hello and Welcome!

My goal is to add specific harmonics to guitar signal and also i want to be able to manipulate a magnitude of existing harmonics. My first attempt was achive it by using FFT getting right bins of some freqs boost it and go back to time domain with IFT (and i was able to do this but there always were some artfiacts) but i couldnt add some harmonic using this method. So here is my question: which way is more afficient and also easier to implement to add harmonic to the signal - addtive synth (adding some sin waves to the original signal) or Harmonic Generation through Frequency Shifting? Or maybe there is another method which is better?

So for example i play note A4 which is 440 Hz and i want to add to the signal a harmonic 660 Hz which does not naturally occur in this sound.

Also if addtive synth is the way should i choose Wavetable synthesis or sine wave synthesiser?

Thanks in advance!
Have a great day!

independent from the method of adding harmonics, you need FFT analysis.
Without this analysis you can do nothing. So that means overlapped FFT, using windowing, region tracking, frequency detecting by phase propagation or parabolic estimates. And no, there is no recep online for this. You have to engineer this all by yourself. Phase Vocoders are a good starting point to learn the techniques: adding a single harmonic is just a pitchshifter…
My app PD Space Guitar Synthesizer adds harmonics. It took me years to get it right. It adds max 32 harmonics, polyphonically, with a lot of extra mods.

1 Like

okey thanks for your advices. I have already been able to do FFT and found a fundamental freq. So right now lets say that i do a real easy plugin which will just add one harmonic to the signal.
My program already detects fundamental freq which is X and i want to add 1.5X so the easiet way to do it is to do pitchshifter?
I know it probably a long way to make it work perfect. But i have a project to do on my studies, so i m just looking for same solution.

Have a good day!

I was willing to do it with wavetable synth.

Adding a simple monophonic partial is just a sine… no need for a wavetable if you just need a sine

 float wstep= 2.*M_PI / (SampleRate/yourFreq);
 float wpos=0;

 {
      mySample[s] += myHarmonicVolume * sinf( wpos );
      wpos = fmod( wpos + wstep, 2.*M_PI );
 }
1 Like

okey I understood. So I will try to accomplish my goal by adding some sin waves to my signal.
Thank you very much!

1 Like

you have to analyze the frequency and level of the neighboring harmonics of the added harmonic so that it integrates well, otherwise you will hear whistles out of place.

1 Like