Class: GenericInterval

.interval. GenericInterval

new GenericInterval(gi)

Represents an interval such as unison, second, etc.

Properties are demonstrated below.

Parameters:
Name Type Argument Default Description
gi number <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
Music21j, Copyright © 2013-2021 Michael Scott Asato Cuthbert.
Documentation generated by JSDoc 3.6.3 on Wed Jul 31st 2019 using the DocStrap template.