Parameter wraparound

I’m using a time of day parameter sheet to determine when an event (nighclub ambience) should play. The parameter is continuous, from 0 to 24. The problem I have is that if I want the sound to play from 10pm to 2am, then two different instruments appear on the track - one at the start, and one at the end. When the time goes from 24 to 0, it stops playing the rightmost instrument and starts the left, and this means that any random modulation (like random start position) is “retriggered”, so the song suddenly jumps to another point.


Is there anything I can do to keep the same instrument playing as the time “wraps” from one side of midnight to the other? Of course, I could do something in the engine, but it would be a shame not to have this functionality in FMOD.

Cheers!

The easiest solution would likely be to shift the instrument in the parameter sheet such that the 24 → 0 transition is the central parameter value, which lets you avoid the jump from 24 → 0 that you’re currently experiencing.

Obviously, this would require minor tweaks in engine to map or correct the parameter value, so if you did want to handle it solely in FMOD Studio, the best way to do this would be to have your Time parameter automate another parameter, which we’ll call “Track”.

If you use an automation curve to set up Track such that it has the same value when Time is at the start an end of its range, like so:

Capture

The result is that you functionally remap the value of the Time parameter, which is basically the same thing as my initial suggestion but handled in Studio. You can then set up your instruments as desired on the Track parameter instead.

Thanks Louis - I’ll give this a shot.

1 Like