enzienaudio / heavy

heavy public issue tracker and static dsp code releases
https://enzienaudio.com
ISC License
71 stars 4 forks source link

Mapping unique output parameters in wwise #250

Open Bluetech777 opened 6 years ago

Bluetech777 commented 6 years ago

Perhaps I'm missing something, but how to you map output parameters to unique RTPC in wwise? Can there only be one global RTPC or can unique instances be created for multiple versions of a plugin?

Usage case: Have built a multiband metering solution with envelopes for individual band volume data (to run audio reactive particle rig in unreal engine). These output parameters (a1-a4) have no option to assign which RTPC they are attached to in wwise, unlike other plugin parameters. Since there are multiple tracks, each one needs a version of the patch loaded as an FX plugin, and needs a unique RTPC for each band (i.e. a1_bass, a1_synth, etc).

Can someone point me to how to do this?

diplojocus commented 6 years ago

You can set up output parameters by using the @hv_param annotation on a send object.

For example, any float values sent to [s myOutput @hv_param] will be passed on to an RTPC within wwise that has to be specifically called myOutput. It'll show up in the plugin UI as a reference.

If the plugin is in the Actor-Mixer hierarchy, the output parameter will update the RTPC for that given gameObjectID voice. So you can manage multiple instances.

However, if the plugin is placed on a bus, there isn't a gameObjectID associated and it'll set the respective global RTPC.

You may have seen some other plugins that let you select the RTPC will a dropdown menu. The reason that's not available is that implementing it requires some private APIs within wwise :( so unfortunately you'll just have to make sure there's an RTPC of the same name as the patch output param.

Bluetech777 commented 6 years ago

They are withing the actor / mixer hierarchy but each plugin is being loaded as an effect on each individual audio track, since I need audio reactivity for multiple bands on each file.

I also need an instance on the Master audio bus for input that we are routing from other locations.

Just to verify, individual parameters on FX instances loaded directly on an audio track will only output floats from that particular instance? What happens when there is a version on the master audio bus? Will this override instances?

Is there anything particular that needs to be done on the Unreal side to identify which instance is being called?

diplojocus commented 6 years ago

So for the master audio bus, it will just affect the global RTPC.

It should be fine as an effect plugin in your A/M, in this case it'll update the instance RTPC (not the global one).

As far I can remember, global and instance RTPCs are all separate. Though it has been a while since I set it up!

Not sure what the best way to retrieve the out param in Unreal is, C++ or Blueprints? There's an API call GetRTPCValue you should probably use. IIRC the 2nd argument should be the gameObjectId (so your instance ID). If you pass null instead, you'll get the global RTPC.

I found it was also semi-useful to add a watch to the gameobject over a remote connection and you can see the RTPC value change over time within the Wwise editor.

Bluetech777 commented 6 years ago

Awesome, thanks for the explanation.