gpt4 book ai didi

java - Jfugue 中乐器没有变化

转载 作者:行者123 更新时间:2023-11-30 06:25:20 25 4
gpt4 key购买 nike

我正在运行 Jfugue 测试程序,这里是代码:

package ge;

import org.jfugue.*;

public class GE {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Player player = new Player();
Pattern pattern = new Pattern("C D E F G A B I[MARIMBA]");
player.play(pattern);
System.exit(0); // If using Java 1.4 or lower
}
}

到目前为止,代码确实有效,也就是说,它可以编译并播放音符。然而,我可以随心所欲地改变乐器,我总是得到钢琴曲。

我怎样才能改变这个?

最佳答案

您应该将仪器设置在序列的开头,而不是结尾。序列 "I[MARIMBA] C D E F G A B" 对我来说是作为马林巴乐器演奏的。

关于java - Jfugue 中乐器没有变化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15732906/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com