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

Add support for AAX meters #801

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

sstillwell
Copy link
Sponsor Contributor

  • 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.

@hor-net
Copy link
Contributor

hor-net commented Dec 9, 2021

I was waiting for something like this always wanted to work on it but never found the time! Thank you! one vote for me!

@sstillwell
Copy link
Sponsor Contributor Author

@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.

@@ -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);
Copy link
Member

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

@olilarkin olilarkin changed the title Stillwellaudio/aax meter pull request Add support for AAX meters Dec 9, 2021
@sstillwell
Copy link
Sponsor Contributor Author

sstillwell commented Dec 9, 2021

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.

@olilarkin
Copy link
Member

@sstillwell
Copy link
Sponsor Contributor Author

I'll work on it this evening if I have a chance. Thanks!

@sstillwell
Copy link
Sponsor Contributor Author

I've refactored into IPlugAAX.h/.cpp - it works here. Please review @olilarkin. It's not pretty but it works.

@sstillwell
Copy link
Sponsor Contributor Author

FYI, making this change means that the call to SetGRBufferMaxValue() in the plugin's ProcessBlock() method must be guarded by:

#ifdef AAX_API
SetGRBufferMaxValue(some_value);
#endif

@olilarkin olilarkin added the AAX issue relates to AAX plug-ins label Dec 27, 2021
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AAX issue relates to AAX plug-ins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants