Music that is composed while you play. Ambigen reads what is happening to a character and renders one continuous piece that follows it.
What it is
Ambigen is the dynamic music for Relicta, a hardcore voice role-playing project set in an underground network of bunkers and caves. Instead of switching between finished tracks, it takes live signals from the game (where you are, how tense things are, how badly you are hurt, whether you are hiding, who is around) and decides, moment by moment, what the music should be. The result is one continuous stereo mix rendered inside the game process.
How it works
The signals place a character in a mood: calm, unease, alarm, fight, a cool-down after the tension falls, and special ones such as dream, near death and ghost. Every mood has its own mix, and the music glides between them instead of cutting. Being hurt brings dissonance and a limping rhythm, stress darkens the sound, and hiding well muffles it.
Places form a tree, and each can have its own tune, harmony and room. A place you know brings its motif back when things get tense there. All of it is written as tables of data, not code, so the music can be authored and tuned without touching the engine.
Why build it
Most commercial sample libraries forbid a game engine from playing their instruments note by note, which goes some way to explaining why truly dynamic music is rare in games. Ambigen builds its instruments from free CC0 libraries and its own recordings.
Where it is going
It began as Relicta's music and has stopped being only that: places, moods, signals and layers are plain tables, so another project can bring its own. One thing I want to try is a story on a web page whose music changes as you scroll through it.
