$INTERVALS_UI


This JavaScript module handles musical intervals for html pages.

Files to include in HTML file header
<script src="libs/harmony-1.0.0.min.js"></script>
<script src="libs/intervals-ui-1.0.0.min.js"></script>

$INTERVALS_UI Methods

Method Description
buildTetracorde() Shows a tretacorde.
buildPentacorde() Shows a pentacorde.
buildModeSteps() Shows degrees of choosen mode.
buildChordComposition() Shows chord's notes.
buildIntervalsFromTone() Shows intervals from a tone.
buildSimpleFifthCircle() Shows simple fifth cycle.
buildFifthCircle() Shows full fifth cycle.

Exemples

$INTERVALS_UI.buildTetracorde()

$INTERVALS_UI.buildTetracorde(id, mode, tone, bStep);

La fonction buildTetracorde() affiche un tétracorde.

Exemple

HTML
<div id="tetracorde1"></div> <div id="tetracorde2"></div>

JavaScript
$INTERVALS_UI.buildTetracorde('tetracorde1', 0, 'C', false);
$INTERVALS_UI.buildTetracorde('tetracorde2', 0, 'C', true);

tetracorde1
tetracorde2

Les différents tétracordes

mode = 0, tétracorde majeur

mode = 1, tétracorde mineur


mode = 18, tétracorde harmonique


mode = 2, tétracorde phrygien


mode = 3, tétracorde lydien


mode = 20, tétracorde diminué

$INTERVALS_UI.buildPentacorde()

$INTERVALS_UI.buildPentacorde(id, mode, tone, bStep);

La fonction buildPentacorde() affiche un pentacorde.

Exemple

HTML
<div id="pentacorde1"></div>
<div id="pentacorde2"></div>

JavaScript
$INTERVALS_UI.buildPentacorde('pentacorde1', 0, 'C', false);
$INTERVALS_UI.buildPentacorde('pentacorde2', 0, 'C', true);

pentacorde1
pentacorde2

Les différents pentacordes

mode = 0, pentacorde majeur

mode = 5, pentacorde mineur

mode = 18, pentacorde harmonique
mode = 2, pentacorde phrygien

mode = 3, pentacorde lydien

mode = 19, pentacorde hongrois

mode =17, pentacorde mineur-lydien

mode = 9, pentacorde augmenté

mode = 6, pentacorde locrien

mode =20, pentacorde locrien-mineur

$INTERVALS_UI.buildModeSteps()

$INTERVALS_UI.buildModeSteps(id, mode, tone, pentacorde, tetracode);

La fonction buildModeSteps() affiche les degrés du mode choisi avec les distances en 1/2 ton.

Exemple

HTML
<div id="major"></div>
<div id="natural"></div>
<div id="harmonic"></div>
<div id="melodic"></div>

JavaScript
$INTERVALS_UI.buildModeSteps('major', 0, "C", 'majeur', 'majeur');
$INTERVALS_UI.buildModeSteps("natural", 21, "A");
$INTERVALS_UI.buildModeSteps("harmonic", 14, "Eb");
$INTERVALS_UI.buildModeSteps("melodic", 7, "I", 'mineur', 'majeur');










$INTERVALS_UI.buildChordComposition()

$INTERVALS_UI.buildChordComposition(id, chord);

La fonction buildChordComposition() affiche la composition des notes d'un accord.

Exemple

HTML
<div id="chord1"></div>
<div id="chord2"></div>
<div id="chord3"></div>

JavaScript
$INTERVALS_UI.buildChordComposition('chord1', 'Am');
$INTERVALS_UI.buildChordComposition('chord2', 'CM7');
$INTERVALS_UI.buildChordComposition('chord3', 'F#°7');

Am chord:

CM7 chord:

F#°7 chord:

$INTERVALS_UI.buildIntervalsFromTone()

$INTERVALS_UI.buildIntervalsFromTone(id, tone);

La fonction buildIntervalsFromTone() affiche .











$INTERVALS_UI.buildSimpleFifthCircle()

$INTERVALS_UI.buildSimpleFifthCircle(id, tone);


$INTERVALS_UI.buildFifthCircle()

$INTERVALS_UI.buildFifthCircle(id, tone);