+ 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;
+ }
+
+ /**
+ * Sets the currently active MidiChannel.
+ * @param channel the number of the MidiChannel to activate
+ */
+ public static void setActiveChannel(int channel) {
+ activeChannel = channels[channel];
+ }
+
+ /**
+ * Sets the current copy buffer.
+ * @param the copy buffer
+ */
+ public static void setCopyBuffer(ArrayList buffer) {
+ copyBuffer = buffer;
+ }
+
+ /**
+ * Sets whether empty tracks should be drawn
+ * @param state true if empty tracks should be drawn
+ */
+ public static void setDrawEmptyTracks(boolean state) {
+ drawEmptyTracks = state;
+ }
+
+ /**
+ * Sets the current sequence as edited, which implies prompts when loading a new sequence.
+ */
+ public static void setEdited() {
+ edited = true;
+ }
+
+ /**
+ * Sets the current editing position of the sequencer.
+ * @param ticks the tick position
+ */
+ public static void setEditPosition(long ticks) {
+ editPosition = ticks;
+ }
+
+ /**
+ * Sets the current editing position of the sequencer.
+ * @param ticks the tick position
+ */
+ public static void setTempo(int bpm) {
+ // tempoMsg
+ }
+
+ /**
+ * Sets the current editing position of the sequencer.
+ * @param ticks the tick position
+ */
+ public static void setTimeSig(int bpm) {
+ // timeSigMsg
+ }