]> ruin.nu Git - moosique.git/blobdiff - MooTrack.java
Implemented some obvious methods.
[moosique.git] / MooTrack.java
index df542a6993467cf00d19ed955c1ddd0849139469..b14bcca97de709b8491b0368f11c67108572b41f 100644 (file)
@@ -19,7 +19,9 @@ public class MooTrack {
         * Creates an empty MooTrack.
         */
        public MooTrack () {
-
+               notes = new Collection();
+               setInstrument(0);
+               // Find the first available channel
        }
 
        /* 
@@ -27,7 +29,7 @@ public class MooTrack {
         * @param instr         the number of the MIDI instrument (0-127)
         */
        public void setInstrument(int instr) {
-       
+               instrument = instr;     
        }
 
        /* 
@@ -35,7 +37,7 @@ public class MooTrack {
         * @param chan          the number of the MIDI channel (1-16)
         */
        public void setChannel(int chan) {
-       
+               channel = chan;
        }
 
        /* 
@@ -43,7 +45,7 @@ public class MooTrack {
         * @return      the number of the channel
         */
        public int getChannel() {
-       
+               return channel;
        }
 
        /* 
@@ -51,7 +53,7 @@ public class MooTrack {
         * @return      the number of notes
         */
        public int getNumberOfNotes() {
-       
+               return notes.size();
        }
 
        /* 
@@ -59,7 +61,7 @@ public class MooTrack {
         * @param note          the MooNote to add
         */
        public void addNote(MooNote note) {
-       
+               notes.add(note);
        }
 
        /* 
@@ -75,23 +77,23 @@ public class MooTrack {
         * @param note          the index of the note
         */
        public MooNote getNote(int note) {
-       
+               return notes.get(note);
        }
 
        /* 
         * Makes the current track solo.
         * @param set   if the track should be solo
         */
-       public void solo(boolean set) {
-       
+       public void setSolo(boolean set) {
+               solo = set;
        }
 
        /* 
         * Mutes the current track.
         * @param set   if the track should be muted
         */
-       public void mute(boolean set) {
-       
+       public void setMute(boolean set) {
+               mute = set;     
        }
 
        /* 
@@ -100,7 +102,7 @@ public class MooTrack {
         */
 
        public boolean isSolo() {
-       
+               return solo;
        }
 
        /* 
@@ -108,6 +110,6 @@ public class MooTrack {
         * @return if the track is muted
         */
        public boolean isMute() {
-       
+               return mute;
        }
 }
\ No newline at end of file