Connor McCormick ☀️
@nor
This code generates all 8 note songs and saves them to disk, making you the proud copyright holder in the United States of all songs containing whole, quarter, eighth, and sixteenth notes that are 8 notes long (unless someone else has already done it, which surely they have)
3 replies
0 recast
6 reactions
Connor McCormick ☀️
@nor
there are maybe two ways to think about how to go about generating these. The first is the approach shown above, where you start with whole notes and then bifurcate down to smaller note values.
1 reply
0 recast
0 reaction
Connor McCormick ☀️
@nor
But you could also imagine trying to play a bit with the rules by only having one note value (duration you hold the note) but then using a musical tie to connect them A tie is essentially a way for the composer to tell you to hold the note longer https://en.wikipedia.org/wiki/Tie_(music) Ties let us shrink the search
1 reply
0 recast
0 reaction
Connor McCormick ☀️
@nor
There are technical reasons that a composer might use a tie. They might want to connect two notes across a beat, or achieve a hold for which there's no standard symbol. E.g. a 5/8 hold, which could be done with a half note tied to an eighth note We'll use ties to connect all possible repeated notes
1 reply
0 recast
0 reaction
Connor McCormick ☀️
@nor
This is going to be useful, because then we can save the sequence A-A-A B "half-notes.txt" as a file that indicates the base unit is half notes, and that gives us a new file sequence from A-A-A B "quarter-notes.txt" Before that would have been: A/2 A/2 A/2 B/2 and A/4 A/4 A/4 B/4 respectively Ok but problem
1 reply
0 recast
0 reaction
Connor McCormick ☀️
@nor
We still haven't shrunk the search space. In fact, now we've just made parts of it inaccessible. If we tie all sequences of notes, then it's impossible to generate these sequences: A/2 A/4 B/4 or A/4 A/2 B/4 They would all be A-A-A B Which if the base note value is quarter notes would be A/4 A/4 A/4 B/4
1 reply
0 recast
0 reaction
Connor McCormick ☀️
@nor
But that's exactly how we're going to shrink the space. We just need a new primitive: the optional tie.
1 reply
0 recast
0 reaction