GSoC 2019: Chord Symbol Playback - Work Product

Posted 4 years ago

Hi! This post is a summary of the work that was done for my GSoC 2019 project: Chord Symbol Playback.

Project description

This project aims to improve the experience of working with chord symbols in scores. Without being able to hear the harmony denoted by the chord symbols, it can be difficult to get a full idea of what a work of music might sound like in practice.

In my original proposal I hoped to, at minimum, solve a number of sequential elementary problems:

  1. Allow users to realize chord symbols into notes in the score
  2. Allow users to directly playback chord symbols when pressing play
  3. Design and implement quality voicing algorithms
  4. Create additional options for voicings and rhythms

Then, I listed additional features that I hoped to work on if time allowed:

  • Automatic settings for different instruments
  • Melodic voicings (arpeggios and such)
  • Custom templates (custom rules for voicing)

Actual results

Soon after starting the project, I realized that it would be better to focus on a more basic approach and explore and implement it with a lot of polish rather than creating many features with less polish. As a result, I ended up focusing on only the elementary problems, and also dismissed rhythms. Here is a demo!

Video Here!

In more detail here is a list of the main changes separated into categories. These can also be seen in the video above:

Usage

  • Chord symbols play back on click and while editing (can be turned off in preferences)
  • Chord symbols can be realized into notes by selecting chords to realize and going to Tools / Realize Chord Symbols
  • Chord symbols can be realized by opening the context menu (right click for most users) and clicking on Realize Chord Symbols
  • Chord symbols play back by default when pressing play and listening to a score

Mixer (Harmony Channel)

  • A separate harmony channel is created whenever there is a chord symbol in the score (and removed when there are none)
  • The harmony channel is a subchannel under the instrument of the given part (like how there are different instruments for different violin articulations)
  • The harmony channel allows users to adjust volume, set solo or mute, set instrument, as well as all the other things adjustable by the mixer

Voicing and Options

  • Voicings can be changed by selecting chord symbols and going to the inspector
  • There are two interpretations which control how to interpret chord symbols as notes
    • Literal interpretation takes notes from the “textbook definition” of chord symbols (for example C13 would give C, E, G, Bb, D, F, A)
    • Jazz interpretation may add, remove, or alter notes when it might be appropriate to do so based on context (for example adding 9ths)
  • There are 6 basic voicing algorithms which place the notes (based on interpretation) without looking at context. This means that voice leading artificially created
    • Root only plays only the root or bass note
    • Close voices all of the notes within one octave
    • Drop 2 selects up to 5 notes and voices them from the top down, dropping the second note from the top by one octave
    • Three Note selects the 3 most important notes and voices them in one octave
    • Four Note selects the four most important notes and voices them in a two octave open voicing
    • Six Note selects the 6 most important notes and voices them in a two octave open voicing, doubling important notes when needed
  • There are 3 duration modes that control how long chord symbols are played for
    • Until next chord symbol plays chords either until the next chord symbol or the end of the score
    • Stop at measure end plays chords until the next chord symbol, but stopping at the measure end as a maximum
    • Segment duration plays chords for the duration of the segment
  • The Play option that allows users to turn off playback for specific chord symbols

Code Status

The code is all housed in this pull request. As of August 22, it is not yet merged but is essentially finished with just final reviewing to go.

Evaluation

While I have changed the course of the project in relation to the original proposal, I consider this project complete. The original essence of the proposal and feature request was to create a robust implementation of chord symbol playback that allows for users to get an idea of what their music might sound like without having to have a physical instrument at hand. Further, the hope was to create a solid foundation that will allow for easy future development of the feature.

I believe I have accomplished this. I have personally been using the feature for my own work (which happens to be really useful for me since I am a student that moves around a lot), and have found that it greatly enhances my ability to write, transcribe, and arrange in MuseScore. Also, one of the most difficult things in getting this project up and running was the foundation. A lot of the code was old and tough to understand. I have done my best to write well written, documented, and easy to understand code that’s flexible so that it can be added on to.

Future Work

First, there are a few things coming up in the future which are also well connected to my project:

  1. Marc Sabatella’s PR with Nashville notation and roman numeral analysis. This is a new feature that will fall under the umbrella of harmony that this project covers. Once Marc’s PR is merged, we hope to connect this up with this project to allow for playback of the Nashville notation. This should be fairly straightforward and smooth given the way that both sides of the code has been written.
  2. Advanced voicing settings. There are a few things that I hope to add with regards to where the chords are voices and what might or might not be included. Nothing is set in stone yet of course, but this will include changing the position of the bass note or removing it altogether, changing the location of where the body of the chord is voiced, and being able to omit extensions.

Additionally, there is a good amount of features left from the proposal that I have not yet touched on:

  • Rhythms are a bit of a can of worms and, for the sole idea of demonstrating harmony, were decided to be non-essential. It is still something that’s a bit difficult to really define, but it is something that could still be considered in the future (the duration settings were a sort of first step to this).
  • Melodic voicings are essentially an extension onto rhythms. If rhythms are done, this introduces an additional dimension that’s arguably even harder to define (in a robust way). For that reason, I probably would not say that it is too realistic for the near future.
  • Custom templates are more complicated than the above two, but are potentially more realistic since it would be user controlled and so would be easier to “define” in a sense. That being said, this provides a job that’s a little more suited to music production (like an arpeggiator) and is not so much an essential feature for music notation
  • Automatic settings for different instruments is something that I think would make sense to have in the future and would take advantage of the advanced voicing settings. At the moment, however, it’s not clear how likely we are to see it happening

More Information (Links)

My original proposal.
The pull request
My MuseScore blog with the weekly project reports

It was a great, fun experience working on this project!
Thank you!

Peter Hieu Vu


Comments

In reply to by Papibois

Great! It looks a simple, yet powerful and very useful tool.

Just a question: It's easy to change voicing and options for single chords, but, is there any way of selecting an option (for example, "Duration > Segment duration) as default for ALL chords?