Dynamic music + Day/Night Cycle (500049)

Dynamic music + Day/Night Cycle
Posted: 06:43 PM 44 Minutes Ago
Hello all.
I’m a musician interested excited by the possibilities of dynamic music in video games. I’ve recently started a project involving the exploration of space dynamic sound. As a beginner programmer 3D modeller, I have big ideas but I’m having a bit of difficulty implementing them. Basically, I’m creating a small island that can be walked about in first-person, with music that changes according to where you are on the island etc.
What I would really like is to be able to change music depending on the time of day, hopefully switching out a range of tracks to something else when it becomes night time.
I’ve used the scripting from this fantastic thread: http://forum.unity3d.com/threads/550...ay-night-Cycle
to implement a day/night cycle into my project but I am unsure of how else to proceed.
Does anybody know how I can use this day/night cycle to control which music tracks play? Unfortunately it isn’t just swapping a ‘day time’ track for a ‘night time’ track as I actually have multiple tracks or layers of music running at once, which are dynamically mixed as the player moves around the space.
If anyone is able to figure out a way for me to change a set of day time tracks to one (or even more!) night time tracks, I would be forever in your debt!

tl;dr Does anyone know how to control what music files are playing based on the time of day in the game?

Thanks!

Depends on how your “layers” are set up. You could have an array of music parts for day, one for night and pick from the arrays accordingly. Just make sure you have something like a boolean to tell you wether it’s day or night

Right now all I’ve done for the music is have individual layers as .wav files that can be heard by the listener unit when the player is in a certain area, treating them as 3D sound without any doppler effect.
how would i go about assigning arrays? is this something selected in Unity or does it require me picking up some scripting knowledge?