Soundtrack

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Soundtrack

Post by Lucifer »

Hello. I'd like to write up a soundtrack for this game.

I'm thinking heavy percussion with some good metal guitars.

But I need some information and some discussion. ;) I wrote a song for Crimson Fields, and it's in the base distribution, and I learned a few things. Basically, here's how I figure it for Armagetron:

1. Each round only lasts 10 seconds - 90 seconds. Some last longer. So there isn't time to develop any musical ideas, really.

2. The music has to vary in feel with the round. For easy programming, it has to be the same tempo no matter what.

3. Must have killer shred guitar solos

4. The music has to be always changing, otherwise it'll be an annoying 'feature' that people will just disable.

I've got a number of ideas on how to pursue this, so let's talk. ;)

For reference, my own music that is currently recorded can be found here:
http://www.davefancella.com/mambo/index ... &Itemid=34

Dave
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

Good idea... I think it needs a moderate to fast tempo... That's all I can think of for now...
Image
User avatar
root down
Round Winner
Posts: 344
Joined: Fri Jun 11, 2004 8:46 am
Location: closer
Contact:

Post by root down »

the one song that comes to mind for me that not only meets the requirements you suggested but is also extremely fitting for the game is bullet train by judas priest
stakes is high
ishAdmin
Match Winner
Posts: 625
Joined: Sun Jul 04, 2004 12:11 am
Contact:

Post by ishAdmin »

Something to consider is to not have an entire song. Just get clips and do looping. You can have a few different bars of a tune and vary what is looping so it stays interesting. My wife used to play a Tetris clone on a mac, columns max I think. It had a choice of tunes. It would start gently, switch to loops with greater intensity, back off to a lighter loop, pound back with a very intense loop. It stayed interesting, eventhough the average tetris game lasted considerably longer than your average tron round. I would keep the music continuous throughout a match, switch to a lighter loop 'idler' loop between rounds.

Anywho, the point I wanted to make is that music files need not be very large at all. I'm not sure what you had planned, but keeping it light is best IMO, and that's easily done with looping music segments. Switch segments depending on where you are is easily done, and will add a new dimension to the game that 'fits' with what is happening on screen. Start of a round has a certain loop. Normal play has a certain loop sequence. End of round has a certain loop. Start and end of match each have their own loop sequence.
Image
User avatar
klax
Project Developer
Posts: 481
Joined: Tue Jun 08, 2004 3:51 pm
Location: Barcelona, Spain
Contact:

Post by klax »

Right now the music engine can support all of these file formats:
raw sound: wav, voc, mp3, ogg
mod sound: mod, s3m, xm, it

For raw sound I suggest to use ogg.

I think the idea is not to use copyrighted songs (at least oficially hehe, we could also share personal packs).

I believe the default song/s in AA should be a mod based one (if we don't have something else hehe). They have a great size ratio compared to ogg/mp3s, and there are a lot of greats songs to use (I love the Purple Motion and Skaven mods). I suppose crediting the author will be enough and we could include it in the default downloadable AA

But if Lucifer or someone else can compose some music for AA it will be really better!

Ishadmin: your idea of miniloops is great!

Here is my ideal plan: all the songs in the music directory (oggs, xm, ...) and they will be played randomly (this way is easier to code ;)). It will be nice if in the HUD we could see the song that is playing like EA's Need for Speed games ;)
k
Random Identifier & Project Developer
Posts: 345
Joined: Wed Feb 25, 2004 12:54 am
Location: Northern California, USA

Post by k »

klax wrote:I believe the default song/s in AA should be a mod based one (if we don't have something else hehe). They have a great size ratio compared to ogg/mp3s, and there are a lot of greats songs to use (I love the Purple Motion and Skaven mods). I suppose crediting the author will be enough and we could include it in the default downloadable AA.
...
It will be nice if in the HUD we could see the song that is playing like EA's Need for Speed games ;)
I agree with using tracker music as the default. There is a ton of it out there, it is usually pretty small, and a lot would probably fit into a game really well. (PM, Skaven, and CCCatch are my favs). The DasBoot mod would probably be a good one. :) Giving credit for tracker music should be good enough. glTron uses a Skaven track. :) If we are going to support playing multiple songs in a directory we should probably have keyboard mappings to start, stop, change tracks, change volume, , etc.

Here is a good place to look (~30,000 tracker songs): http://www.modarchive.com/
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Song looping and stuff

Post by Lucifer »

What I was actually interested in doing was something a little different. ;) Can the sound engine mix multiple mod/midi tracks on the fly?

Here's the idea: You take a metric, such as the cycle's average speed over the last x frames, or just grab a snapshot or whatever, and you tell the sound engine to pick loops that are that exciting (for lack of a better word). The sound engine has something that looks like this:

5 drum tracks, ranging from boring to really exciting and hyperactive
8 bass tracks to match (might just be included in the drum tracks)
8 rhythm tracks (guitar, preferably, but it would make for a large download)
8 lead tracks

The sound engine would need to be able to mix all of these on the fly based on the metric it gets from the game, and introduce a random element in choosing loop combinations to keep it sounding different.

Then, ideally, it would be able to mix in the middle of a loop, well, hm. Stop a loop in the middle, start a different one in the middle. Because the chances of a round ever ending on an exact loop boundary are slim, and there should be a happy little 2-bar fill or whatever played at the end of the round. There should also be something played when your cycle dies, but it would be nice to have actual voice samples played when other cycles crash.

I would prefer to use midi or ogg, just because it's been so long since I've done tracker music and I haven't fooled with any of the new tracker programs. BUT, (big but) if you guys really want tracker music I can make it, and I'm good at it, it's just been a decade since I've worked in that format (and several plaforms ago).
ishAdmin
Match Winner
Posts: 625
Joined: Sun Jul 04, 2004 12:11 am
Contact:

Post by ishAdmin »

The idea of mixing different tracks on the fly would make a really interesting and dynamic music experience. One thing that concerns me is cpu cycles to do that. At best I get 20 fps. Any lower than that and the game really starts to suck bricks. I'd like the playback engine to very light on the cpu load. I don't know a darn thing about what is best in this situation. Does the sound card matter?
Image
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Performance discussion

Post by Lucifer »

ishAdmin wrote:The idea of mixing different tracks on the fly would make a really interesting and dynamic music experience. One thing that concerns me is cpu cycles to do that. At best I get 20 fps. Any lower than that and the game really starts to suck bricks. I'd like the playback engine to very light on the cpu load. I don't know a darn thing about what is best in this situation. Does the sound card matter?
Well, the advantage of mod files is that they use very low cpu. On the other hand, the advantage of MIDI files is that the soundcard does the work, same as your 3d accelerator on the video card, you just send the data across the PCI bus to the card and let the card render the music. In the setup I'm suggesting, you'd have to mix the midi files before sending them to the sound card, but that isn't hard in and of itself, and both midi files and mod files benefit from being just a bunch of bytes that go together very quickly. So, in that scenario, you shouldn't notice any difference in performance. Under Linux, hwoever, since few ALSA drivers actually support midi banks on the sound card (and with a cheap sound card that lacks midi banks on any platform, and any OSS driver), midi files are actually a larger footprint than mod files because SDL (used by ArmagetronAd) uses an old version of the Timidity software synth, so it requires the CPU to render the music and then pump it to the soundcard as 16-bit 44.1khz two channel sound.

Mixing ogg files, on the other hand, is a whole different ballgame. First you'd decompress the ogg file into a stream, and you'd have to do this with several at a time (you might improve performance by caching decompressed blockfiles, but then your hard drive footprint is much higher). Mixing them isn't a big deal, it's just adding integers, and the tracks themselves can and should be at a low sampling rate, possibly just 8-bit samples, but it would probably only be one order of magnitude more demanding than the mod/midi files solution. Then you buffer it, of course, and then pump it to the sound card, of course.

In the grand scheme of things, however, mixing small wav files isn't a big enough performance hit to affect your FPS. With 3d acceleration, anyway, you're just pumping the data across the AGP bus and letting the video card render it, and the actual data itself isn't very large at all. Mixing small wav files isn't a big enough performance hit to significantly affect latency in the game, since you'd take advantage of the system's threading model to manage most of it. It's decompressing the ogg files that will cause the greatest performance hit, and if dithering is required that is also a performance hit, although I can lift some code out of Audacity to do a fast dither. Mod files are probably the best compromise across the platforms supported by ArmagetronAd. Midi files will play somewhat differently from one machine to the next, but should be acceptable with the only possible performance hit being against those of us that run Linux. Wav files should perform the most predictably across all the platforms.

Discussion on how it affects the size of distribution and other discussion of these issues can be had here (when I approached Crimson Fields, who I'm still working with)

http://archives.seul.org/crimson/users/ ... 00009.html

The thread is shown here (subject heading of "More Soundtrack" by Dave Fancella, because I am Dave Fancella):
http://archives.seul.org/crimson/users/ ... reads.html
User avatar
klax
Project Developer
Posts: 481
Joined: Tue Jun 08, 2004 3:51 pm
Location: Barcelona, Spain
Contact:

Post by klax »

Lucifer: we should really discard native midi support in AA, because in linux for example it will depend on timidity, and you'll need the Gravis UltraSound patches to be installed (midi in linux is not as easy as other OSes).

If you are not used to trackers, then compose it in midi and then we can always convert it to a mod (the convert to mod from midi in ModPlug Tracker for Windows works very well, only has minor timing issues).

The music engine that you are proposing is complicated (I haven't seen it in any free/commercial game), very hard to code and very cpu expensive. And about mixing, I'm not sure if we could mix 2 mods, but I really think it's not a good idea. Right now it mixes one mod/mp3/ogg with the sound effects of the bike (these effects right now are moduled by the speed of the bike).

I believe we should stick to playing only one song at a time.
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Mod files and stuff

Post by Lucifer »

klax wrote:Lucifer: we should really discard native midi support in AA, because in linux for example it will depend on timidity, and you'll need the Gravis UltraSound patches to be installed (midi in linux is not as easy as other OSes).
Yeah, that's pretty obvious. :) And the GUS patches aren't exactly a small set.
klax wrote:If you are not used to trackers, then compose it in midi and then we can always convert it to a mod (the convert to mod from midi in ModPlug Tracker for Windows works very well, only has minor timing issues).
Not a big deal, actually. My work ethic prevents me from trying to write something in one format and then convert it to another. I have to start from the beginning in the target environment, as best as it is known. ;) Naturally I'd prefer to record it for real rather than use midi or mod, but that's not very realistic for a game that's supposed to be downloaded by people on slower connections (or even faster, we did the math in Crimson Fields). Luckily, I used to use MeD all the time, and I know my way around trackers, so I installed Soundtracker and have been playing with it.

So, someone with a mod player, or someone who knows how to plug this into AA to test it, would someone mind taking a second to see if this file really is a mod file that'll work with AA? It should be a very short metal line. If it doesn't work then I'm going to have to either learn a little bit more about Soundtracker or find another tracker (Cheesetracker uses Qt, so there's that, at least, but it's a clone of ImpulseTracker, and I'm definitely from the ol' Soundtracker school).
klax wrote:The music engine that you are proposing is complicated (I haven't seen it in any free/commercial game), very hard to code and very cpu expensive. And about mixing, I'm not sure if we could mix 2 mods, but I really think it's not a good idea. Right now it mixes one mod/mp3/ogg with the sound effects of the bike (these effects right now are moduled by the speed of the bike).
Yeah, it is. I suppose since I already know everything that I want in it I should just sit down and write it, eh? ;) Here's my dilemma: I can give the time to write the engine, or I can give the time to make a song or two, but I don't have the time to give both. ;( I think I just won't play any new games until next I have time (after this) to do something, at which point I'll write the engine instead of more music, eh? ;)
klax wrote:I believe we should stick to playing only one song at a time.
Ok, it's probably safe to say that this is what'll get original music into AA the fastest, so let's do that. ;)

Next part of discussion: It's impractical to write a loop that repeats during idling, a loop that plays (possibly repeating) during a round, a victory theme, and so forth. Not impractical to write, but impractical to deal with while playing. I'm thinking the target length of any music should be about 2/3 the average length of a complete match using default settings and four players. Any disagreement here? Then there should be idling and victory theme, with idling only playing between matches, and the victory theme only playing at the end of the match. The soundtrack would then emphasize match play rather than individual rounds.

Perhaps to mark round endings you could just throw on a man yelling "ha ha ha" or something when you lose, or saying "Good job, Program!" when you win? I can plug a mic into my computer and make those, too, but my voice isn't the best for that sort of work.
Attachments
test.mod.gz
Here's the test mod file
(532.95 KiB) Downloaded 542 times
User avatar
klax
Project Developer
Posts: 481
Joined: Tue Jun 08, 2004 3:51 pm
Location: Barcelona, Spain
Contact:

Post by klax »

wow. It sounds veeeery good to me in foobar2000 :o

And about the announcer between rounds, great idea!. The announcer really makes a difference. And the other day I was talking to someone in the grid about adding announcers like: 'Double Kill', 'Multi Kill', 'Rampage'... with better suited tron phrases lol

EDIT: It sounds really good inside AA. The song is looping all the time and there's no gap between loops.

Lucifer: you could try your tests playing them in mikmod as SDL_Mixer mod support is based in it ;)
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

klax wrote:wow. It sounds veeeery good to me in foobar2000 :o

And about the announcer between rounds, great idea!. The announcer really makes a difference. And the other day I was talking to someone in the grid about adding announcers like: 'Double Kill', 'Multi Kill', 'Rampage'... with better suited tron phrases lol

EDIT: It sounds really good inside AA. The song is looping all the time and there's no gap between loops.

Lucifer: you could try your tests playing them in mikmod as SDL_Mixer mod support is based in it ;)
Well, I'm glad to hear that it sounds good in AA. I actually had mikmod installed, and when I upgraded, Mandrake removed it for some reason. ;( In any case, the test was to determine if Soundtracker was writing standard MOD files or ImpulseTracker files or its own format, because Soundtracker doesn't actually manage to mention it anywhere in the online help, UI, or website. I'm running AA 2.7 right now, and if it already supports music then you could just give instructions for me to test it in AA itself. Otherwise I haven't managed to get the thing to build on my machine, or else I'd just work off CVS.

For announcer samples, if someone gets a chance to watch the original movie and then lists what sorts of things are said in the movie that seems like the best starting point. I don't actually have a copy of the movie, but if someone were to dump a DVD of it on me, I certainly wouldn't object. ;)
User avatar
klax
Project Developer
Posts: 481
Joined: Tue Jun 08, 2004 3:51 pm
Location: Barcelona, Spain
Contact:

Post by klax »

Lucifer: to get music support in AA you'll need to be able to compile AA. Here are the steps to get one music playing in AA:

1. Do a 'sh configure --enable-music'
2. Edit /armagetronad-0.2.7.0/src/engine/eSound.cpp and search for 'fire.xm' and substitute for 'test.mod'
3. Copy 'test.mod' in /usr/local/games/armagetronad/music
4. Compile ;)

I want to warn you that right now there is a bug when you exit AA: it will hang and you'll have to kill the process manually :?
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Another test and comments

Post by Lucifer »

Ok, I don't have any idea what sort of sound you guys are looking for for a soundtrack, if anything, so here's a little something for an opening theme (not intended to play during actual gameplay), if you're willing to break it up into several themes like this.

Comments? I'm interested in hearing about how bad the guitars sound, mostly. They seem to be overdriving on my speakers at low volumes, which would indicate I sampled them at too high a volume. And any other comments, but most importantly about the guitars. I realize that uncompressed the thing is 1MB, which is *huge* for a mod file, or used to be anyway.
Attachments
test.tar.gz
(904.82 KiB) Downloaded 557 times
Post Reply