Java 赋格曲中的乐器没有变化
我正在运行Jfugue测试程序,下面是代码:Java 赋格曲中的乐器没有变化,java,jfugue,Java,Jfugue,我正在运行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 P
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”
对我来说是一种木琴乐器。JFugue的作者插话说@Archeg的答案应该被认为是正确的答案!