]> ruin.nu Git - moosique.git/blobdiff - MooTrackTitle.java
Fixed accessors, encoders and decoders for tempo and time signature.
[moosique.git] / MooTrackTitle.java
index 4079e4503ef0fe19814af56cecf95a49b3be1f53..6a3e1b5f8cb638d331aedb00a3d4b7b726ef1bfe 100644 (file)
@@ -39,7 +39,7 @@ public class MooTrackTitle extends JPanel {
 
        /** 
         * Creates the title bar.
-        * @param aTrack the track that this tracktitle is operating on.
+        * @param aTrack the track that this track title is operating on.
         */
        public MooTrackTitle (Track aTrack) {
                setDoubleBuffered(true);
@@ -58,8 +58,7 @@ public class MooTrackTitle extends JPanel {
                                }
                        } else if (status >= 192 && status < 208) {
                                programChangeMessage = (ShortMessage)msg;
-                               // System.out.println("Program change " + programChangeMessage.getData1());
-                               channel = status - 192;
+                               channel = programChangeMessage.getChannel();
                        }
                }
 
@@ -77,8 +76,7 @@ public class MooTrackTitle extends JPanel {
                int type;
                if (channel == 9) type = MooInstrumentList.DRUMS;
                else type = MooInstrumentList.INSTRUMENTS;
-               instruments = new MooInstrumentList(channel, type);
-               // instruments = new MooInstrumentList(channel, type, programChangeMessage);
+               instruments = new MooInstrumentList(channel, type, programChangeMessage);
                add(instruments);
 
                channelBox = new JComboBox();