How can I make a midi note continue for a set amount of time? I would like to use the acoustic nylon guitar (25) instrument, but rather than fading out I would like it to continue playing the note for 10 or 15 seconds and modify the pitch myself to simulate a person changing finger position in slow motion.
1 2 3 4 5 6 7 8 9 10 11 12 13
| try { m_Synth = MidiSystem.getSynthesizer(); m_Synth.open(); m_MidiChannel = m_Synth.getChannels(); m_Instrument = m_Synth.getDefaultSoundbank().getInstruments(); m_Synth.loadInstrument(m_Instrument[GUITAR]); m_MidiChannel[DEFAULT_CHANNEL].programChange(GUITAR); m_wCurNote=60; } catch (Exception ex) { return; } |
I've tried controllers 64 - 69 and they don't appear to change anything.
1 2 3 4 5
| m_MidiChannel[DEFAULT_CHANNEL].controlChange(67,127); m_MidiChannel[DEFAULT_CHANNEL].noteOn(m_wCurNote,67); |