Yesterday was the most freakin’ amazing day ever. I went to New York for the first time, which I’m not ashamed to admit, and saw my first Broadway show.
I am now regretting that it was my first, and not closer to the 20th.
Nick Jonas sang and acted and talked really quickly, Anderson Cooper narrated, and the guy who played Bud Frump was absolutely HILARIOUS.
Still, it was an overly long ride there and an overly long ride back for less than 2 hours of New York time. Worth it, though.
I can’t make connections or say my problems for anything this week in math, so instead, I will go off on a long tangent that’s equal parts math, programming, music, and me spewing ideas at the world in hope that someone can understand them, because I sure don’t.
Check out the keyboard above – just a single octave’s worth of keys, 13 in all. If we want to try to get the computer to understand these, we can’t just say that the note on c = c, because there are multiple “c”s. Instead, what we could do is give that note a value, like in this list:
low C = 1
C# = 2
D = 3
D# = 4
E = 5
F = 6
F# = 7
G = 8
G# = 9
A = 10
A# = 11
B = 12
high C = 13
Then, we could assign each quantity to a .wav or .mp3 file that plays just that note.
if note = 1
From here on, it gets a bit more musical.
A major third is four half-steps, and a minor third is three. A major triad chord involves a base note, then the note a major third up, then the note a minor third up. A minor triad chord involves a base note, then the note a minor third up, then the note a major third up.
So, imagine the major_third and minor_third functions as outputting the note a major/minor third up from the given note.
In the program, it would look something like
return note + 4
return note + 3
Then, the major triad of n would be the array [n, major_third(n), minor_third(major_third(n)))]
And the minor triad:
[n, minor_third(n), major_third(minor_third(n)))]
To simplify things if we want to have an interval that isn’t a third, we could make a universal makeinterval section that takes both the note and the interval, although the interval would be in terms of my special note notation, not the normal interval notation:
def makeinterval(note, interval)
return note + interval
Every single chord could be created from this base notation of [n; makeinterval(n, interval_1); makeinterval(makeinterval(n, interval_1), interval,2); ...]
And that, ladies and gentlemen, is how we program chords into the computer,