Does anyone here know any formal music theory?
-
Hi, I'm not sure what language the pretty generic C-style code is in but I guess it's not Javascript as ToString is Pascal case. Anyway, this JS library is brilliant for accessing musical theory in code.
it's C#.. oooh and thank you. I'll take a look
Real programmers use butterflies
-
Or learn German (or a related language, such as Norwegian): In the Germanic tradition, B is called H, and B flat is called B. In any case, it will be less confusing if you use a true musical ♭ sign for the flats, rather than a plain lowercase b letter. B♭ and b♭ isn't that confusing. Bonus joke: What could you get if you drop a piano down a mine shaft? Answer: a♭
What could you get if you drop a piano down a mine shaft?
ab minor (miner)
-
I don't. It's sad I know, esp considering I just delivered a MIDI library unto the world. Anyway, I have a question for a music nerd, and it has to do with key signatures. Googling led me to some confusion. Basically I'm getting my key signature back as an int and a bool together, where the int is range -7 to 7 and the bool indicates minor or major. The int indicates the number of flats (int is negative) or the number of sharps (int is positive) or C if it's 0. Regarding the int, I'm not sure if I'm translating it correctly in code.
const string FLATS = "FBEADGC";
const string SHARPS = "GDEABFC";if (0 == scode)
return "C " + (IsMinor ? "minor" : "major");
if(0>scode)
return FLATS[((-scode)-1)].ToString() + "b " + (IsMinor ? "minor" : "major");
else // if(0scode
is the aforementioned int.Real programmers use butterflies
It's not right: major and minor keys have different numbers of sharps or flats. For example, while B major has 5 sharps: C#, D#, F#, G#, A#, B minor has a D natural, and then, if it's a harmonic minor, a G natural; if it's a melodic minor, a G# and A# for an ascending scale, whereas both those are natural for a descending scale. Minor keys are tricky: there's no fixed answer. More here: musictheory.net[^]
-
I don't. It's sad I know, esp considering I just delivered a MIDI library unto the world. Anyway, I have a question for a music nerd, and it has to do with key signatures. Googling led me to some confusion. Basically I'm getting my key signature back as an int and a bool together, where the int is range -7 to 7 and the bool indicates minor or major. The int indicates the number of flats (int is negative) or the number of sharps (int is positive) or C if it's 0. Regarding the int, I'm not sure if I'm translating it correctly in code.
const string FLATS = "FBEADGC";
const string SHARPS = "GDEABFC";if (0 == scode)
return "C " + (IsMinor ? "minor" : "major");
if(0>scode)
return FLATS[((-scode)-1)].ToString() + "b " + (IsMinor ? "minor" : "major");
else // if(0scode
is the aforementioned int.Real programmers use butterflies
Not sure if this was already mentioned in one of the other responses, but you have E and A in the wrong order for the sharp key signatures. A has 3 and E has 4. I learned the sequence of sharps (aka circle of fifths) back in piano classes many years ago as "Father Charles Goes Down And Ends Battle". Conveniently, you can reverse the phrase to get the order of flats (ie circle of fourths) and it still makes sense.
-
What could you get if you drop a piano down a mine shaft?
ab minor (miner)
-
Member 7989122 wrote:
acelerando moltissimo
Accelerando, not acelerando always put double 'c' the correct form in italian.
-
The flat key signatures go F, Bb, Eb, Ab, Db, Gb, Cb. The sharp key signatures go G, D, A, E, B, F#, C#. EDIT: That's major. No sharps/flats = C. The minor flat key signatures go D, G, C, F, Bb, Eb, Ab. The minor sharp key signatures go E, B, F#, C#, G#, D#, A#. No sharps/flats = A. But that's just major/minor. Then there's Dorian, Phrygian, and others. :laugh:
Robust Services Core | Software Techniques for Lemmings | Articles
I think you may have a typo in the sharp key signatures. I think it should be G, D, A, E, B, F#, C#. That's the way the circle of fifths works. I'm definitely a novice at this stuff.
-
I think you may have a typo in the sharp key signatures. I think it should be G, D, A, E, B, F#, C#. That's the way the circle of fifths works. I'm definitely a novice at this stuff.
Thanks. I've fixed it.
Robust Services Core | Software Techniques for Lemmings | Articles
-
There is a strong tradition for denoting major scales with uppercase letters, and minor scales with lowercase letters. So, The minor flat key signatures go d, g, c, f, bb, eb, ab. The minor sharp key signatures go e, b, f#, c#, g#, d#, a#. No sharps/flats = a. Maybe this tradition is stronger in some musical styles than others. I have never seen guitar chord annotations where it is not followed.
I think there's some potential for confusion here. Regarding key signatures in scores: A score with one sharp is traditionally interpreted to be either G major or E minor. There is no other indication of whether or not the key signature implies G major or E minor unless it is included in the title such as "Polonaise in Ab Minor." (I say traditional because there are non-traditional scoring methods too.) Regarding chords, there are a variety of ways to show chords in a score. For example, a C minor chord can be designated as Cm or C-. A G major 7 can be GMAJ or G^. And so on. Now 7989122's comment about major/minor scales is interesting to me. I've never used a score that does it that way, but it makes sense on a certain level. I don't need that sort of notation in my arranging, but hey, maybe I've learned something new. If you sign up with the Sonic Scores forum (no affiliation) you can ask questions and get a lot of helpful answers from professional musicians. They also know a lot about MIDI. There are other music notation apps that have active forums.
-
I don't. It's sad I know, esp considering I just delivered a MIDI library unto the world. Anyway, I have a question for a music nerd, and it has to do with key signatures. Googling led me to some confusion. Basically I'm getting my key signature back as an int and a bool together, where the int is range -7 to 7 and the bool indicates minor or major. The int indicates the number of flats (int is negative) or the number of sharps (int is positive) or C if it's 0. Regarding the int, I'm not sure if I'm translating it correctly in code.
const string FLATS = "FBEADGC";
const string SHARPS = "GDEABFC";if (0 == scode)
return "C " + (IsMinor ? "minor" : "major");
if(0>scode)
return FLATS[((-scode)-1)].ToString() + "b " + (IsMinor ? "minor" : "major");
else // if(0scode
is the aforementioned int.Real programmers use butterflies
-
To simplify that - there are 12 keys in the chromatic scale, so just put an integer from 0...11. Then you don't have any regional differences. And if you want major / minor, then add a Boolean. Should suffice for the most common "Western" music.
PS
no, this is not even close.
Real programmers use butterflies
-
I don't. It's sad I know, esp considering I just delivered a MIDI library unto the world. Anyway, I have a question for a music nerd, and it has to do with key signatures. Googling led me to some confusion. Basically I'm getting my key signature back as an int and a bool together, where the int is range -7 to 7 and the bool indicates minor or major. The int indicates the number of flats (int is negative) or the number of sharps (int is positive) or C if it's 0. Regarding the int, I'm not sure if I'm translating it correctly in code.
const string FLATS = "FBEADGC";
const string SHARPS = "GDEABFC";if (0 == scode)
return "C " + (IsMinor ? "minor" : "major");
if(0>scode)
return FLATS[((-scode)-1)].ToString() + "b " + (IsMinor ? "minor" : "major");
else // if(0scode
is the aforementioned int.Real programmers use butterflies
-
I don't. It's sad I know, esp considering I just delivered a MIDI library unto the world. Anyway, I have a question for a music nerd, and it has to do with key signatures. Googling led me to some confusion. Basically I'm getting my key signature back as an int and a bool together, where the int is range -7 to 7 and the bool indicates minor or major. The int indicates the number of flats (int is negative) or the number of sharps (int is positive) or C if it's 0. Regarding the int, I'm not sure if I'm translating it correctly in code.
const string FLATS = "FBEADGC";
const string SHARPS = "GDEABFC";if (0 == scode)
return "C " + (IsMinor ? "minor" : "major");
if(0>scode)
return FLATS[((-scode)-1)].ToString() + "b " + (IsMinor ? "minor" : "major");
else // if(0scode
is the aforementioned int.Real programmers use butterflies
Note that no flats or sharps is C major (or A minor), but that C minor is three flats (same as E flat). ( scode == 0 ) && (IsMinor) should be A minor, not C minor I have always enjoyed this presentation of the "circle of fifths": Tolkien Circle of Fifths : lotr[^] Letter names outside the circle are the major keys. Lower case letters on the inside of the circle are the minor keys. This more colorful presentation includes all the sharp & flat keys. [^]