cpressey / NaOpGenMo

National Opera Generation Month: spend (what's left of) the month of November writing code that generates a 2.5+ hour long opera.
8 stars 0 forks source link

Resources #1

Open cpressey opened 9 years ago

cpressey commented 9 years ago

Starting with some basic ones. Being a relative newcomer to the world of generative music, some of these will be crude/obvious/unvetted. Criticism of these resources, and pointers to better resources, by anyone with more experience, are welcome.

Wikimedia Commons and the Internet Archive both have some public-domain audio files. Some of these are even recordings of operas.

Free Music Archive has a search facility which lets you search by "remix allowed":

http://freemusicarchive.org/search/?adv=1&mood=all+moods&quicksearch=&search-genre=Genres&duration_from=&duration_to=&tempo=0&music-filter-remix-allowed=1

Mutopia has sheet music and MIDI files under various CC licenses (some of which allow remixing). (Their search does not seem to allow searching by license, however.)

Should you be looking for source material for your libretto, there are gobs of text resources listed in NaNoGenMo's resource issues.

moonmilk commented 9 years ago

Lilypond (http://lilypond.org/) is a somewhat intimidating score engraver that turns text files into beautiful PDFs. It looks scary but it's actually not too hard to get it to do simple things.

cpressey commented 9 years ago

@enkiv2 mentioned MIDIUtil as a way to generate MIDI files from Python. The audioop and wave modules actually come bundled with Python, I recently learned.

timbre.js is a library for synthesizing audio in Javascript/HTML5 -- see for example this demo

Csound, the FORTRAN of audio synthesis languages, is apparently on Github now (it wasn't last time I looked into it, but that was a year or two or three ago.)

ikarth commented 9 years ago

Overtone is a Clojure-based open source audio environment designed for live-coding.

There's some existing research into procedural music that might give some inspiration: Experience-Driven Procedural Music Generation for Games Markov Chain Music Generation in Clojure The Computer Music Journal (Subscription) A Stack Overflow Thread Otomata: A Generative Sequencer Book: Algorithmic Composition: A Guide to Composing Music with Nyquist An introduction to procedural audio and its application in computer games. http://www.procedural-audio.com/

Wikipedia: http://en.wikipedia.org/wiki/Generative_music http://en.wikipedia.org/wiki/Algorithmic_composition http://en.wikipedia.org/wiki/Computer_music#Computer-generated_music

cpressey commented 9 years ago

To dispel any misapprehensions about choosing a particular programming language: on Linux at least (and probably the *BSDs too), you can generate audio from any language that can write 8-bit-clean bytes to a file. Simply pipe them through aplay, which will treat them as a digital audio stream in one of many different formats. So for example, lua foo.lua | aplay -f u8 -r 8000 to treat the output as unsigned 8-bit levels, mono, 8000 samples per second. Seems to be popular as a technique for bytebeat (unsurprisingly.)

http://freesound.org/ has many Creative Commons-licensed samples. I just searched for "public domain" and got 1250 hits, but this isn't a license-specific search (they don't appear to support that, at least not in their UI.) They claim to also have an API and I have no reason to doubt them but I haven't looked at it yet.

cpressey commented 9 years ago

Oh wait, yes you can search freesound.org by license, it's just not grouped obviously in the "advanced search" in the UI. Here is a search for CC0 that returned for me 65626 sounds.

cpressey commented 9 years ago

Oh, I just found this: PUBLIC-DOMAIN OPERA LIBRETTI AND OTHER VOCAL TEXTS. Last updated 14 years ago, so I don't know how many of the links are broken, but I tried two at random and they both worked.

moonmilk commented 9 years ago

Sad to learn that the Web Speech API is not supported in the Opera browser. You'd think they'd make a point of it.

Jokes aside, also sad to learn that the Web Speech API in the Chrome browser doesn't support SSML (speech synthesis markup language), which would allow controlling pitch word-by-word. Doesn't look like Safari or Firefox do either. But there may be downloadable speech synthesizers that can be made to sing.

cpressey commented 9 years ago

I remember the Commodore 64 speech synthesizer S.A.M. came with a demo of it singing The Star-Spangled Banner...

eSpeak has an option to alter the pitch, but I just tried it and it does not provide a large range (from 0-99, and each of those steps sounds like it might be around a 10th of a semitone?) Its manual page suggests that it supports "some" SSML tags -- being completely new to SSML, I haven't tried this yet.

Interestingly though (possibly moreso for NaNoGenMo?), it has an option to dump the phoneme codes it chose:

$ espeak -x -v en "Hello world"
 h@l'oU w'3:ld
cpressey commented 9 years ago

Uh-oh. I just found this:

moonmilk commented 9 years ago

Josh Millard seems to have accidentally completed NaOpGenMo, though a bit late, with this christmas oratorio of infinite length: http://joshmillard.com/endlessjingling/