Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411474 Posts in 69369 Topics- by 58423 Members - Latest Member: antkind

April 23, 2024, 12:42:41 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperAudioGenerative Music
Pages: [1]
Print
Author Topic: Generative Music  (Read 2848 times)
Feral_P
Level 1
*


View Profile
« on: December 04, 2010, 09:59:49 AM »

Or at least I think that's the right term for it.

Basically, I want to procedurally generate music, on the fly. What I'm looking for is a library that works with c++ (preferably as portable as possible, although just windows will do) that allows me to do this; ideally one where notes are already part of the library (or generated by it), so I don't have to record them all myself and play them back.

Any help would be appreciated Smiley
« Last Edit: December 04, 2010, 01:23:22 PM by Feral_P » Logged
s0
o
Level 10
*****


eurovision winner 2014


View Profile
« Reply #1 on: December 04, 2010, 11:37:58 AM »

I don't know of any C++ libraries, but the guys at Maxis integrated Pure Data (an all-purpose music/audio programming language) into Spore to generate the music. As far as I know, they let Pd generate MIDI events which were then interpreted by the game's audio engine. Pd also has internal sound but they didn't use it for whatever reason.
Logged
dkanaga
Level 0
**



View Profile WWW
« Reply #2 on: December 04, 2010, 06:54:32 PM »

I was wondering something kind of similar a while back (but also wanting do real-time synthesis), and got some good responses/ideas here: http://forums.tigsource.com/index.php?topic=8420.msg351982#msg351982

Ultimately, for that game, we ended up just using Processing and SuperCollider mashed-up together...

Anything more specific about this project your working on? I love this kind of stuff Smiley
Logged

Feral_P
Level 1
*


View Profile
« Reply #3 on: December 05, 2010, 01:51:53 AM »

Yeah, my first post was a bit brief. I chose to write and post it about five minutes before I had to leave, so it was kind of rushed.

I downloaded 'musagi' - music making software - and promptly realised I'm no musician. But I'd like to, for this project at least, do everything myself and, since I have a fetish for procedural generation, I thought I'd try to do it that way.

I'm not settled on the theme yet, but the music will most likely be dark ambient, with maybe sci-fi leanings.

As far as the library goes, I just want something I can use to generate and play music while my game's running. Speed isn't really an issue, since it's going to be turn based and I doubt the algorithms will be very complex.

Like I say, I'm no musician, so if you have know of any notable resources that might help me, I'd love to hear those as well.

btw, thanks for the help, you two Wink
Logged
Sos
Level 8
***


I make bad games


View Profile WWW
« Reply #4 on: December 05, 2010, 03:59:44 AM »

Partaudio is what you're looking for. You get a buffer then just fill it with whatever. Also, Allegro has that option, but offline, you pregenerate track and make it play it, and since it's a versatile lib and easy as hell, you can visualise youd data with no effort
Logged

s0
o
Level 10
*****


eurovision winner 2014


View Profile
« Reply #5 on: December 05, 2010, 05:41:30 AM »

http://www.obiwannabe.co.uk/tutorials/gamedev/OSC/oschooks.html
Here's a great article on how to use Pd with games if you're still interested.

Anyway:
Quote
But I'd like to, for this project at least, do everything myself and, since I have a fetish for procedural generation, I thought I'd try to do it that way.
I don't mean to sound rude, but this strikes me as a bit odd. Proc gen is hardly the "easy way out" here. Even if you let the computer "compose" the music for you, you'll still have to give it clear and meaningful instructions on how to do that, and if you have no musical knowledge or talent (as you claim yourself), I don't think you're going to get anything better than what you would compose "by hand".

Sorry to be such a downer, but please consider my point.  Smiley
Logged
Feral_P
Level 1
*


View Profile
« Reply #6 on: December 05, 2010, 05:57:10 AM »

That is certainly a good point and not one that I'd thought about. I knew I'd have to find out more about composition, but I suppose I assumed it would be easier to programme it than actually put it into practice myself. Which is likely wrong.

You're right, though. I should at least get more grounding in composition before I try to programme anything.

Thanks for the link as well Smiley
Logged
s0
o
Level 10
*****


eurovision winner 2014


View Profile
« Reply #7 on: December 05, 2010, 06:03:23 AM »

Thanks for the link as well Smiley
No big deal.

Here's some more interesting writing by the same guy who wrote the article I linked to.
http://puredata.hurleur.com/viewtopic.php?pid=5875#p5875
Logged
PaulForey
Guest
« Reply #8 on: December 06, 2010, 03:31:48 PM »

Pure Data hooked up to my pygame stuff via OSC is my personal weapon of choice.

I've got the 'Designing Sound' book by Andy Farnell (a.k.a. obiwannabe) and it's way awesome.

My current project is pretty much all about utilising game events and things to not only control sound effects but also subtly alter the pure-data generated music as well. The 'game' is just a platform for the sounds Smiley

A recent thought is an experimental mode (which the player could turn off or on) which would utilise sound received from the player's microphone to modulate the sounds in wicked cool ways.

This kind of stuff is way fun.
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #9 on: December 11, 2010, 08:02:22 PM »

http://britcruise.wordpress.com/2010/03/31/strategy-for-emotion-control-in-an-algorithmic-music-composition-engine/
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic