Hi all,
This is very exciting to me, since I've been looking for a way to
integrate the pitchtracker of
https://magnetophon.github.io/VoiceOfFaust/ into the binary,
instead of using an external pd patch.
So many thanks to Nicolas for writing it!
Is it open source? What license?
Julius's solution didn't work for me, but this at least compiles
and runs:
i = +(1) ~_ :min(1e9):max(0);
Unfortunately it doesn't track the pitch here.
I connected an oscillator but the bargraph stays at 0.
Also, I don't understand any of the algorithm, but shouldn't "i"
get reset at some point, so it doesn't run into the min clause?
That would happen after 1e9/48000/60/60 = almost 6 hours at 48k
SR, right?
Cheers,
Bart
Julius Smith <julius.sm...@gmail.com> writes:
Hi Nicolas,
It looks like you are asking for unbounded correlation lags.
Try limiting
it with something like i = min(1e8,+(1)) ~_ ;
- Julius
On Tue, May 5, 2020 at 11:56 PM Nicolas Gravillon
<gravil...@gmail.com>
wrote:
Hi everyone,
First of all, thank you all for your amazing achievement with
Faust. I am
delighted to use it and amazed by all this work. Regarding my
problem, I
try for some time now to implement a pitch tracker implementing
autocorrelation, for a more reliable metering than the zero
crossing
method. I ended with the following version, strongly inspired
from Tiziano
Bole work :
import("stdfaust.lib");
BufferLength=4;
pitch(x) = ma.SR / max(M, 1) - ma.SR * (M == 0)
with {
AC(x, k) = sum(j, BufferLength, (x@(j))*(x@(j+k))) /
(BufferLength) ;
// Correlating two signals, on the buffer length, ideally over
600 samples
with actual SR
i = +(1) ~_ ;
U = AC(x,i) > AC(x,0)/2; // Detection of a good
correlation, AC(x,0) being the highest possible value, so its
half becomes
the detection threshold
V = AC(x,i) <= AC(x,i+1);
W = AC(x,i+1) > AC(x,i+2);
Y = U: *(V) : *(W);
N = (+(1) : *(1 - Y)) ~ _;
M = (N' + 1) : ba.sAndH(Y);
};
process = pitch : hbargraph(“Frequency", 50, 2000);
The problem seems to be located in the Autocorrelation function
: AC(x,
k) = sum(j, BufferLength, (x@(j))*(x@(j+k))) / (BufferLength)
since the
error says “can’t compute the min and max values of […] used in
delay
expression […] (probably a recursive signal).
Any chance to get it working? I do not see actually how to fix
boundaries
for the delay lines, or get rid of the recursive guess from the
compiler.
Thanks for reading this,
Nicolas
_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users
_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users