@@ -0,0 +1,1587 @@
+import jAudioFeatureExtractor.ACE.DataTypes.Batch;%0A%0Aimport java.io.File;%0Aimport java.util.LinkedList;%0A%0A/**%0A * Created by Daniel McEnnis on 2/21/2015.%0A * Psuedo-Locale Sensitive Hashing Algorithm%0A * Similarity algorithm: cast back to an array of doubles and use a similarity measure like Euclidean.%0A * This roughly corresponds to timbral similarity of two items.%0A *%0A * Licensed under the LGPL%0A */%0Apublic class LocaleSenstiiveHash %7B%0A%0A    public static int main(String%5B%5D args) throws Exception%7B%0A        if (args.length %3C 2)%7B%0A            throw new java.io.IOException(%22Hashing requires a file list to execute%22);%0A        %7D%0A        boolean raw = false;%0A        int i=0;%0A        if (args%5B0%5D == %22--bytes%22)%7B%0A            i++;%0A            raw = true;%0A        %7D%0A        LinkedList%3CFile%3E files = new LinkedList%3CFile%3E();%0A        for(int a=0;a%3Cargs.length;++a)%7B%0A            Batch b = new Batch();%0A            b.setRecordings(new File%5B%5D%7Bnew File(args%5Ba%5D)%7D);%0A            b.execute();%0A            double%5B%5D%5B%5D results = b.getDataModel().container.getResults();%0A            for(int j=0;j%3Cresults.length;++j)%7B%0A                for(int k=0;k%3Cresults%5Bj%5D.length;++k)%7B%0A                    if(raw)%7B%0A                        System.out.print(Double.toHexString(results%5Bj%5D%5Bk%5D));%0A                    %7Delse %7B%0A                        if ((k != 0) %7C%7C (j != 0)) %7B%0A                            System.out.print(%22%5Ct%22);%0A                        %7D%0A                        System.out.print(results%5Bk%5D%5Bj%5D);%0A                    %7D%0A                %7D%0A            %7D%0A            System.out.println();%0A        %7D%0A        return 0;%0A    %7D%0A%7D%0A

Implement a simple function to create a timbrally-based unique id for a piece of music.