Programmer instrument length performance/memory impact

Hello, we’re currently using an event with a programmer instrument track for a rhythm game we’re building. The programmer instrument gets filled with the song file in runtime based on the song the user selects.

The programmer instrument is currently Synchronous because we want precise seek functionality for players who’d like to go to a specific point in the song timeline. This currently works well, however it also means that we need to have a programmer instrument long enough so that would cover the entirety of the song file.

My question is: is there a meaningful performance or memory impact of changing the programmer instrument’s length, even if it’s not filled with song data that covers its entirety? For example, if we have a programmer instrument that’s 30 minutes long, versus 4 hours long, is there a performance difference between these two cases even if we fill it with a song file that’s only 4 minutes long?

Thanks!

The resource cost of a programmer instrument that isn’t currently playing audio is negligible. It’ll barely show up a blip in the profiler.

The FMOD_STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND callback fires when a programmer instrument finishes playing its sound, meaning that you’ll receive it and be able to release the programmer sound as soon as a song finishes playing, allowing you to free up the memory used by the song’s sampledata almost immediately. If you’d prefer to avoid even the blip of resources consumed by an event instance that isn’t playing audio, you could also stop and release the event instance at the same time.