Dear FluCoMa community,
since this is my first question here, I’d like to say hello and I hope I’m not breaking any rules.
I’m PhD at Turin Conservatorium researching on hybrid lutherie and HMI. I’ve read a lot on this site, and found some discussions close to this argument but not completely on focus on this issue I’m having. I’m currently researching on an hybrid instrument electric guitar-like, that I’m calling Chelys.
Recently I’ve created an installation as a study case for this. Everything worked but now I’m trying to push the instrument to a next level. Most of the job is done by fluid.pitch~ using the algorithm HPS, that’s because placing the excitement system on the “pickup area” enables mostly harmonic excitement (I attach a graph I’ve made where the grey bobbin symbol represents the exciter).
Filtering the In signal is possible of course to push the “harmonic” to the fundamental frequency. That’s easy using a fixed string pitch but since I’m dynamically changing the tune of the string this simple patch starts to tweak all over the harmonic spectrum. I’ve found that instead of using Yin, HPS works better but not enough as I’m trying to jump to different harmonics of the string and create harmonic or fundamental glissatos.
I’d appreciate your helpful knowledge.
Thank you,
Guglielmo
2 Likes
hello! The only rule here is about civility, so you are fine 
I am not certain I understand what you are trying to do though. Did you consider fluid.sinefeatures~ to get a number of peaks instead?
What is not behaving with fluid.pitch in FFTYin mode?
2 Likes
Thank you for your reply.
I realize my question might have been a bit foggy. What I’m trying to do is detect the fundamental frequency (f₀) of a string in a feedback system, where the string is being excited at an unknown harmonic.
For example, if I’m hearing a “tone” at 300 Hz, I’d like the feedback to recognize it as 100 Hz, 3rd harmonic — or if the measured frequency is 615 Hz, to interpret it as 123 Hz, 5th harmonic.
and, final question, are there better strategies than hps? this is the best way I’ve found in fluid.pitch… better results than Yin
hello
a few question:
- do you know the fundamental of the string before the performance
- if so, can you do a ‘tuning’ patch
the idea is that if you know the string fundamental it is a much easier task than guessing from a few peaks…
Exactly, if the tunings were static I would simply store the six (or more) fundamentals at the start of the piece and use them to bias the pitch tracker, but the whole point of this instrument is that every string is continuously re-tuned by its own DC-motor tuner during the performance/installation, so the fundamentals are in constant flux. Here’s a short clip that shows the extent of the detuning range in real time:
video video video
with the strategies I know, with purely acoustic pitch tracking, I’ve failed hard on this instrument: the feedback-driven spectrum is hyper-harmonic and the detector constantly jumps to 2f, 3f or 4f, making closed-loop tuning impossible.
Now I’m trying to detect with an s-type load cell the string tension and use that description converted with tension-frequency correlation, but I would much prefer a software-only solution that doesn’t add mass/damping.
If you know any reliable way of detecting the true (unknown and continuously moving) fundamental in a heavily electromagnetically-sustained string, I would really appreciate the hint.
Anyway, thank you so much for your help and attention!
first, it looks amazing! Congrats
second, I don’t think flucoma is your friend here. maybe @danieleghisi and @a.harker have ideas on how to find the missing fundamental of a bunch of peaks but it is going a bit beyond our toolset…
Hi Guglielmo – we did talk in person about this a little bit
.
If you’re using a state-of-the art algorithm, and providing to it “good quality” peaks, and it doesn’t manage to get to the fundamental, I’m not sure I’ll be able to find a better one. The point is that when your string jumps to the harmonic, that truly is the new acoustic fundamental, I guess…
The only thing that I can think of is to enforce continuity: if you see that there’s a 1 octave jump at some point, that’s surely an analysis error, right? Since the string detuning must be slow…
So I assume you could perhaps take a median filter on the input, check whether the new value is far away from the running median (with a very large threshold, say, half an octave) and in that case determine that it must have jumped to a harmonic – and you may even know which one by rounding its ratio to the median. This is something that sounds reasonable on paper, but I guess that there’ll be many thorns along the road…
1 Like
thank you @tremblap !!!
@danieleghisi Yeah! We dealt with it… probably the median filter would be a good logic way assuming that the string doesn’t detune before the amplitude activates the string’s feedback… At this point it’s mostly empirical tweaking.
As soon as I have something that survives a long full-range automated detune without a single octave error, I’ll post the patch here.
Thanks again to both of you for your hints!