How to get the value of AudioProcessorValueTree in ARAPlaybackRender.
I’ve already retrieved the value of APTVS from the AudioProcessor, but I can’t get it in ARAPlaybackRender.
I’m sorry, I know this is a low-level question, but it’s been bothering me for days.
I’m not sure this can be done easily but if your goal is to retrieve parameters, it might not be a good approach with ARA. You can use the
juce::ARADocumentControllerSpecialisation and the
juce::ARAAudioModification classes to save and restore data.
Thanks for your answer, I read my sample file carefully and found that it does use the juce::ARADocumentController and juce::ARAAudioModification classes to save and restore data.
I found that it creates a DocumentView and PlaybackRegionView class. It implements the slider in the PlaybackRegionView class and then passes the value of the slider to the AAAAudioModification class. Then it called the methods of ARAAudioModification in the playbackrander to get the value of the slider.
But my sample file is really hard to read and I can’t reproduce it. Can you please show me how to implement in code to create a gain slider and get the value of gain in playbackrender::processblock? Thank！
The ARADemoPlugin of the JUCE_ARA fork might be more helpful for you than the example of the main JUCE. Look at the
dimmed variable of the
ARADemoPluginAudioModification class, and how it is used by the
PlaybackRenderer class for the playback and the
ARADemoPluginDocumentControllerSpecialisation class for saving/restoring the state.