"cgMusic", Computer Composed Music

Hectate

  • *
  • Posts: 4643
I was discussing this program with Wareya earlier in the IRC channel. I thought other people might be interested in hearing about this program. One caveat, I believe that it is Windows-only and the output is MIDI (although that can be converted or even edited afterward using other software). I would have used this during past Game Jams but it doesn't launch on my laptop (works fine here on my work PC though). It doesn't produce loops (although one could edit the output to create loops) and the instructions are not in English.

cgMusic (http://codeminion.com/blogs/maciek/2008/05/cgmusic-computers-create-music/) is a simple program that will generate a fairly wide variety of music for you using a scripting language (angelscript) and random seeds. The generated composition can be further altered by changing settings, seeds, part order, and/or algorithms - as well as expanded by adding more parts and repeats. I highly suggest clicking the link above to read the designer's blog post about it, as well as to hear some samples of what it can produce. The download is also located at the above link.

I have a few notes and suggestions to impart to you from my fiddling with the program...

1. Changing random seeds of any algorithm can have a drastic impact on the output - if you have something that you like (or even are just partially interested in) be sure to either save or at least make a note of the seed and other settings before making other changes. I've got a text file that I use to keep track of seeds and other combos that I like.

2. Changing the arrangement and tempo after creating a song is a great way to take the same melody and song structure and make something different but still familiar. An example would be to use the "Latin" arrangement for something bright and cheerful (say, in-town scenes of a RPG), and then switch the same composition to "Piano (Boogie Woogie)" with a higher tempo to get a more frantic feeling (battle scenes?).

3. It's not immediately obvious, but the "Struc" (Structure) tab has a lot of options. If you left-click on any of the cells you can change the order of the parts, how they sound, their individual tempo (good if you want to vary it within the song between parts), their key, and even the "voice" that is used for that particular part. All those changes don't effect the individual parts which each have their own tab for changes.

4. Remember that the output can be very random and not be acceptable. The melody itself often falls into this category since that's the most difficult part to teach a computer how to compose. Like anything "procedural", not all potential compositions are good ones. But since generating them and listening to them are easy, just keep trying until you hear something you like - even just a small part that you like.

Finally, here's a .cgm attached (the save file it creates) of a Dance arrangement I created with this program a while back. There were quite a few tweaks that I did to this - it's all about experimenting! Try listening to it, and then changing the arrangement algorithm and listening again to hear how it stays similar, but how much it changes also. Cheers!
:
:
Patience is a Virtue,
But Haste is my Life.
Proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.

Joe

  • *
  • Posts: 2478
I used this for the song in Hatched. It took me less than an hour to create a MIDI, tweak it, and render it with GarageBand. This software is fantastic for putting together a song in a jiffy.

Chibicat

  • Posts: 74
I just tried it, kinda hurts the ears, lol. I think it's a start, you can import them into another program and change the sounds. I tried using VST's and it didn't sound half bad.

Joe

  • *
  • Posts: 2478
I just tried it, kinda hurts the ears, lol. I think it's a start, you can import them into another program and change the sounds. I tried using VST's and it didn't sound half bad.

Yeah, MIDI files are like sheet music for your computer (they'll sound different depending on your sound card), so it's only meant as a starting point. Soundfonts, VSTs, etc. should be used to get something that sounds good and that can be used in Stencyl.

AvistTorch

  • Posts: 36
This is very interesting.  Thanks for bringing this to my attention. 

EDIT: Very, very interesting.  Might be just the thing I need to get my mind flowing again.
This thing is truly amazing.  Its raw output isn't good more most purposes, of course, but it's good at creating a "backbone".

« Last Edit: May 13, 2011, 03:37:06 pm by AvistTorch »
Current Projects:
Battle Lines Zero: The Sargonian Wars (Status: Engine-building)(Genre: Tactical RPG or Turn Based Tactics)
Project "PARTS" (Status: Early spriting/engine-building)(Genre: Real-time strategy)

Jon

  • *
  • Posts: 17524
This peripherally reminds me of the music generator that Wolfram (the creator of some math software) made.

http://tones.wolfram.com/generate/

Luyren

  • *
  • Posts: 2807
Oh great, at least this sounds like music! It sounded better than I expected.

[offtopic]
Last semester a chamber orchestra was quickly put together to play an algorithmic composition. I don't know if this is how it's called in english, but it's like this software, compositions made by a computer program.

That thing didn't sound good at all, nobody even tried to play in tune, with all the shifts and jumps in the "melody". Most of the orchestra members where the teachers, and even they didn't like it. Sure, we have a lot of weird stuff if we try to play modern or contemporary music, but that was insane!The most frightening part is that we only played the first movement. God help me if I ever have to play the other movements. >_>

So yeah, I don't like much the idea of computer generated music, but I'm glad this program can make something nice to hear.
[/offtopic]
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

Strasteo

  • Posts: 323
This is cool. Definitely a start for a song, and I can see the benefits of using it. I think that composing on your own is still the best route however if you already have a good idea of melody and structure for a song and have an affinity for music-writing.

Still, something I wouldn't mind tinkering around with.