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

Re: [sc-users] Understanding SCMIR



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/