# Select a sound within a multisound to play via a parameter

**URL:** <https://qa.fmod.com/t/select-a-sound-within-a-multisound-to-play-via-a-parameter/12768>\
**Category:** FMOD Studio\
**Created:** [October 24, 2016, 3:35am UTC](https://qa.fmod.com/t/select-a-sound-within-a-multisound-to-play-via-a-parameter/12768 "2016-10-24T03:35:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wizardfu](https://avatars.discourse-cdn.com/v4/letter/w/c57346/32.png) [@wizardfu](https://qa.fmod.com/u/wizardfu)\
**Post date:** [October 24, 2016, 3:35am UTC](https://qa.fmod.com/t/select-a-sound-within-a-multisound-to-play-via-a-parameter/12768/1 "2016-10-24T03:35:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [October 24, 2016, 10:19am UTC](https://qa.fmod.com/t/select-a-sound-within-a-multisound-to-play-via-a-parameter/12768/2 "2016-10-24T10:19:00Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![wizardfu](https://avatars.discourse-cdn.com/v4/letter/w/c57346/32.png) [@wizardfu](https://qa.fmod.com/u/wizardfu)\
**Post date:** [October 24, 2016, 5:32pm UTC](https://qa.fmod.com/t/select-a-sound-within-a-multisound-to-play-via-a-parameter/12768/3 "2016-10-24T17:32:20Z")

</div>

> [@](#):
>
> 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).

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.

---

<div class="post-metadata">

**Author:** ![wizardfu](https://avatars.discourse-cdn.com/v4/letter/w/c57346/32.png) [@wizardfu](https://qa.fmod.com/u/wizardfu)\
**Post date:** [October 24, 2016, 5:34pm UTC](https://qa.fmod.com/t/select-a-sound-within-a-multisound-to-play-via-a-parameter/12768/4 "2016-10-24T17:34:07Z")

</div>

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.
