+ public static long getEditPosition() {
+ return editPosition;
+ }
+
+ /**
+ * Returns the GUI.
+ * @return the GUI
+ */
+ public static MooGUI getGUI() {
+ return gui;
+ }
+
+ /**
+ * Calculates the position (measures, beats, ticks) in the current sequence for the given tick position.
+ * @return an array of integers where index 0 is measures, 1 is beats and 2 is ticks.
+ */
+ public static int[] getPositionForTick(long ticks) {
+ /*
+ int measures, beats, ticks;
+ for (int i = 0; i < timeSignatures.length; i++) {
+ long tick = timeSignatures[i].getTick();
+ // Split the ticks in the interval into measures, beats and ticks.
+ }
+ */
+ int[] pos = {1, 1, 1};
+ return pos;
+ }
+
+ /**
+ * Returns the receiver of the current sequencer.
+ * @return the receiver
+ */
+ public static Receiver getReceiver() {
+ return receiver;
+ }
+
+ /**
+ * Returns the current sequence.
+ * @return the current sequence
+ */
+ public static Sequence getSequence() {
+ return seq;
+ }
+
+ /**
+ * Returns the current sequencer.
+ * @return the current sequencer
+ */
+ public static Sequencer getSequencer() {
+ return sequencer;
+ }
+
+ /**
+ * Returns the tempo of the current sequence.
+ * @return the tick position
+ */
+ public static int getTempo() {
+ return 120;
+ // if (tempoMsg == null) return 0;
+ }
+
+ /**
+ * Calculates the tick position in the current sequence for the given position (measures, beats, ticks).
+ * @return the tick position.
+ */
+ public static long getTicksForPosition(int measures, int beats, int ticks) {
+ long tickPos = 0;
+ /*
+ for (int i = 0; i < timeSignatures.length; i++) {
+ long tick = timeSignatures[i].getTick();
+ // Add the measures, beats and ticks in the interval.
+ }
+ */
+ return tickPos;
+ }
+
+ /**
+ * Returns the tempo of the current sequence.
+ * @return the tick position
+ */
+ public static int[] getTimeSig() {
+ int[] ts = {4, 4};
+ return ts;
+ // if (timeSigMsg == null) return 0;
+ }
+
+ /**
+ * Returns true if the current sequence has been edited.
+ * @return the tick position
+ */
+ public static boolean isEdited() {
+ return edited;
+ }
+
+ /**
+ * Returns whether the given track should be drawn
+ * @return true if the given track should be drawn
+ */
+ public static boolean shouldBeDrawn(Track track) {
+ if (drawEmptyTracks) return true;
+ else return (!emptyTracks.contains(track));
+ }
+
+
+
+
+
+
+
+
+ /* ***
+ ** MUTATOR METHODS **
+ *** */
+
+
+
+
+
+
+
+
+ /**
+ * Fast forwards the current sequence the given number of measures.
+ * @param measures the number of measures to fast forward
+ */
+ public static void forward(long ticks) {
+ editPosition += ticks;
+ }
+
+ /**
+ * Rewinds the current sequence the given number of measures.
+ * @param measures the number of measures to rewind
+ */
+ public static void rewind(long ticks) {
+ editPosition -= ticks;