Programmer Instruments sounds from urls usage / alternatives questions

Hey Fmodderrs,

I have a large quantity (~20,000 / 10G as wavs) of audio clips which are user selectable, they are vocal lines which run over the music soundtrack. The programmer instrument is in a loop which will be used / repeated many times during playback.

There’s no sensible way to group the audio clips into ones that could be used together, eg. to build them into sets of banks that may be used together, their usage is pretty random.

The target device is mobile so packaging them all up into a single bank isn’t practical.

I can use programmer instruments to trigger the selected audio clip. When the user selects the clip there will be a delay while it’s downloaded from a url, this is expected and fine the first time it’s used.

A few questions;

  1. Are there any options other than using programmer instruments?

  2. The event that will hold the programmer instrument will be looped quite often, is there a way to “fix” a sound to a programmer instrument rather than having to respond to the callback every time the loop repeats?

  3. Alternate solution; at runtime with built banks can I add sounds to events in a similar way to scripting in studio (eg, studio.project.create(‘SingleSound’) and then adding it to an event track). I can’t find any mention of this in the runtime APIs so I assume its not an option.

  4. Are there any utilities that are prefered for batch compressing audio files outside of banks to vorbis?

Your only other option is to directly interact with the Core API, which means you lose out on all Studio functionality.

There isn’t a way to “fix” the sound to a programmer instrument - essentially, once the programmer instrument untriggers it loses its association with the sound. However, you should be able to create a sound a single time in your own code, and then pass it into the event callback using user data so you can get the programmer instrument to play it.

Take a look at this reply for an example on how you might do so: Adding effects to real-time recorded audio - #2 by Connor_FMOD

No, this isn’t an option.

A few options come to mind, such as ffmpeg, Audacity, and fre:ac, but there may be other options out there that suit your needs better.

1 Like

:+1: thanks Louis, thats super useful information