Forum Thread
  Posts  
"Programmable" Music (Forums : Sound Design & Composition : "Programmable" Music) Locked
Thread Options
Oct 14 2010 Anchor

Hey people,

okay first of all, this what I'm going to explain now, is really hard for me because
1. My English is not the best
2. I don't know the name either!
but I'll try my best!

When you ever played the Game "The Legend of Zelda - Twilight Princess". On Hyrule Field, when you're riding with your horse along the path and it appears an enemy, the music changes. Or if it gets night, the music changes, too! (e.g. Youtube - Hyrule Field at 0:40) This happens also in Hyrule City, if you change between east, west, south, north and center.
This is also used on many keyboards. There you have 4 patterns: Intro - Pattern A - Pattern B - Finish. And when you change between A and B the music changes also!
How do you do this with music programs (in my case FL Studios)? How does it change when you press any button and how do you "program" it? Also i wanna know how the music changes ingame, when you meet an enemy or time of day?

Would be thankfull if somebody could help (or even understand what i just said :P)

Edited by: Pallabon

Oct 14 2010 Anchor

As far as I know, you can't program the conditions for loops, or changing track upon factors that will be seen in the game through music software, such as "when enter is pushed, we will play the "Let's Fight!" sound effect/track.

If you want to change from one track to another depending on important events such as battle, changing area. This will have to be programmed. The code for this depends on the game engine, and it can be done in several different ways. It can also be done by scripting but this also depends on the script system that the developers have integrated / developed, not every script system gives you access to change which track to play.

Here's a tutorial (for programmers) that shows, and explains how to add, play sounds and under conditions such as when pushing down the left click. The code is written in Java and a tutorial in how you use sound in the Java Monkey Engine. You see mostly games written in C++ due to its speed and freedom in resource management. Jmonkeyengine.org

It won't say much however, but that's how it looks like. It might look intimidating, but once you understand the language it all makes sense.

Generally I advice to use a game engine that is solely focused on scripting, an engine made for developers that lack a programmer.
Team up with a programmer, or if you are fascinated / simply wants to learn a language for game development. I recommend the book C++ Primer 4th edition. It will take some time to practice on the basics before you can apply it to game development however. But in my opinion it's well wort it, as long you are interested.

Edited by: Siphonen

Oct 16 2010 Anchor

Fmod.org
Ambiera.com

hope thats what you are looking for

Oct 17 2010 Anchor

Wow, that Ambiera is a nice find.

To learn programming in C++, you can use this site:
Cplusplus.com

Rather easily explained.

Then you simply need to program some conditional statement in, e.g.: (pseudocode)
if (enemy_shows_up)
play the menacing tune

etc.

You'll see yourself. But programming can be very time-consuming. Easier to find an engine, and then play around with sound playing functions.

Oct 18 2010 Anchor

Ok thx people! I will compare all those things and if I'm not sure, i will ask again.

Arxae
Arxae Resident Stepmania Freak :D
Oct 18 2010 Anchor

feillyne wrote: Wow, that Ambiera is a nice find.

It's irrKlang actually :) Ambiera is the company ^^

--

°w°

Dragonlord
Dragonlord Linux-Dragon of quick wit and sharp tongue
Oct 18 2010 Anchor

Isn't IrrKlang more or less just an OpenAL frontend? Can't say for sure as I never used it but I read a few things about it.

Arxae
Arxae Resident Stepmania Freak :D
Oct 18 2010 Anchor

No don't think so :) never saw such a thing :p i have looked into it and never encountered it :p

--

°w°

Oct 18 2010 Anchor

You can simulate this easily in Ableton Live. A lot of game composers use this to test out their transitions / loops from one piece to another.

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.