X-Git-Url: https://ruin.nu/git/?p=moosique.git;a=blobdiff_plain;f=Moosique.java;fp=Moosique.java;h=860f561a3d720e50dcf333554824f65f6fd18a0c;hp=c99d93cef21971aa71ae7bcf4ede6db984c0521a;hb=ae0bb1ddc2361a9c7f08579488870f0b99b14cb6;hpb=8b3ebfce3014e0edf2a0b0669981fcf583a36feb diff --git a/Moosique.java b/Moosique.java index c99d93c..860f561 100644 --- a/Moosique.java +++ b/Moosique.java @@ -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)); + } + } +