iPlug2 icon indicating copy to clipboard operation
iPlug2 copied to clipboard

Add support for AAX meters

Open sstillwell opened this issue 4 years ago • 7 comments

  • Created issue #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.

sstillwell avatar Dec 09 '21 02:12 sstillwell

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 avatar Dec 09 '21 09:12 hor-net

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

sstillwell avatar Dec 09 '21 15:12 sstillwell

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.

sstillwell avatar Dec 09 '21 19:12 sstillwell

https://github.com/iPlug2/iPlug2/blob/master/IPlug/AAX/IPlugAAX.cpp#L366

olilarkin avatar Dec 09 '21 19:12 olilarkin

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

sstillwell avatar Dec 09 '21 19:12 sstillwell

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

sstillwell avatar Dec 09 '21 23:12 sstillwell

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

sstillwell avatar Dec 10 '21 00:12 sstillwell