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);