GSoC 2019: Chord Symbol Playback - Week 8

Posted 3 months ago

We're actually about 2/3 through now :) I was wrong last week

So far

Last week I worked mainly on testing, improving existing voicings, and the automatic extension system. For testing I realized that there were a lot of cases not being covered by the tests. In fact I modified one of the voicing algorithms and the corresponding test still passed since the issues I fixed were never even covered by the tests in the first place. Now the tests are a lot more comprehensive. It may be a bit overkill, so in the future when things are more set in stone I may dial it back. For now though, I am opting to just keep the extensive tests to help aid development since changes are a lot quicker and more drastic.

For the voicings, I have made edits to help remedy the lower muddiness and imbalance that we saw last week. Here is a look at the new voicings with the same chords that we saw last week:
Week 8.png
And here is what we had last week for reference:
Week 7.png

As you can hopefully see, I think what we have now is a lot better. There are still edge cases that could be made better. For example you can see in the 6 note voicing we have a bit of a muddy cluster at the bottom. Still, the new algorithm should be working better than what we had last week.

Finally I started on the automatic extension feature. This is the feature where extensions and alterations are automatically added where appropriate. This proved to be a pretty big challenge. There were two main issues.

The first was that it is pretty hard to systematically and deterministically define "appropriate" in the code. Without using neural networks and machine learning, it's extremely difficult to define a way to automatically modify chords as a real musician would. There is always another edge case or another exception and we can't realistically deal with every case. That being said, it's possible to create something a bit more conservative that mostly works and can still be useful. So far I have decided to just add flat 9ths and flat 13ths when a dominant chord is resolving to a minor tonic function chord and add a major 9th otherwise. This is still not always good, and needs tweaking, but sounds alright for now as a starting point.

The second issue is voicing and resolving the voices in these altered chords. For some chords, it's possible to just throw the right notes on the staff and have it sound good. As we introduce more and more dissonance, however, it becomes really important to properly resolve the voices or else the dissonant chords will sound off. In this case, the resolution of the dissonance is arguable more important than the voicing of the dissonant chord itself. Right now the voicing system is pretty blind and mostly just considers the voicing settings and the chord symbol at hand. This week with the experimental implementation of the "Jazz" interpretation I have looked ahead to see partial information about the next chord. Moving forward, it'll likely be important to look at even more contextual information so that we can properly voice are chords more holistically so that there is good voice leading in addition to good voicing.

Here is a look at the current state of the Jazz interpretation.

Video Here!

Again, it's not the best feature right now and I don't think it's better than just a more literal interpretation, but there are some nice moments. Moving forward, this will hopefully get at least a little bit better so it can become a useful feature :)

This week

This week I would like to focus on giving the voicing algorithms more information so that we can improve not just the Jazz interpretation, but the literal interpretation as well. With more information, we can improve the voice leading and also have more to work with when deciding what notes to add or alter. It's something that seems somewhat simple, but can really bring up some difficult challenges. For that reason, I expect this change to take close to the whole week. While working on this, however, I'd like to also introduce some quality of life changes to the UI and to the feature to further improve the friendliness of chord symbol playback in general. This should be an exciting week!

See you all next time!


Comments

Great! I am very exited about the progress of this feature :-)
Just two comments from my side:
1) never remove testcases that are still valid
2) Have the literal interpretation as the default and the "jazzy" one as an option, than it's OK if it is sometimes wrong. I was not expecting you to simulate a virtuosic jazz pianist ;-)

Excellent work again! BTW, I agree, keep the tests :-)

Regarding the voicings, tweak what you can, but personally I'd be more considered with the muddiness in the basic cases than voice leading or edge cases. On the other hand, maybe the default won't be 6-note voicings? Or the choice could be made to have triads max out at 4-5 notes, as there is little to be gained by additional doubling.

After this, I'd say the focus should turn to getting the code ready for merging, I'll have more comments there I'm sure.