FrontEndMacro: Display Parameter Text Instead of Parameter ID
-
Looking in the source I find this
-
Looking in the source I find this
So it should appear the pluginParameterName?
In the MIDI Panel it displays the pluginParameterName, and technically the style is the same of the FrontEndMacroPanel.
-
@bendurso It's saying it will use the component name because processor parameters don't have a name of their own.
Can you change it using LAF?
-
@d-healey Mm but I'm using sliders, not processors. They do have names.
-
@bendurso said in FrontEndMacro: Display Parameter Text Instead of Parameter ID:
They do have names.
I'm not sure, I haven't used macros much.
-
@d-healey Oh, I ended up here because the MPE of the global modulator wasn’t working, but the MPE of the macro was. Along the way, I realized that macros are far more customizable than global modulators.
-
@d-healey said in FrontEndMacro: Display Parameter Text Instead of Parameter ID:
@bendurso It's saying it will use the component name because processor parameters don't have a name of their own.
Can you change it using LAF?
To be honest this would be very nice to have - i.e. the frontend Macro panel using the pluginParameterName as its display value for Parameter - sure I could (I think) build some sort of LAF for this, but all I'm looking for is the name to be something end-user readadble - and isn't that really the whole point of the pluginParameterName???
-
@d-healey I found that the display parameter is set by this function on line 1473 of FrontendPanelTypes.cpp
juce::String FrontendMacroPanel::getCellText(int rowNumber, int columnId) const { hise::SimpleReadWriteLock::ScopedReadLock sl(connectionLock); if (auto data = connectionList[rowNumber].get()) { if (columnId == ColumnId::ParameterName) return data->getParameterName(); else if (columnId == ColumnId::CCNumber) return getData(data)->getMacroName(); } return {}; }
I asked to Claude to change it to Automated parameter name (I also provided it the code of midi learn panel, because is the working example of what I want), and it gave me a working code:
juce::String FrontendMacroPanel::getCellText(int rowNumber, int columnId) const { hise::SimpleReadWriteLock::ScopedReadLock sl(connectionLock); if (auto data = connectionList[rowNumber].get()) { if (columnId == ColumnId::ParameterName) { auto* processor = data->getProcessor(); int parameterIndex = data->getParameter(); return hise::ProcessorHelpers::getPrettyNameForAutomatedParameter(processor, parameterIndex); } else if (columnId == ColumnId::CCNumber) return getData(data)->getMacroName(); } return {}; }
Now it displays the automated parameter name of the knobs on the FrontendMacroPanel :)
Can someone check if the syntax is correct? I mean, it compiled without issues, but maybe could crash in the future if something is wong hehe.
Maybe it can be added/modified to the Hise code on github. -
@bendurso The else isn't necessary because of the return in the clause above. Just use the if. I'd also go for an early return after the first if to avoid the nesting, but that's just me.
-
@bendurso hmm, is this handling the case where I dont set a pluginParameterName name? In that case it should fall back to the param name....
-
@Lindon Mm, no. My idea was to replicate the same behavior as the MIDI Learn Panel since it uses pluginParameterName, which works for me. Possibly, it could be modified to use the text from the slider instead.
-
@Lindon Or you could disable isPluginParameter checkbox, and insert a name for pluginParameterName anyway
-
@bendurso said in FrontEndMacro: Display Parameter Text Instead of Parameter ID:
@Lindon Or you could disable isPluginParameter checkbox, and insert a name for pluginParameterName anyway
I think you are missing the point, this is about QoL is it not?
-
@Lindon said in FrontEndMacro: Display Parameter Text Instead of Parameter ID:
I think you are missing the point, this is about QoL is it not?
It makes sense hehe.
@d-healey said in FrontEndMacro: Display Parameter Text Instead of Parameter ID:
The else isn't necessary because of the return in the clause above. Just use the if. I'd also go for an early return after the first if to avoid the nesting, but that's just me.
Oh yeah, there is something wrong because Hise was exported successfully, but I can't export a plugin with this updated code.
This are your suggestions? I tried it and it works, but still can't export a plugin with this.
juce::String FrontendMacroPanel::getCellText(int rowNumber, int columnId) const { hise::SimpleReadWriteLock::ScopedReadLock sl(connectionLock); auto data = connectionList[rowNumber].get(); if (!data) return {}; if (columnId == ColumnId::ParameterName) { auto* processor = data->getProcessor(); int parameterIndex = data->getParameter(); return hise::ProcessorHelpers::getPrettyNameForAutomatedParameter(processor, parameterIndex); } if (columnId == ColumnId::CCNumber) return getData(data)->getMacroName(); return {}; }
-
@bendurso said in FrontEndMacro: Display Parameter Text Instead of Parameter ID:
This are your suggestions? I tried it and it works, but still can't export a plugin with this.
Yep my suggestions won't fix such issues.
-
@d-healey Oh, the code was fine. The export error was due to me forgetting to enable Faust in the new build of HISE