]> ruin.nu Git - moosique.git/blobdiff - Moosique.java
no message
[moosique.git] / Moosique.java
index 9089a2fc7c722234f3f29fedf7f57b73f217297d..860f561a3d720e50dcf333554824f65f6fd18a0c 100644 (file)
@@ -345,14 +345,32 @@ public class Moosique {
                // timeSigMsg
        }
        
+       /** 
+        * Sets the solo setting of the given track.
+        * @param on    true for solo, false for not
+        */
        public static void setTrackSolo(Track track, boolean on){
                trackSolo.put(track, new Boolean(on));  
        }
 
+       /** 
+        * Sets the mute setting of the given track.
+        * @param on    true for mute, false for not
+        */
        public static void setTrackMute(Track track, boolean on){
                trackMute.put(track, new Boolean(on));  
        }
 
+       /** 
+        * Sets the current playback volume.
+        * @param volume        the volume, between 0 and 1
+        */
+       public void setVolume(long volume) {
+               for (int i = 0; i < channels.length; i++) {
+                       channels[i].controlChange(7, (int)(volume * 127.0));
+               }
+       }
+
 
 
 
@@ -585,6 +603,7 @@ public class Moosique {
                for (int i = 0; i < tracks.length; i++) {
                        convertTrack(tracks[i]);
                }
+
                // Sends sequence to GUI and sequencer, then returns
                if (gui != null) gui.setSequence(seq);
                try {