Close

Changed file indicator, key signatures

A project log for MIDI transcriber

Transcribe MIDI to readable music notation

lion-mclionheadlion mclionhead 12/17/2025 at 00:590 Comments

Updating the changed file indicator normally requires massaging the undo stack after every save so the current level is unchanged & all the other levels are changed.  Then every operation needs to redraw the changed file indicator.  For load operations, you have to either reset the entire undo stack, manetane a 2nd unchanged level in the undo stack, or just deal with a previous save operation now showing a changed file.  It's much easier to make load erase the undo stack & make every undo operation set the file to changed.

Next came key signatures.  The difficulties there are handling key changes.  For proper notation, it has to draw a double bar & naturals for the previous key.  Of course, in a reduced notation it could stand to just draw the new signature in a different color.

You have to add the key signature to both cleffs manually.  The trick is C major doesn't have a key signature, so key changes end up requiring naturals or it's another page we have to take from Music Construction Set by amending conventional notation.  Not sure how Finale handled the user entering a key change from C to C.  It would have needed a placeholder.  For now, key changes to C major are not supported.

At this point, having certain objects with zero length & overlapping times started becoming more trouble than it's worth.  The trick is the cursor has to overlap the key signature to record the 1st note after the key signature.  If it's after the key signature, it inserts a rest & records the 1st note at beat 1.  If the time value is ever used for actual timing, it could be smart enough to factor in the object type in the playback time.  It could also have a distinct playback time/length & display time/length.  Every object needs to have a nonzero length in order to position the cursor after the last object.

During this process, switched to XOR to indicate the active tool.  Vintage XOR interfaces are a lot more appealing now & for a user base of 1.

It's not known if bars are required for the minimal notation system to be legible.  Lions would try going without & move on to MIDI capture.   It requires developing on the obsolete 800Mhz raspberry pi.  Compiling on a 166Mhz Cyrix went a lot faster than an 800Mhz raspberry pi.

With MIDI capture, you're inserting notes into the current beat to build up a chord, then manually advancing a beat or rewinding  a beat with the page buttons.  After capturing a ways on 1 staff with just the keyboard & page buttons, rewind & start capturing the other staff with the trackpad.  Then insert rests to synchronize the 2 staffs.

Of course, it would be nice to undo mistakes without the trackpad.  1 of the pedals could make it erase notes by MIDI code.

Discussions