private static String filename, fileArg;
private static long editPosition;
- private static boolean makeGUI = true, isEdited;
+ private static boolean makeGUI = true, isEdited = false, drawEmptyTracks = false;
private static Thread player;
public static final int DEFAULT_RESOLUTION = 96, DEFAULT_TRACKS = 4;
editPosition += ticks;
}
+ /**
+ * Shows the given message in the status bar.
+ * @param text the message to show
+ */
+ public static boolean shouldBeDrawn(Track track) {
+ if (drawEmptyTracks) return true;
+ else return (!emptyTracks.contains(track));
+ }
+
+
+ /**
+ * Shows the given message in the status bar.
+ * @param text the message to show
+ */
+ public static void setDrawEmptyTracks(boolean state) {
+ drawEmptyTracks = state;
+ }
+
/**
* Loads the MooSequence in the given file.
* @param filename the filename to use
noteOffs.trimToSize();
boolean isEmpty = (noteOns.size() == 0);
String text = "Track " + i + " has " + noteOns.size() + "/" + noteOffs.size() + "/" + tracks[i].size();
- if (isEmpty) text += " and will not be removed.";
+ if (isEmpty) {
+ text += " and will be removed.";
+ emptyTracks.add(tracks[i]);
+ }
System.out.println(text);
- emptyTracks.add(tracks[i]);
// Sorts the note lists by tick position.
Comparator c = new Comparator() {