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

Re: [sc-users] Reset SCMIR Global Feature



Something like this might be what you're looking for?:

log(~normed[0].getFeatureTrail(0)+1)

e.g. log on an array returns logs elementwise in a new array

log([0.1,0.6,0.9,0.2,0.3]+1).plot

best
N

On 21 Dec 2019, at 07:55, stepan.kayukov@xxxxxxxxx wrote:

I think I understand now, thank you for walking me through some of these questions.  One last thing that I'm pretty certain that I can't figure out, though: is there a way to apply a logarithmic curve to the globally normalized data? Due to the types of sounds I'm categorizing (and human frequency response), there is an enormous amount of information in the lower floats..  is there a way to conform this data to a curve?

On Thu, Dec 19, 2019 at 1:56 PM <clicksonnil@xxxxxxxxx> wrote:
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/