Hacker News new | ask | show | jobs
by rovyko 2658 days ago
Simple, but pleasant. This is how it starts. It might take some time, but I think most ambient music in video games will eventually be procedural.

EDIT: Just want to say that these are better than I expected. As good or better than about half the ambient music recommendations I get on Spotify.

4 comments

A lot of (or most) music in video games already is procedural.

• Disasterpeace's most famous soundtracks all incorporated some measure of procedural music happening at runtime — Fez, Hyper Light Drifter, The Floor Is Jelly, Mini Metro... this ranged from simple mixtures of tones and textures at random intervals to very advanced, tightly integrated (re-) composition systems.

• Most games will dynamically mix different "stems" together based on the action in the game. Amon Tobin's soundtrack to Splinter Cell: Chaos Theory is a great example of this, but it happens in pretty much every AAA game now (and most indies, if not something more ambitious like the above). Another great example was Banjo-Kazooie on the N64. In simpler cases there are 3 or 4 different variations of each piece of music, but it's not uncommon to find a game with many more. Couple that with Fmod to apply filters at runtime (like a lowpass when diving underwater) and you have a very lively, dynamic soundtrack that adapts to the gameplay.

I could list a ton more examples, but that'd be tiring. A key point is that while this music is procedural, it's not generative. In other words, while it's common to find games where existing music is remixed dynamically, you rarely find games where the music is being composed on the fly.

Another interesting aspect to consider is the relative rarity of generative or procedural sound effects. Most sound effects are played back as-recorded, with perhaps some Fmod filtering. Mario Odyssey one-upped this by playing different sound effects depending on the moment-to-moment chord changes in the music, so that the sound effects would harmonize and "play along" with the music — to beautiful effect. But rare is the game that fully dynamically generates sound effects at runtime.

What I want is this for driving. Empty twisty roads? Play exciting music. Dangerous turns ahead? Add up the tension so the driver slows down. Traffic? Play something soothing...
Very insightful comment, thanks!
Background music in games has had weird dynamic elements for decades. Lucas Arts adventures that used iMUSE occasionally had variants of tracks that they would blend between. Early versions that relied on MIDI hardware could also incorporate tempo changes anywhere in the track in sync with the on screen transitions. The graveyard in Monkey Island 2 is a good example: it has one track that shifts its mood slightly between screens.

A more generative example is the music in Portal 2. There are several aspects to its music that are subtle, purely generative and integrated with the gameplay. For example, the each receiver for the laser beams start playing an additional, random voice over the background music track as long as it is hit by a ray. It is a bit faint, bit it is there. It becomes cool in those levels where you have several of them next to each other They are starting to play a randomized concert while you are solving the puzzle. Someome made a long and elaborate writeup about this and other aspects of the game's music, but I can find it now.

It is a but funny because games shifted away from using sound synthesis amd sampling for music to studio recorded tracks over time as they started to have enough storage space for it. But this now limits how you can process the music to make it dynamic.

This is also what Brian Eno did for Spore. If I'm not mistaken you could configure the parameters of the music yourself from an in-game menu.
Yeah, the first thing I thought of when seeing this was video game BGM. Ideally you would want some way to smoothly change the parameters over time as the player moves from one zone to the next, although you could probably cheat it pretty well just by having a separate track for each zone and cross-fading between them.
This was supposedly something that No Man's Sky was doing, was it not?
Yes, their sound designer Paul Weir did a GDC talk on the sound engine that they built for the game. It included things like procedural riffs on an existing non-procedural soundtrack, advanced spatial SFX, and had a demo of the engine in action.

Edit: here's the talk: https://www.youtube.com/watch?v=zKJ_XuQjjiw

And Monkey Island 2—though that wasn’t generated, it was just a large pile of musical glue that let the music flow from one area to the next.
We did a similar thing with System Shock 2 for ambient sounds/music. We had zone triggers which fed into a DSL for queuing up/randomizing/looping audio segments. I built the runtime on top of an existing virtual-machine style audio playback system which had been developed for flight sims, where it was used to stitch together voices for ground control. I was a fairly junior dev at the time, and IIRC I was not able to implement the requested cross-fading feature in time to ship. Fortunately, the silence between tracks worked pretty well with the desired atmospheric effect.