Hi all--
I'm currently working on a project for controlling my granular synth patch using a control stream derived from various feature extractions from an input signal (soundfile or live). Currently what I'm working with is the spectral centroid, which I've implemented as a PD patch.
I'm wonding if people have other ideas for perceptual features that can be reliably extracted from an audio stream using the FFT or otherwise. The input is not necessarily pitched (might eventually want to analyze its own granular output as well, in addition to noisy and unpitched sounds) so I'm not that interested in pitch tracking, etc. rather more high level sonic features. For example, how might I detect a period of sharp attacks on a wind instrument? Maybe by using some sort of peak threshold with the spectral centroid? "Smoothness" of a sound? Continuum of pitched to unpitched? Etc.
Also if there are any PD implementations (abstractions or externals) of this sort of stuff please inform me; I haven't found anything as of yet.
I'd very much appreciate any input!
Best, Jacob
Hi Jacob,
A lot of work has been done on this, particularly in the field of MIR (Musical Information Retrival). One method is to treat the frequency spectrum as a statistical distribution, and then extract various characteristics of the distribution. These can include:
Mean: the arithmetic average Variance: the spectral 'spread' about the mean Deviaton: the square root of the variance Skewness: a measure of asymmetry around the mean Kurtosis: A measure of the relative spectral peakedness Irregularity: A measure of the jaggedness of the spectrum
There are many others including Tristimulus and Inharmonicity, but I can't remember the definitions off-hand. A Google for any of the above should give you the formulae.
I have a set of abstractions that implement some of the above. I'll package them up and make them available within the next couple of days.
Regards,
Jamie
On Fri, 2005-07-15 at 10:44 -0400, Jacob Last wrote:
Hi all--
I'm currently working on a project for controlling my granular synth patch using a control stream derived from various feature extractions from an input signal (soundfile or live). Currently what I'm working with is the spectral centroid, which I've implemented as a PD patch.
I'm wonding if people have other ideas for perceptual features that can be reliably extracted from an audio stream using the FFT or otherwise. The input is not necessarily pitched (might eventually want to analyze its own granular output as well, in addition to noisy and unpitched sounds) so I'm not that interested in pitch tracking, etc. rather more high level sonic features. For example, how might I detect a period of sharp attacks on a wind instrument? Maybe by using some sort of peak threshold with the spectral centroid? "Smoothness" of a sound? Continuum of pitched to unpitched? Etc.
Also if there are any PD implementations (abstractions or externals) of this sort of stuff please inform me; I haven't found anything as of yet.
I'd very much appreciate any input!
Best, Jacob
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi Jamie-
Thanks, I would love to see the abstractions, as I was sort of shooting in the dark for a while implementing even the relatively simple spectral centroid. I originally thought I should be able to do the computation all in the signal domain from the [rfft~] object's outputs....is that possible? What I ended up doing is writing each analysis frame into an array, then using [bang~] to trigger the calculation for each frame, reading through the array.
Well, if you could package those up it would be immensely appreciated!
Jacob
On 7/15/05, Jamie Bullock jamie@postlude.co.uk wrote:
Hi Jacob,
A lot of work has been done on this, particularly in the field of MIR (Musical Information Retrival). One method is to treat the frequency spectrum as a statistical distribution, and then extract various characteristics of the distribution. These can include:
Mean: the arithmetic average Variance: the spectral 'spread' about the mean Deviaton: the square root of the variance Skewness: a measure of asymmetry around the mean Kurtosis: A measure of the relative spectral peakedness Irregularity: A measure of the jaggedness of the spectrum
There are many others including Tristimulus and Inharmonicity, but I can't remember the definitions off-hand. A Google for any of the above should give you the formulae.
I have a set of abstractions that implement some of the above. I'll package them up and make them available within the next couple of days.
Regards,
Jamie
On Fri, 2005-07-15 at 10:44 -0400, Jacob Last wrote:
Hi all--
I'm currently working on a project for controlling my granular synth patch using a control stream derived from various feature extractions from an input signal (soundfile or live). Currently what I'm working with is the spectral centroid, which I've implemented as a PD patch.
I'm wonding if people have other ideas for perceptual features that can be reliably extracted from an audio stream using the FFT or otherwise. The input is not necessarily pitched (might eventually want to analyze its own granular output as well, in addition to noisy and unpitched sounds) so I'm not that interested in pitch tracking, etc. rather more high level sonic features. For example, how might I detect a period of sharp attacks on a wind instrument? Maybe by using some sort of peak threshold with the spectral centroid? "Smoothness" of a sound? Continuum of pitched to unpitched? Etc.
Also if there are any PD implementations (abstractions or externals) of this sort of stuff please inform me; I haven't found anything as of yet.
I'd very much appreciate any input!
Best, Jacob
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Fri, 15 Jul 2005, Jacob Last wrote:
Thanks, I would love to see the abstractions, as I was sort of shooting in the dark for a while implementing even the relatively simple spectral centroid. I originally thought I should be able to do the computation all in the signal domain from the [rfft~] object's outputs....is that possible? What I ended up doing is writing each analysis frame into an array, then using [bang~] to trigger the calculation for each frame, reading through the array.
you can compute the centroid of signal chunks using a [phasor~] tuned to ramp up exactly synched with each block, one or two [*~] and then summing or averaging all values in each chunk ([lop~] could do it but there are better ways that I can't think of now).
you can compute higher-order moments using powers. e.g. multiplying a signal with itself for squaring, or [expr~ pow($v1,3)] for cubing, etc. And you insert that right after the [phasor~].
the mean (the centroid) is the 1st-order moment.
the variance is the 2nd-order moment minus the square of the mean, or the other way around...
there are formulæ for skewness and kurtosis that are quite simple combinations of moments.
Entropy is not obtainable using moments, but has a similar formula. You have to do [expr~ $v1*log($v1)] after the [phasor~], or something.
,-o--------o--------o--------o-. ,---. irc.freenode.net #dataflow |
| The Diagram is the Program tm| | ,-o-------------o--------------o-.
-o------------o-------------o-' | | Mathieu Bouchard (Montréal QC) | | téléphone:+1.514.383.3801
---' `-o-- http://artengine.ca/matju -'
On 7/15/05, Mathieu Bouchard matju@artengine.ca wrote:
(snip)
you can compute the centroid of signal chunks using a [phasor~] tuned to ramp up exactly synched with each block, one or two [*~] and then summing or averaging all values in each chunk ([lop~] could do it but there are better ways that I can't think of now).
(snip)
How would I do this? I am trying think out how to average all the values in a signal block and output a single float at the end of each DSP cycle...is there an external to do this? I can't think of an abstraction to do it.
Thanks, Jacob
you can do this with a delay of [insert number of samples in signal block here] and a simple feedback system.
First, subtract the delayed signal from the direct (undelayed) signal. This delay controls the number of samples to sum over. Then feed the output of this into a 1-tap IIR filter (this means the output of this filter gets multiplied by a coefficient before getting summed with the input). In a mathematical proof this coefficient is equal to 1 exactly, although this is an IIR filter on the LIMIT of stability and with floating point arithmetic it should rather be set to 0.999999999.
I couldn't be bothered to craft a nice ascii pic of this so I did a gif instead (attached). The delta sign is the delay, and the sigma sign indicates summation. K is the coefficient discussed.
As far as implementing this I am not entirely sure. pipe~ would perform a delay although it would probly not be sample accurate, but using z~ would be a little messy (you would need lots of them). The feedback cannot be implemented directly as I think this would cause a 'DSP loop' which would not be solved by using a z~ in the path (please correct me if I'm wrong), while a send and receive pair would give a delay of 64 samples if that was the size of your signal block. hmmm.
Matt
-=-=-=-=-=-=-=-=-=-=-=- http://www.loopit.org -=-=-=-=-=-=-=-=-=-=-=- ----- Original Message ----- From: "Jacob Last" jacoblast@gmail.com To: "Mathieu Bouchard" matju@artengine.ca Cc: "the PureData - mailinglist" pd-list@iem.at; jamie@postlude.co.uk Sent: Monday, July 18, 2005 4:29 PM Subject: Re: [PD] feature extraction
On 7/15/05, Mathieu Bouchard matju@artengine.ca wrote:
(snip)
you can compute the centroid of signal chunks using a [phasor~] tuned to ramp up exactly synched with each block, one or two [*~] and then summing or averaging all values in each chunk ([lop~] could do it but there are better ways that I can't think of now).
(snip)
How would I do this? I am trying think out how to average all the values in a signal block and output a single float at the end of each DSP cycle...is there an external to do this? I can't think of an abstraction to do it.
Thanks, Jacob
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Mon, 18 Jul 2005, matthew jones wrote:
In a mathematical proof this coefficient is equal to 1 exactly, although this is an IIR filter on the LIMIT of stability and with floating point arithmetic it should rather be set to 0.999999999.
With Pd floats this number doesn't exist and thus gets rounded to 1, which is just as bad.
1 - 2^24 = 0.999999940395355 is the biggest number smaller than one.
with 64-bit floats (not used in Pd) it's instead 1 - 2^53.
the constants 24 and 53 are always one more than the number of significant _binary_ digits in that format. (the number of significant _decimal_ digits is 3.332 smaller than that)
,-o--------o--------o--------o-. ,---. irc.freenode.net #dataflow |
| The Diagram is the Program tm| | ,-o-------------o--------------o-.
-o------------o-------------o-' | | Mathieu Bouchard (Montréal QC) | | téléphone:+1.514.383.3801
---' `-o-- http://artengine.ca/matju -'
How would I do this? I am trying think out how to average all the values in a signal block and output a single float at the end of each DSP cycle...is there an external to do this? I can't think of an abstraction to do it.
abstraction: tabsend~ to a table and iterate over table each dsp tick external: avg~ (zexy)
t
hi
if i understand you right, you're maybe looking for [avg~] from zexy. it outputs a float after every dsp-cycle, that represents the average of all values of one block~.
roman
Jacob Last wrote:
How would I do this? I am trying think out how to average all the values in a signal block and output a single float at the end of each DSP cycle...is there an external to do this? I can't think of an abstraction to do it.
Thanks, Jacob
___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
Hi,
I was trying to achieve something slightly different to you in that I needed to do a periodic 'snapshot' of the features rather than generate continuous feature curves. I actually used the spectral peak data generated by fiddle~ as the basis for the calculations. As such, I was only dealing with 'control data'. I think for your purposes, Mathieu's suggestions sound good. Anyhow, you might get some use from my abstractions, so I have posted them at: http://www.puredata.org/Members/jb
I used them for rapid testing of a timbre classification technique so they are very rough. You may even spot some faults! At some point soon, I might put together an external that does the job more elegantly. Let me know how you get on.
Regards,
Jamie
On Fri, 2005-07-15 at 12:28 -0400, Jacob Last wrote:
Hi Jamie-
Thanks, I would love to see the abstractions, as I was sort of shooting in the dark for a while implementing even the relatively simple spectral centroid. I originally thought I should be able to do the computation all in the signal domain from the [rfft~] object's outputs....is that possible? What I ended up doing is writing each analysis frame into an array, then using [bang~] to trigger the calculation for each frame, reading through the array.
Well, if you could package those up it would be immensely appreciated!
Jacob
On 7/15/05, Jamie Bullock jamie@postlude.co.uk wrote:
Hi Jacob,
A lot of work has been done on this, particularly in the field of MIR (Musical Information Retrival). One method is to treat the frequency spectrum as a statistical distribution, and then extract various characteristics of the distribution. These can include:
Mean: the arithmetic average Variance: the spectral 'spread' about the mean Deviaton: the square root of the variance Skewness: a measure of asymmetry around the mean Kurtosis: A measure of the relative spectral peakedness Irregularity: A measure of the jaggedness of the spectrum
There are many others including Tristimulus and Inharmonicity, but I can't remember the definitions off-hand. A Google for any of the above should give you the formulae.
I have a set of abstractions that implement some of the above. I'll package them up and make them available within the next couple of days.
Regards,
Jamie
On Fri, 2005-07-15 at 10:44 -0400, Jacob Last wrote:
Hi all--
I'm currently working on a project for controlling my granular synth patch using a control stream derived from various feature extractions from an input signal (soundfile or live). Currently what I'm working with is the spectral centroid, which I've implemented as a PD patch.
I'm wonding if people have other ideas for perceptual features that can be reliably extracted from an audio stream using the FFT or otherwise. The input is not necessarily pitched (might eventually want to analyze its own granular output as well, in addition to noisy and unpitched sounds) so I'm not that interested in pitch tracking, etc. rather more high level sonic features. For example, how might I detect a period of sharp attacks on a wind instrument? Maybe by using some sort of peak threshold with the spectral centroid? "Smoothness" of a sound? Continuum of pitched to unpitched? Etc.
Also if there are any PD implementations (abstractions or externals) of this sort of stuff please inform me; I haven't found anything as of yet.
I'd very much appreciate any input!
Best, Jacob
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hello all, Im having trouble tracking down the flashserver external for pd on os x. Is this available anywhere anymore does anyone know? Thanks Nicky
Nicholas Ward(e)k dio:
Hello all, Im having trouble tracking down the flashserver external for pd on os x. Is this available anywhere anymore does anyone know?
i thought it was only available for windows, at least it was the last time i used it, but i might be wrong.
Thanks Nicky
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list