Print the notes of an increasing octave-repeating scale.Print the notes of an increasing octave-repeating scale.
Challange
To quote Wikipedia:
An octave-repeating scale can be represented as a circular arrangement of pitch classes, ordered by increasing (or decreasing) pitch class. For instance, the increasing C major scale is C–D–E–F–G–A–B–[C], with the bracket indicating that the last note is an octave higher than the first note.
Major scales are defined by their combination of semitones and tones (whole steps and half steps):
Tone – Tone – Semitone – Tone – Tone – Tone – Semitone
Or in whole steps and half steps, it would be:
Whole – Whole – Half – Whole – Whole – Whole – Half
So, for example, in the C major scale, we first start with the C note. Then we go up a tone (whole step) to a D Another tone (whole step) to an E Now a semitone (half step) to an F Tone (whole step) to a G Tone (whole step) to an A Tone (whole step) to a B And finally, a semitone (half step) to a C again A minor scale (I'm talking about the natural minor scale as opposed to the harmonic minor scale and the melodic minor scale) follows the following formula
Tone – Semitone – Tone – Tone – Semitone – Tone – Tone
or
Whole – Half – Whole – Whole – Half – Whole – Whole
So, the C minor scale will look like
or, as letters: C, D, D#, F, G, G#, A#
So, your job today, is given a major or minor scale, print the notes.
Input/Output
Input/Output can be taken in any reasonable format for taking the name of the scale and returning the set of the increasing octave-repeating notes of that scale.
You don't need to print out the last note.
If the notes are enharmonic equivalent (same note but different names eg A#/Bb), you can print either of them, but you can't print C as B# or E as Fb)
If the scales are enharmonic equivalent (same scale but different names eg G#m and Abm), you have to handle both of them.
Input -> Output
C -> [C, D, E, F, G, A, B]
Cm -> [C, D, Eb (D#), F, G, Ab (G#), Bb (A#)]
G -> [G, A, B, C, D, E, F# (Gb)]
F#m -> [F# (Gb) – G# (Ab) – A – B – C# (Db) – D – E]
This is code-golf, so the shortest answer (in bytes) wins!