[jmsl] MIDI File Transcriber Crashes

jmsl at music.columbia.edu jmsl at music.columbia.edu
Tue Dec 2 17:03:29 EST 2008


Hi all,

I'm getting the following error (attached) when attempting to transcribe
a MIDI file with the code in the attached sample.

Any ideas as to what is going wrong?  What other information would be
helpful in tracking this down?

TIA,
Greg

-- 
Dr. Greg Wilder, CTO & Co-Founder
Orpheus Media Research, LLC
http://www.orpheusmediaresearch.com/
+1 215-764-6057 (office)
+1 215-205-2893 (cell)
-------------- next part --------------
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
    at java.util.Vector.elementAt(Vector.java:427)
    at com.softsynth.jmsl.score.transcribe.MeasureBeatDivisions.getBeatDivisionList(MeasureBeatDivisions.java)
    at com.softsynth.jmsl.score.transcribe.SearchPathList.initSearchPathList(SearchPathList.java)
    at com.softsynth.jmsl.score.transcribe.HeuristicSearch.search(HeuristicSearch.java)
    at com.softsynth.jmsl.score.transcribe.Transcriber.transcribe(Transcriber.java)
    at com.softsynth.jmsl.score.transcribe.TranscribeMidiFile.transcribe(TranscribeMidiFile.java)
-------------- next part --------------
36 	        public OutputLilypond(String input_file) { // MIDI file constructor
37 	                Score score = null;
38 	                System.out.println();
39 	                System.out.println("*** Beginning Lilypond Transcription using " + input_file);
40 	
41 	                // transcribe the MIDI file
42 	                TranscribeMidiFile transcriber = new TranscribeMidiFile(input_file);
43 	                BeatDivisionSchemeList.defaultSetup();
44 	                try {
45 	                        score = transcriber.transcribe();
46 	                } catch (IOException e) {
47 	                        e.printStackTrace();
48 	                }
49 	
50 	        // LilyPondWriter
51 	                File lpFile = new File("shared_resources/output.ly");
52 	        try {
53 	                // TODO: LilyPond file names may not include digits, underscores, or dashes
54 	            LilyPondWriter lpWriter = new LilyPondWriter(score, lpFile);
55 	                        System.out.println("Duration Report: " + lpWriter.getDurationErrorReport());
56 	            lpWriter.write();
57 	            System.out.println("OutputLilypond: File written to output.ly");
58 	            if (lpWriter.durationErrorsInScore()) {
59 	                System.out.println("OutputLilypond: OUTPUT ERROR");
60 	                System.err.println(lpWriter.getDurationErrorReport());
61 	            }
62 	        } catch (IOException e) {
63 	                System.out.println("OutputLilypond: OUTPUT ERROR");
64 	                        e.printStackTrace();
65 	        }
66 	
67 	                // display final "process completed" statement
68 	                System.out.println("*** Completed OutputLilypond: shared_resources/output.ly");
69 	        }


More information about the jmsl mailing list