|
@@ -346,7 +346,8 @@ export class VexFlowConverter {
|
|
|
|
|
|
|
|
|
const wantedStemDirection: StemDirectionType = gveNote.parentVoiceEntry.parentVoiceEntry.WantedStemDirection;
|
|
|
- const lineShiftDirection: number = restVoiceId === 1 ? 1 : -1;
|
|
|
+ const isUpperVoiceRest: boolean = restVoiceId === 1 || restVoiceId === 5;
|
|
|
+ const lineShiftDirection: number = isUpperVoiceRest ? 1 : -1;
|
|
|
const gveNotePitch: Pitch = gveNote.sourceNote.Pitch;
|
|
|
const noteHalftone: number = gveNotePitch.getHalfTone();
|
|
|
const newHigh: boolean = lineShiftDirection === 1 && noteHalftone > maxHalftone;
|
|
@@ -355,11 +356,11 @@ export class VexFlowConverter {
|
|
|
maxHalftone = noteHalftone;
|
|
|
linesShift = 0;
|
|
|
|
|
|
- if (restVoiceId === 1 && wantedStemDirection === StemDirectionType.Up) {
|
|
|
+ if (isUpperVoiceRest && wantedStemDirection === StemDirectionType.Up) {
|
|
|
linesShift += 7;
|
|
|
- } else if (restVoiceId > 1 && wantedStemDirection === StemDirectionType.Down) {
|
|
|
+ } else if (!isUpperVoiceRest && wantedStemDirection === StemDirectionType.Down) {
|
|
|
linesShift += 7;
|
|
|
- } else if (restVoiceId === 1) {
|
|
|
+ } else if (isUpperVoiceRest) {
|
|
|
linesShift += 1;
|
|
|
} else {
|
|
|
linesShift += 2;
|