WLJS LogoWLJS Notebook

MusicInterval

MusicInterval[semitones]
MusicInterval[name]
MusicInterval[properties]

represents the distance between two musical pitches.

MusicInterval[7]
MusicInterval["PerfectFifth"]

Useful properties include "Semitones", "Name", "CompoundOctaves" and "CentDeviation".

interval = MusicInterval["MinorThird"];
interval["Semitones"]

Intervals can transpose symbolic music:

MusicPitch["E4"] + MusicInterval["MinorThird"]
MusicNote["C4", 1/4] + MusicInterval[7]
MusicChord["C Major"] + MusicInterval[7]

They can also define a MusicScale:

MusicScale[MusicInterval /@ {2, 2, 1, 2, 2, 2, 1}]

See the Wolfram Language reference for named and compound intervals.