I need a low-latency pitch tracker for real-time performance work -- has anyone implemented one in ChucK? I'm ready to write one if need be -- it would be fun to start playing with the UAna objects -- but I don't feel the need to replicate work already done. Thanks in advance. - Rob
Rob; I need a low-latency pitch tracker for real-time performance work -- has
anyone implemented one in ChucK? I'm ready to write one if need be -- it would be fun to start playing with the UAna objects -- but I don't feel the need to replicate work already done.
Check /examples/analysis/tracking/pitch-track.ck That should be a starting point at least. This is a hard subject to have to deal with, you may need to give a shout if you run into issues. Yours, Kas.
Kas: Thanks -- I finally found the tracking sub-directory in the 1.2.1.3 docs. (FWIW, I'd been looking in the 1.2.1.2 docs as well as the online examples in http://chuck.cs.princeton.edu/doc/examples/, which is why I didn't previously find them. I'm looking forward to the fruits of the online documentation efforts!) And yep, I'm keenly aware that pitch tracking is non-trivial. I'll let you know if I get hung up on UAna-specific issues, though. - Rob On 12 Dec 2009, at 04:05, Kassen wrote:
Rob;
I need a low-latency pitch tracker for real-time performance work -- has anyone implemented one in ChucK? I'm ready to write one if need be -- it would be fun to start playing with the UAna objects -- but I don't feel the need to replicate work already done.
Check /examples/analysis/tracking/pitch-track.ck
That should be a starting point at least. This is a hard subject to have to deal with, you may need to give a shout if you run into issues.
Yours, Kas.
Rob; Thanks -- I finally found the tracking sub-directory in the 1.2.1.3 docs.
(FWIW, I'd been looking in the 1.2.1.2 docs as well as the online examples in http://chuck.cs.princeton.edu/doc/examples/, which is why I didn't previously find them. I'm looking forward to the fruits of the online documentation efforts!)
Yes, that was a issue. For some reason the tracking example was removed from the 1.2.1.2 version while it was in 1.2.1.1. I think that must have been done by mistake as that particular example turned out to be very useful for a lot of people. Good thing it's back now. I can understand how that would lead to confusion.
And yep, I'm keenly aware that pitch tracking is non-trivial. I'll let you know if I get hung up on UAna-specific issues, though.
You may want to also look into Ge and Rebecca's work with "smelt" and the paper on the analysis stuff. Typically I find that you'll end up with a cross between science and gut feeling about the particular kind of signal you are interested in tracking. Whistling and flutes are relatively easy while -for example- tracking pitch on voices is hard. Guitar notes (not chords) are easy, aside from the attack (which you can more or less forget about). Good luck! Kas.
On 12 Dec 2009, at 18:22, Kassen wrote:
Guitar notes (not chords) are easy, aside from the attack (which you can more or less forget about).
Do these track the overtones? - When checking the spectrum of an oud, I noticed that the fundamental is missing if one passes to new note by shortening the string with the finger against the board without striking it with the other hand. Hans
Hans;.
Do these track the overtones? - When checking the spectrum of an oud, I noticed that the fundamental is missing if one passes to new note by shortening the string with the finger against the board without striking it with the other hand.
Well, fft as such doesn't "track" anything. All you get is energy and phase for a certain band over that frame. From this we can quite easily determine the most prominent frequency, but as you know that need not be the fundamental. It quite likely is the fundamental for many signals but we don't *know* this and without more knowledge about the piece we can't say what the root of a certain chord is, even if we could manage to separate the notes. Pitch trackers often get very confused by chords (and may output all sorts of musically interesting "garbage" in response). What we can do -given enough frequency resolution- is try to find a series of harmonics and use that to calculate what the fundamental must have been. Harmonics will be integer multiples of the fundamental, after all. This is what our hearing psychology does when listening to something like your oud. It's also why a HPF set loose on a full mix by a DJ in a club will sound less dramatic that a LPF; it's far easier for us to imagine the missing elements in the first case than the second. I think that might've answered your question but I'm well aware that it only raises more. There are lots and lots of questions here. Nobody knows all the answers, in fact we are sure we will never get perfectly accurate instantaneous pitch-tracking. I'm not even sure that would be as useful as making good guesses based on how sound is experienced by our hearing psychology; as noted the perceived frequency, the most important thing, may not actually be there in the signal at all. In a way it's a bit of a tragic task, but of course lots of fun are still to be had. Kas.
On 12 Dec 2009, at 19:32, Kassen wrote:
Do these track the overtones? - When checking the spectrum of an oud, I noticed that the fundamental is missing if one passes to new note by shortening the string with the finger against the board without striking it with the other hand.
Well, fft as such doesn't "track" anything.
In a past thread, when discussing using GPUs for getting extra computing power, I forgot to mention this FFT that achieves 144 Gflop/ s on the now not so new GeForce 8800GTX: http://en.wikipedia.org/wiki/OpenCL Haven't looked at details, but I think it can be used as just an added parallel computing resource.
All you get is energy and phase for a certain band over that frame. From this we can quite easily determine the most prominent frequency, but as you know that need not be the fundamental. It quite likely is the fundamental for many signals but we don't *know* this and without more knowledge about the piece we can't say what the root of a certain chord is, even if we could manage to separate the notes. Pitch trackers often get very confused by chords (and may output all sorts of musically interesting "garbage" in response).
What we can do -given enough frequency resolution- is try to find a series of harmonics and use that to calculate what the fundamental must have been. Harmonics will be integer multiples of the fundamental, after all. This is what our hearing psychology does when listening to something like your oud.
Actually, the cochlea produce difference tones which do not exist acoustically. And if the input is a harmonic series with missing fundamental, it will be restored by that. So one idea might be to add such difference tones as a part of an analysis. Hans
OpenCL-based ChucK UGens would definitely be interesting...
On Sat, Dec 12, 2009 at 3:14 PM, Hans Aberg
On 12 Dec 2009, at 19:32, Kassen wrote:
Do these track the overtones? - When checking the spectrum of an oud, I noticed that the fundamental is missing if one passes to new note by shortening the string with the finger against the board without striking it with the other hand.
Well, fft as such doesn't "track" anything.
In a past thread, when discussing using GPUs for getting extra computing power, I forgot to mention this FFT that achieves 144 Gflop/s on the now not so new GeForce 8800GTX: http://en.wikipedia.org/wiki/OpenCL
Haven't looked at details, but I think it can be used as just an added parallel computing resource.
All you get is energy and phase for a certain band over that frame. From this we can quite easily determine the most prominent frequency, but as you know that need not be the fundamental. It quite likely is the fundamental for many signals but we don't *know* this and without more knowledge about the piece we can't say what the root of a certain chord is, even if we could manage to separate the notes. Pitch trackers often get very confused by chords (and may output all sorts of musically interesting "garbage" in response).
What we can do -given enough frequency resolution- is try to find a series of harmonics and use that to calculate what the fundamental must have been. Harmonics will be integer multiples of the fundamental, after all. This is what our hearing psychology does when listening to something like your oud.
Actually, the cochlea produce difference tones which do not exist acoustically. And if the input is a harmonic series with missing fundamental, it will be restored by that.
So one idea might be to add such difference tones as a part of an analysis.
Hans
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
On 12 Dec 2009, at 21:45, mike clemow wrote:
OpenCL-based ChucK UGens would definitely be interesting...
Kassen that Mac OS X now uses floats all through in the audio pipe line. Wouldn't that be great for ChucK, too - avoiding overflow over combined UGen amplitude 1.0. Hans
On Sat, Dec 12, 2009 at 3:14 PM, Hans Aberg
wrote: On 12 Dec 2009, at 19:32, Kassen wrote:
Do these track the overtones? - When checking the spectrum of an oud, I noticed that the fundamental is missing if one passes to new note by shortening the string with the finger against the board without striking it with the other hand.
Well, fft as such doesn't "track" anything.
In a past thread, when discussing using GPUs for getting extra computing power, I forgot to mention this FFT that achieves 144 Gflop/s on the now not so new GeForce 8800GTX: http://en.wikipedia.org/wiki/OpenCL
Haven't looked at details, but I think it can be used as just an added parallel computing resource.
participants (4)
-
Hans Aberg
-
Kassen
-
mike clemow
-
Robert Poor