Today i tried to track the live input of an acoustic guitar and to control a k-Var with it. I want to replicate the incoming fundamental frequency as good as it could be.
I analyzed it with ‚pvsanal‘ and tried some different stuff. Mostly i used ‚pvstrace‘ and ‚pvscent‘.
The results were not that good i wanted them to be.
Maybe you have some advice for me?
This was my setting:
iFFTsize = 2048 ; 1024
iOverlap = iFFTsize/16 ; /8
iWinsize = iFFTsize
iWintype = 1 ; Hann
fIn pvsanal aMic, iFFTsize, iOverlap, iWinsize, iWintype
fTrace pvstrace fIn, 15
kfftFreq pvscent fTrace
kfftFreq port kfftFreq, 0.01
Csound mailing list
Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here
Today i tried to track the live input of an acoustic guitar and to control a k-Var with it. I want to replicate the incoming fundamental frequency as good as it could be.
...
I think pvspitch is the better opcode to calculate the pitch of an
instrument. There are other opcodes with built-in FFT to also do it for
you.
I found I got better results, if I compressed the signal going into the
pitch analysis, especially with dynamic things like voice - and possibly
guitar.
Other opcodes you might try are: pitch, pitchamdf, plltrack or ptrack. I
don't know enough about pitch analysis to suggest which of these is
particularly good for a certain purpose. But IIRC they are well
documented in the manual, including caveats.
Hi
It also may be useful (depending on use case) to round the pitch tracking frequency to the nearest note (eg if using 12tet, and you want the exact note), and if not to be used in realtime, maybe even time-average (mode) the frequencies - I've had some good results with those.
The first thing you should do is to low pass filter your audio signal, since high frequencies and harmonics can lead to very jittery behaviours.
I got good results also with the pitch opcode, but you need to define the expected range with a fair amount of confidence.
Also be aware that low sounds are harder to be detected, and that complex textures (like chords or multiple voices) could lead to unexpected results (so the most powerful harmonic should be picked, but that can vary a lot depending on the material).
There’s no easy solution when analysing those kinds of signals.