This JavaScript module handles transposable harmonic sequences for html pages.
<link rel="stylesheet" href="css/music.min.css" />
<script src="libs/harmony-1.0.0.min.js"></script>
<script src="libs/sequence-ui-1.0.0.min.js"></script>
Method | Description |
---|---|
init() | Builds all harmonic sequences found in html file. |
updateTonality() | Updates transposable harmonic sequences with given tonality. |
buildSequencesFromList() | Shows harmonic sequences from sequence list. |
buildHarmonization() | Shows harmonization in a given mode. |
init() Builds all harmonic sequences found in html file.
options { 'tonality': 'MC', 'bMajorOrMinor': true or false, 'lang': 'en' or 'fr' for language }
$SEQUENCE_UI.init({'lang':'en'});
updateTonality() Updates transposable harmonic sequences with given tonality.
buildSequencesFromList() Shows harmonic sequences from sequence list.
buildHarmonization() Shows harmonization in a given mode.
It's an array of chord:
[ chord, chord, chord, ... ]
It's an array of five fields:
[ degree, signature, notation, function, options ]
The degree of chord is the degree in main tonality, "P1" stands for the fondamental.
Degree | I | #I | bII | II | #II | bbIII | bIII | III | #III | bIV | IV | #IV |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Note | C | C# | Db | D | D# | Ebb | Eb | E | E# | Fb | F | F# |
Code | "P1" | "A1" | "m2" | "M2" | "A2" | "d3" | "m3" | "M3" | "A3" | "d4" | "P4" | "A4" |
Degree | bV | V | #V | bbVI | bVI | VI | #VI | bbVII | bVII | VII |
---|---|---|---|---|---|---|---|---|---|---|
Note | Gb | G | G# | Abb | Ab | A | A# | Bbb | Bb | B |
Code | "d5" | "P5" | "A5" | "d6" | "m6" | "M6" | "A6" | "d7" | "m7" | "M7" |
It's the string of chord signature.
This is the degree notation in roman number.
T | "T" Tonic degree I in fondamental state without leading-tone. | |
T | "Ts" Tonic degree I in fondamental state with leading-tone. | |
T | "t" Tonic degré I à l'état de renversement ou autre degré sans la leading-tone. | |
T | "ts" Tonique degré I à l'état de renversement ou autre degré avec la leading-tone. | |
D | "d" Dominante avec la sensible mais sans la quarte. | |
D | "D" Dominante avec le triton tonal donc sensible et quarte. | |
D | "Dst" substitution tritonique, subV7 ou bII7 avec quarte et sensible. | |
D² | "D2" Dominante secondaire, V7/?. | |
D² | "D2st" substitution tritonique de la dominante secondaire, subV7/?. | |
SD | "SD" Sous-dominante. | |
SD² | "SD2" Sous-dominante secondaire. |
<div class="harmonic-sequence">
['P4','m','IV','SD'], ['P5','7','V7','D'], ['P1','m','I','T']
</div>
$SEQUENCE_UI.init({"tonality":"mG"});
Tone (degree I) is set by the given value in $SEQUENCE_UI.init({"tonality":"mG"}), here it's G.
<div id="sequence_1" class="harmonic-sequence"></div>
var sequence_1 = [['M2','m','II','SD'],['P5','','V','d'],['P1','','I','T']];
$SEQUENCE_UI.init({"tonality":"MG"});
Tone (degree I) is set by the given value in $SEQUENCE_UI.init({"tonality":"MG"}), here it's G.
<div align="center">
<div id="sequence_2" class="harmonic-sequence">D#</div>
</div>
var sequence_2 = sequence_1;
$SEQUENCE_UI.init({"tonality":"mG"});
Tone (degree I) is set by the given value in <div>tone</div>, here it's D#.
<div id="sequence_3" class="harmonic-sequence transposable"></div>
var sequence_3 = [
['M2','7','II/V','D2'], ['P5','7','V7','D'], ['P1','M7','I','Ts']
];
$SEQUENCE_UI.init({"tonality":"MC#"});
Tone (degree I) is initially set by the given value in $SEQUENCE_UI.init(tone), here it's C#.
It can be updated calling to $SEQUENCE_UI.updateTonality(tonality).
$SEQUENCE_UI.updateTonality("MF");
<div id="sequence_4" class="harmonic-sequence transposable">Ab</div>
var sequence_4 = [
['P5','','V','d'],['P1','','I','T'],['P4','','IV','SD'],['P1','','I','T']
];
Tone (degree I) is initially set by the given value in $SEQUENCE_UI.init(tone), here it's Ab.
Il peut être mis à jour par l'appel à $SEQUENCE_UI.updateTonality(tonality).
$SEQUENCE_UI.updateTonality("MF");
var mySequence = [
['P1','','I','T'],['P1','7','V7/IV','D2'],['P4','','IV','SD'],['P5','','V','d'],
['P5','7','V7','D'],['M3','m','VI','t'],['M3','7','V7/II','D2'],['M2','m','II','SD'],
['M7','°7','VII°7','D'],['P1','','I','T']
];
<div id="mySequence" class="harmonic-sequence">@</div>
<div id="mySequence" class="harmonic-sequence">!</div>
<div id="mySequence" class="harmonic-sequence">!%</div>
<div id="mySequence" class="harmonic-sequence">$</div>
<div id="mySequence" class="harmonic-sequence">$%</div>
<div id="mySequence" class="harmonic-sequence">A</div>
<div id="mySequence" class="harmonic-sequence">A%</div>