Rule-based system for solving functional harmony exercises
- MuseScore version at least 3.4 (plugin may not work with version 3.3.4 and lower). We reccomend newest version 3.5.x. Before using this plugin on versions 3.6.x, please see "Musescore 3.6.x" chapter
- Windows is preferred, but this plugin should also work with Linux systems and Mac OS
-
Download plugin - click Code -> Download ZIP. Use archive manager (WinRar, 7zip) to unpack it.
-
Open MuseScore and go to Edit -> Preferences (Mac: Musescore -> Preferences).
-
Copy whole unpacked "HarmonySolverPlugin-master" folder to this path.
3.5. If you have MuseScore 3.6.0 or newer, go to HarmonySolverPlugin-master -> main, delete folder "resources" and rename folder "resources3.6" to "resources"
-
"harmonySolver" should appear on the left. Tick checkbox next to it and press ok. If harmonySolver is not visible, press "Reload Plugins" button. You can also set here keyboard shortcut for harmonySolver (Define Shortcut).
-
After that, you can use harmonySolver plugin by clicking Plugins -> HarmonySolver or using defined shortcut.
For MuseScore 3.6.x it is essential to either
or
- check the "Remember my choice and don't ask again" option during first appearance of "Would you like to try our improved score style" window (does not matter whether you choose the new or old style)
Without that, solutions will not be displayed correctly.
Plugin solves three types of exercises connected with functional harmony:
- exercises with given harmonic functions
- exercises with given figured bass
- exercises with given soprano melody
It generates four-part harmonization satisfying given input according to functional harmony rules.
To solve this type of exercises open a tab called "Harmonics".
You can use three buttons:
- Import - for import saved file with exercise
- Check Input - for checking of input correctness
- Solve - for solving given exercise
There will also appear a place to provide harmonic functions input.
You should use dedicated notation:
First line must contain key. It should be lower letter for minor keys, and upper letter for major keys. You can also append accidentals. Examples:
- C (= C major)
- e (= e minor)
- Db
- ab
- G#
- f#
Second line must contain metre. It should be provided in format: "nominator / denominator". For example:
- 3 / 4
- 12 / 8
- 2 / 2
Each next line is treated as next measure.
Each measure contains harmonic functions separated by a semicolon.
Harmonic function must satisfy the scheme:
X{ extra arguments }, where
X is one of T (major tonic), S (major subdominant) or D (major dominant).
You can also use minor harmonic functions: To (minor tonic), So (minor subdominant),
Do (minor dominant).
You can provide also extra arguments for harmonic function. Every argument
should be inside curly parentheses and be separated from next by slash.
What is more every extra argument should satisfy the schema: key : value.
List of extra arguments:
- position - determines which chord component should soprano note be.
Example usage: "position: 3>" means that soprano should be minor third of given harmonic function. - revolution - determines which chord component should bass note be.
If not specified in bass will be prime of chord.
Example usage: "revolution: 5" means that bass should be fifth of given harmonic function. - system - determines if system of result chord should be open or close.
Example usage: "system: open" and "system: close". - degree - determines degree of harmonic function. Using this argument you can
satisfy for example TIII or DVII.
Example usage: "degree: 3" or "degree: 6". - extra - determines extra chord components to use. For example, you can
satisfy subdominant with extra sixth or dominant with extra seven.
Example usage: "extra: 6" means extra sixth for harmonic function, "extra: 7, 9>" means extra seventh and minor ninth fo harmonic function. - omit - determines which chord components to omit.
Example usage: "omit: 5" means that fifth will be omitted in that chord and all voices will not contain fifth. - delay - determines if chord components should be delayed by other chord components.
Plugin supports only single delays x - y, where interval between x and y is not bigger
than second. Plugin also supports delays like 7 - 8 or 9 - 8.
Example usage: "delay: 4-3" means that third should be delayed by fourth, "delay: 6-5, 4-3" means that fifth should be delayed by sixth and third by fourth. - down - if used, harmonic function is down.
Example usage: "down". - isRelatedBackwards - if used, harmonic function is related backwards.
It should be used for deflections.
Example usage: "isRelatedBackwards".
Full examples of harmonic functions:
D{extra: 7 / delay: 6-5, 4-3 / position: 7 / revolution: 1}
- means dominant with extra 7 in soprano voice, in bass should be 1, also specified special delays.So{down / revolution: 3>}
- means minor subdominant, down, with 3> in bass (= Neapolitan chord).D{extra: 9 / omit: 5}
- means dominant with extra 9 without usage of 5.
Full example of measure:
T{}; S{}; So{extra:6}; D{extra: 7, omit: 5}; T{delay: 4-3}
Plugin supports modulation deflections. To specify deflection you have to wrap harmonic functions between parentheses. Examples:
(S{}; D{}); D{}; T{}
- means that we have modulation deflection to dominant.(S{}; D{})[T{degree:6}];D{};T{}
- the first part is the elipse. Between parentheses () there is deflection to elipse source chord which should be wrapped between [].S{}; (S{isRelatedBackwards}); D{}; T{}
- means that second harmonic function is deflected backwards to first harmonic function.
Plugin supports Chopin chord and Neapolitan chord. When you specify harmonic function with more than four chord components, plugin will choose the ones to omit. When you add ninth to extra, plugin adds seventh to extra. It also corrects mistakes made by user - for example from T{position: 3>} it will make T{position: 3}.
Plugin supports fifth alterations.
For example D{extra: 7,5<}
will generate seventh dominant with upper altered fifth.
There are also some example files in folder /examples/harmonics. You can import them and learn notation from examples.
To solve this type of exercises open a tab called "Bass".
There is only one button Solve for solving exercise. Before you will click Solve, you should open score containing bass voice with figured bass symbols. If you want to bind note with a specific symbol - choose note from score and use shortcut ctrl+G. Remember not to use rests, ties and more than single delays, plugin does not support them.
All alteration in bass symbols should be after the number and should be represented as b, # and h, not "<" or ">".
You can delay up to two numbers, for example "6b-5, 4-3". You cannot have delay like "6-".
Whole score should have one metre and should not have an anacrusis.
All alteration symbols without number will be applied to 3.
Here is a table with all supported number bass symbols with their translations (you can also use other symbols and combinations, but they may not be handled correctly):
Input symbols | How they will be treated |
---|---|
(nothing) | 5 3 |
5 | 5 3 |
3 | 5 3 |
5 3 |
5 3 |
6 | 6 3 |
6 3 |
6 3 |
7 | 7 5 3 |
7 5 |
7 5 3 |
7 3 |
7 5 3 |
7 5 3 |
7 5 3 |
2 | 6 4 2 |
4 2 |
6 4 2 |
6 4 2 |
6 4 2 |
4 3 |
6 4 3 |
6 4 3 |
6 4 3 |
6 4 |
6 4 |
6 5 |
6 5 3 |
6 5 3 |
6 5 3 |
10 2 |
10 4 2 |
10 4 2 |
10 4 2 |
9 7 |
9 7 5 3 |
9 7 3 |
9 7 5 3 |
9 7 5 3 |
9 7 5 3 |
7 5 6 |
7 5 6 |
There are also some example scores in folder /examples/bass.
To solve this type of exercises open a tab called "Soprano".
At the top side you can choose the set of chords used to harmonization. Tonic, subdominant and dominant are obligatory. Remember to choose right scale. Default scale is major.
At the bottom side you can set tolerance for breaking basic functional harmony's rules. If 0% is set than rule cannot be broken. The greater percentage, the more likely rule is broken.
List of basic rules:
- Parallel fifths - interval of fifth between two same voices in two next chords
- Parallel octaves - interval of octave between two same voices in two next chords
- Crossing voices - intersection of melodic lines in two neighbour voices
- One direction - all voices goes in same direction from one chord to next chord
- Hidden octaves - unsounded musical interval of an octave that is implied by the similar up or down motion of two voice parts and that if sounded would produce parallel octaves
- False relation - chromatic move not in the same voice
- Repeated function - two identical chords with same harmonic function
- Illegal doubled third - third treated as chord component occurs in at least two voices when it is not allowed
Before you will click Solve, you should open a score with only soprano voice. Remember not to use rests. Whole score should have one metre and should not have an anacrusis.
Each note of melody will be harmonized. The number of chords will be equal to number of notes.
There are also some example scores in folder /examples/soprano.
To check correctness of your own solution open a tab called "Validator".
Here is a button which you can press to validate opened score. Score should contain all four voices satisfying chord homophony. Soprano and tenor should be written down using 1st voice from MuseScore. Alto and bass should be written down using 2nd voice from MuseScore. Rules that will be evaluated:
- Parallel octaves
- Parallel fifths
- Crossing voices
- One direction
- Forbidden jump
- Hidden octaves
- False relation
All chords will be treated by validator as if they have different harmonic functions. So when for example tonic will be repeated with fifth between soprano and alto validator will also treat this connection as breaking parallel fifths rule. There is made one assumption: when validator finds parallel fifth/octave between bass and other voice, and bass is staying at same pitch - validator treats these two chords as if they have same harmonic function.
You can choose path for solution scores. The default path is /main/solutions.
You can enable printing chord components and chord symbols in solution score. What is more plugin has two special components: prechecker and corrector. You can also enable or disable them.
prechecker - evaluates rules for all pairs of neighbour harmonic functions. Also it checks if harmonic function could generate at least one chord. If no, it will let you know about this problem. It does not work in soprano harmonization.
corrector - makes some basic corrections with given harmonic functions:
- for chain dominants (for example (D7) -> D7 -> T) chooses harmonic functions where fifth should be omitted (if not specified) to avoid parallel fifths
- for connections like D7 (where 7 is in bass) -> T it sets revolution of T to third (if not specified)
- for Chopin chord adds fifth to omit (if not specified)
Using prechecker and corrector is recommended for beginners, but it will increase time of finding solution.
Plugin settings are persistent and if you exit plugin and launch it again they will load exactly like you set before turning plugin off.
The business logic of plugin is based on the content of the books:
- "Podstawy harmonii funkcyjnej" by Jacek Targosz, PWM 2004
- "Harmonia - zbiór zadań i przykładów do I i II części podręcznika dla średnich szkół muzycznych" by Kazimierz Sikorski, PWM 1984
The project was carried out as an engineering thesis in computer science at AGH University of Technology, Cracow 2020.
Developers:
- Wiktor Pawłowski
- Mikołaj Sikora
- Jakub Sroka
Supervisor:
- PhD Maciej Smołka (Assistant Professor)