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

RNBO Parameters working in Max/Msp but Unity doesn't see them. #45

Closed
JimPapanick opened this issue Aug 18, 2024 · 2 comments
Closed

RNBO Parameters working in Max/Msp but Unity doesn't see them. #45

JimPapanick opened this issue Aug 18, 2024 · 2 comments
Assignees

Comments

@JimPapanick
Copy link

I have done various small plugins in Unity and I have successfully done pretty much the same thing I'm trying to do now various times. Suddenly today the parameters that ARE changing , do not show that anything is happening when I debug them through a script. I basically have copied and pasted past plugins and re-exported them and their newly exported versions are broken aswell. So I think that something is wrong with my Unity/Rnbo/Cmake (max/msp was also updated and i still have the same issue).

I'm at my wits end.
SO

During export through CMAKE on CMD, do you find any weird messages in this log?
Copy and pasted from CMD.

D:>cd D:\Unity\RNBO\rnbo.unity.audioplugin-main\build

D:\Unity\RNBO\rnbo.unity.audioplugin-main\build>cmake .. -DPLUGIN_NAME="Fzero4"
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.22621.
-- building for WindowsStandalone64 with bit depth 64 for CPU AMD64
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done (0.3s)
-- Generating done (0.0s)
-- Build files have been written to: D:/Unity/RNBO/rnbo.unity.audioplugin-main/build

D:\Unity\RNBO\rnbo.unity.audioplugin-main\build>cmake --build .
MSBuild version 17.6.3+07e294721 for .NET Framework

RNBOWrapper.cpp
AudioPluginUtil.cpp
rnbo_source.cpp
RNBO.cpp
Generating Code...
Creating library D:/Unity/RNBO/rnbo.unity.audioplugin-main/build/Debug/Fzero4.lib and object D:/Unity/RNBO/rnbo.un
ity.audioplugin-main/build/Debug/Fzero4.exp
RNBOUnityPlugin.vcxproj -> D:\Unity\RNBO\rnbo.unity.audioplugin-main\build\Fzero4\Assets\Plugins\Windows\Fzero4.dll

D:\Unity\RNBO\rnbo.unity.audioplugin-main\build>

@JimPapanick
Copy link
Author

A screenshot example of what I'm experiencing.
1: I have input on my audio source, the input does have output (i can hear it)
2: The parameter in the patcher works just fine as you can see on the right
3: The parameter in Unity seems idle both in the inspector and through the script that I'm handling it

Please help!!
image

@jinpavg
Copy link
Contributor

jinpavg commented Aug 22, 2024

Hi Jim, thank you for reaching out here and sharing this example. Yes, I think I can see what's up here. There are basically two issues -

  1. It doesn't look like you've set an instance index for the RNBO plugin on the Mixer. Without this, you won't be able to address this particular instance of your RNBO plugin from script.

  2. Unity's GUI for audio parameters includes slider that don't necessarily reflect the present value of the parameter in your RNBO plugin. Instead of calling GetFloat() on the audio mixer, I'd recommend you get the value of the parameter directly from your RNBO plugin, by calling GetParamValue(). You can see the documentation for that here: https://github.com/Cycling74/rnbo.unity.audioplugin/blob/main/docs/PARAMETERS.md#getting-a-parameter-value

So in your situation, it doesn't look like your script has a reference to this instance of the RNBO Plugin. It's possible that the plugin is functioning (after all, it is passing audio), but we don't know if it is because we are just asking the audio mixer what the value of the slider named "FzeroHzAmount" is, which is always 0.

If you set up your script to address a particular instance of your device, as in the "GETTING STARTED" article above, and get the value of the parameter directly from that plugin, it should become clear whether your plugin is in fact changing the value of your parameter or not.

Certainly let me know if I can help further!

@jinpavg jinpavg closed this as completed Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants