GSoC 2019: Week 4

Posted 1 year ago

This past week I have been working on further improving key signatures for instrument changes. After fixing the bug where deleting a key signature before an instrument change would crash the program, I have been working on allowing the user to insert an ordinary key change before an instrument change, and have the key signatures for subsequent instrument changes update accordingly.

This has proved to not be an easy task. My current solution is to create a method that is called whenever a key signature is added or removed. This method uses the KeyList for the staff to loop through every subsequent consecutive key change for an instrument change, changing the key signature to match the transposition. Unfortunately, the method I'm using at the moment has a few issues. Firstly, it currently decouples the link I had made between key signatures and their instrument change, so that if you delete an instrument change, it would automatically delete the associated key change. Secondly, it currently doesn't work for atonal key signatures. However, I think I know the direction I need to move in next, which is to loop through key signature objects, rather than key signature events. By modifying the key signature directly, it shouldn't break the link, and should make working with atonal key signatures easier.

This next week, I will be continuing this work on key signatures, and hopefully moving on to instrument change warnings.