[music-dsp] Live pitch detection
Victor.Lazzarini at nuim.ie
Mon Oct 11 05:24:49 EDT 2010
For fiddle~ there is an article: http://www-crca.ucsd.edu/~tapel/icmc98.pdf
I have not looked at the internals of sigmund~, but from its outside
appearance, it looks like an improvement on fiddle~, using similar
principles, but maybe an enhanced peak-picking and sinusoidal tracking.
There is also an excellent paper on the latest DAFx: http://dafx10.iem.at/proceedings/papers/VonDemKnesebeckZoelzer_DAFx10_P102.pdf
where different methods are measured against each other. AMDF comes
out very well.
Regards 'hacking' of sigmund~, in PD the business end of the class is
a DSP processing function, which has a loop that iterates over an input
vector of samples. This is what needs to be removed and adapted for a
standalone application (and any other relevant functions that are
you will also need to replace the FFT function for one of your own).
You will just have to figure out where the output is being banged out
and tap it there.
On 11 Oct 2010, at 03:52, robert bristow-johnson wrote:
> if it's all in the time domain (which is what i think it would have
> to be for it to be used live), i can't imagine generic C code to be
> too complicated. there would have to be a circular buffer (and if i
> ever do a circular buffer in C, its length is a power of 2 and i
> mask the index to make it wrap around) and then whatever the alg
> does to it.
> if someone gets this into a simple and clean state where it's pretty
> much just given a buffer of the last 100 ms of sound and the result
> is the pitch or fundamental frequency or period length (with
> fractional sample precision), i would be interested in seeing it.
> otherwise, for time-domain pitch detection, i generally do something
> based on the Average Magnitude-squared Difference Function. can be
> done real-time, but likes to have a 2 period delay, which is not
> particularly good for low pitches and live settings. i have an idea
> about how Axon does their 13 ms pitch detection (for the low E
> string which has a periods possibly as long as 12.1 ms, so telling
> us what the period length is 1 ms after it completes the very first
> period is pretty fast, i think).
> but i have no idea what fiddle~ nor sigmund~ nor Accordeur do
> mathematically. can anyone fill us in about it?
> r b-j
> On Oct 10, 2010, at 4:03 PM, Victor Lazzarini wrote:
>> yes, you would just need to remove the audio processing loop from
>> the PD external and
>> then write a wrapper around it. It should not be that difficult.
>> On 10 Oct 2010, at 19:00, Alexandre Quessy wrote:
>>> 2010/10/10 Victor Lazzarini <Victor.Lazzarini at nuim.ie>:
>>>> Both of these are open source. You should be able to have a look
>>>> and use the
>>>> code in your applicatiom if you are a C programmer.
>>> Yes, but it needs to be hooked to something like RtAudio or
>>> for the audio input.
>>> I was looking at Denemo's source code, and there is some pitch
>>> detection going on there. I asked the developers and they used some
>>> code from Accordeur, which is a fork in QT of Dan's Tuner. (which is
>>> in WX) I'm more into Clutter myself. I don't know how much their
>>> differ, appart from the GUI toolkit.
>>>> On 10 Oct 2010, at 15:32, Spencer Russell wrote:
>>>>> On Wed, Sep 29, 2010 at 1:45 AM, Alexandre Quessy <alexandre at quessy.net
>>>>>> I'm much used to using Miller Puckette's [fiddle~] object for
>>>>>> Data. Is there a C/C++ library that provides a similar tool?
>>>>> As i understand it, fiddle~ has been pretty much completely
>>>>> in favor of sigmund~ (also by Miller, and more recently released)
>>> Good to know. Thanks Spencer. I haven't used much Pure Data in the
>>> last few months.
>>> So, I should either start from sigmund~ or Accordeur. Which should
>>> the easiest? Probably Accordeur.
>>> Alexandre Quessy
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book
> reviews, dsp links
More information about the music-dsp