[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Understanding SCMIR



Thank you - Nick. If I may ask now, how might I organize the data of multiple SCMIR analyses? 

For instance, if I wanted to use Tartini to do Pitch Analysis of 10 audio files. And I wanted to access all of the files (and their specific indices) that returned a value between 0.4 and 0.44.  

Is this something built in to the language? Is there a a tutorial on SCMIR for the beginners? 

Thank you again. 


On Wed, Nov 27, 2019 at 9:41 AM <clicksonnil@xxxxxxxxx> wrote:
Hi,

[170,5,11].order
gives
[ 1, 2, 0 ]

You're asking for the indices into an array if the values were sorted in order from lowest to highest.

e.featuredata is the actual Loudness output values, across your soundfile, according to a stepsize in time given in samples by SCMIR.framehop
To recover time in seconds from a given frame, use:
SCMIR.frameTime(frame)

Best
Nick





> On 27 Nov 2019, at 14:12, stepan.kayukov@xxxxxxxxx wrote:
>
> Hi all -
> I'm trying to work more closely with the SCMIR plugins in SC - and I'm just a little confused about the nature of the data that I'm processing.
>
> Let's say you use a basic analysis snippet..something like this:
>
> (
> {
> e = SCMIRAudioFile(~filename, [Loudness]);
> e.extractFeatures(normalize:true);
> ~ordered = e.featuredata.order;
> }.fork;
> )
>
> Well, ~ordered produces a long string of whole numbers (based on a short waveform test):
> [ 83, 85, 84, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 4, 11, 18, 25, 27, 34, 41, 2, 9, 20, 32, 6, 13, 36, 39, 16, 23, 0, 22, 29, 7, 15, 30, 37, 8, 14, 38, 1, 21, 28, 31, 3, 5, 12, 17, 24, 33, 35, 40, 10, 19, 26, 42, 45, 44, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 43, 94, 93, 92, 91, 90, 89, 88, 87, 86 ]
>
> These do not seem "ordered" necessarily.  Although, comparatively, the e.featuredata gives me an (even-longer?) float array.
>
> Maybe I missed this in the documentation, but can anyone help me understand what these numbers represent specifically? And perhaps, where does timing information enter the picture?
>
> Thanks.


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/