I'm developing a patch that takes my guitar signal, detects the pitch (using fiddle), multiplies this frequency by some integer to choose a desired partial and uses this to set the centre frequency of a bandpass fillter with a very narrow Q.
This signal's volume is controlled by a midi expression pedal and added to the original guitar signal which goes to my guitar amp via a reamping box.
My goal is to be able to play a note and use the expression pedal to boost that partial and hopefully the sound from the amp will cause the string itself to feedback at that frequency.
I've been able to get a good approximation of this by running the bandpassed signal through a delay (after the expression pedal so the attack is removed), this shouldn't be necessary if I can get it to feedback properly.
I recorded the guitar signal inside max and it seems that the guitar is feedbacking at the desired partial sometimes, other times I'm simply hearing the boosted partial. I think some strings are more likely to cause feedback and some frequencies work better possibly because there are phase differences whose influence changes depending on the frequency.
My main question is about the physics of such a process. I imagine that I would want the phase of the boosted partial to be the same or close to the original so that it reinforces that pitch on the guitar. I did a quick test recording a filtered and unfiltered sine wave and it appears that the cascade object may be putting the signal out of phase or at least delaying the band-passed signal relative to the original signal.
It should be possible to purposefully delay the band-passed signal by some small amount so it lines up with the phase of the original signal's chosen partial. The problem is that I'm not sure how I'd calculate the phase of the partial of the unprocessed signal without processing it (e.g. band pass) and thus presumably delaying it or putting it out of phase.
Here's where the physics comes in, for naturally vibrating strings are partials in phase with each other particularly the fundamental?
It this were true perhaps some very limited calculation could be done to detect the time offset between zero crossings in both signals. For example I imagine the zero crossings for the fundamental match up with a zero crossing from the fourth partial (every fourth one). This could be used to calculate the delay time for the band passed partial (something like: wavelegnth - offset*partialNumber) so that the band-passed partial is in phase with the original.
To top this all off I realise that the entire guitar signal is delayed simply by going through my interface and max. I have the signal vector as small as possible though. In the future, the original signal will be doubled before my interface and the band-passed signal added after the interface using a mixer pedal.
I will also need a more sophisticated level control eventually. When the guitar starts sustaining the chosen partial the patch continues to boost it even more. Ideally I'd like something roughly linear in spite of this dynamic.
Any thoughts would be much appreciated. Let me know if you have any questions.