Skip to content
Snippets Groups Projects
Unverified Commit 3a9c9227 authored by mirabilos's avatar mirabilos Committed by mirabilos
Browse files

use note numbers for octave tracking range checks

so things like C♭ or B♯ (which are situated across octave boundaries)
won’t underflow or overflow the pitch/note number

same as MirBSD commitid 10061C139CF78FE4B09
parent e825da91
No related branches found
No related tags found
No related merge requests found
......@@ -252,12 +252,12 @@ def mml(macro, _nplay=None, _barline=None, _mmltrk=None):
# octave tracking implementation
if octave_tracking and not octave_tracking_onhold:
if (octave < 6) and (abs(note - octave_tracking_last_note) >
if (note < 72) and (abs(note - octave_tracking_last_note) >
abs(note + 12 - octave_tracking_last_note)):
normml[0] += ">"
octave += 1
note += 12
if (octave > 0) and (abs(note - octave_tracking_last_note) >
if (note >= 12) and (abs(note - octave_tracking_last_note) >
abs((note - 12) - octave_tracking_last_note)):
normml[0] += "<"
octave -= 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment