Namespace: interval

music21. interval

Interval related objects

Source:

Requires

  • module:music21/prebase
  • module:music21/pitch

Classes

ChromaticInterval
DiatonicInterval
GenericInterval
Interval

Members

<static> interval.Direction

Interval Directions as an Object/map

Source:
Example
if (music21.interval.Direction.OBLIQUE >
    music21.interval.Direction.ASCENDING ) {
   console.log(music21.interval.Direction.DESCENDING);
}

<static> interval.IntervalDirectionTerms

N.B. a dict in music21p -- the indexes here let Direction call them + 1

Source:
Example
console.log(music21.interval.IntervalDirectionTerms[music21l.interval.Direction.OBLIQUE + 1])
// "Oblique"

<static> interval.MusicOrdinals

ordinals for music terms...

Source:
Example
for (var i = 1; // N.B. 0 = undefined
     i < music21.interval.MusicOrdinals.length;
     i++) {
    console.log(i, music21.interval.MusicOrdinals[i]);
}
// 1, Unison
// 2, Second
// 3, Third
// ...
// 8, Octave
// ...
// 15, Double Octave

Methods

<static> convertDiatonicNumberToStep(dn) → {Array}

Parameters:
Name Type Description
dn Int

diatonic number, where 29 = C4, C#4 etc.

Source:
Returns:

two element array of {string} stepName and {Int} octave

Type
Array
Music21j, Copyright © 2013-2018 Michael Scott Cuthbert and cuthbertLab.
Documentation generated by JSDoc 3.5.5 on Wed Jul 4th 2018 using the DocStrap template.