X-Git-Url: https://ruin.nu/git/?p=moosique.git;a=blobdiff_plain;f=Moosique.java;h=c9ed3ae003931b43f74d9c7ad3e7609dd0ca5d0e;hp=46efc7dc41e6acbadeba89067a09df0d566a3ec1;hb=9cc9e864bbd9993ba0c8a418b3bf82ef90cc930f;hpb=a9a054c1a3cf7cfc7981ea13b76856d06d7efa91 diff --git a/Moosique.java b/Moosique.java index 46efc7d..c9ed3ae 100644 --- a/Moosique.java +++ b/Moosique.java @@ -19,7 +19,8 @@ public class Moosique { private static Synthesizer synthesizer; private static MidiChannel[] channels; private static MidiChannel activeChannel; - private static MetaMessage tempoMsg, timeSigMsg; + private static MetaMessage timeSigMsg; + private static MetaMessage[] tempoChgMsgs; private static String filename, fileArg; private static long editPosition; @@ -326,7 +327,7 @@ public class Moosique { if (msg.getStatus() == MetaMessage.META) { metaMsg = (MetaMessage)msg; if (metaMsg.getType() == 81) { - tempoMsg = metaMsg; +// FLERA!!! tempoMsg = metaMsg; } else if (metaMsg.getType() == 88) { timeSigMsg = (MetaMessage)msg; } @@ -340,14 +341,6 @@ public class Moosique { ShortMessage shortMsg; ArrayList noteOns, noteOffs; for (int i = 0; i < tracks.length; i++) { - noteOns = new ArrayList(tracks.length); - /* - Collections.sort(track[i].events, new Comparator() { - public int compare(Object o1, Object o2) { - return ((MidiEvent)o2).getTick() - ((MidiEvent)o1).getTick(); - } - }); - */ for (int j = 0; j < tracks[i].size(); j++) { noteOn = tracks[i].get(j); if (noteOn.getMessage().getStatus() == ShortMessage.NOTE_ON) { @@ -373,6 +366,7 @@ public class Moosique { } } } + // Sends sequence to GUI and sequencer, then returns if (gui != null) gui.setSequence(seq); try {