Musical Mesostic as generated by the Platonic Music Engine

March 3, 2016 10:28 AM

In case you haven't had your shot of modernist/postmodernist classical music today here is a musical analogue to John Cage's mesostic method of generating texts. Warning, the music starts off very softly and then has loud bits. If you listen carefully you just might hear something familiar embedded within the stream of notes.

John Cage pioneered a form of poetry and a means to generate poems/text called mesostics. The idea that evolved was to take a source text, like Finnegans Wake, make up a spine (a word of your choosing, usually the point of your text) and then search the source text for the letters making up your spine. When you come across a letter you then write down the word containing it (and some of the surrounding text). You then search for the next letter and write down its words on the line below.

Cage generally formatted his text by centering everything by the spine letters and putting them in caps. Here's an example using Finnegans Wake and the spine "Joyce"
    Just a whisk
    Of
 pitY
   aCloud
in pEace and silence
So I decided to create a musical analogue to Cage's mesostic using my ongoing project the Platonic Music Engine. The PME starts with input from the user like a name or birthday or anything and generates a piece of music from this called the Platonic Score. The Platonic Score does not try to sound conventionally musical. The software then gives you many different ways to shape the Platonic Score probabilistically into sounding however you want.

It does this by using weighted quantization and also through something I call Style Algorithms. Style Algorithms are complete musical ideas coded into the software. Like a Bach 2-part Invention or simple guitar chords or any musical style idea that has ever existed or will exist (for which the code has been written). You can find several more examples of this on the website listed above.

So I created a Style Algorithm to generate these Musical Mesostics (John Cage eventually used software to search his source texts looking for mesostics). But how does the mapping work?

The PME is great at generating a ton of random-sounding notes (they sound random but are all directly derived from the user's initial input). I then figured that a good spine would be some melody of the user's choosing.

The software searches through that stream of notes and whenever it finds a note from your melody that note becomes part of the spine.

But how to make this clear? I decided to make the surrounding stream be very quiet (pppp) and whenever a spine note is found to make it loud (ff).

In the example above the initial user input is "Metafilter" and the spine is the famous opening to Beethoven's Fifth Symphony (da-da-da dummmm, da-da-da dummmm).

One cool thing about the PME is that it doesn't just generate music in every musical style imaginable but it also produces sheet music (and even graphic notation).

I created three ways to display the sheet music for this Style Algorithm. Each method colors the spine notes red. The first is just straight forward with no special formatting. The second tries to mimic Cage's text formatting by having the spine notes in the middle of the line. Unfortunately it's nearly impossible to automate a process to keep them centered so I didn't do that. The third method, and the one I'm linking to from here, is more of an acrostic style with the spine notes printed at the beginning of each line.

Here is a link to the sheet music as a pdf.

But we're not done! Now for the interactive part! Since this is a low volume part of Metafilter I thought I'd offer to create musical mesostics for anyone who happens by. Just supply a melody (it must be public domain or licensed using something permissive like CC) with the notes. You don't need to provide the durations or the octaves (things the software will ignore anyway) but just the notes. For example for the Beethoven spine it is: g g g e f f f d. And if you provide an initial input (the seed that generates all the music) I'll use it otherwise I'll default to using your user name. If you can't read music don't sweat it. If the piece is in the public domain I can probably find the sheet music and will take the notes from there.

It's really easy and quick to generate these things but obviously I'll only be able to do it while I'm online and following the requests (if any). I'll post links to the audio file and the sheet music in the comments.

So here's your chance at some personalized poetic modernist/postmodernist classical computer generated music!

posted by bfootdav (6 comments total) 3 users marked this as a favorite

Oh man, do my username please! And Jessamyn's too if it's not too much trouble.
Melody/spine: the first however-many notes of Happy Birthday, now that it's public domain.

I can only kindasorta wrap my brain around what you're doing, but I think I get it, and can appreciate it from a "user input + algorithm = new yet familiar sound/text" perspective. One thing I'm unclear about: how does the word map onto the melody? Does it use each letter as a cue for an algorithm for finding a particular string of notes, or a pitch or length or volume of a note?

Maybe I should read this again sometime that's not "right before I fall asleep."
posted by not_on_display at 12:39 AM on March 4, 2016 [1 favorite]


It's all done! But first, there's a little plastic bead stuck in my headphone jack so I can't listen to these(!). Let me know if the music is off or doesn't match the pdfs.

not_on_display: Happy_Birthday_not_on_display.mp3 and Happy_Birthday_not_on_display.pdf

jessamyn: Happy_Birthday_jessamyn.mp3 and Happy_Birthday_jessamyn.pdf

One thing I'm unclear about: how does the word map onto the melody?

The word (y'alls names) is turned into a 64 bit number via a hash algorithm. This number then becomes the seed for a pseudo random number generator (specifically I use pcg). In case you don't know, pseudo random number generators look to the eye and (at least this one) under mathematical analysis like they produce entirely random output, but the don't. In fact it's entirely deterministic. So if you use the same seed every time you will get the same results. But since your names result in different hashes/seeds this means the numbers the algorithm generates are different and unique (within like billions of runs) to each of your names.

The generated data then becomes the pitch number, duration, and volume for each note. If you look at the two scores above you will see that the notes are different even though I used the exact same parameters for each run -- the only difference being the seed.

I set the software to generate 600 notes to make sure I could fit the whole melody in there. The software then goes through and picks out the actual melody of the song to highlight with the higher volume and red note.

I also quantized the generated music to just use two octaves and only the notes in G-major thus making the notes from the melody occur more often than had I just used the entire range of the keyboard. Ok, I accidentally posted them and am now editing in the 4 minute window.

Hopefully it all works and if I need to add to this answer I'll add another comment. Sigh.
posted by bfootdav at 1:55 PM on March 4, 2016 [1 favorite]


Hey, thanks! That was fun!
posted by not_on_display at 6:21 PM on March 4, 2016


Cool!

How about my user name to Erik Satie's Gymnopédie No. 1?
posted by ageispolis at 4:28 PM on March 8, 2016 [1 favorite]


And ... done! Nice choice! I only included the first two phrases but if you want the entire piece I can do that but it might run long. And in case it wasn't clear from all my text above this is only the melody -- this particular Style Algorithm cannot handle chords.

Gymnopedie #1: mp3 and pdf of sheet music.
posted by bfootdav at 7:24 PM on March 8, 2016 [2 favorites]


Amazing! Thank you.
posted by ageispolis at 4:59 AM on March 9, 2016


« Older Pool Rules   |   Beach Pajama Party! Newer »

You are not logged in, either login or create an account to post comments