]> ruin.nu Git - moosique.git/blobdiff - Moosique.java
no message
[moosique.git] / Moosique.java
index bb90b765b69492f5d2da3a6334e507de62f46825..13d7ce6c650adc260db8575ccdf849399b92d130 100644 (file)
@@ -56,8 +56,12 @@ public class Moosique {
                //If a filename is given as the command-line argument, attempts to load a sequence from the file.
                if (fileArg != null) {
                        System.out.print("Loading MIDI sequence from " + fileArg + "...");
-                       if (!load(fileArg)) clearSequence();
-                       System.out.println("Done");
+                       if (!load(fileArg)) {
+                               System.out.println("Failed");
+                               clearSequence();
+                       } else {
+                               System.out.println("Done");
+                       }
                } else {
                        // Otherwise creates a new empty one.
                        clearSequence();
@@ -78,7 +82,15 @@ public class Moosique {
        }
 
        /** 
-        * Returns a pointer to the current sequence.
+        * Returns the GUI.
+        * @return the GUI
+        */
+       public static MooGUI getGUI() {
+               return gui;
+       }
+
+       /** 
+        * Returns the current sequence.
         * @return the current sequence
         */
        public static Sequence getSequence() {
@@ -86,7 +98,15 @@ public class Moosique {
        }
 
        /** 
-        * Returns a pointer to the MidiChannels of the selected synthesizer.
+        * Returns the current sequencer.
+        * @return the current sequencer
+        */
+       public static Sequencer getSequencer() {
+               return sequencer;
+       }
+
+       /** 
+        * Returns the MidiChannels of the selected synthesizer.
         * @return the available MidiChannels
         */
        public static MidiChannel[] getChannels() {
@@ -94,7 +114,7 @@ public class Moosique {
        }
 
        /** 
-        * Returns a pointer to the currently active MidiChannel.
+        * Returns the currently active MidiChannel.
         * @return the active MidiChannel
         */
        public static MidiChannel getActiveChannel() {
@@ -173,7 +193,7 @@ public class Moosique {
         * @param measures      the number of measures to rewind
         */
        public static void rewind(long ticks) {
-               position -= ticks;
+               setPosition(position - ticks);
        }
 
        /** 
@@ -181,7 +201,7 @@ public class Moosique {
         * @param measures      the number of measures to fast forward
         */
        public static void forward(long ticks) {
-               position += ticks;
+               setPosition(position + ticks);
        }
 
        /**