Implementing active music in Spring

Implementing active music in Spring

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Implementing active music in Spring

Post by Warlord Zsinj »

Yeah, its another suggestion which isn't at all tied up with gameplay or fundamental issues.
They annoy the hell out of me, and here I am posting one. Such a hypocrite.

Anyway, I'd like to see someone code up the ability to put music into Spring. Not just randomly playing music, but playing certain elected tracks according to the gameplay, like TA did.

Apart from porting the original TA music (or getting Jeremy Soule to make us some new stuff... :wink:), I was dreaming up a fantastic selection of tracks to put in, so that you can have Wagner and ol' Ludwig Van' blasting down your speakers as you roll through your enemy.

Now, this thread isn't for discussing what would be good music to put in.
What I'd rather like to see is the coding to be so straight forward that it reads from a directory called "Soundtrack", in which there are subdirectories called "building", "attack", "losing", "winning", "tension". Then a player just puts the music he wants in there, and Spring randomly selects a track according to what the program determines is the right mood music (running a similar algorithm to the original TA).

The idea being that with the code in place, people can release their own soundtrack music in a zip, and others can download it and switch and choose to their hearts content. Equally, mods can specify their own music (get John Williams for SWTA), and so on.

The most important part of any soundtrack mixer is that it takes up as little CPU time as is possible, so that I am able to play my soundtrack online, which I was never able to do on OTA, as it often slowed down TA, and made me drop behind and lag.
User avatar
Neuralize
Posts: 876
Joined: 17 Aug 2004, 23:15

Post by Neuralize »

I posted a thread about this before the great PHPBB exodus, which basically said the same thing, so, I'm in full support of this method. Put it in. Now. .. Right now.
User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

Post by Buggi »

1) Start Winamp
2) Press Play
3) Start Spring
4) Enjoy with music

^_^;;;

:D

-Buggi
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

yeah i just run WMP player. DO NOT STREAM! i learnt this lesson the hard way!!! :evil: stupid cheapskate that i am :twisted:
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

He wants the music to be specific for the time of the game though... like a nice quiet track while you're just building and nothing's going on, which emerges into a powerful score when a battle breaks out, then after the battle it plays another calm-ish track based on your win/loss performance (which could just be calculated based on ratio of units lost compared to your enemy). It was definitely one of the cool features of TA, especially with the orchestral soundtrack...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

*It is scientifically prooven to improove strategic adherence and gameplay on behalf of the player! I am sure there're statistics somewhere but no matter how hard I search I cant find them! Get em outa this straight jacket! They exist I tell you They exist!*
Doomweaver
Posts: 704
Joined: 30 Oct 2004, 14:14

Post by Doomweaver »

Winamp lags Spring. took me a few games to work that out. Haven't tried any other players.
User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

Post by Buggi »

FM?
AM?

;)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

You know maybe you could bring a cd player along and an OTA disc. Wether its in keeping with the games ongoings doesnt matter that much as it always helps.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

As Gnome said; I intended for the music to be active.
That is, it updates according to information which Spring feeds it.

It is one of the most brilliant innovations of OTA, and many games since have adopted it.

Apart from the incredible soundtrack of TA, the reason why the music is so succesful in that game is because it is so atmospheric.
Jeremy Soule had a much easier task of composing atmospheric music, because he was able to know exactly what the atmosphere of the game he was composing for.
Hence there are slow pieces, with an edge of tension for building, which gets the player in the mood for building, but with that constant edge of tension, knowing danger is around the corner.
Then there are highly climactic full orchestral pieces which uplift the player, and really add incredible amounts of atmosphere to an attack.
The 'defeat' tracks in OTA were mournful, and really added to the sense of despair a player feels at a blow.

To illustrate my point entirely, please download and listen to the following pieces to understand what I mean.

Victory or Battle pieces
These pieces would play during the height of battle. While listening to them, imagine you are desperately ordering your troops forward, as artillery thunders around and aircraft shoot overhead.
Ride of the Valkyries - Wagner
Great piece, you'll recognise it from Apocalypse Now!. Everything sounds grandiose when you do it to this.
Symphony No. 9: An die Freude (Ode to Joy) - Beethoven
Good ol' Ludwig Van'. Kubrick knew what he was doing. This doesn't have to be about Joy at all. It can be about trampling the enemy kbots underfoot as you march to the heart of the enemy base.

Defeat pieces
I would use this pieces for a defeat soundtrack, as Gnome suggested, based on casualty lists, etc. It would play when you are losing a battle, or many men. Bear this in mind while listening to it.
Miserere by Allegri
Suggested version: Jane Sheldon (Soprano), cantillation, anthony walker
Adagio or Adagio for strings by Samuel Barber
(I'm sure you've heard this before; it's a great piece. Try and get hold of the choral version if you can)
Delibes Lakme: Viens Mallika (Flower Duet)
You'll recognise this one from 2001: A Space Oddysey. This would work just as well as a tension piece.

As you are listening to those (If you don't want to download all of them, get atleast one from each list to see what I'm on about), imagine playing them on random in the background. The one's I suggested for defeat music would not work for an attacking music. They just target very different human emotions. However, each is (in my opinion) perfect for the atmosphere that they are intended.

The amount of atmosphere created by action-specific soundtrack is beyond measurement. Not only is it not difficult to add to a game, but it for a small amount of work, a huge 3rd party area of downloadable soundtracks made by people opens up. Personally, I prefer orchestral pieces to battle too, and with such an ability put in, I would make a selection of orchestral tracks which I believe suits the atmosphere of TA. Of course, some people prefer heavy metal to play with, and I'm sure within that genre there are many different pieces which one could class as "tension" music or "attacking" music, and someone would make a selection for them.
User avatar
Delta
Posts: 127
Joined: 09 May 2005, 15:33

Post by Delta »

Victory or Battle pieces

Ride of the Valkyries - Wagner
Symphony No. 9: An die Freude (Ode to Joy) - Beethoven

Defeat pieces

Miserere by Allegri
Adagio or Adagio for strings by Samuel Barber
Delibes Lakme: Viens Mallika (Flower Duet)

*all links from _This site_
A lot of music here that would work great in spring...
User avatar
[K.B.] Napalm Cobra
Posts: 1222
Joined: 16 Aug 2004, 06:15

Post by [K.B.] Napalm Cobra »

I love em.

Ode to joy - Victory
Ride of the Valkyries - Watching a large advancing army
Adagio for strings - Defeat
Flower Duet - Where to use it best?
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

Really try and get hold of Miserere. It's the perfect defeat song.
I'll see if I can upload it at fileuniverse...

Other excellent tunes:
Vespers: Virgin, Mother of god, Rachmaninov
Great defeat piece
1812 Overture, Tchaikovsky
Perhaps a little cliche, but still a fantastic victory piece.
March Slave, also by Tchaikovsky
Another good battle track.

------------

But I digress!
The reason I posted songs was to show that there are some songs which are fantastic battle songs - but horrible defeat songs (Ode to Joy while I rouse the remnants of a once mighty army? :? ), and some songs that are mournfully perfect defeat songs, but atmosphere-ruining battle music (Adagio while I stand over my defeated foe? I think not). The point being that simply playing music in the background does not create atmosphere, because the atmosphere it was composed for may not suit the atmosphere of the game. If Spring can feed an inbuilt audioplayer data from a battle, and seelct the most appropriate songs to suit that atmosphere, it will complement the atmosphere of the game significantly.
User avatar
[K.B.] Napalm Cobra
Posts: 1222
Joined: 16 Aug 2004, 06:15

Post by [K.B.] Napalm Cobra »

Imperial March - Advancing army / preperations for war.

Ever wanted to rub it in your defeated foe's face Monty Python style? http://www.mikeez.com/kickassclassical/ ... tybell.mp3
User avatar
Delta
Posts: 127
Joined: 09 May 2005, 15:33

Post by Delta »

Imperial march is way to much star wars, even thou its great...

chopin - funeralmarch
Defeat

Jenkins - Allegretto
Building-defending

Mozart - Requiem
carmina burana
Battle
Kixxe
Posts: 1547
Joined: 14 May 2005, 10:02

Post by Kixxe »

We could have just a folder named Music, and inside there are folders like battle, building defeat victory ect. Then users could put whatever they want there.

And maybe some classical music included for those who dosent have any music of their own-.-*
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Post by Warlord Zsinj »

Originally posted by ME.
Now, this thread isn't for discussing what would be good music to put in.
What I'd rather like to see is the coding
Its all good and well to talk up what pieces to put in; but the coding actually needs to be done. I can't code - so I would really like to see the SY's (or someone with coding skills) put this ability in at some point. The sooner the better, but I understand that there are other things to attend too.
From what little I understand of coding, and given the sheer abundance of computer-music players, I don't think it would be so difficult to add. The ease of addition of atmosphere-specific tracks is a vital part of this player.
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

[K.B.] Napalm Cobra wrote:Imperial March - Advancing army / preperations for war.
...
Imperial March just screams «Goliaths». There is no other music more suited to the march of a few Goliaths crushing forward into the enemy's defenses. :twisted:
That a military music from USA, no?
If so, the author is portuguese, since as far as i know, they were all made by the same dude. And anyway, Sousa is a portuguese name. :-)
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

WOW what a load of old (but cool) music!
heres some new:
My Chemical Romance
Taking Back Sunday
Funeral For A Friend
THATS THE SHIT :twisted: owning and listening to 'hang em high'
free samples available on WMP! :twisted: listen to it guys!!!
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

PauloMorfeo wrote:
That a military music from USA, no?
If so, the author is portuguese, since as far as i know, they were all made by the same dude. And anyway, Sousa is a portuguese name. :-)
http://en.wikipedia.org/wiki/John_Philip_Sousa

Sousa was quite American. His parents or grandparents were probably immigrants though.
Locked

Return to “Engine”