Skip to content

Commit

Permalink
- added parameter ID & value dump function to patch browser context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Hart committed Sep 15, 2024
1 parent db42d96 commit b263ec8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion currentGitHash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cec22a05605d96258fef5cbeecc955f81266cde9
db42d96dc918b0ff55f60615f400861ec9ea2e7a
2 changes: 1 addition & 1 deletion hi_backend/backend/currentGit.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define PREVIOUS_HISE_COMMIT "cec22a05605d96258fef5cbeecc955f81266cde9"
#define PREVIOUS_HISE_COMMIT "db42d96dc918b0ff55f60615f400861ec9ea2e7a"
17 changes: 17 additions & 0 deletions hi_core/hi_dsp/editor/ProcessorEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ void ProcessorEditor::showContextMenu(Component* c, Processor* p)
InsertBefore,
CloseAllChains,
ViewXml,
DumpParameters,
CheckForDuplicate,
CreateGenericScriptReference,
CreateTableProcessorScriptReference,
Expand Down Expand Up @@ -664,6 +665,7 @@ void ProcessorEditor::showContextMenu(Component* c, Processor* p)

m.addItem(Copy, "Copy " + p->getId() + " to Clipboard");
m.addItem(ViewXml, "Show XML data");
m.addItem(DumpParameters, "Dump parameter ID & values");

if ((dynamic_cast<Chain*>(p) == nullptr || dynamic_cast<ModulatorSynth*>(p)) && !isMainSynthChain)
{
Expand Down Expand Up @@ -729,6 +731,21 @@ void ProcessorEditor::showContextMenu(Component* c, Processor* p)
{
PresetHandler::checkProcessorIdsForDuplicates(p, false);
}
else if (result == DumpParameters)
{
String s;

s << "(" << p->getType() << ") - Parameter dump: \n";

for(int i = 0; i < p->getNumAttributes(); i++)
{
s << "\t[" << String(i) << "]: " << p->getIdentifierForParameterIndex(i).toString().quoted() << " | " << String(p->getAttribute(i), 2) << "\n";
}

debugToConsole(p, s);


}
else if (result == CreateGenericScriptReference)
ProcessorHelpers::getScriptVariableDeclaration(p);
else if (result == CreateAudioSampleProcessorScriptReference)
Expand Down

0 comments on commit b263ec8

Please sign in to comment.