X-Git-Url: https://ruin.nu/git/?p=moosique.git;a=blobdiff_plain;f=MooTrackTitle.java;h=e22c3219846e013d6553dbbda8f851c8b65fe250;hp=545681d89d53e529cb3053627aed33e7be193264;hb=aae2d0b4428236b4147f466b3858a34bb7ed174f;hpb=867eb267809ea85e6f983b93e5f63ca86150d7bc diff --git a/MooTrackTitle.java b/MooTrackTitle.java index 545681d..e22c321 100644 --- a/MooTrackTitle.java +++ b/MooTrackTitle.java @@ -60,8 +60,11 @@ public class MooTrackTitle extends JPanel { title.addFocusListener(new TitleFocusListener()); add(title); - instruments = new MooInstrumentList(channel); - // instruments = new MooInstrumentList(channel, programChangeMessage); + int type; + if (channel == 9) type = MooInstrumentList.DRUMS; + else type = MooInstrumentList.INSTRUMENTS; + instruments = new MooInstrumentList(channel, type); + // instruments = new MooInstrumentList(channel, type, programChangeMessage); add(instruments); channelBox = new JComboBox(); @@ -73,15 +76,15 @@ public class MooTrackTitle extends JPanel { channelBox.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e){ - int chan = channelBox.getSelectedIndex(); + channel = channelBox.getSelectedIndex(); MidiEvent me; MooNote mn; - instruments.setChannel(channelBox.getSelectedIndex()); + instruments.setChannel(channel); for (int j = 0; j < track.size(); j++) { me = track.get(j); if (me instanceof MooNote){ mn = (MooNote)me; - mn.setChannel(chan); + mn.setChannel(channel); } }}}); add(channelBox);