heavy icon indicating copy to clipboard operation
heavy copied to clipboard

Customising GUI controls for Wwise

Open RobertoHuge opened this issue 6 years ago • 10 comments

Hello,

I have created a Pd patch which achieves all of the functionality that I want, and everything works correctly when converted into a Wwise plugin.

How would I approach creating GUI controls for the Wwise plugin? My system is 64 bit Windows.

I'm a novice programmer outside of Pd and Max so I would appreciate some advice on this.

Thank you

RobertoHuge avatar Mar 22 '18 15:03 RobertoHuge

@RobertoHuge what kind of GUI controls are you looking for?

Currently you can expose parameter controls with @hv_param on a [send] or [receive] object and WAV loading with @hv_table on a table/array object.

See here for more info: https://enzienaudio.com/docs/index.html#07.wwise#rtpcs

diplojocus avatar Mar 26 '18 05:03 diplojocus

I should've been clearer: in addition to the default float sliders, I'd like to have integer sliders and toggle/tick boxes, but I'd also like to change the layout so that some parameters are arranged in cross tables.

Thus far I have figured out how to edit the position, size, parameter names, and borders in the resource script of the Wwise source code (Hv_examplepatch_WwiseAuthoringPlugin.rc)

To give some context the patch is utilising Markov chains, and as a result I have 230 exposed parameters.

RobertoHuge avatar Mar 26 '18 11:03 RobertoHuge

Integer ranges and toggles are on the roadmap, see here for how that might look: https://github.com/enzienaudio/heavy/issues/130

What's a cross table?

One of the aims of heavy is a focus on the audio processing and to not turn it into a generic GUI design system, so I'd be hesitant to go beyond the necessary features.

I'm glad you found the Wwise authoring plugin rc file, you can indeed edit that to create custom UI. If you want to provide any suggestions for improvements I'd be interested to take a look.

diplojocus avatar Mar 26 '18 12:03 diplojocus

What do you mean by the roadmap? Is that something I can edit in the source code?

A cross table is just a table with x and y values respresented through how they intersect: image So for me it would be a Markov chain table with values 1-8 on each axis, and each intersection would contain a slider for the parameter.

I completely understand that - I don't think it's necessary to have a generic GUI design system in Heavy, but I think it's useful to know how it can be edited in the source code.

RobertoHuge avatar Mar 26 '18 13:03 RobertoHuge

I've managed to achieve most of the GUI functionality from the resource script, but I can't get the parameter assignment to work with checkboxes and comboboxes from the Windows MFC.

For the generated float sliders, the parameter values are passed to the rest of the program. When I change these sliders to a different form such as a checkbox, the parameter values are not set through checking/unchecking. They still contain the parameter ID (e.g. IDS_HV_PARAM_PLAY), but it is not clear how to utilise them to send a value of 1 and 0 for checked and unchecked respectively.

Is there some way I can change the Heavy parameter values when changes are made from the GUI script?

RobertoHuge avatar Apr 03 '18 20:04 RobertoHuge

I've figured out how to make all of the GUI controls for future reference:

Firstly, to change the float sliders to integer you change the type of parameter in the XML file from Real32 to int32, as well as the default values and ranges from floats to integers. Additionally, Wwise has a bunch of object classes for the GUI. For example, a combobox can be made by creating a static text in the resource script and assigning the class and enumerations. For example: LTEXT "Class=Combo;Prop=param_name;Options=0:option1,1:option2,2:option3",IDC_RANGE_HV_PARAM_EXAMPLE_TYPE,20,20,80,13,WS_BORDER | WS_TABSTOP

image

Finally, to utilise the other objects available from windows MFC toolbox you need to firstly assign the parameter ID to that object. Then add this code at the top of the WwiseAuthoringPlugin cpp script(after the includes and defines):

using namespace AK; using namespace Wwise;

// Bind non static text UI controls to properties for property view AK_BEGIN_POPULATE_TABLE(TableExample) AK_POP_ITEM(IDC_RANGE_HV_PARAM_PLAY, szHv_examplepatch_param1) AK_POP_ITEM(IDC_RANGE_HV_PARAM_MMR1, szHv_examplepatch_param2) AK_END_POPULATE_TABLE()

For Wwise to call the dialog, the out_pTable needs to be set to the name of the table(TableExample). This is located underneath the bool Hv_examplepatch_WwiseAuthoringPlugin::GetDialog function.

This information and more can be found here: https://www.audiokinetic.com/library/2017.2.2_6553/?source=SDK&id=wwiseplugin__dialog__guide.html

RobertoHuge avatar Apr 05 '18 23:04 RobertoHuge

Hey @RobertoHuge awesome work! Looks like you're rocking it. I meant to reply earlier and but I couldn't find the plugin dialog guide you just linked! Would you also be able to post a screenshot of the resultant UI from your changes? I'd be interested in integrating these changes in heavy itself.

diplojocus avatar Apr 06 '18 08:04 diplojocus

image

RobertoHuge avatar Apr 09 '18 12:04 RobertoHuge

This looks amazing, what are you doing with the front end/game input?

dbaxaudio avatar Apr 09 '18 17:04 dbaxaudio

Thanks, it's a procedural/generative music plugin. I didn't make it for a specific game, but I think there's lots of potential as to how you could map game parameters to musical elements such as tempo, transposition, and key.

Here's a quick demo of it generating a melody over a prerendered loop: https://www.youtube.com/watch?v=JzWK9ZBJOhw

RobertoHuge avatar Apr 16 '18 17:04 RobertoHuge