Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

How to have MIDI playlist use random audio as its sample

0 votes

I have a music playlist of some looping midi files and I'm trying to figure out how to have this playlist select a different "sampler instrument" each time it is event-triggered. 

I'm trying to randomly alternate which audio sample is used for the MIDI music playlists, so I have the playlist targeted to a *random* container with a library of different audio samples. I want it to be like a sampler instrument that chooses a random instrument.

However, when I play the music playlist, it randomly selects a sample for each MIDI note - I'm wanting it to randomly select a sample for each segment in the playlist and use that sample for the entire MIDI segment, if that makes sense.

asked Oct 16, 2020 in General Discussion by Dan V. (130 points)
edited Oct 17, 2020 by Dan V.

2 Answers

0 votes
Hi, you might consider using the Blend Container as a container for your different instruments,

then create a Blend Track and use an LFO set to Random mode to pick a different instrument to play for each note.

More directly but Hacky's approach is to create a PD+Heavy plugin that outputs an RTPC value to drive the Switch Group every time a note is played,

enabling random selection of content under the Switch Group. However,

I think using Random LFO should be enough for your needs :)
answered Oct 19, 2020 by Hou Chenzhong (Audiokinetic) (5,990 points)
Thank you! So I'm not looking to switch instruments for each note but specifically for each music segment. I don't think the LFO will accomplish this but I am gonna mess around with a switch group and PD plugin.
0 votes
 
Best answer

Hey Dan, 

That's a good question. You could probably achieve this by creating a plugin that sets an RTPC randomly, and then use that RTPC to control what instrument is being played. 

Creating a PD patch would be a quick way to make it. 

For controlling what instrument is playing, you could connect the RTPC to volume. However, if you want to avoid having all instruments playing at the same time, you could also connect it to priority and kill the other instruments. 

Let us know if this works! 

answered Oct 19, 2020 by Mads Maretty S. (Audiokinetic) (39,060 points)
selected Oct 20, 2020 by Dan V.
Great idea! I haven't worked with pure data before but that video seems like a good walk through. Do you think it's better to use the plugin-generated-RTPC to drive priority (like you said), or to drive a switch group that contains switch tracks of each instrument?
Follow up question - how can I create the proper dll and xml files for my plugin on a mac? Heavy seems to only create .dylib, .bundle, .a, .h files for me when I follow the wwise compiling instructions.
Hey Dan. You're right, using a Switch container would definitely be better! Make sure to let us know how it goes.

About Heavy on Mac, I haven't yet tried it. So I'll have to get back to you on that.
Hi there,
To build the plugin dll and xml for the Authoring tool.
You need to compile it using Visual Studio under Windows.
That's because Wwise under macOS is actually running under a Windows emulator called wine.

Also when deploying the Authoring tool plugin,
remember not to follow hvcc's documentation on github,
as it's outdated.

You will need to deploy the dll and xml to the following address:
/Library/Application Support/Audiokinetic/Wwise\ 2019.2.6.7381/Authoring/x64/Release/bin/Plugins

Use the Finder to find it,
where the SDK version is filled out according to your situation.

I hope this helps.
Ah! Bummer but thank you for clarifying and for the additional info. Appreciate the help!
...