gpt4 book ai didi

java - 2 个音符之间的 JFugue 半音

转载 作者:行者123 更新时间:2023-11-30 05:22:37 24 4
gpt4 key购买 nike

在 JFugue (vr 5.0.9) 中获得两个音符之间的半音的最快方法是什么(如果有)?

例如,我如何获得F4和G5之间的半音数?

最佳答案

我认为 Note 上的 getValue() 方法将为您提供所需的内容。

    Note n1 = new Note("F4");
Note n2 = new Note("G5");
int semitoneDelta = n2.getValue() - n1.getValue();
System.out.println(semitoneDelta); // returns 14 in this case

关于java - 2 个音符之间的 JFugue 半音,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59290961/

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