hanonOctaveRunShift function
- HanonOctaveRun run, {
- required int staff,
- bool below = false,
A 8va da pauta staff nas colunas de run (cada coluna é uma semicolcheia,
16 por compasso); com below, a 8va bassa.
Implementation
PatternOctaveShift hanonOctaveRunShift(
HanonOctaveRun run, {
required int staff,
bool below = false,
}) {
const perMeasure = 16;
return PatternOctaveShift(
from: run.first ~/ perMeasure,
to: run.last ~/ perMeasure,
staff: staff,
below: below,
startAfter: run.first % perMeasure == 0
? null
: (run.first % perMeasure) * _sixteenth,
endAfter: run.last % perMeasure == perMeasure - 1
? null
: (run.last % perMeasure + 1) * _sixteenth,
);
}