Goal: make FxmeFX the single library dependency of MechanOdd (besides JUCE itself). FxmeFX already bundles FxmeTools as a submodule, and FxmeTools bundles WDL. So the target dependency chain is:
MechanOdd ──▶ FxmeFX ──▶ FxmeTools ──▶ WDL
(effects) (GUI/DSP/look&feel) (convolution engine)
After the transition MechanOdd must no longer depend on:
FxmeJuceTools(the JUCE user-module currently installed under../JUCE/usermodules/FxmeJuceTools), and- the top-level
lib/FxmeToolssubmodule (added by mistake — it is a byte-for-byte duplicate oflib/FxmeFX/lib/FxmeTools).
A full scan of Source/ shows MechanOdd depends on only a handful of symbols
from the FxmeJuceTools module:
| Symbol | Uses | Already in FxmeTools? |
|---|---|---|
fxme::FxmeSlider |
33 | ✅ FxmeTools/components/FxmeSlider.h (identical API, namespace fxme) |
fxme::FxmeLookAndFeel |
~13 | ✅ FxmeTools/lookandfeels/FxmeLookAndFeel.h (identical drawing code) |
fxme::HorizontalVuMeter |
2 | ✅ FxmeTools/components/FxmeMeters.h (identical API) |
CracksGenerator |
3 | ❌ missing — must be ported |
CracksGenerator is included directly (Source/Sources/CracksSource.h →
#include "CracksGenerator.h") and its .cpp is compiled into MechanOdd via an
explicit rule in CMakeLists.txt (lines 105–108), pulling from
../JUCE/usermodules/FxmeJuceTools/Dsp/.
Conclusion: the GUI components are already in FxmeTools. The only missing
piece is CracksGenerator (≈45 lines, header + cpp, no external deps).
The request assumed the LFO/ADSR "functions and components" live in FxmeFX.
They do not. Searches of lib/FxmeFX/ find no LFO/ADSR/envelope classes
(only compressor/limiter envelope followers, unrelated).
The LFO + ADSR modulation system lives inside MechanOdd itself, in
Source/Modulation/:
ModEngine.{h,cpp}— global modulator bank (LFO shapes +juce::ADSR)VoiceModEngine.{h,cpp}— per-voice variantModulationComponent.{h,cpp}— the GUI tabParamSource.h— per-voice APVTS shadowing
This system is tightly coupled to MechanOdd's architecture: APVTS parameter
ids, per-voice override atomics (ParamSource), target naming conventions
(src* / res* / mtx_* → isPerVoiceTarget), the feedback matrix, and
MechanOdd's "overwrite the raw-value atomic each block" modulation strategy. It
is not a clean lift-and-shift.
What is genuinely generic and reusable is a small LFO kernel:
- the
Shapeenum (sine/triangle/square/sawUp/sawDown), evalLfo(shape, phase),syncRateBeats(index)+ the tempo-sync rate table,- phase advance.
ADSR itself is already juce::ADSR — nothing to move.
Recommendation: treat LFO/ADSR promotion as optional and scoped: extract
only the LFO kernel into FxmeTools/dsp/Lfo.h (see step 2.B). Leave the
orchestration (ModEngine, VoiceModEngine, ParamSource, GUI) in MechanOdd.
See Open question Q1.
Mechanodd/
├─ .gitmodules
│ ├─ lib/FxmeFX → github.com/odoare/FxmeFX (KEEP)
│ └─ lib/FxmeTools → github.com/odoare/FxmeTools (REMOVE — duplicate)
├─ lib/FxmeFX/
│ ├─ WDL/WDL/ ← STALE leftover WDL working tree
│ │ (no longer in FxmeFX/.gitmodules;
│ │ MechanOdd's CMake still points here)
│ ├─ lib/FxmeTools/ ← the real FxmeTools (submodule @ f8b584b)
│ │ ├─ cmake/FxmeTools.cmake ← registers module + fxmetools_attach()
│ │ ├─ FxmeTools/ (the JUCE module: components/ dsp/ lookandfeels/)
│ │ └─ WDL/WDL/ ← canonical WDL (FxmeTools' submodule)
│ └─ Source/<Effect>/ …
└─ lib/FxmeTools/ ← DUPLICATE submodule @ f8b584b (REMOVE)
- Both
lib/FxmeToolsandlib/FxmeFX/lib/FxmeToolsare pinned to the same commitf8b584b— confirmed duplicate. lib/FxmeFX/WDL/WDLis a stale copy. MechanOdd'sCMakeLists.txt(lines 97–103) still compilesconvoengine.cpp/fft.c/resample.cppfrom there. The canonical WDL is now reached through FxmeTools viafxmetools_attach(), which compiles those same three files fromlib/FxmeFX/lib/FxmeTools/WDL/WDL.
lib/FxmeFX/lib/FxmeTools/cmake/FxmeTools.cmake provides:
juce_add_module(<FxmeTools module>)→ registers theFxmeToolstarget;fxmetools_attach(<target>)→ linksFxmeToolsand compiles the WDL convolution engine + adds its include dir + setsNOMINMAXon MSVC.
FxmeFX's own effect CMakeLists.txt files already use exactly this pattern
(include(.../lib/FxmeTools/cmake/FxmeTools.cmake) + link FxmeTools). The
reused effect components include FxmeTools by path, e.g.
#include <FxmeTools/dsp/VuMeter.h>, <FxmeTools/components/VuMeterComponent.h>,
<FxmeTools/dsp/Biquad.h> — so MechanOdd must have the FxmeTools module on
its include path once it compiles those effect sources (it gets this for free
from juce_add_module(FxmeTools)).
- MechanOdd source already qualifies the GUI controls as
fxme::…and reaches them through<JuceHeader.h>. BecauseFxmeToolsis a JUCE module,juce_generate_juce_header(MechanOdd)will include it inJuceHeader.hautomatically once it is linked — so no include changes are needed in MechanOdd source for the GUI controls. CracksGeneratoris currently in the global namespace. When ported into FxmeTools it should be wrapped innamespace fxmefor consistency, which means updating its 3 usages inSource/Sources/CracksSource.{h,cpp}tofxme::CracksGenerator(and changing the include to<FxmeTools/dsp/CracksGenerator.h>).
Two repos are touched: FxmeTools (inside the FxmeFX submodule) and MechanOdd. Changes to FxmeTools must be committed/pushed in the FxmeTools repo, then the FxmeFX submodule pointer bumped, then MechanOdd's FxmeFX pointer bumped. See step 6 for the commit/push ordering.
Work in lib/FxmeFX/lib/FxmeTools/.
-
Create
FxmeTools/dsp/CracksGenerator.h, copied from../JUCE/usermodules/FxmeJuceTools/Dsp/CracksGenerator.h, with these edits:- remove
#include <JuceHeader.h>(module headers must not include it; the umbrellaFxmeTools.halready includesjuce_core/juce_dspforjuce::Randomandjuce::dsp::ProcessSpec); - wrap the class in
namespace fxme { … }(matching the other dsp headers).
- remove
-
Create
FxmeTools/dsp/CracksGenerator.cpp, copied from the FxmeJuceTools.cpp, with#include "CracksGenerator.h"and the body wrapped innamespace fxme { … }(matchingSpectrumAnalyzer.cpp). -
Register them in the module:
- in
FxmeTools/FxmeTools.h, add under the DSP section:#include "dsp/CracksGenerator.h" - in
FxmeTools/FxmeTools.cpp, add:#include "dsp/CracksGenerator.cpp"
- in
-
(Optional consistency) bump the module
version:inFxmeTools.h.
No CMake change is needed in FxmeTools — module .cpps are aggregated through
FxmeTools.cpp.
Only if you want the LFO reusable across projects (see Q1). Scope it small:
- Create
FxmeTools/dsp/Lfo.hinnamespace fxmecontaining:enum Shape { sine, triangle, square, sawUp, sawDown };static float eval (Shape, float phase)(body fromModEngine::evalLfo);static float syncRateBeats (int index)+ the rate table (fromModEngine::syncRateBeats/syncRateChoices);- optionally a tiny stateful
class Lfo { float phase; advance(...); }.
- Add
#include "dsp/Lfo.h"toFxmeTools.h. - In MechanOdd, refactor
ModEngine/VoiceModEngineto callfxme::Lfo::eval(...)/fxme::Lfo::syncRateBeats(...)instead of their private statics. Keep all the orchestration in MechanOdd.
ADSR stays juce::ADSR — nothing to extract.
If you prefer to defer this, skip Step B entirely; it is independent of the core goal (dropping FxmeJuceTools + the duplicate submodule).
Edit /home/doare/src/Mechanodd/CMakeLists.txt:
-
Replace the FxmeJuceTools module registration. Remove:
juce_add_module(../JUCE/usermodules/FxmeJuceTools)
and add (after
add_subdirectory(../JUCE JUCE)):include(${CMAKE_CURRENT_SOURCE_DIR}/lib/FxmeFX/lib/FxmeTools/cmake/FxmeTools.cmake)
This registers the
FxmeToolsmodule and thefxmetools_attach()helper. -
Attach FxmeTools to the target (gives the module + WDL convolution engine + include dirs + MSVC
NOMINMAX). Afterjuce_add_plugin(...)/target_sources(...):fxmetools_attach(MechanOdd)
-
Delete the manual WDL block (lines ~97–103) that compiles from the stale
lib/FxmeFX/WDL/WDL—fxmetools_attach()now provides WDL fromlib/FxmeFX/lib/FxmeTools/WDL/WDL. -
Delete the FxmeJuceTools DSP block (lines ~105–108) that pulled in
CracksGenerator.cppfrom../JUCE/usermodules/FxmeJuceTools/Dsp. It is now part of the FxmeTools module. -
Update
target_link_libraries: replaceFxmeJuceToolswithFxmeTools(or rely onfxmetools_attachhaving linked it — then just remove theFxmeJuceToolsline). Keep all thejuce::…entries. -
The FxmeFX effect-reuse block (
FXMEFX_EFFECTS, lines ~60–95) stays as is — it globs effect.cpp/components and assets directly and does not depend on FxmeJuceTools. (Those effect components include<FxmeTools/…>, which now resolves because the FxmeTools module is on the include path.)
In Source/Sources/CracksSource.h:
- change
#include "CracksGenerator.h"→#include <FxmeTools/dsp/CracksGenerator.h> - change the member type
CracksGenerator generator;→fxme::CracksGenerator generator;
In Source/Sources/CracksSource.cpp: qualify any remaining CracksGenerator
references with fxme:: (the 3 total usages are here and in the header).
No other MechanOdd source changes are expected — fxme::FxmeSlider,
fxme::FxmeLookAndFeel, fxme::HorizontalVuMeter resolve unchanged via
JuceHeader.h.
cd /home/doare/src/Mechanodd
git submodule deinit -f lib/FxmeTools
git rm -f lib/FxmeTools
rm -rf .git/modules/lib/FxmeToolsgit rm -f also drops the [submodule "lib/FxmeTools"] stanza from
.gitmodules. Verify .gitmodules afterwards contains only the lib/FxmeFX
entry, and git submodule status lists only lib/FxmeFX.
The workflow has three jobs (Linux/macOS/Windows) that each:
- check out with
submodules: recursive(✅ keep — now pulls FxmeFX→FxmeTools→WDL), - separately check out
odoare/FxmeJuceToolsandmvit intoJUCE/usermodules/FxmeJuceTools(steps "Checkout FxmeJuceTools" / "Install FxmeJuceTools module", lines ~35–45, ~83–93, ~135–145).
Remove the "Checkout FxmeJuceTools" and "Install FxmeJuceTools module" steps
from all three jobs. submodules: recursive already provides everything.
Confirm no other step references usermodules or FxmeJuceTools.
Mechanodd.jucer still lists JUCE modules but not FxmeJuceTools, and the
build is CMake-driven. If the .jucer is no longer used it can be left alone or
deleted. If it is still used, regenerate/adjust module paths to point at the
FxmeTools module instead. Recommend: treat CMake as source of truth; leave
.jucer out of scope (note in PR).
After steps A–F:
cd /home/doare/src/Mechanodd
rm -rf build
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -jChecklist:
- CMake configures with no
FxmeJuceTools/usermodulesreferences. -
FxmeToolsmodule is registered exactly once. - Cracks source compiles and the crackle generator works at runtime.
- Convolution-based effects (Cab, ConvolReverb) still build & load (WDL now
via
fxmetools_attach). - GUI renders identically (sliders, look-and-feel, VU meter).
- Standalone + VST3 (+ AU on macOS) build and load in a host.
-
git submodule statusshows onlylib/FxmeFX.
- Two
FxmeTools.cmakeincludes. MechanOdd must include FxmeTools.cmake itself (it neveradd_subdirectorys FxmeFX). Don't also let any FxmeFX CMake run, orjuce_add_module(FxmeTools)could be called twice (target redefinition). MechanOdd only globs FxmeFX sources, so this is fine — just don't addadd_subdirectory(lib/FxmeFX). - Stale
lib/FxmeFX/WDL. Left untouched it's harmless but confusing; the real fix belongs in the FxmeFX repo (remove the stale WDL working tree there). Out of scope for MechanOdd but worth a follow-up issue. - CracksGenerator namespace change is a breaking source change — make sure all 3 usages are updated, or compilation fails fast (acceptable).
juce::dsp::ProcessSpecin CracksGenerator.h requiresjuce_dsp; FxmeTools' module declaresjuce_dspas a dependency and the umbrella includes it, so this is satisfied.
-
Q1 — LFO/ADSR promotion (Step B): do you want the LFO kernel extracted to FxmeTools now, or deferred? (The full modulation system is MechanOdd-specific and should stay; only the small LFO shape/sync kernel is worth sharing.)
Response : Yes, do the LFO shape/sync sharing.
-
Q2 —
.jucer: still in use, or can it be dropped/ignored (Step G)?
Response : Drop .jucer file
-
Q3 — Stale
lib/FxmeFX/WDL: open a follow-up to clean it in the FxmeFX repo, or leave it?I think WDL can be safely removed from lib/FxmeFX since it is already in FxmeTools
- FxmeTools repo (
lib/FxmeFX/lib/FxmeTools): commit Step A (+ B) → push. - FxmeFX repo (
lib/FxmeFX): bump the FxmeTools submodule pointer to the new commit → commit → push. - MechanOdd repo: bump the
lib/FxmeFXsubmodule pointer, apply steps C–F, remove the duplicate submodule → commit.
If you are not ready to push the library repos, you can validate everything locally first (the working trees are already at the needed state); just remember the submodule pointer bumps before CI will pass.
FxmeTools repo
FxmeTools/dsp/CracksGenerator.h(new)FxmeTools/dsp/CracksGenerator.cpp(new)FxmeTools/dsp/Lfo.h(new, optional — Step B)FxmeTools/FxmeTools.h(add includes)FxmeTools/FxmeTools.cpp(add include)
MechanOdd repo
CMakeLists.txt(FxmeTools.cmake include +fxmetools_attach, drop FxmeJuceTools/WDL blocks, fix link libs)Source/Sources/CracksSource.h/.cpp(include +fxme::qualification)Source/Modulation/ModEngine.*,VoiceModEngine.*(only if Step B).github/workflows/release.yml(remove FxmeJuceTools steps ×3).gitmodules(droplib/FxmeTools— viagit rm)- remove submodule
lib/FxmeTools