Cellular Automata and Music Using Java
Justin Powell writes "Take computers, mathematics, and the Java Sound API, add in some Java code, and you've got a recipe for creating some uniquely fascinating music. IBM Staff Software Engineer Paul Reiners demonstrates how to implement some basic concepts of algorithmic music composition in the Java language. He presents code examples and resulting MIDI files generated by the Automatous Monk program, which uses the open source jMusic framework to compose music based on mathematical structures called cellular automata."
Lets hope it sounds better than DNA music. That was tried a while ago and was horrible.
Josh
I really love this stuff and I'm just finishing my master's in music technology (go figure..). This isn't the first time I've seen CA in music. I know for sure of a cell examples in Max/MSP, PD (Pure Data), and Common Music.
I don't see any real benefits for doing this kind of task in java. It's very nice having another option, but are there any reasons to use this software over the other very good options? I am much more excited about the possibilities with ChucK.
It's nice and all but I don't see how there is any real control of the product. Like most other computer generated music it is must fiddled with until something pleasing accidently resulted, right? I probably just missed something.
vampirical
a teacher/performer/artist/programmer at my school did a performance at arstechnica called 'cell phone symphony' where he used the audiences cell phones to make music! Each person sat in one chair, mapped to a grid on his computer. They got special phone connections with the phone company to dial a lot at once. They got a big projector to projet over the audience, and had a spotlight (of sorts, from the projector) pop up on someone when their phone rang. The whole audience watched via a big mirror.
heres the wired article.
I've got old skool sound effects right here. The whole game fit in 4K, even won the 4K Java Game programming contest.
It requires that you have Java installed in order to play. It doesn't work on Linux, tho. Sorry. Complain at Sun to get full screen mode working on Linux.
Javascript + Nintendo DSi = DSiCade
The RIAA announced today that they will be using this technology to phase out recording artists altogether. CDs will still cost $16.99, though.
Unknown host pong.
so, computer generated music sounds like... well... computer generated music.
;)
or maybe like a four year old banging on a keyboard.
although, does that mean the program has intelligence equivalent with a four year old human?
Could it be?
... sentimental songs which were composed entirely by mechanical means on a special kind of kaleidoscope known as a versificator." --Orwell's '1984'
"Here were produced
Unknown host pong.
If you like that, try this: Fractmus 2000 (win32)
this sig limit is too small to put anything good h
Interesting, though I used Java to visualize symmetrical structures in the music of J.S.Bach. I used stereoscopic 3D (with OpenGL) and 4-channel 3D sound (with DirectSound3D) to 'virtually' present the 4-parts: Soprano, Alto, Tenor and Bass, flying around in 3D, not just visually, but aurally too. It was exhibited 2 years ago.
www.rexguo.com - Technologist + Designer
I can't wait to hear these new Java-written MIDIs on Geocities pages, complete with leet spinning skulls and black background...
Trolling is a art,
..to code in Java: There are very nice libraries that take care of the plumbing for you and help you write clean code faster. In this case, the library in question is jMusic.
I'm sure Chuck is awesome (it sure looks cool yet daunting), but as a java coder by day and a musician by night, I'm rather intrigued by jMusic myself.
All one has to do is click the midi link to realize that the tinkering of a first year piano student could easily be mistaken for a celluar automata.
My personal preference for coding this kind of thing:
KeyKit, an awk-like language designed specifically for manipulating MIDI data.
http://nosuch.com/keykit/
Remember .mod files? I always thought mods were better than midi because mods usually had some sort of voice while midis were usually solely instrumental.
Yes! I listen to NYC Speedcore and do math at 3AM. I suggest you try it too.
Did I miss something...
Mathematically based pattern gerenation mechanism applied to midi format produces repeating rhythmic sounds.
(don't forget the subjective addition: "that sound bloody terrible!!")
My god, this is so amazing...
Maybe if we hand tweak the pattern generation mechanism enough...we could get it sounding like... REAL MUSIC!!
Sorry, call me when you can approximate dance music, the most basic of rhythmic beats.
I apologise for the cynicism, third (or so) computer gen'ed music article that was distinctly average here on slashdot.
Okay, this risks being called a bit off topic, but it's so cool (and reasonably relevant) that it has to be mentioned. Dot matrix printer music by this group The User has been around for awhile. It's not algorithmic music, but by printing strings of characters simultaneously to different dot matrix printers they make some pretty interesting sounding stuff.
Tell me when it starts believing things for me...
%diety bless Douglas Adams
...might be interesting. Play a note at random, choose a note based on the weighted probability of the next note in a corpus of music, then use the first two notes to figure out the weighted probability of the third, and so on.
Then if you go out four notes and only one note has any probability of being the fifth in that series, drop off notes from the beginning of the string until there is more than one possibility and continue. Something like:
1
12
123
1234
(note 5 always follows notes 1234, so drop the 1)
(1)2346
(1)23467
(note 8 always follows 23467, so drop 2, note 8 still follows 3467 so drop 3, then there is more than one possible note)
((1)23)4679 {etc}
Then the music would probably sound really familiar, but just about the time you catch on it segues into another pseudo-familiar tune.
damn, this man was insightful. he wrote about an internet-like structure describing the network of the h2g2 book, but he did also describe (at a very detailed level) how to create and use this kind of sound "tools" in his "dirk gently" novels.
i mean, just read what he wrote about computer interfaces in h2g2 (when ford is breaking into the hq). adams was damn smart and way more funny than clarke.
but did you know that adams did not invent this style of writing sf? read "the star diaries" by stanislaw lem. funny. uh... just read anything written by lem. you think clark or heinlein novels are great? just as an example, do you wanna know where the matrix authors stole the idea of these human-driven fighting robots? "The Invincible".
beer as in "free beer"
Who owns the copyright of the computer generated music? The programer? The user? The machine?
jmusic has nothing on the facilities offered by the programs mentioned in the parent. PD is an incredible environment for experimental music composition.
I while ago I did my own experimenting with Java generated fractal audio. I took a different approach - using the fractal data to produce raw samples rather than MIDI notes.l /
I wrote it up at this page: http://homepages.paradise.net.nz/~andrew-1/fracta
(you will need a recent JVM from SUN to use the applet)
After following some links, here's some cool human-assisted mathematically-generated music:
;)
/.'d already =)
http://www.geocities.com/vienna/9349/
The first prime number and pi midi files are awesome
Might hafta wait til tomorrow tho - looks like the guy's geocities account got
Homonyms are fun!
You're driving your car, but they're riding their bikes there.
http://sjsu.rudyrucker.com/~karl.schramm/applet/
I suppose it's all in the ear of the beholder or something. Ah well.
Is it fascism yet?
This reminds me of the CDC computer that played classical music utilizing the speaker in the console via program loops, also
The card reader reading cards at the appropriate time
The tape drives rocking tapes and loading/unloading the heads
The disk drives clicking head carriage locking solenoids
The card punch punching a few cards in rhythm
The line printer printing the cadence
Listening to Mozart, Bach etc. was quite an experience in this manner. Unfortunately we did not have the source code.
Of course, back in those days we did however sit closer to the machine code than one typically does presently. So it was possible to list it and see how it did what it did.
The cpu timing cycles (core read & write) was accomplished with a delay line and sending a "0" pulse down the coil with various taps located at the appropriate distance to perform each timing step in order.
And in the end, the love you take is equal to the love you make
At uni a couple years back my mates and I found this one temp file on the solaris server in /var/tmp that made a rather awesome repetitive tune. Seriously we all used to play it and it'd get stuck in your head so bad :)
/var/tmp > $AUDIODEV
cat
=)
Homonyms are fun!
You're driving your car, but they're riding their bikes there.
Wow - my best friend is one of the developers of jMusic! It is an open source music synthesis and composition package written in java. You can download the latest version from sourceforge.
:)
or you can get it from the jMusic web site:
http://jmusic.ci.qut.edu.au
jMusic has been used for many other very weird and wonderful things like elevator installations, and many electronic performances. It does heaps of stuff including Markov, gendyn, granular and particle synthesis, dance music and much more
Saying your OS is the best because more people use it is like saying MacDonalds make the best food
This is cool, but I'm guessing the results won't be very...well, great. Theoretically you could construct every bit pattern for say, 1 MB - 5 MB, capturing the typical encoding of an MP3. Then, you select each byte pattern that sounds good. You would in fact "create" every song that has ever been encoded into MP3 format between 1 and 5 MB. The only problem with this is you are creating more byte patterns than there are protons in the universe, so this is of course practically impossible. It doesn't stop with music either. Anything that can be encoded digitally can be "created" this way. Obviously this cannot happen, not with what we know of anyways, so it's pointless. But it is interesting none the less to think that everything you see, hear, use etc in the realm of digitazion can be created with a simple NFA or graph set to take each "path" and then decode what's viable, etc. Perhaps I should create this algorithm and claim all information withen a certain byte range, sueing for copyright infringment anytime something is created on a computer, as my algorithm has created it already. It's interesting to think about how we get to "create" a finite path in a DFA or byte graph that really already exists, but we need to "find" it.
"If you are a dreamer, a wisher, a liar, A hope-er, a pray-er, a magic bean buyer
I can imagine Darl McBride runs it day and night to make and release a "music compilation CD" that consists of 100,000,000 different music patterns and develops a patern comparison program to sue some upcoming musician.
Seriously, heard it, and it sounds better than monkey punching keyboard as it has some rhythm and cycle, but still, calling it "music" is wild use of the word. What's the point of "Using Java"?
The terrain-mapped music in that game didn't sound totally awful.
Hmm seems to be working now...
Homonyms are fun!
You're driving your car, but they're riding their bikes there.
It's a hoax, this is obviously music from a bossfight in one of the castlevania games..
OK not really, but listen to it!
Sigs? We don't need no stinking sigs!
Autonomous Monk sounds like a forced play on words on the name of jazz great Thelonius Monk, though I doubt that he would have thought much of the resulting music.
I'm puzzled why the poster referred to the title of the guy as "Staff Software Engineer" as if it's something special at IBM. Not to denigrate the work he's done, but 'staff engineer' is not worth mentioning. In context as seen from an IBM Engineers perspective (I'm also staff, fwiw) it's pretty funny that you would even include it. Here's the ranks for those that might care:
Band 1-5: The non-technical types.
Band 6: "nothing" Engineer (new hires)
Band 7: Staff Engineer (basically, you get staff in your first few years at IBM unless you're a total moron, and if you DON'T make staff at some point they basically have to promote or fire you)
Band 8: Advisory Engineer (most IBM engineers spend the bulk of their career as advisory)
Band 9: Senior Engineer (the fastest I've seen senior made was 10 years, and it's typically 15+ before you get to senior)
Band 10: Senior Technical Staff Member or STSM (most engineers at IBM never make it this far)
Band 11: Distinguished Engineer (you have to walk on water and have saved entire villages from destruction to get to this, you basically do whatever you want with a huge budget and work on only the coolest stuff)
Band 12: IBM Fellow (you are the uber shiznit, report to the execs, and the world is your oyster)
Look at this as an insight into the workings of the hive mind at IBM. We are the borg, yada yada yada.
In '97-'98 I wrote a bunch of music theory training programs for the Music department at my school (they eventually became this website), and I tried out MAX first before I went with Java. MAX was far better equipped to handle the music-related requirements (anyone remember Java 1.0.2?). But with Java I could put my applets online, run them on any OS, and (biggest bonus) get some serious experience in a language that would get me my first job when I got out of college. Learning a new language to a level where you can tackle an ambitious project is a big investment. There are a lot of musicians and composers with day jobs as developers (like me) who want to be able to leverage what they already have, if feasible. And nowadays, Java has pretty good support for audio, as general-purpose languages go, so many projects wouldn't be giving up much to use Java.
Here are a few snippets from the jMusic website that suggest why they chose Java for their project:There are more hints at this in the intro of the article, as well.
There are only 10 types of people: those who understand decimal, those who don't, and, uh, 8 other types I forget.
I thought you might have had a point, up until I saw the Tori Amos bit. That can be generated by kicking a cat in the nuts.
From the site:
Mathematical Proofs Set to Music I added this web page just for fun. While looking at some proofs, it occurred to me that their structure resembled musical scores, so as an experiment I decided to see what they sounded like. Essentially, the musical notes correspond to the depth of the proof tree as the proof is constructed by the proof verifier. A fast higher note is produced for each step in the construction of a formula. A sustained lower note is produced when the formula is matched to a previous theorem or earlier proof step, to result in a new proof step (which corresponds to a proof step displayed on the Metamath Proof Explorer page that shows the theorem's proof).
All science is either physics or stamp collecting. Ernest Rutherford (1871-1937)
I'd suggest that interested folks check-out http://www.sseyo.com to see a completely different approach to creating generative music, using SSEYO's Koan music engine, which is actually aimed at deploying mobile devices. The site lets Windows users download a plugin/Active X that allows you to listen to some of the interactive sounds/music, and play with the demos, including the awesome "Do The Space Shake" :)
Another program (written in Java incidentally) which among other things generate music: Grammidity
It works on the "evolve" principle where you "mate" two objects, and then let either the user or some algorithm decide which of the children are most successful and can evolve further.
Being bitter is drinking poison and hoping someone else will die
where the "hero" created a software to render companies earning report into music, and had it as their best selling soft and main revenue source - just after the software to create spending justifiction that was licensed to various governemental agencies ....
damn memory ! anyone can contribute their 2 cents and help me upgrade ?
It takes 40+ muscles to frown, but only four to extend your arm and bitchslap the motherfucker
before i can tell it to play something i know? or ask it to
play some skeeneerd?
Then we can expect all the compositions to be adagios? ;)
See Musitives , which uses Java to generate music from pictures.
The question is: can the cellular automata still be alive when Java is dead?
Expanding a vast wasteland since 1996.
I'll bet the tempo will be adagio.
The universe is made of stories, not atoms.
(Muriel Rukeyser)
A song ain't nothin in the world but a story
just wrote with music to it. (Hank Williams Sr)
music is composed of notes and sounds, yet they are
the substance of expression, and not the music itself.
stories -- you love someone, they leave, you feel loss, pain, grief.
something happens, you're happy, joy, love - your father may
aggravate you, you have an argument, you try and listen,
you resolve it; you find a friend, you get along, because of
empathy of points of view -- our lives are composed of stories.
in the happy and the sad, in the alternation of major
and minor notes, the making and leaving of spaces,
in the harmony and disonance, sympathy of feelings
aroused by the experiences in story of our lives gives
rise to stories in the expression of music.
music - like fairy tales - doesn't tell the story in a realistic
photographic form, but tells the story from the emotional aspect.
empathetic sympathy and identification with ones own story and
life experience within the sequence of notes gives rise to
enjoyment of a song.
while algorithms provide a structure that is used by
musicians in telling their stories, good music comes from
the expression of these experiences, and the greatest
musicians were able to do this with the greatest eloquence.
an algorithmic pattern may certainly be the producer of
a sequence of notes in time -- in which one can find
more or less musical pleasure depending on what one
brings to it -- yet without a life history of experience to
inform these notes with stories -- the music is left dead
and lifeless -- the facade of song -- a charade of music;
and that is true of any music that isn't played with FEELING
behind it.
All one's life is music, if one touches the notes rightly, and in time.
(John Ruskin)
A few years back, I brushed the dust off of my old Amiga, powered it on, and recorded a few good songs produced from this generator.
I have posted several MP3's of sample output on this website, and some of it rivals some of the garbage coming out of the Dance Top 40 as of late.
http://www.maokhian.com/music/
Algorithmic music systems go back at least as far as Mozart. Composers made up algorithms to generate tunes with some sort of randomization (e.g. dice) to make key decisions.
The man who never alters his opinion is like the stagnant water and breeds Reptiles of the Mind -- William Blake
Meant to post this earlier--there is a site featuring some pretty cool "algorithmic jazz" pieces by John Clavin here
http://www.algorithmicjazz.com/
The compositions (computer programs) are written in Java and use the Jsyn software engine. (Plug in available on the website)
Best quote:
"The soul of the machine is the collection of algorithms that give it life."
There are three pieces of varying complexity--mood music for sensitive robots, methinks.
---mike