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
Add support for AAX meters #801
base: master
Are you sure you want to change the base?
Add support for AAX meters #801
Conversation
sstillwell
commented
Dec 9, 2021
- Created issue Add support for AAX meters #800
- This pull requests adds input, output, and gain reduction meters (for Dynamics plugins) that report information back to Pro Tools for metering within the host UI - this could additionally be extended to other formats than AAX if the host supports it.
…urfaces, mixer UI).
…or loops because there's only one maximum value regardless of number of buses.
… separate from creating the descriptors.
I was waiting for something like this always wanted to work on it but never found the time! Thank you! one vote for me! |
@hor-net do be sure to read the notes on the linked issue #800 about how to implement Gain Reduction in Dynamics plugins - you'll need to add a single call in your plugin's ProcessBlock() method to report the highest gain reduction in that block (0.0 = no reduction, 1.0 = full reduction to silence). That's per Pro Tools AAX SDK docs. |
IPlug/IPlugProcessor.cpp
Outdated
@@ -509,11 +512,16 @@ void IPlugProcessor::PassThroughBuffers(PLUG_SAMPLE_SRC type, int nFrames) | |||
|
|||
void IPlugProcessor::ProcessBuffers(PLUG_SAMPLE_DST type, int nFrames) | |||
{ | |||
mMeterLevelIn = GetInputBufferMaxValue(nFrames); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to affect all plug-in formats. This should move out of IPlugProcessor
I'll do the work, but do you have a suggestion as to where? I placed it there because it's able to surround the call to the plugin's ProcessBlock() method, and also to plan ahead if VST3 or other SDK would support similar mechanism in the future. Again, willing to do the work, but unsure where else it could logically go. edit: I guess I could put it in IPlugAAX::RenderAudio and just surround the call to ProcessBuffers() / PassThroughBuffers()...would that work for you? I'll have to change how I access the buffers, but I think I can accomplish that. |
I'll work on it this evening if I have a chance. Thanks! |
…ly applies to AAX plugins.
I've refactored into IPlugAAX.h/.cpp - it works here. Please review @olilarkin. It's not pretty but it works. |
FYI, making this change means that the call to SetGRBufferMaxValue() in the plugin's ProcessBlock() method must be guarded by: #ifdef AAX_API |
Change method to only search connected buffers for maximum values - otherwise would cause mono instances to crash either on instantiation, on removal, or on Pro Tools quit.
ed4d21e
to
e029826
Compare