NaNoGenMo / 2022

National Novel Generation Month, 2022 edition.
51 stars 0 forks source link

Generative opera #17

Open nhthn opened 1 year ago

nhthn commented 1 year ago

Not a novel since it definitely won't reach the word count, but I feel it's in the spirit of the challenge to make at least two hours of music. I plan on having a mixture of algorithmic and handwritten elements.

For vocals I will be using OddVoices, a free and open source singing synthesizer for English that I developed. For instrumentation I plan on synthesizing everything in SuperCollider.

hugovk commented 1 year ago

Indeed, there has been a NaOpGenMo (National Opera Generation Month) in 2014 and 2015! But please do continue!

cc @cpressey

cpressey commented 1 year ago

🧑‍🎤 !

nhthn commented 1 year ago

I've completed a short handwritten overture. I experimented with two versions, one using SuperCollider and synthetic instruments, and one sequenced in Reaper using orchestral samples (using Sforzando and the VSCO library). The latter was more "realistic" in the sound design sense but sounded lifeless and generic; it felt like I was writing someone else's music. SuperCollider instruments have a rougher and more analog sound that I've come to like.

I wrote a program that sets a given text to music in a recitative style. It uses cmudict to determine stress patterns for input text, then generates a rhythm that ostensibly sounds close to natural speech. It takes advantage of the fact that English is considered by linguists to be a "stress-timed language" where the temporal distance between stressed syllables is roughly equidistant, and the unstressed syllables are filled in like musical tuplets. In reality the rhythm fails to sound entirely natural in ways I think are interesting. The libretto itself is handwritten for now, but I am open to generative text.

After writing the rhythm generator, I wrote a simple melody generator that draws randomly from a bank of pre-written phrases, based on my philosophy towards algorithmic melody generation that I've been developing for a few years now.

Originally I was going to output a MIDI file, but I had trouble finding a Python MIDI file library that I liked. Instead I went to OddVoices and wrote a long-overdue feature that accepts a bespoke JSON format for entering note events, which is much nicer than shoehorning everything into MIDI files, which to my understanding are an aging file format.

I wrote a patch that generates drones and ostinati to generate an accompaniment to the recitative, but I don't like it that much. A friend sent me a Debussy opera (Pelleas et Melisande) that uses call and response between the vocalist and the orchestra, which is giving me some ideas.