--- linuxsampler/trunk/src/engines/common/InstrumentScriptVM.cpp 2020/02/01 15:51:54 3732 +++ linuxsampler/trunk/src/engines/common/InstrumentScriptVM.cpp 2020/02/01 18:11:20 3733 @@ -88,8 +88,11 @@ * channels. * * @param text - source code of script + * @param patchVars - 'patch' variables being overridden by instrument */ - void InstrumentScript::load(const String& text) { + void InstrumentScript::load(const String& text, + const std::map& patchVars) + { dmsg(1,("Loading real-time instrument script ... ")); // hand back old script reference and VM execution contexts @@ -102,7 +105,9 @@ dynamic_cast(pEngineChannel->pEngine->GetInstrumentManager()); // get new script reference - parserContext = pManager->scripts.Borrow(text, pEngineChannel); + parserContext = pManager->scripts.Borrow( + { .code = text, .patchVars = patchVars }, pEngineChannel + ); if (!parserContext->errors().empty()) { std::vector errors = parserContext->errors(); std::cerr << "[ScriptVM] Could not load instrument script, there were "