动态更新 MIDI 序列
我有一个程序,可以在用户输入后动态创建 MIDI 事件序列,并在循环当前播放的序列时执行此操作。它是用 scala 编写的,我正在使用 java 库 javax.sound.midi.*
如下:
- 现在该算法的工作原理
- 构建序列;
- 设置序列
- 启动序列器;
- 建立新序列;
- 当完成事件由定序器从 3 开始执行时触发时,
这种方法的问题是两个序列之间存在延迟,而我希望它能够不间断地播放,如果可能的话甚至可以重叠两个序列。
有什么办法可以做到吗?
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:
- create sequencer;
- build sequence;
- set sequence
- start the sequencer;
- build new sequence;
- 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论