Spogg wrote:I renamed the keys in the Ruby module from D#, G#, A# to Eb, Ab, Bb because I'm used to that naming system.
Caution, Mr Wisenheimer speaks: Both of you would be wrong. You see, there is a difference between D sharp and E flat. You might not notice it, since we are used to play on equal tempered piano replicas. But, for example, on a violin it may be a noticable difference.
When to use sharp, and when to use flat? Whenever you're ascending it's a sharp, when descending a flat.
Ascending or descending from what? From the key you're in and the chord you're in (chord progression). Basically, from the root.
But for midi there is no key, it is just naming the pre-defined midi note-numbers. Yes, and no. There is a root. Midi defines (and
only defines) middle C as midi note number 60. Regarding that, it would be sharps all the way up from 61 to 127, and flats all the way down from 59 to 0.