public void setChannel(int chan){
channel = chan;
- System.out.println(chan);
setSelectedIndex(Moosique.getChannel(channel).getProgram());
- System.out.println(Moosique.getChannel(channel).getProgram());
}
public void actionPerformed(ActionEvent e) {
for (int i = 1; i <= 16; i++)
channelBox.addItem(new Integer(i));
- for (int j = 0; j < track.size(); j++) {
- MidiEvent me = track.get(j);
- if (me instanceof MooNote){
- MooNote mn = (MooNote)me;
- channelBox.setSelectedIndex(mn.getChannel());
- break;
- }
- }
+ channelBox.setSelectedIndex(channel);
instruments = new MooInstrumentList(channelBox.getSelectedIndex());