The music changes are much simplier than they sound. For each level, there are 4 (or is it 5? Can't remember) different tracks. Each track is split in 8 or so segmenets. Depending on the Nightopians' mood the game will pick a different music track for each segment.
This is easier to understand in Christmas NiGHTS once you unlock the Jukebox, that let you arrange the music as you please.
This is easier to understand in Christmas NiGHTS once you unlock the Jukebox, that let you arrange the music as you please.