Filtering Changes and Deviations in Pitch

Liam Fan's icon

Hello!

I'm using [retune~ @retune 0 @pitchdetection 1] to detect pitch from an instrument and I've noticed sometimes the pitch of the instrument varies just enough that it detects the wrong pitch, especially during the attack and decay of the played note. I've been trying to figure out a way to filter the output of [change] so that it will only output the detected note if it has been sustained for more than 2 seconds for example.

Appreciate the help in advance,

Liam



[Edit] Here is my progress so far;

Max Patch
Copy patch and select New From Clipboard in Max.

Source Audio's icon

It really depends on what exactly you want to do.

Also what is expected from input instrument.

reading values and averaging them seems wrong thing to do for me.

Why retune ?

did you check fzero~ , and other many 3rd party pitch tracker externals ?