Spectral irregularity descriptor tool?

Matt Collins's icon

Hi there! I've been searching for any external descriptor tool that might output the spectral irregularity of a sound in real-time, but have had no luck finding one as of yet. I've looked through zsa.descriptors, the IRCAM descriptors in Max Sound Box and many of the other legacy externals developed for Max over the years. Perhaps there's some technical reason as to why spectral irregularity can't be extracted in real-time? Any help with this would be much appreciated.

AlexHarker's icon

From the look of the formula as in the Jensen paper the spectral irregularity can easily be calculated in real-time, so it looks like it's just the case that no-one has done it in an easily accessible external. There are ways you could build this in native Max using pfft~ and either a one sample delay or delta~ (it's the sum of the differences between consecutive bins). The hardest part is getting the sum of a frame's worth of values and converting to the Max domain, but it is possible (if not that nice).

This sort of thing could also be built quite neatly in the FrameLib package that I recently released on the package manager. One of the kinds of tasks that makes easier than in native Max would be building custom descriptors. It may be that in either case (native or FrameLib) that's a bit more low-level than you are wanting (or easily able) to go - hard to know for any individual. However, it's a fairly quick build from my perspective. Let me know if you need either more pointers or more direct help/assistance in putting a patch together in either case.

AlexHarker's icon

Ah - what the hell - couldn't resist making the framelib version:

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

AlexHarker's icon

But let me know if a native version is more of interest... That one might take a tad longer, mostly to figure out how to deal with the summing issue.

Matt Collins's icon

Hi Alex, thanks so much for this. I'm not wedded particularly to this having to be made natively, so I think the framelib version you've made there could end up doing the job perfectly - but I'll have a play around with it and let you know if I have any thoughts/questions off the back of it. Thanks again, especially for taking the time to actually make a framelib version of this!