From 0b151ab82846ee52a5791ea68130f79575fa6655 Mon Sep 17 00:00:00 2001 From: Chris McAvoy Date: Tue, 12 Nov 2019 14:14:48 -0700 Subject: [PATCH] Added missing section from tutorial It's easy to miss the step to add your module to `plugin.hpp` and `plugin.cpp`. It says you need to do that in the output from the helper script, but it should be a step in the tutorial itself. --- PluginDevelopmentTutorial.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/PluginDevelopmentTutorial.md b/PluginDevelopmentTutorial.md index 2a7dc4c..4837439 100644 --- a/PluginDevelopmentTutorial.md +++ b/PluginDevelopmentTutorial.md @@ -74,6 +74,23 @@ to the init() function in plugin.cpp. ``` Open `MyModule.svg` with Inkscape, open the Layers panel, and hide the `components` layer to hide component placeholders. +## Add the module to the plugin + +The `createmodule` command above adds your module to the `plugin.json` manifest, but doesn't enable the module until you add it to +`plugin.hpp` and `plugin.cpp`. + +Uncomment the following line (at or near line 11) in `src/plugin.hpp`, + +```cpp +extern Model *modelMyModule; +``` + +Then uncomment the line (also at or near line 11) in `src/plugin.cpp`, + +```cpp +p->addModel(modelMyModule); +``` + ## Implementing the DSP kernel Rack modules have four basic components, as we saw in the [Panel Guide](Panel.html).