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

Re: [sc-users] Reset SCMIR Global Feature



Hi, 

From the help file as below. 

You can also SCMIR.setGlobalFeatureNorms(~yournorms)

best
N



//test of global normalization processing


//first run 
(
~files = [Platform.resourceDir +/+ "sounds/a11wlk01.wav", "/data/audio/mirdata/pixiesivebeentired.wav","/data/audio/mirdata/Yellow Submarine.wav"]; 
~featureinfo= [[MFCC,13],[Chromagram,12]]; 

{SCMIR.findGlobalFeatureNorms(~files,~featureinfo); }.fork
    
)


SCMIR.globalfeaturenorms //in this case, will be minimums in first array, maximums in second


//you can save this file for later reuse (assumes exactly same featureinfo settings, which is up to you to check)

SCMIR.saveGlobalFeatureNorms("/Users/nickcollins/Desktop/testglobfeat.scmirZ"); 

//recall
SCMIR.loadGlobalFeatureNorms("/Users/nickcollins/Desktop/testglobfeat.scmirZ"); 



//now to normalize individual files with respect to global normalization
(
~normed = ~files.collect{|filename|
    var e; 
    
    e= SCMIRAudioFile(filename,~featureinfo);    
    
    e.extractFeatures(true, true); //will use global normalization 
    
}
)

//normalized SCMIRAudioFiles
//find max and mins in different files, so did normalize with respect to larger corpus
~normed[0].getFeatureTrail(0).minItem
~normed[1].getFeatureTrail(0).minItem


> On 19 Dec 2019, at 03:59, stepan.kayukov@xxxxxxxxx wrote:
> 
> Hi again -
> I'm normalizing different sets of files and I'd like to reset the Global Feature value when starting a new set. 
> Is there a method or suggestion to do this? 


_______________________________________________
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/