Jump to content


Photo

Idea For Music Implementation


  • Please log in to reply
4 replies to this topic

#1 Garo

Garo

    Programming Department

  • Xenocide Programming Department
  • 119 posts

Posted 13 August 2006 - 06:31 AM

Imagine the Geoscape. You watch the globe spinning and you hear a slow ambient tune at the background. Then you see an UFO coming. The music changes bit into a more faster and a bit agressive. You launch your interceptor and when it catches the ufo, the interception window is popped up and the music changes dramatically mood into a fast rock/metal interception tune. After the ufo is destroyed, the music slows down back to the basic ambient tune into the background.

Traditionally, the different musics for those different "states" are changed simply by crossfading (fading first tune down and fading second tune up). This is quite boring and in many cases, it doesn't sound very good.

I have long time ago had an idea how these music state changes could be done seamlessy without a need for any crossfading, but that the song could actually envolve into another song. Imagine a simphony with a slow start with just some strings and which quickly envolves into a mass orchestra piece.

Before I represent you the idea, I'll quickly describe what tracker music is.

Tracker is the generic term for a class of software music sequencers which, in their purest form, allow the user to arrange sound samples stepwise on a timeline across several monophonic channels. A tracker's interface is primarily numeric; notes are entered via the keyboard, while parameters, effects and so forth are entered in hexadecimal. A complete song consists of several small multi-channel patterns chained together via a master list. http://en.wikipedia.org/wiki/Tracker


The trick is the following:
Create a simple statechart which contains all different music styles needed in one scene. Geoscape would be a good example of "one scene". The geoscape would contain the following different states (note that my ideas WHAT the music of those states are just my own examples and not to be taken seriously):

1) No UFO's on the globe (some slow ambient music, maybe)
2) Ufo(s) are flying on the globe (a bit faster ambient music with a bit of agressivity)
3) Interception of an ufo (some fast and agressive rock/heavy quitar tune)

This statechart would contain the following state changes:
- 1 -> 2
- 2 -> 1
- 2 -> 3
- 3 -> 2

Now compose all those three different music tunes into one tracker module file (like .XM or .IT). Then also compose (at least one pattern long) translation patterns, one for each state change (like a pattern which translates music (1) into music (2))

Then the music engine can be programmed so, that when it's (for example) playing tune 1 (the ambient background tune), and it receiveres an event which tells that there's now an ufo on the globe, the music engine schedules the translation pattern 1 -> 2 to be the next pattern after the current one. This means that the current song is stopped after the current pattern and the translation patter is played immediatelly after the current one. After the translation pattern is done, the music engine schedules the patterns of tune number 2 into the master pattern playlist.

Pros:
- No need for simple crossfading to switch between two different music
- A good (as the translation from one to another has been composed into the beginning to be a part of the song) switch from one song to another

Cons:
- Need to compose music into tracker module format (for example, .XM or .IT)
- Additional work to create the translation patterns and statecharts
- Additional work as it needs to think a bit how the individual sounds are arranged into the tracker channels to allow easy writing of translation patterns.


Please tell what do you think or ask for details if you doubt that I couldn't explain myself clearly enough. Technically I believe that we can use FMOD Ex to support all this with minimal additional coding.

- Garo

#2 kafros

kafros

    Creative Text Department

  • Xenocide Creative-Text Departmen
  • 1,800 posts

Posted 13 August 2006 - 02:23 PM

Ideas like this one are also used in commercial games. Two I can recall right now are 1) No one lives forever and 2) F.E.A.R.

1) Some could describe it as an "old game", although I think it is still quite interesting. IIRC, once you could spot a bad guy, a small 2-3 second clip played (which mixed well with all in-game music) and then an "action song" played, until the action ended.

2) Same with FEAR. I've only played it at an Internet cafe for about an hour, but it seems that once the enemy squad notices you, the music changes in no-time to a different clip, until all enemies are neutralized.

Unfortunately, the very nature of these games support this music pattern. In xenocide, there are many music genres which could (and probably will) be implemented.

The only problem with such an idea would be the total work needed to be done on compositions. We try to implement a framework which will permit SND members to support each other and use everybody's work. If such a plan is completed sucessfully, I guess it will be easier to materialise your idea Garo, which personally I'm very fond of :)

#3 Garo

Garo

    Programming Department

  • Xenocide Programming Department
  • 119 posts

Posted 14 August 2006 - 02:07 AM

Ideas like this one are also used in commercial games.


I remember seeing many games which uses something like this, but they all simply crossfade music from one to another, which is not what I would like to do.

As traditionally songs have a beginning and an end and a constant path between them, my idea allows songs to have multiple beginnings, endings and most important, multiple paths between them which can change dynamically according to the game.

I don't know what the FMOD Ex Sound Designer allows. It even could allow to do something like this without using tracker music formats. I'm not sure about it though, so I'd like to hear opinions from somebody who have used the FMOD Sound Designer.

- Garo

#4 LfO

LfO

    Sergeant

  • Xenocide Sound Department
  • 81 posts

Posted 24 August 2006 - 10:47 AM

I think this is an appealing and ambitious concept, but not right for Xenocide.

FMOD Designer isn't designed as a sequencer or tracker - It has no MIDI capabilities, and for that matter, no internal metronome. At best, it could be a wrapper for pre-written music segments - kind of a macro-tracker. You (meaning the coders) would have to write an basic tracker to drive FMOD. Even then, we might almost certainly end up with a lot of cross-fades, which are probably a big part of why you don't like other games' implementation of music transitions.

The only alternative I can think of would be to find a freeware tracker that we could embed. If we did find one, we would have to run freeware softsynths under the covers - in my experience, these require a lot of processing power. We would lose our ability to compose with commercial tools. I don't know how well FMOD plays with others, either.

Assuming we could overcome the technical hurdles, this would really be an experiment - the results might sound great, but then again, they might turn out to be pretty boring. With traditional music writing, we have some idea of what to expect - and, we already have a start.

It really is a very cool idea - it would be pushing the envelope - but in my opinion, we don't have the resources to devote to it.
Oscillators make my world...um...oscillate...

#5 red knight

red knight

    Xenocide Project Leader

  • Xenocide Inactive
  • 3,310 posts

Posted 27 August 2006 - 11:47 AM

Yeap, I have been seeing trackers and it is a pretty good thing to have that support... but do not count on it.

Greetings
Red Knight
Sourceforge Nick: flois - Federico Andres Lois
Visit my blog at: flois.blogspot.com

Posted Image

Pookie cover me, I am going in.