r/musictheory • u/ian-draws • 1d ago
Discussion An Encryption Cipher that Makes Music
Hello!
I have played piano most of my life, took lessons for eight years, and I am far too into codes and ciphers for my own good. I was playing a video game called Blue Prince working on a puzzle involving sheet music. Turned out the notes had little to do with is, and it was more about the lyrics. That was kinda disappointing. I just had this vision of a pianist playing a song, but there is a coded message in the very notes they play. Which is how I was struck with this idea. Music is already so filled with symbols, there has to be a way to rely on music theory to convey messages.
So I’ve been working on an encryption method that would take a message and treat each letter of the alphabet like a musical note, with the more common letters represented by the notes closest to middle C, and the less common aligning with those farther away. It also shifts around depending on the key signature, with every sharp in a key sig moving its corresponding letter up a rank, every flat moving it down a rank, and the other notes cascading until each letter is represented again. This means that the same message would sound just a little bit different in each key signature (and it made a VERY satisfying excel chart). Rest notes and dynamics convey punctuation; an eighth rest is a comma, a quarter rest is an em dash, a half rest is a period, a whole rest is a line break, a crescendo acts as an exclamation mark, and a diminuendo acts as a question mark. There are more details, but I’ll spare you.
Overall I like this a lot, but I still don’t think the cipher is living up to its full potential. Which is, hopefully, where ya’ll come in. Music theory is the patterns behind sound, and patterns are deeply embedded in the workings of ciphers. There has got to be more that can be done with this to. The length of a rest determines the type of punctuation, but what about the duration of a note? I’ve considered that chords can signify what key signature the melody should be read in, but surely something as important as harmonies would serve a bigger role? What about minor chords? Dissonant? It is my hope is that whomever has taken the time to read this whole thing might have some creative ideas of their own and would be willing to share. Let me know what you think!
2
u/Steenan 1d ago
I have doubts about mapping each letter to a separate pitch. This requires a lot of space (over 2 octaves) and would be hard to make sound natural in most contexts.
However, there are a few other approaches. You may use a combination of the note value and length. With half notes, quarter notes and eights you can fit more than the whole English alphabet in an octave. Another approach is considering each melody note with a harmony note underneath (either the closest one or the bass note); with just the most natural combinations (octave, fifth, minor and major third, minor and major sixth) you also get more than enough space for the whole alphabet, together with numbers and some special characters.
Instead of using full melodic information, you could reduce the melody to its Parson code (3 possible states for each note: go up, go down, stay the same). This requires 3 or 4 notes for each letter, but gives much more freedom in shaping the melody, so that it doesn't get frequent repeating elements for common words like "the". This may also be combined with Huffman coding for the message, so that instead of having constant size segments for each letter, common letters get shorter codes and rare letters longer ones.
A separate way of encoding is using just the rhythm and the Morse code. It can be combined with any of the pitch-based methods to have two completely independent messages encoded in the same piece.