Macros - Clear All?
-
-
@d-healey Thanks, I had a play with the code and couldn't find a way to prevent the name resetting.
I was commenting out lines from this bit at 206, but it was all or nothing. Perhaps it's elsewhere in the script. The function here is for one Macro at a time, but I guess it could be tweaked to apply to all.
if(result == -1) { synthChain->getMainController()->getMacroManager().setMacroControlMidiLearnMode(synthChain, index); synthChain->getMainController()->getMacroManager().setMidiControllerForMacro(-1); synthChain->clearData(index); macroNames[index]->setText("Macro " + String(index + 1), dontSendNotification); }
-
@DanH said in Macros - Clear All?:
synthChain->clearData(index);
So now you need to dig deeper and find out what the clearData function does.
-
@d-healey Hmmm... need a hint, where to look perhaps? To me it looks like it clears the data collected in the lines above.
-
@DanH Find the function definition and see what it's doing
-
@d-healey I'm getting confused. Is it defined in the the file, or is it a more general c++ thing?
-
@DanH
clearData
is a function, so somewhere in the HISE sourcecode there must be a place where that function is defined, it will look something like (but not exactly the same as):function clearData() { }
-
@d-healey gotcha
-
@d-healey searched the SC for clearData... Nothing pertinent coming up :/
-
@DanH is it this you're looking for?
-
@ulrik Thanks, I honestly don't know :face_with_tears_of_joy:
Does it define the function of clearData
-
@DanH Yes I think this is where the function is defined, better ask David :)
-
@ulrik Looks like a function definition to me, of course there could be more than one clearData function so make sure it's in the right class (what ever object type synthChain is).
-
@d-healey it never ends! :face_with_tears_of_joy:
-
@DanH :) Yep