//note, uses local normalization per file, not global. You'll find a bigger example in the SCMIRAudioFile help file which first runs global normalisation checks, then does the feature extraction with that global normalisation. ( { ~indices = [ "/data/audio/mirdata/EMcorpus/electro/19.wav", "/data/audio/mirdata/EMcorpus/electro/Axel F.wav", "/data/audio/mirdata/EMcorpus/electro/Bassline (Stretched)1986.wav", "/data/audio/mirdata/EMcorpus/electro/Beat Box.wav", "/data/audio/mirdata/EMcorpus/electro/Clear.wav", "/data/audio/mirdata/EMcorpus/electro/Close (To The Edit).wav", "/data/audio/mirdata/EMcorpus/electro/Cosmic Cars.wav", "/data/audio/mirdata/EMcorpus/electro/Let The Music Play.wav", "/data/audio/mirdata/EMcorpus/electro/Pack Jam (12_ Remix).wav", "/data/audio/mirdata/EMcorpus/electro/Planet Rock.wav" ].collect {|path| //Tartini defaults to one output, pitch in MIDI note values a = SCMIRAudioFile(path,[\Tartini]); a.extractFeatures(true); b = List[]; a.featuredata.do{|val,index| if((val>=0.4) && (val<=0.44),{b.add(SCMIR.frameTime(index))}) }; b } }.fork; ) ~indices.postcs [ List[ 117.74839002268, 121.57968253968, 129.33514739229 ], List[ 6.0139682539683, 6.6409070294785, 6.664126984127, 6.6873469387755, 13.212154195011, 14.048072562358, 14.164172335601, 14.187392290249, 14.81433106576, 14.837551020408, 14.860770975057, 14.883990929705, 14.907210884354, 59.07156462585, 92.276099773243, 100.44952380952, 158.3833106576, 165.92979591837, 168.50721088435, 168.530430839, 168.55365079365, 168.5768707483, 168.60009070295, 168.6233106576, 176.70385487528 ], List[ ], List[ 10.100680272109, 11.215238095238, 12.306575963719, 12.329795918367, 12.353015873016, 44.721632653061, 45.83619047619, 93.7389569161, 102.58575963719, 102.60897959184, 111.38612244898, 113.66167800454, 130.8212244898, 130.84444444444, 253.58512471655, 257.99691609977, 258.02013605442, 262.43192743764, 264.6610430839, 266.86693877551, 271.27873015873, 271.30195011338, 273.50784580499, 275.73696145125, 280.14875283447, 282.65650793651, 284.58376417234 ], List[ 3.8545124716553, 3.8777324263039, 82.895238095238, 82.918458049887, 92.229659863946, 105.88299319728, 125.06267573696, 127.91873015873, 149.95446712018, 153.78575963719, 175.82149659864, 175.84471655329, 190.19464852608, 191.03056689342, 197.85723356009, 197.88045351474, 198.69315192744, 199.41297052154, 201.6885260771, 201.71174603175, 239.76925170068, 244.32036281179, 245.76, 271.65024943311, 283.07446712018 ], List[ 4.852970521542 ], List[ ], List[ 9.1951020408163, 12.097596371882, 12.120816326531, 14.535691609977, 16.161088435374, 17.089886621315, 20.224580498866, 22.221496598639, 22.291156462585, 27.678185941043, 27.701405895692, 27.72462585034, 32.461496598639, 32.484716553288, 34.411972789116, 34.435192743764, 37.059047619048, 44.071473922902, 44.094693877551, 50.758820861678, 51.107120181406, 51.803718820862, 60.116462585034, 63.0189569161, 73.142857142857, 77.810068027211, 78.437006802721, 79.621224489796, 79.644444444444, 79.667664399093, 79.690884353741, 79.71410430839, 88.862766439909, 93.088798185941, 93.11201814059, 97.593469387755, 98.197188208617, 100.58884353741, 104.39691609977, 109.55174603175, 112.15238095238, 122.76390022676, 125.96825396825, 125.9914739229, 126.01469387755, 126.17723356009, 126.82739229025, 136.53333333333, 136.55655328798, 141.59528344671, 141.64172335601, 149.81514739229, 149.97768707483, 154.18049886621, 162.02884353741, 165.3725170068, 166.1852154195 ], List[ 4.5743310657596, 34.202993197279, 95.735873015873, 286.25560090703 ], List[ 0.046439909297052, 0.069659863945578, 0.092879818594104, 0.11609977324263, 0.13931972789116, 0.16253968253968, 0.18575963718821, 0.20897959183673, 9.1951020408163, 36.664308390023, 36.687528344671, 36.71074829932, 36.757188208617, 36.780408163265, 36.803628117914, 37.059047619048, 37.128707482993, 37.151927437642, 37.17514739229, 37.244807256236, 56.470929705215, 66.501950113379, 66.525170068027, 66.548390022676, 66.873469387755, 66.896689342404, 67.128888888889, 67.337868480726, 67.361088435374, 89.698684807256, 89.721904761905, 89.745124716553, 89.814784580499, 89.838004535147, 89.861224489796, 218.63909297052, 218.66231292517, 218.68553287982, 236.82031746032, 236.84353741497, 236.86675736961, 236.88997732426, 236.91319727891, 236.93641723356, 236.95963718821, 241.34820861678, 241.44108843537, 241.46430839002, 251.35600907029, 251.37922902494, 251.40244897959, 264.19664399093, 290.11011337868, 290.13333333333, 290.22621315193, 290.24943310658, 290.5977324263, 290.71383219955, 291.08535147392, 291.15501133787, 291.17823129252, 291.75873015873, 291.78195011338, 291.80517006803, 291.82839002268, 291.85160997732, 291.89804988662, 292.57142857143, 292.59464852608, 292.94294784581, 292.96616780045, 293.05904761905, 293.0822675737, 293.66276643991, 293.68598639456, 293.70920634921, 293.73242630385, 293.7556462585, 293.77886621315, 293.87174603175, 293.89496598639, 293.91818594104, 294.01106575964, 294.26648526077, 294.35936507937, 294.38258503401, 294.49868480726, 294.5219047619, 294.75410430839, 294.87020408163, 294.96308390023, 295.56680272109, 295.65968253968, 295.68290249433, 320.27283446712, 320.29605442177, 422.64961451247, 434.60789115646, 448.00580498866, 450.37424036281 ] ]
|