Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customising GUI controls for Wwise #256

Open
RobertoHuge opened this issue Mar 22, 2018 · 10 comments
Open

Customising GUI controls for Wwise #256

RobertoHuge opened this issue Mar 22, 2018 · 10 comments
Labels

Comments

@RobertoHuge
Copy link

RobertoHuge commented Mar 22, 2018

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

@diplojocus
Copy link
Contributor

diplojocus commented Mar 26, 2018

@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

@RobertoHuge
Copy link
Author

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.

@diplojocus
Copy link
Contributor

Integer ranges and toggles are on the roadmap, see here for how that might look: #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.

@RobertoHuge
Copy link
Author

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
Copy link
Author

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
Copy link
Author

RobertoHuge commented Apr 5, 2018

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

@diplojocus
Copy link
Contributor

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.

@RobertoHuge
Copy link
Author

image

@dbaxaudio
Copy link

dbaxaudio commented Apr 9, 2018 via email

@RobertoHuge
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants