MusicScale[name]
returns the scale with the specified name.
MusicScale[{pitch1,pitch2,…}]
returns the scale constructed from the pitches pi.
MusicScale[{interval1,interval2,…}]
returns the scale constructed from the intervals intervali.
MusicScale[…,properties]
returns the scale with the specified property association properties.
MusicScale[music,…]
returns the scale with properties inherited from another scale music.
MusicScale
MusicScale[name]
returns the scale with the specified name.
MusicScale[{pitch1,pitch2,…}]
returns the scale constructed from the pitches pi.
MusicScale[{interval1,interval2,…}]
returns the scale constructed from the intervals intervali.
MusicScale[…,properties]
returns the scale with the specified property association properties.
MusicScale[music,…]
returns the scale with properties inherited from another scale music.
Details
- MusicScale represents a musical scale containing a list of pitches.
- MusicScale represents a musical scale defined by a list of pitches or a list of intervals.
- Use MusicScale["Names"] to list supported scale names.
- The association properties can contain the following keys:
-
"IntervalList" list of intervals between pitches as MusicInterval "Mode" diatonic mode of the scale "Name" common name of the scale "NameWithTonic" common name of the scale including its tonic pitch "PitchList" list of pitches in the scale as MusicPitch "Tonic" tonic pitch of the scale as MusicPitch "Type" type of the scale, such as "Diatonic" - For a scale object obj, any of the above properties can be obtained using obj["prop"]. Use obj["PropertyAssociation"] to retrieve the values of all available properties.
Examples
open all close allBasic Examples (5)
Construct the music scale with the specified common name:
MusicScale["GMajor"]Construct a music scale with the specified list of pitches:
MusicScale[{"C", "D", "E", "G", "A"}]Construct a music scale with the specified set of intervals:
MusicScale[{MusicInterval[2], MusicInterval[2], MusicInterval[1], MusicInterval[2], MusicInterval[2], MusicInterval[2], MusicInterval[1]}]Construct a music scale with properties specified in an Association:
MusicScale["Major", <|"Tonic" -> "D"|>]Construct a music scale with default properties inherited from another MusicScale:
m = MusicScale["Major"]MusicScale[m, <|"Tonic" -> "D"|>]Scope (5)
Use MusicScale["Names"] to see the list of supported names:
MusicScale["Names"]//ShortMany scale types are supported:
MusicScale /@ {"Minor", "Aeolian"}m = MusicScale["D#Aeolian"];
m["Properties"]List all available properties with their values:
m["PropertyAssociation"]//DatasetThe tonic of a scale can be specified in its name:
MusicScale["D#Minor"]Alternatively, it can be passed separately using an association with a "Tonic" key:
MusicScale["Minor", <|"Tonic" -> MusicPitch@"D#"|>]Create a scale from a "Mode" of the diatonic major scale:
MusicScale[MusicPitch@"A", <|"Name" -> "Aeolian"|>]
%["Mode"]Retrieve the "Type" property of a scale:
MusicScale[{"C", "D", "E", "G", "A"}]
%["Type"]Applications (2)
Construct a random melody from a scale:
scale = MusicScale@RandomChoice@MusicScale["Names"]MusicScore@RandomChoice[scale["PitchList"], 10]Construct all four-tone diatonic chords from the D minor scale:
scale = MusicScale["DMinor"]Create a list of all the D minor pitches over two octaves:
pitches = Join[scale["PitchList"], MusicTransform[{"Transpose", 12}] /@ Rest@scale["PitchList"]];Construct chords by sampling the every third pitch in the list:
Table[MusicChord@pitches[[{i, i + 2, i + 4, i + 6}]], {i, 7}]Insert all chords in a MusicScore object:
MusicScore[%]Related Guides
History
Text
Wolfram Research (2026), MusicScale, Wolfram Language function, https://reference.wolfram.com/language/ref/MusicScale.html.
CMS
Wolfram Language. 2026. "MusicScale." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MusicScale.html.
APA
Wolfram Language. (2026). MusicScale. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MusicScale.html
BibTeX
@misc{reference.wolfram_2026_musicscale, author="Wolfram Research", title="{MusicScale}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/MusicScale.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_musicscale, organization={Wolfram Research}, title={MusicScale}, year={2026}, url={https://reference.wolfram.com/language/ref/MusicScale.html}, note=[Accessed: 12-June-2026]}