Class: GenericInterval

music21.interval. GenericInterval

new GenericInterval(gi)

Represents an interval such as unison, second, etc.

Properties are demonstrated below.

Parameters:
Name Type Argument Default Description
gi Int <optional>
1

generic interval (1 or higher, or -2 or lower)

Source:
Example
var gi = new music21.interval.GenericInterval(-14)
gi.value
// -14
gi.directed
// -14
gi.undirected
// 14
gi.direction == music21.interval.Direction.DESCENDING
// true
gi.isSkip
// true
gi.isStep
// false
gi.isDiatonicStep
// false  // augmented unisons are not diatonicSteps but can't tell yet..
gi.isUnison
// false
gi.simpledDirected
// -7
gi.simpleUndirected
// 7
gi.undirectedOctaves
// 1
gi.semiSimpleUndirected
// 7  -- semiSimple distinguishes between 8 and 1; that's all
gi.semiSimpleDirected
// 7  -- semiSimple distinguishes between 8 and 1; that's all
gi.perfectable
// false
gi.niceName
// "Fourteenth"
gi.directedNiceName
// "Descending Fourteenth"
gi.simpleNiceName
// "Seventh"
gi.staffDistance
// -13
gi.mod7inversion
// 2  // sevenths invert to seconds

Methods

<static> GenericInterval#complement() → {music21.interval.GenericInterval}

Returns a new GenericInterval which is the mod7inversion; 3rds (and 10ths etc.) to 6ths, etc.

Source:
Returns:
Type
music21.interval.GenericInterval

<static> GenericInterval#getDiatonic(specifier) → {music21.interval.DiatonicInterval}

Given a specifier, return a new DiatonicInterval with this generic.

Parameters:
Name Type Description
specifier string | Int

a specifier such as "P","m","M","A","dd" etc.

Source:
Returns:
Type
music21.interval.DiatonicInterval

<static> GenericInterval#reverse() → {music21.interval.GenericInterval}

Returns a new GenericInterval which has the opposite direction (descending becomes ascending, etc.)

Source:
Returns:
Type
music21.interval.GenericInterval

<static> GenericInterval#transposePitch(p) → {music21.pitch.Pitch}

Transpose a pitch by this generic interval, maintaining accidentals

Parameters:
Name Type Description
p music21.pitch.Pitch
Source:
Returns:
Type
music21.pitch.Pitch
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.