diff --git a/resources/data/patches_factory/Tutorials/Formula Modulator/12 A Slew Limiter.fxp b/resources/data/patches_factory/Tutorials/Formula Modulator/12 A Slew Limiter.fxp new file mode 100644 index 00000000000..07ea8eb810b Binary files /dev/null and b/resources/data/patches_factory/Tutorials/Formula Modulator/12 A Slew Limiter.fxp differ diff --git a/src/common/dsp/modulators/FormulaModulationHelper.cpp b/src/common/dsp/modulators/FormulaModulationHelper.cpp index ad515ac9111..048e77fa58f 100644 --- a/src/common/dsp/modulators/FormulaModulationHelper.cpp +++ b/src/common/dsp/modulators/FormulaModulationHelper.cpp @@ -205,6 +205,14 @@ end lua_settable(s.L, -3); + lua_pushstring(s.L, "samplerate"); + lua_pushnumber(s.L, samplerate); + lua_settable(s.L, -3); + + lua_pushstring(s.L, "block_size"); + lua_pushnumber(s.L, BLOCK_SIZE); + lua_settable(s.L, -3); + if (lua_isfunction(s.L, -2)) { auto cres = lua_pcall(s.L, 1, 1, 0);