Howdy, my first question here so please be kind to the noob ![]()
I’m writing a plugin that displays MIDI notes on the grand staff, and I have some parameters that I want preserved when updating the plugin.
This works fine for an AudioParameterChoice, but not for envelopes or even just the last values on AudioParameterBool and AudioParameterInt params.
Note that this is on Reaper, so it’s maybe only a problem there. The Reaper error message is: “parameter envelope on non-automatable parameter”, even though one can add envelope and automate those parameters within the same plugin version.
Incidentally, persisting ints and bools didn’t work on the JUCE standalone app until I manually set the appropriate values on the AudioProcessorValueTreeState.
Here’s the beginning of the constructor, where the audio parameters are constructed:
GrandStaffMIDIVisualizerProcessor()
: AudioProcessor (getBusesLayout()),
parameters(*this, nullptr, juce::Identifier("GrandStaffMIDIVisualizerParameters"),
{
std::make_unique<juce::AudioParameterChoice>("key",
"Key",
StringArray {
"Sharp", "Flat",
"C", "C#", "Db", "D", "Eb", "E", "F", "F#", "Gb", "G", "Ab", "A", "Bb", "B"
},
0
),
std::make_unique<juce::AudioParameterBool>("holdNotes", // parameterID
"Hold Notes", // parameter name
false), // default value
std::make_unique<juce::AudioParameterInt>(OCTAVES_ID, // parameterID
"Octaves", // parameter name
-3, // min value
3, // max value
0), // default value
std::make_unique<juce::AudioParameterInt>("chordPlacement", // parameterID
"Chords Placement", // parameter name
0, // min value
2, // max value
1), // default value
std::make_unique<juce::AudioParameterBool>("chordFontBold", // parameterID
"Display chords with bold font", // parameter name
false), // default value
})
All of the source code is here: https://github.com/brynjar-reynisson/GrandStaffMIDIVisualizer/tree/main
I have a hunch that Reaper expects there to be something that listens to host notifications for these params, but don’t know what to look for.
Hope that someone can help, seems like I can’t be the only one to have encountered this.
TIA!



