我有几个关于JFugue的问题(5,测试版)。
感谢您的帮助,
最诚挚的问候,
侯赛因哈蒙德。
答案 0 :(得分:1)
回答问题的第一部分:在F-Major的关键字中,Bb像Bb一样播放,在F-Major播放时与B本身相同。这是一个测试它的程序:
StaccatoParser parser = new StaccatoParser();
DiagnosticParserListener dpl = new DiagnosticParserListener();
parser.addParserListener(dpl);
Pattern pattern = new Pattern("KEY:Cmaj B Bn Bb KEY:FMaj B Bn Bb");
parser.parse(pattern);
它的输出(注意MIDI Note 70是Bb而MIDI Note 71是B):
Before parsing starts
Key signature parsed: key = 0 scale = 1
Note parsed: value = 71 duration = 0.25 onVelocity = 64 offVelocity = 64
Note parsed: value = 71 duration = 0.25 onVelocity = 64 offVelocity = 64
Note parsed: value = 70 duration = 0.25 onVelocity = 64 offVelocity = 64
Key signature parsed: key = 5 scale = 1
Note parsed: value = 70 duration = 0.25 onVelocity = 64 offVelocity = 64
Note parsed: value = 71 duration = 0.25 onVelocity = 64 offVelocity = 64
Note parsed: value = 70 duration = 0.25 onVelocity = 64 offVelocity = 64
After parsing finished
回答你问题的第二部分:我现在还不确定是否有一个不错的答案。但是你激励我在transpose()
课上编写Pattern
方法。谢谢!