What's the method to control volume in an MIDI sequencer?

落花浮王杯 提交于 2019-12-01 09:06:18
  1. Call getSequence to get the Sequence;
  2. call getTracks to get the list of tracks;
  3. in each track, for each channel used in the track, call add to add multiple events at the appropriate time positions:

    track.add(new MidiEvent(
        new ShortMessage(ShortMessage.CONTROL_CHANGE, channel, 7, volume),
        tick));
    
  4. maybe remove other volume change events (that would interfere with your fadeout) from the track;
  5. wait a little time for the fadeout to happen.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!