GSoC 2019: Week 5

Posted 2 years ago

Building on my progress from last week, I have finished my work on key signatures interacting with key changes, at least for now. Adding a key change before an instrument change now updates the key signature for that instrument change, including for atonal key signatures, and deleting an instrument change deletes the key change.

After finishing this work, I have been investigating approaches into a dynamic instrument change warning object that is automatically placed at the end of the last bit of music before an instrument change, and would move automatically if any additional music was added or removed. After a bit of thought, I decided that a better approach would be to do this the other way around, and have the initial warning be the thing that the user placed, and have a text object automatically appear at the first bit of music after that instrument change, which would move dynamically. This would make things easier as things like the key change and clef change should appear at the warning, rather than before the first notes of music.

My approach to this is to add onto the methods that handle adding and removing notes, and every time a note is added, it should check backwards along the line of music, first to see if there are any notes before it, in which case nothing needs to be done, and secondly to see if there is an instrument change proceeding it. If there is, there would be a text object linked from the instrument change, which would be moved to the position of the note added. A similar mechanism would be implemented for removing notes.

So far, my work has mainly been in the investigatory stage, but I hope by the end of this week to have a working prototype of some kind, which I can then build on to fix edge cases that might arise.