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
Solution Comments
Show comments
Loading...
Problem Recent Solvers4
Suggested Problems
-
List the notes of a major scale
4 Solvers
More from this Author321
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
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.
Thanks for pointing out the error, Christian. Corrected.
That's a very interesting and instructive problem!