@Override /** This will set the correct MidiDevice when the project is reloaded */ public void onLoad() { super.onLoad(); ftw.setMidiChannel(midiChannel); if (midiDeviceIndex != null) { try { ftw.setMidiDevice(project.getSequencer().listMidiOutDevices().get(midiDeviceIndex)); } catch (Exception e) { System.out.println("WARNING: Was unable to connect to external midi device"); } } setUpKeys(); }
/** * Constructor for deepClone * * @param cloneMe */ private MidiLane(MidiLane cloneMe) { super("Copy of " + cloneMe.getName(), cloneMe.project); trackHeaderPart = (MidiPart) (cloneMe.trackHeaderPart.deepCopy(null)); trackHeaderPart.lane = this; midiDeviceIndex = cloneMe.midiDeviceIndex; midiChannel = cloneMe.midiChannel; keyNames = cloneMe.keyNames; for (Part part : cloneMe.getParts()) { part.deepCopy(this); } ftw = cloneMe.ftw.getSequence().createFrinikaTrack(); ftw.setMidiChannel(midiChannel); setUpKeys(); }
public void setMidiChannel(int channel) { midiChannel = channel; ftw.setMidiChannel(midiChannel); setUpKeys(); }