Given the ubiquity of this short musical phrase called the “Millennial Whoop”, let’s compose some Celtic-style music that “features” it. I am going to use the folk-rnn deep LSTM model that we trained and presented recently. (This is a continuation of my explorations of using deep learning for assisting the process of music composition.)

Let’s start with a jig, which is a 6/8 dance. Using our model trained on over 23,000 folk music transcriptions, I seed with the millennial whoop as the beginning measure and ask for 3 transcriptions in C major:

python sample_rnn.py metadata/config5-wrepeats-20160112-222521.pkl --terminal --ntunes 3 --seed "M:6/8 K:Cmaj G E G E 3" X:0 M:6/8 K:Cmaj G E G E 3 | A, C A, C 2 D | E G C E G c | B G A G E F | G E G E 3 | A, D E C 2 A | G E D E C D | D A, G, A, 2 C :| |: E G E E 2 E | C D E G 2 E | C E C A, 2 A, | B, D C A, B, G, | E G E E 2 D | C E C A, 2 B, | C D E G E D |1 D 2 C C 2 D :| |2 D 2 C C 2 E |

X:1 M:6/8 K:Cmaj G E G E 3 | G E G c 3 | G E G c B A | G A G F E D | G E G E 3 | G E G c 3 | d c A G A B | c B A G A B :| c 3 d e d | c B A G A B | c B A B G A | A B c d e f | c 2 d e d c | B A B c B c | A G F G A G | A B c d e d :|

X:2 M:6/8 K:Cmaj G E G E 3 | G E G C 2 G | A G E G E C | D 3 E D C | G E G E 3 | A G E G 3 | c B c d e f | e d c A 2 G :| g e g g e g | a f a f e f | g e g g e g | a f d d 2 G | g e g g e g | f a f a f e | g e c d 2 d | e c A G 2 G :|

Each transcription generated by the model consists of tokens from seven classes: pitch (e.g., “G” and “A,”), duration (e.g., “2”) , grouping (e.g., “3)”), measure (e.g., “|:”), key (e.g., “K:Cmaj”) , meter (e.g., “M:6/8”), and sequence (begin and end tokens). Above are terminal outputs of these, to which I add the “X:” (reference number) field. Each token is separated by a space. (If you want to convert any of the above, use the handy ABC converter, but remember to remove the spaces between pitch and duration is necessary.)

I have added line breaks to the output above so we can have a good look. Notice that folk-rnn repeats the Millennial Whoop in the fifth measure of each tune (the first repeated 8 measure section). That is a “conservative” choice. The subjects of the turns of X:0 and X:2 (the second repeated 8 measure section) create variations of the Millennial Whoop. The turn in X:1 has little relation to the tune.

All three tunes are pretty good, but of them I like the tune of X:0 and the turn of X:2 the most. That turn is properly the high point of the jig, and I might keep it for a coda. For now though, I will take the tune of X:0 to embiggen the seed for folk-rnn to compose three other turns.

python sample_rnn.py metadata/config5-wrepeats-20160112-222521.pkl --terminal --ntunes 3 --seed "M:6/8 K:Cmaj G E G E 3 | A, C A, C 2 D | E G C E G c | B G A G E F | G E G E 3 | A, D E C 2 A | G E D E C D | D A, G, A, 2 C :|" X:0 M:6/8 K:Cmaj G E G E 3 | A, C A, C 2 D | E G C E G c | B G A G E F | G E G E 3 | A, D E C 2 A | G E D E C D | D A, G, A, 2 C :| |: E G c G 2 C | E G d e c G | E G c G 3 | G A c G E D | E 2 c G 2 E | E G c A G E | D E D E D C | A, A, A, A, 3 :|

X:1 M:6/8 K:Cmaj G E G E 3 | A, C A, C 2 D | E G C E G c | B G A G E F | G E G E 3 | A, D E C 2 A | G E D E C D | D A, G, A, 2 C :| |: C D E G 2 E | C A, C G, 2 E | C D E G E G | A 2 A A G E | C 2 E G 2 E | C A, G, G, E, G, | C D E G E C | D E D D 2 B, :|

X:2 M:6/8 K:Cmaj G E G E 3 | A, C A, C 2 D | E G C E G c | B G A G E F | G E G E 3 | A, D E C 2 A | G E D E C D | D A, G, A, 2 C :| G E G G E G | A G A c d e | d c A G A c | d c A G E G | c d c d c A | G E C D E A | G E C D C A, | A, 3 G, 2 C :|

Again, I have added line breaks so we can have a good look at them. I like the first 3 measures of the turn of X:0. The turn of X:2 begins like the fun turn of X:2 from the previous batch, but the rest is horribly wayward.

Let’s take the first three measures of the turn of X:0, edit its 2nd bar and add to the tune. The 6th measure of the tune is annoying me, so Ima edit that (changing the 2nd and 3rd notes), and seed folk-rnn to compose the last 5 measures of my Millennial Whoop jig.

python sample_rnn.py metadata/config5-wrepeats-20160112-222521.pkl --terminal --ntunes 3 --seed "M:6/8 K:Cmaj G E G E 3 | A, C A, C 2 D | E G C E G c | B G A G E F | G E G E 3 | A, C D C 2 A | G E D E C D | D A, G, A, 2 A :| |: E G c G 2 C | E G d e c A | E G c B 2 A |" --rng_seed 3213 X:0 M:6/8 K:Cmaj G E G E 3 | A, C A, C 2 D | E G C E G c | B G A G E F | G E G E 3 | A, C D C 2 A | G E D E C D | D A, G, A, 2 A :| |: E G c G 2 C | E G d e c A | E G c B 2 A | G A A d c A | G A E C D G | A G E D C A, | G, A, C D C A, | C D E C 3 :|

X:1 M:6/8 K:Cmaj G E G E 3 | A, C A, C 2 D | E G C E G c | B G A G E F | G E G E 3 | A, C D C 2 A | G E D E C D | D A, G, A, 2 A :| |: E G c G 2 C | E G d e c A | E G c B 2 A | G C C E C D | E G c G C D | E G c A 2 B | c d c G E C | D E C A, 2 G, :|

X:2 M:6/8 K:Cmaj G E G E 3 | A, C A, C 2 D | E G C E G c | B G A G E F | G E G E 3 | A, C D C 2 A | G E D E C D | D A, G, A, 2 A :| |: E G c G 2 C | E G d e c A | E G c B 2 A | E D D E G A | E G c G 2 C | E G d c A G | E C A, G, A, C | D D D D 2 D :|

I tried several random seeds until I got some material that I liked. Both X:0 and X:1 are just messes; but the turn of X:2 is great save the ending.

Let’s take everything but that last measures of the turn of X:2, change the first two notes of its fourth bar, and tell folk-rnn to generate two endings.

python sample_rnn.py metadata/config5-wrepeats-20160112-222521.pkl --terminal --ntunes 3 --seed "M:6/8 K:Cmaj G E G E 3 | A, C A, C 2 D | E G C E G c | B G A G E F | G E G E 3 | A, C D C 2 A | G E D E C D | D A, G, A, 2 A :| |: E G c G 2 C | E G d e c A | E G c B 2 A | G E D E G A | E G c G 2 C | E G d c A G | E C A, G, A, C |1" --rng_seed 14 X:0 M:6/8 K:Cmaj G E G E 3 | A, C A, C 2 D | E G C E G c | B G A G E F | G E G E 3 | A, C D C 2 A | G E D E C D | D A, G, A, 2 A :| |: E G c G 2 C | E G d e c A | E G c B 2 A | G E D E G A | E G c G 2 C | E G d c A G | E C A, G, A, C |1 D E D D 2 E :| |2 D E C D C D |

X:1 M:6/8 K:Cmaj G E G E 3 | A, C A, C 2 D | E G C E G c | B G A G E F | G E G E 3 | A, C D C 2 A | G E D E C D | D A, G, A, 2 A :| |: E G c G 2 C | E G d e c A | E G c B 2 A | G E D E G A | E G c G 2 C | E G d c A G | E C A, G, A, C |1 E D C A, 3 :| |2 E D C A, G, A, |

X:2 M:6/8 K:Cmaj G E G E 3 | A, C A, C 2 D | E G C E G c | B G A G E F | G E G E 3 | A, C D C 2 A | G E D E C D | D A, G, A, 2 A :| |: E G c G 2 C | E G d e c A | E G c B 2 A | G E D E G A | E G c G 2 C | E G d c A G | E C A, G, A, C |1 D E D C 2 D :| |2 D E C C 2 B, |

After a few random seeds, I think we are nearly there! I am going to take the last ending of X:2, and then slap on an edited version of that rocking turn from above as a coda. Finally, we have The Millennial Whoop Jig!

T:The Millennial Whoop Jig C:Bob L. Sturm (w/ folk-rnn) M:6/8 K:Cmaj |: "C" GEG E3 | "F" A,CA, "C" {B,}C2 D | EGC EGc | "F" BGA "G" GEF | "C" GEG E3 | "F" A,CD "_C" C2 "G" A | "C" GED ECD | "Am" DA,G, "F" A,2 A :| |: "C" EGc G2 C | "F" EGd "G" ecA | "C" EGc "Am" B2 A | "G" GED "_D" DEF | "C" EGc G2 C | "F" EGd "_A" cA "C" G | "F" ECA, "_D" G,A,C |1 "G" DED D2 F :| |2 "G" DEB, "C" C3 | |: "8va on repeat" "C" GEG GEG | "F" AFA FEF | "C" GEG GEG | "F" AFD "G" D2 G, | "C" GEG GEG | "F" FAF AFE | "G" GEC D2 D |1 "F" CEG "G" cef :| |2 "F" ecA "G" GAB | "C" c6 ||

Now it’s time to learn to play it! Tomorrow I will have folk-rnn help me compose The Millennial Whoop Reel.

Update (Oct 29 2016): a few more edits, corrections to the harmony and what not, here is a different version: