# The composer's code

As you pore through an old book on famous composers, you find an interesting passage.

It wasn't until the American Revolution that this note was found locked in a drawer. It had been taken from the composer's manuscripts and smuggled across the sea to the then-colonies. American intelligence tried to figure out what the message said, but could not. One man was confident that the message had crucial information to their winning the Revolution in mere days but could not break the code.

GYPUVXOLIHPFCHYLUMYGSQQEIYOZUOHUCIHUVKIIYNWMXNDPAKEVWSRUKTLBVUHIR


What did the code say?

Hint 1:

The composer in question is Johann Sebastian Bach...

Hint 2:

... Or at least he would have been fifty years ago.

Hint 3:

This code is based on a particular piece of music.

Hint 4:

That piece of music is popularly misattributed to Bach.

• Maybe the code said "these are just random letters. do not believe them"....:p :D – manshu Jan 7 '16 at 21:41
• @manshu No. ಠ_ಠ – Arcturus Jan 7 '16 at 22:10
• "If you had been fighting instead of decrypting this, you would already have won..." – SJuan76 Jan 7 '16 at 23:45
• @SJuan76 No. ಠ_ಠ – Arcturus Jan 7 '16 at 23:59
• Had the encryption method being used really been invented before the American Revolution? – S.C. Jan 8 '16 at 2:43

Having seen Mr. Holland's Opus, I remember the part where he's explaining to the kids that the song "A Lover's Concerto" used the melody from Minuet in G Major. I also remember hearing that it was really written by someone else (googling this bit shows me that it's now attributed to Christian Petzold).

So if we transcribe the melody below the string of characters, we get:

GYPUVXOLIHPFCHYLUMYGSQQEIYOZUOHUCIHUVKIIYNWMXNDPAKEVWSRUKTLBVUHIR DGABCDGGECDEFGGGCDCBABCBAGFGABGBADGABCDGGECDEFGGGCDCBABCBAGABAGFG

And using that as a Vigenère cipher gives us

CROSSTHEDELAWARERIVERONCHRISTMASBEATTHEBRITISHWITHASURPRISEATTACK

And finally split up properly:

Cross the Delaware River on Christmas beat the British with a surprise attack

• Nice work. I figured it was the minuet, but the key idea never occurred to me. This key is, however, an oddly mixolydian rendering of the melody! – phoog Jan 11 '16 at 19:52
• @phoog Yes, it is mixolydian. I wondered if the sharp was going to affect things in some way, but was only going to worry about it if the Fs were giving me bad data. – Joel Rondeau Jan 11 '16 at 19:57
• Could you please explain how to reveal the string DGABCDGGECDEFGGGCDCBABCBAGFGABGBADGABCDGGECDEFGGGCDCBABCBAGABAGFG? I don't quite get it. – S.C. Jan 12 '16 at 2:57
• Those are the notes in the melody. Google Minuet in G Major, view images, and pick onlinesheetmusic.com. Ignore the bass clef and the additional notes above the staff. Do not ignore the B in measure 8. Stop when you have the same number of letters as the puzzle. – Joel Rondeau Jan 12 '16 at 3:06
• To make sure you get the right minuet, better Google Minuet in G Major Petzold. – Rosie F Aug 18 '16 at 18:08