GSoC 2019: Chord Symbol Playback - Work Product
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:
- Allow users to realize chord symbols into notes in the score
- Allow users to directly playback chord symbols when pressing play
- Design and implement quality voicing algorithms
- 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!
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:
- 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.
- 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
Thanks. Wonderful job!
In reply to Thanks. Wonderful job! by Bubulmo
That is remarkable! Bravo!
Thanks ! can't wait to use this great new feature !
Thank you for this wonderful feature! I hope to see it in the 3.3 release.
In reply to Thank you for this wonderful… by drowo
That unfortunately won't be the case, but hopefully in 3.4
See https://musescore.org/en/node/293812#comment-941946 ff.
In reply to That unfortunately won't be… by Jojo-Schmitz
That's really bad news :-(
In reply to That unfortunately won't be… by Jojo-Schmitz
Yes hopefully ... having some kind of plan for 3.4 would be very much appreciated!
Why not even give users the possibility to vote for the features they would prefer?
Knowing that resources are not infinite having to make choices is natural.
genial looking forward to it
I hope it will be approved and embedded into the software soon.
deleted
The realization of chord symbols is now integrated into the MuseScore code.
It can be tested with the latest Nightly: https://ftp.osuosl.org/pub/musescore-nightlies/windows/
Here is an example of a result on a traditional Basque song
https://musescore.com/user/1964776/scores/5933132
In reply to The realization of chord… by Papibois
Great news! Thanks to all having made that possible.
In reply to The realization of chord… by Papibois
Great! I'm already testing ...
In reply to The realization of chord… 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?
In reply to Great! Downloading now by Bubulmo
Yes, via Inspector and the "Set as style" button (further UI in Format > Style > Chord symbols is done in a pending PR, see #302714: Chord symbol playback: make global settings available in Edit Style dialog and https://github.com/musescore/MuseScore/pull/5889)
In reply to Yes, via Inspector and 'Set… by Jojo-Schmitz
Thanks very much! Working great!