Board index DeFRaG Mapping

Music Advances with the player

Maps and the process of creating them

Music Advances with the player

Postby <hk> » Apr 13th, '11, 11:08 am

I wonder if there is a way to control the progress of music played during a run.

Here is what I had in mind:

A player starts a run and the first few seconds of a music track are looped in the background. When player passes the 1st checkpoint it goes to looping the 2nd part of the music, leaving the first part out. Fast forward the player hears only the last few seconds of a track looping over and over (part 8) at the finish line.

Is it possible to have some kind of trigger entity that loops all the time and the sound it is calling is changed by triggers. But there is a delay in between so the 1st part is not cancled in favor of the 2nd part.

This is a tricky one. Especially in multiplayer.
User avatar
<hk>
Menstruating 24/7
 
Posts: 1040
Joined: May 2nd, '09, 12:06 am
Location: Ingolstadt Germany

Re: Music Advances with the player

Postby DF///Kov3nant » Apr 13th, '11, 12:24 pm

my wife is an audio engineer (Diplom Toningenieurin) she read your post and said that for aesthetic reasons, one shouldn't break the loop in the middle of the cycle. it would have to go to the end before beginning the next loop. as soon as the player hits the trigger there should be a command to say "finish the cycle that you're on, then start the next loop" otherwise you'll have ugly timing errors, skips, and so forth.

Wife:
Also, folgender menschenfreundlicher Plan:
Du kannst Dir die Hauptspur (Layer 1), die Du durchlaufen lassen wolltest, schenken. Wenn wir von 8 Triggern ausgehen, machst Du einfach 8 Loops in Deinem freundlichen Sequencer (was benutzt Du, wenn ich fragen darf? Reine Neugier), wo Du bei jedem einzeln ein neues Element vorstellst.
Dann brauchst Du allerdings immernoch ZWEI Programmierbefehle. Den Trigger, daß der neue Loop gestartet werden soll, sobald der Spieler ihn erreicht oder passiert UND einen Befehl, daß der vorhergehende Loopcycle zuende ausgeführt/abgespielt werden muß, BEVOR der nächste startet. Sonst klingt doof, diesen Befehl bräuchtest Du auch unbedingt, wenn Du Spur 1 laufen lassen würdest, sonst hat Dein Endprodukt was von 8 Kindern, die sich noch nicht auf ein Lied geeinigt haben ;)

Geholfen hat das sicher nicht, weil Du immer noch nicht weißt, wie's zu programmieren ist, aber vielleicht hat's Dir ein wenig Extra-Arbeit gespart.


I know that board rules say English, but I can only explain it properly in German. Will translate on request.
User avatar
DF///Kov3nant
 
Posts: 36
Joined: Mar 11th, '11, 7:19 am
Location: Rodgau, Germany

Re: Music Advances with the player

Postby <hk> » Apr 13th, '11, 12:57 pm

That's basically repeating what I said.

I know where to slice the tracks. And for the "play to then end" I put the trigger delay. You can't trigger something when the audio track finishes. You have to run a trigger delay in parallel and time it so they both finish at the same time. That's possible.
User avatar
<hk>
Menstruating 24/7
 
Posts: 1040
Joined: May 2nd, '09, 12:06 am
Location: Ingolstadt Germany

Re: Music Advances with the player

Postby Arcaon » Apr 13th, '11, 1:41 pm

If done well, it could potentially mean 7.4 seconds of music before the next part (for a random 130 bpm house track), so I can only imagine it working smoothly at long maps.
Arcaon
 
Posts: 325
Joined: Oct 16th, '09, 1:36 am

Re: Music Advances with the player

Postby <hk> » Apr 13th, '11, 2:08 pm

Music sucks anyway. It's just interesting to know how it might possibly be done. It's still not multi player safe.
User avatar
<hk>
Menstruating 24/7
 
Posts: 1040
Joined: May 2nd, '09, 12:06 am
Location: Ingolstadt Germany

Re: Music Advances with the player

Postby <)Ghost(> » Apr 13th, '11, 6:21 pm

link target speaker to a trigger and tick activator key, so it only plays for the player that hits the trigger
<)Ghost(>
 
Posts: 347
Joined: May 2nd, '09, 3:19 pm

Re: Music Advances with the player

Postby <hk> » Apr 13th, '11, 6:27 pm

That may be true, but the delay and relay combination to make the music checkpoint dependant is not so much multi player compatible.
The trigger resemble a simple state machine. That kind of state machine can only be in one state at once. Which means: No extra state for extra players.

This is leading nowhere.
User avatar
<hk>
Menstruating 24/7
 
Posts: 1040
Joined: May 2nd, '09, 12:06 am
Location: Ingolstadt Germany

Re: Music Advances with the player

Postby Leaf » Apr 18th, '11, 10:12 am

This may be completely besides the point, but the computer game Rez does exactly what you're talking about. The way it achieves it is by holding back the change to the next part of the level until it can seamlessly transition to the 2nd piece of music.

I have no idea if this is possible, but in defrag perhaps you could design a level that somehow holds the player back, and then when the beat matches, a door opens or something.

Leaf
 
Posts: 20
Joined: Apr 6th, '10, 10:03 pm

Re: Music Advances with the player

Postby <hk> » Apr 18th, '11, 10:43 am

Another Idea would be to adapt the music as subversion handles it.


All tracks are playing all the time but many parts are silent. Depending on the situation you are in some parts are loud and others a bit more quiet.


One could use entities with a certain part of a track that can play no problem over the others. I don't know if it is possible to start many sound entities at once so they keep the sync.
User avatar
<hk>
Menstruating 24/7
 
Posts: 1040
Joined: May 2nd, '09, 12:06 am
Location: Ingolstadt Germany

Re: Music Advances with the player

Postby 742617000027 » Jun 16th, '11, 9:51 pm

Didn't read through all of this, but I have some thoughts on the matter and some questions.

How is music played back in maps? Is there something like an ambient background music that has the same loudness throughout the whole map? Or is it more like the sound triggers you can place in maps from which with increasing distance the loudness decreases?
Because then what you could to is basically start every loop at the same time so they play back in time, but add the more advanced loops only later in the map. I guess this would cause little "fades", since when you approach the more advanced loops, they will play back more quietly at first and more loudly the nearer you get. Not sure if this could be avoided by some kind of invisible door that doesn't allow sound to get trough unless you trigger it.
User avatar
742617000027
 
Posts: 166
Joined: May 2nd, '09, 12:36 pm
Location: Ger


cron