Fluid.pitch to find the overall pitch changement when sweeping across three strings at once

Hello everyone, I would like to find the overall pitch changement when sweeping across three strings at once, therefore I could map it to smoothy control the upward or downward sound source movement with surround panner or Ircam Spat. I am currently using the fluid.pitch but found my patch made the movement a little bit jumpy… is there better ways to do with ? Thanks alot !

As far as I know, none of the algorithms in fluid.pitch~ are polyphonic, so they may have a hard time picking up the pitch with these slides.

That being said, you can use fluid.stats to smooth things out a bit to see if that improves things.

You can also look at the centroid output in fluid.spectralshape~ as that correlates strongly with “brightness”, and the slides do improve in “brightness” as you move up the neck.

You can also try a combination of things by looking at the confidence output of fluid.pitch~ and if it as > 0.8 then take the pitch value, and if it is < 0.8 then use the centroid instead. That may still be jumpy as you go from one type of descriptor to another, but that may help a bit.

At minimum, looking at the confidence will let you know how well the pitch algorithm is working, as if the confidence is constantly low (which I suspect it may be, given your material is polyphonic) the algorithm isn’t going to be very accurate.

I’m in the middle of something else, but fluid.chroma is good for catching harmonic content change.

more soon

Thank you very much for your suggestion. I’ve updated the patch (as shown in the video) and incorporated ‘zl’ to find the average values within several samples, resulting in a very smooth outcome. It seems that under the fluid.pitch detection, the confidence rarely exceeds 0.8 for my sound source. The use of centroid has been quite helpful, and I hope to make further modifications to enhance the accuracy of this detection!

Sounds interesting, let me take a look!

1 Like

I also recommend using @unit 1 for both, and in the case of spectralshape also adding @power 1. @unit 1 does frequency to midi conversion which essentially makes the changes in frequency linear, rather than logarithmic, which is generally preferable (unless being used to drive an oscillator directly). This will also make your scaling at the end more linear as well (e.g. scale 0. 127. 0. 1.).

I’ve personally not played with chroma very much, so no practical suggestions there, but I can imagine it being quite useful here.

Thanks again for your suggestion.

Using MIDI pitch is indeed a great idea! I’ve realized that I’m not familiar with many of the arguments of fluid objects. I’ll try various combinations to experiment further. Additionally, I’m also interested in attempting to control this part using Wekinator. I’m planning to give it a try today as well.

here’s the updated patch

2 Likes

Looking good.

Yeah tons of attributes in there. Thinking now, you can also experiment with the @minfreq and @maxfreq parameters of both. Since you don’t care about low pitches here starting at @minfreq 200 may work well, then from there, experiment with the top end (5k? 8k?).

1 Like

With @minfreq 200 and @maxfreq 5000 it works very will :grin:

1 Like