Dynamically updating MIDI sequences

依然范特西╮ 提交于 2019-12-11 06:41:56

问题


I have a program which dynamically creates sequences of midi events after some user input, and does that while looping the currently played sequence. It's written in scala and I'm using the java library javax.sound.midi.*

Now the algorithm works as follows:

  1. create sequencer;
  2. build sequence;
  3. set sequence
  4. start the sequencer;
  5. build new sequence;
  6. when the finish event is triggered by the sequencer execute from 3

the problem with this approach is that there is a delay between two sequences, while I would like it to be playing without pauses, if possible even overlapping the two sequences.

Is there any way to do it?

来源:https://stackoverflow.com/questions/4361886/dynamically-updating-midi-sequences

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!