Problem 60839. List the notes of a major scale
If you have seen The Sound of Music, then you are familiar with the major scale: do, re, mi, fa, sol, la, ti, do. The C major scale, for example, is C, D, E, F, G, A, B, C.
Notice the pattern that defines a major scale: a whole step (two notes) from C to D, a whole step from D to E, a half step (one note) from E to F, whole step, whole step, whole step, and half step. The Ab (A flat) major scale would be Ab, Bb, C, Db, Eb, F, G, Ab, and the E major scale would be E, F#, G#, A, B, C#, D#, E.
Also notice on the image of the keyboard below that the black notes have two names. Thus, the G# (G sharp) major scale—G#, A#, C, C#, D#, F, G, G#--is the same as the Ab major scale but with the sharp names rather than the flat names. The major scales that use flats are Db, Eb, F, Gb, Ab, and Bb.
Write a function to list the notes of a major scale, starting on the specified note of the scale (or, if not specified, the first note).
Solution Stats
Problem Comments
-
3 Comments
Christian Schröder
on 6 Apr 2025 at 18:43
Nice problem, Chris! One small point: in your description of a major scale, I think it should be three whole steps after going from E to F, not two.
ChrisR
on 7 Apr 2025 at 1:06
Thanks for pointing out the error, Christian. Corrected.
William
on 8 Apr 2025 at 18:39
That's a very interesting and instructive problem!
Solution Comments
Show commentsProblem Recent Solvers4
Suggested Problems
-
List the notes of a major scale
4 Solvers
More from this Author298
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!