Setting Up the Project
First, we will set up our effect inside the project.
- Creating the effect directories.
- Adding our effect to the FORGE effects list.
Creating the Effect Directories.
-
Open STM32CubeIDE with
OSCAR_Workspaceas your workspace. -
Select the project
Software_OSCAR_P01A01. - Create a directory named
MyFirstEffectinsideSoftware_OSCAR_P01A01\DAD_FORGE\Effects:- Right-click on the
Effectsfolder → New / Folder.
- Right-click on the
-
Inside
MyFirstEffect, create two subdirectories:IncandSrc. - Select the
Incdirectory and add it to the include path:- Right-click on
Inc→ Add/Remove Include Path, then check all build configurations.

- Right-click on
- Create a new header file
cMyFirstEffect.hinsideInc:- Right-click on
Inc→ New / Header File.
- Right-click on
- Create a new source file
cMyFirstEffect.cppinsideSrc:- Right-click on
Src→ New / Source File.
- Right-click on
Adding Our Effect to the FORGE Effects List
Open the following file: Software_OSCAR_P01A01\DAD_FORGE\Effects\@Config\EffectsConfig.h
Modify the “EFFECT CONFIGURATION” section by commenting out the line #define TEMPLATE_EFFECT and adding the following line #define MY_FIRST_EFFECT
This tells FORGE to compile our effect.
// ======================= EFFECT CONFIGURATION ===========================
#ifdef DEBUG_RELEASE_EFFECT
//#define DELAY_EFFECT
//#define MODULATIONS_EFFECT
//#define REVERB_EFFECT
//#define TEMPLATE_EFFECT
//#define TEMPLATE_MULTI_MODE_EFFECT
#define MY_FIRST_EFFECT
#endif
In the ‘EFFECT CONFIGURATION CHECK’ section, append ` && !defined(MY_FIRST_EFFECT)` to the condition of the second if statement.
// ====================== EFFECT CONFIGURATION CHECK ======================
// Ensures exactly one effect is selected during compilation.
//
#if defined(DELAY_EFFECT) + defined(MODULATIONS_EFFECT) + defined(REVERB_EFFECT) + defined(TEMPLATE_EFFECT) + defined(TEMPLATE_MULTI_MODE_EFFECT)> 1
#error "ERROR: Multiple effects are defined at the same time! Only one effect must be active."
#endif
#if !defined(DELAY_EFFECT) && !defined(MODULATIONS_EFFECT) && !defined(REVERB_EFFECT) && !defined(TEMPLATE_EFFECT) && !defined(TEMPLATE_MULTI_MODE_EFFECT) && !defined(MY_FIRST_EFFECT)
#error "ERROR: No effect is defined! Please define exactly one of: DELAY_EFFECT, MODULATIONS_EFFECT or REVERB_EFFECT."
#endif
At the end of the file, add the following code to provide FORGE with the information required to run the effect:
// Configuring the First effect
#ifdef MY_FIRST_EFFECT
#include "cMyFirstEffect.h"
#define DECLARE_EFFECT cMyFirstEffect __Effect
#define EFFECT_NAME "My First Effect"
#define EFFECT_VERSION "Version 1.0"
#define EFFECT_SPLATCH_SCREEN "Template.png"
constexpr uint32_t EFFECT_BUILD = BUILD_ID('F', 'R', 'I', '1');
#endif