Created
November 18, 2016 10:13
-
-
Save tatecarson/feeba9e8f48b998e7e02a3391429fb41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
{ | |
~files.do{|filename,i| | |
[i, filename].postln; | |
e = SCMIRAudioFile(filename, [[MFCC, 13], [Chromagram, 12]]); | |
e.extractFeatures(); | |
e.extractOnsets(); | |
e.save(~scmirPath ++ (filename.splitext[0].basename++".scmirZ")); | |
} | |
}.fork; | |
) | |
(//laod data | |
~loadAnalysis = { | |
~onsets = Dictionary.new; | |
PathName(~scmirPath).entries.do{ | |
arg subfolder; | |
~onsets.add( | |
subfolder.folderName.asSymbol -> | |
Array.fill( | |
subfolder.entries.size, | |
{ | |
arg i; | |
SCMIRAudioFile.newFromZ(subfolder.entries[i].fullPath); | |
} | |
) | |
); | |
}; | |
}; | |
~loadAnalysis.() | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment