Answered
0
0

Is it possible to select a certain sound within a multisound to trigger via a parameter?

I want to create procedurally-generated melodies using my game’s random numbers, not FMOD’s. And I don’t want to use the pitch automation, so I’ve got 12 different samples each for the various notes. At first I thought I could create a multisound that holds all twelve notes, then trigger a certain one to play via a parameter, but I can’t figure out how to do that.

I realize it’s possible to create twelve different audio tracks, all with the same rhythm structure, and make only one of these play based on the parameter, but would definitely be cumbersome and I imagine inefficient as well.

  • You must to post comments
Best Answer
2
0

Hi Nathanael,
You can’t automate the index of the sound that plays in a multisound, but you can do a few different things to get the same effect.

If you have 12 samples, just put them on one track, next to each other. This is a bit like the explosions/Single Explosion example in the example project in fmod studio, and it is controlled by the ‘size’ parameter.

You can use an event like that as a sound in another event, so it can look like a ‘sound’ in a track , this is done by using reference events (ie open 2 event windows, and drag an event into the track of another event).

  • Nathanael Weiss

    Thanks this really helped. I also see I can use Programmer Sounds, which could be just the thing as I want to procedurally determine the musical key for many different sound effects. I will try out all these methods and see which one fits.

  • Nathanael Weiss

    Just figured out how to create a programmer sound by right clicking in any track and doing Add Programmer Sound. Also found programmer_sound.cpp in the examples and how to identify each individual sound via getting the FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES struct and reading the name variable.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.