X-Git-Url: https://ruin.nu/git/?p=moosique.git;a=blobdiff_plain;f=MooTrackTitle.java;h=6a3e1b5f8cb638d331aedb00a3d4b7b726ef1bfe;hp=4079e4503ef0fe19814af56cecf95a49b3be1f53;hb=1d2d2bfd14ba0addab97692527d4414d3a87e13d;hpb=e7289eb46e09ee6ed3bc5bb4a814f59902d885cb diff --git a/MooTrackTitle.java b/MooTrackTitle.java index 4079e45..6a3e1b5 100644 --- a/MooTrackTitle.java +++ b/MooTrackTitle.java @@ -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();