Explorar el Código

FL Studio Mobile import: MiniSynth plays FLM's build of the engine (velocity, balance pan, 5 voices, LFO to OSC Mod, MW Dest), A/B inside FL

Ka1-S hace 3 semanas
padre
commit
f5ce7c3a9d

+ 1 - 1
docs/USER_GUIDE.md

@@ -11,7 +11,7 @@ Piano Roll, Playlist, Mixer) see [WORKFLOW_FL.md](WORKFLOW_FL.md); for the built
 |---|---|---|
 | `.flp` | FL Studio | imported: channels, samples, patterns, arrangement, automation, mixer and FL's native plugins |
 | `.als` | Ableton Live 11 / 12 | imported: tracks, clips (warped audio too), groups, returns, mixer and automation; Session clips go to the clip grid (Settings › Session clips of Live sets: or onto the Playlist) |
-| `.flm` | FL Studio Mobile | imported, partial: arrangement, samples, drum kits, levels and routing; other instruments play a built-in synth for now |
+| `.flm` | FL Studio Mobile | imported, partial: arrangement, samples, drum kits, levels and routing, MiniSynth; other instruments play a built-in synth for now |
 | `.mid` | any app | opened as a project |
 
 After an import, **Help › Last project import report** lists what was converted, approximated or left out, and

+ 62 - 6
docs/analise/REA_rodada182c.md

@@ -626,10 +626,66 @@ block). The Reverb kind has no LFO and runs once per block (identical output). T
 Not reproduced (INFERRED from the fit, not REA): whether FL or the rack wrapper makes the tick chunks. FLM's own app
 calls with its device buffer and voice-derived activity; LYNX follows the measurable host (FL).
 
-### F4 MiniSynth (branch `feature/flm182c-f4`, after 0.1.25)
+### F4 MiniSynth (rounds 182c / 190n, branch `feature/flm190n-minisynth`, 0.1.26)
 
-FLM's MiniSynth parameters 1…43 are FL's desktop MiniSynth parameters 0…42, in the same order: the two name tables
-match one for one (FLM_FORMAT §7.1, REA_rodada41 §1.2). FLM's parameter 0 is the module's Enable. The importer writes
-the state the way the desktop plugin saves it ("SSLF" + .flms: HEAD with a name, DATA "0rev" + 43 floats). The channel
-then plays on LYNX's MiniSynth engine, which round 41 built bit-exact to FL's MiniSynth. The engine's wave tables come
-from `oscdata.dat`, a file byte-identical in FLM's resources and in FL's Minisynth folder (checked with cmp).
+FLM's MiniSynth parameters 1…43 are FL's desktop MiniSynth parameters 0…42, in the same order (the two name tables,
+FLM_FORMAT §7.1 and REA_rodada41 §1.2; PROVEN-REA: CMiniSynth's setter 0x1806af050 forwards parameter n to the engine
+setter with n − 1). FLM's parameter 0 is the module's Enable. The importer writes the state the way the desktop plugin
+saves it ("SSLF" + .flms: HEAD with a name, DATA "0rev" + 43 floats). The engine's wave tables come from `oscdata.dat`,
+a file byte-identical in FLM's resources and in FL's Minisynth folder (checked with cmp).
+
+FLM runs **its own build of the same engine** (PROVEN-REA, CMiniSynth vft 0x180a057c8, engine call 0x1806a89a0; every
+formula of REA_rodada41 was re-read, the filter, envelopes, LFO, oscillators and effects are the same constant for
+constant). The differences, which LYNX's MiniSynth now has as its "FLM build" (`ChannelDef::modelParams = { 1 }`,
+`miniSynthIsFlm`; the desktop path is unchanged and renders bit-identically to before):
+
+| | Desktop MiniSynth | FLM's module | LYNX |
+|---|---|---|---|
+| velocity | MIDI byte from Init.Vol, / 127 | the note's velocity 0…1 as it is (slot 71, 0x1806ae9d0) | engine switch |
+| level / pan | host law A: centre 0.7071 per side | linear balance, centre 1 / 1 (+3.01 dB) (0x1806ab0a0) | engine switch |
+| voices | 99 (host max-polyphony event) | 5 | engine switch |
+| LFO → OSC Mod | m + 12·L | m + L, clamped to ±1 (0x1806aab90) | engine switch |
+| first note's glide | from key 0 | from its own key | engine switch |
+| effects' silence gate | "a voice was active" per engine call | per 32-sample block: the effects stop 0.5 s after the last voice | engine switch |
+| MW Dest | int(p): filter, LFO amount | int(2p): filter, LFO amount, OSC Mod | converted at import (OSC Mod → wheel amount 0) |
+
+Not modelled: FLM's per-voice pitch / pan / velocity offsets (slot 73, from FLM's event queue), the instant kill on a
+negative velocity, last-bit summation orders. OPEN: the scale of the velocity byte stored in a .flm note (the importer
+uses byte / 255, unchanged).
+
+**A/B inside FL (round 190n).** Projects made from FL's own render test `MiniSynth.flp` (only the state floats, the
+notes and, for the FLM side, the channel's plugin events from FL's `FL Studio Mobile Rack.fst` preset were changed),
+rendered with FL /R: FL Studio Mobile Rack holding one MiniSynth module against FL's MiniSynth with the same 43
+values, 10 settings, 7 notes (keys 36…72, a chord, an overlap, one note at velocity 50). MiniSynth draws random phases,
+drift and dither, so renders never null; the measure is the level per 125 ms window and the third-octave spectrum
+(mean differences in dB; `lvl / spec`). "LYNX" is LYNX's engine against FL's MiniSynth (the yardstick of what two
+renders of one patch give), "LYNX FLM build" is the engine with the switches above, driven with the velocity FLM's FL
+wrapper hands its module (int(41.362274·ln(10·Init.Vol + 1)) / 127, one MIDI step below the desktop's: PROVEN-REA
+0x180834b80), against the FLM render.
+
+| Setting | FLM vs FL MiniSynth | LYNX vs FL MiniSynth | LYNX FLM build vs FLM |
+|---|---|---|---|
+| D default | 0.35 / 0.13 | 0.24 / 0.13 | 0.23 / 0.27 |
+| S1 osc kind, filter freq / peak / kbd / vel | 0.28 / 0.65 | 0.19 / 0.17 | 0.34 / 0.35 |
+| S2 filter envelope (osc kind 5: random phase sets each note's level) | 2.86 / 2.34 | 3.76 / 1.66 | 2.08 / 2.01 |
+| S3 transpose, amp envelope | 0.15 / 0.15 | 0.17 / 0.10 | 0.18 / 0.20 |
+| S4 LFO | 0.16 / 0.10 | 0.13 / 0.23 | 0.21 / 0.44 |
+| S5 LEAD voices, slide, mod wheel | 1.72 / 0.49 | 1.29 / 0.36 | 1.45 / 0.30 |
+| S6 distortion | 5.74 / 4.66 | (harness: no channel level) | 0.10 / 0.41 |
+| S7 delay + chorus | 0.20 / 0.25 | 0.24 / 0.25 | 0.17 / 0.41 |
+| S8 phaser | 0.72 / 0.52 | 0.48 / 0.50 | 0.85 / 0.52 |
+| S9 noise, LFO → OSC Mod | 5.25 / 3.01 | 0.39 / 0.16 | 0.24 / 0.27 |
+
+Reading: the parameter order holds on every setting. FLM is 3.01 dB above FL's MiniSynth at the same channel level
+(the pan law); S1's 0.65 is the wrapper's velocity step acting through FLT Vel; S6 (the 3 dB reach the distortion)
+and S9 (LFO → OSC Mod depth) are the engine differences above, and LYNX's FLM build follows FLM on both. S2 and S5 are
+dominated by the random phases / the harness' note order (LYNX against FL's own MiniSynth scatters as much). The rack
+at its default volume (RPRM 0 = 0.853) is 0 dB, as F2's law says. Tools: /mnt/e/lynx-work/flm190n/ab (mkgen.py,
+render.sh, score2.py), tools/msr.cpp; REA spec /mnt/e/lynx-work/flm190n/rea/spec-minisynth-diff.md.
+
+Quality gate: the desktop engine renders the same bytes as before on 7 of the settings (old against new object); the
+FLM build costs the same per voice (branches on a flag). MiniSynth parameter automation lanes of a .flm are still
+listed, not imported (LYNX's MiniSynth takes no automation clips on its knobs from the renderer yet).
+
+**Best way?** FL: FLM-in-FL is the reference, matched. Ableton: no FLM import. Users: FLM users ask for desktop
+continuity of their MiniSynth patches (FL's own answer is the FLM plugin). Verdict: FLM-exact, no alternative proposed.

+ 10 - 2
src/core/FlmImport.cpp

@@ -295,7 +295,8 @@ bool directWaveProgram (Ctx& ctx, const flm::Module& m, ChannelDef& c)
 }
 
 // FLM's MiniSynth → LYNX's MiniSynth engine (F4). FLM's parameters 1…43 are the desktop plugin's 0…42, in the same
-// order (the two parameter-name tables, FLM_FORMAT §7.1 and REA_rodada41 §1.2); FLM's 0 is the module's Enable. The
+// order (the two parameter-name tables, FLM_FORMAT §7.1 and REA_rodada41 §1.2; PROVEN-REA setter 0x1806af050 and
+// A/B inside FL, round 190n); FLM's 0 is the module's Enable. The
 // state is written the way the desktop plugin saves it ("SSLF" + its .flms preset: signature, HEAD with the name, DATA
 // "0rev" + 43 floats); the wave tables come from oscdata.dat, which FLM's resources and FL's MiniSynth folder share.
 bool miniSynthState (Ctx& ctx, const flm::Module& m, ChannelDef& c)
@@ -334,7 +335,13 @@ bool miniSynthState (Ctx& ctx, const flm::Module& m, ChannelDef& c)
     for (std::size_t i = 1; i <= 43; ++i)
     {
         std::uint32_t bits;
-        const auto v = std::clamp (m.params[i], 0.0f, 1.0f);
+        auto v = std::clamp (m.params[i], 0.0f, 1.0f);
+        // MW Dest has three steps in FLM (filter, LFO amount, OSC Mod) and two on the desktop (below 1 = filter,
+        // 1 = LFO amount); OSC Mod has no desktop twin, so its wheel amount goes to 0 (spec-minisynth-diff §3.2)
+        if (i == 4)
+            v = v >= 0.5f && v < 1.0f ? 1.0f : 0.0f;
+        if (i == 5 && m.params[4] >= 1.0f)
+            v = 0.0f;
         std::memcpy (&bits, &v, 4);
         u32 (bits);
     }
@@ -346,6 +353,7 @@ bool miniSynthState (Ctx& ctx, const flm::Module& m, ChannelDef& c)
     if (! miniSynthStateUsable (state))
         return false;
     c.instrument = InstrumentKind::minisynth;
+    c.modelParams = { 1.0f }; // FLM's build of the engine: velocity as it is, balance pan, 5 voices (core/MiniSynth.h)
     c.pluginState = std::move (state);
     c.samplePath = oscdata;
     ctx.note (&FlpImportReport::converted, "FL Studio Mobile: MiniSynth");

+ 51 - 11
src/core/MiniSynth.cpp

@@ -239,6 +239,10 @@ public:
     float P[paramCount] {};
     float keyvel[128] {};
     int last = 0;
+    // FL Studio Mobile's build of this engine (REA spec-minisynth-diff, round 190n): the first note after a reset
+    // glides from its own key, LFO → OSC Mod adds 1·L (clamped to ±1) instead of 12·L, the effects' silence gate
+    // looks at every 32-sample block, 5 voices
+    bool flm = false, flmPlayed = false;
     std::uint32_t counter = 1;
     float keyL[128] {}, keyR[128] {}, keyPitch[128] {}, keyFcut[128] {}, keyFres[128] {};
     float bend = 0.0f, mw = 0.0f;
@@ -277,6 +281,7 @@ public:
         playing = false;
         std::fill (std::begin (keyvel), std::end (keyvel), 0.0f);
         last = 0;
+        flmPlayed = false;
         counter = 1;
         std::fill (std::begin (keyL), std::end (keyL), 1.0f);
         std::fill (std::begin (keyR), std::end (keyR), 1.0f);
@@ -472,7 +477,8 @@ public:
             v = &voices[0];
         counter = counter + 1;
         v->age = counter;
-        v->glide = (float) last;
+        v->glide = (float) (flm && ! flmPlayed ? key : last);
+        flmPlayed = true;
         if (lead)
         {
             bool alone = true;
@@ -528,6 +534,8 @@ public:
         {
             const auto m = std::min (n, blockLen);
             n -= m;
+            if (flm)
+                any = false;
             lfoStep (m, pos);
             pos = pos + (((double) m / rate) * bpm) * 0.016666666666666666;
             for (auto& v : voices)
@@ -810,7 +818,7 @@ void Voice::oscSetup() noexcept
     const auto f = freq;
     auto m = e->oscmod;
     if (e->lfoDest == 2)
-        m = m + e->lfo * 12.0f;
+        m = e->flm ? std::clamp (m + e->lfo, -1.0f, 1.0f) : m + e->lfo * 12.0f;
     const auto expo = (float) i32 (m * 24.0f - 12.0f) * 0.0833333358168602f + 0.006250000558793545f;
     const auto r = (double) powf32 (2.0, (double) expo);
     const auto am = std::fabs (m);
@@ -1039,6 +1047,9 @@ public:
             }
     }
     bool panLawA = true;
+    // FL Studio Mobile's module around the engine (round 190n): the note's velocity is the voice's as it is, the
+    // per-note levels are a linear balance (centre 1, 1), at most 5 voices
+    bool flm = false;
     bool playing = false, changed = false;
 
     // a freshly created plugin (its own 44.1 kHz set-up), then the host's sample rate when it differs (§2.4)
@@ -1051,19 +1062,23 @@ public:
         eng.setRate (44100.0);
         if (fs != 44100.0)
             eng.setRate (fs);
-        eng.setMaxPoly (0);
+        eng.flm = flm;
+        eng.setMaxPoly (flm ? 5 : 0);
         for (auto& h : held)
             h = Held {};
         playing = changed = false;
     }
 
-    void noteOn (int key, double initVol, double fvol, double fpan, double pitchCents) noexcept
+    void noteOn (int key, double initVol, double fvol, double fpan, double pitchCents, float flmVelocity = 0.0f) noexcept
     {
         key = std::clamp (key, 0, 127);
         if (held[key].on)
             eng.note (key, 0.0f);
         held[key] = { true, fvol, fpan, pitchCents, false, {} };
-        eng.note (key, (float) velFromInitVol (initVol) * 0.007874016f);
+        if (flm) // a velocity of 0 would be a note-off
+            eng.note (key, std::clamp (flmVelocity, 1.0f / 127.0f, 1.0f));
+        else
+            eng.note (key, (float) velFromInitVol (initVol) * 0.007874016f);
     }
     void noteOff (int key) noexcept
     {
@@ -1103,7 +1118,13 @@ public:
             if (held[i].on)
             {
                 const auto& h = held[i];
-                if (panLawA)
+                if (flm)
+                {
+                    const auto p = std::clamp ((float) h.fpan, -1.0f, 1.0f);
+                    cl = (float) h.fvol * (p > 0.0f ? 1.0f - p : 1.0f);
+                    cr = (float) h.fvol * (p < 0.0f ? 1.0f + p : 1.0f);
+                }
+                else if (panLawA)
                     lawA (h.fpan, h.fvol, cl, cr);
                 else
                     cl = cr = (float) h.fvol;
@@ -1175,6 +1196,7 @@ struct Setup
 {
     std::array<float, paramCount> P {};
     std::shared_ptr<const Tables> tabs;
+    bool flm = false;
 };
 
 class MiniSynthInstrument final : public Instrument
@@ -1208,11 +1230,14 @@ public:
         delete retired.exchange (nullptr);
         pitchCents.store (channel.sampler.pitch * 100.0f);
         tempo.store (bpm > 0.0 ? bpm : 120.0);
-        if (channel.pluginState == state && channel.samplePath == oscdata)
+        const auto variant = miniSynthIsFlm (channel);
+        if (channel.pluginState == state && channel.samplePath == oscdata && variant == flmVariant)
             return;
         state = channel.pluginState;
         oscdata = channel.samplePath;
+        flmVariant = variant;
         auto s = std::make_unique<Setup>();
+        s->flm = variant;
         if (auto p = parseState (state))
             s->P = *p;
         else
@@ -1250,7 +1275,7 @@ public:
         notePan[k] = nextPan;
         const auto knob = pitchCents.load();
         plugin.noteOn (k, initVol, channelVol, std::clamp ((double) nextPan + channelPan, -1.0, 1.0),
-                       (double) knob + (double) nextCents);
+                       (double) knob + (double) nextCents, (float) vel);
         plugin.held[k].slide.anchor (live.ref (knob));
         plugin.sliding = plugin.sliding || plugin.held[k].slide.moving(); // (a porta glide-in, round 168l)
         nextPan = 0.0f;
@@ -1345,6 +1370,7 @@ private:
     void applySetup (double sr) noexcept
     {
         plugin.eng.tabs = setup->tabs;
+        plugin.flm = setup->flm;
         plugin.init (sr, setup->P.data());
         plugin.eng.bpm = tempo.load();
         quiet = 0;
@@ -1359,6 +1385,12 @@ private:
             setup = s;
             // a new patch: the plugin restores the state (its parameters) without resetting its voices
             plugin.eng.tabs = setup->tabs;
+            if (plugin.flm != setup->flm) // the other build of the engine: a fresh plugin
+            {
+                plugin.flm = setup->flm;
+                plugin.init (rate, setup->P.data());
+                plugin.eng.bpm = tempo.load();
+            }
             for (int i = 0; i < paramCount; ++i)
                 plugin.eng.setParam (i, setup->P[(std::size_t) i]);
         }
@@ -1371,6 +1403,7 @@ private:
     LiveChannelPitch live; // (audio thread)
     std::atomic<double> tempo { 120.0 };
     std::vector<std::uint8_t> state;
+    bool flmVariant = false;
     std::string oscdata;
     double rate = 44100.0, channelVol = 1.0, channelPan = 0.0, lastTicks = -1.0, songBeats = 0.0;
     bool playing = false;
@@ -1384,6 +1417,11 @@ private:
 
 bool miniSynthStateUsable (const std::vector<std::uint8_t>& state) { return parseState (state).has_value(); }
 
+bool miniSynthIsFlm (const ChannelDef& channel) noexcept
+{
+    return channel.instrument == InstrumentKind::minisynth && ! channel.modelParams.empty() && channel.modelParams[0] >= 0.5f;
+}
+
 std::vector<float> miniSynthParams (const std::vector<std::uint8_t>& state)
 {
     const auto p = parseState (state);
@@ -1406,15 +1444,17 @@ namespace minisynth
 {
 std::vector<float> renderReference (const std::vector<std::uint8_t>& state, const std::vector<RefNote>& notes, double sampleRate,
                                     int length, const std::string& oscdataPath, int block, double bpm, int maxPoly, double songPos,
-                                    bool panLawA)
+                                    bool panLawA, bool flm)
 {
     const auto p = parseState (state);
     if (! p || length <= 0)
         return {};
     auto plugin = std::make_unique<Plugin>();
     plugin->eng.tabs = tablesFor (oscdataPath);
+    plugin->flm = flm;
     plugin->init (sampleRate, p->data());
-    plugin->eng.setMaxPoly (maxPoly);
+    if (! flm)
+        plugin->eng.setMaxPoly (maxPoly);
     plugin->eng.bpm = (double) (float) bpm;
     plugin->panLawA = panLawA;
     if (songPos >= 0.0)
@@ -1434,7 +1474,7 @@ std::vector<float> renderReference (const std::vector<std::uint8_t>& state, cons
         for (std::size_t i = 0; i < notes.size(); ++i)
         {
             if (notes[i].start == n0)
-                plugin->noteOn (notes[i].key, notes[i].initVol, notes[i].finalVol, notes[i].finalPan, notes[i].pitchCents);
+                plugin->noteOn (notes[i].key, notes[i].initVol, notes[i].finalVol, notes[i].finalPan, notes[i].pitchCents, (float) notes[i].initVol);
             if (notes[i].release == n0)
                 plugin->noteOff (std::clamp (notes[i].key, 0, 127));
         }

+ 8 - 2
src/core/MiniSynth.h

@@ -42,6 +42,12 @@ int miniSynthParamOffset (const std::vector<std::uint8_t>& state, int index);
 
 std::unique_ptr<Instrument> makeMiniSynthInstrument();
 
+// FL Studio Mobile's MiniSynth module is this engine with a few differences (REA spec of round 190n: the note's
+// velocity goes to the voice as it is, linear balance pan with centre gain 1, 5 voices, LFO → OSC Mod at 1/12 of the
+// desktop depth and clamped, the first note glides from its own key, the effects really stop 0.5 s after the last
+// voice). A channel imported from a .flm asks for it with modelParams = { 1 } (saved with the project).
+bool miniSynthIsFlm (const ChannelDef& channel) noexcept;
+
 namespace minisynth
 {
 // One note for the reference renderer (the verification harness drives the engine exactly like the Python model).
@@ -54,11 +60,11 @@ struct RefNote
 
 // Renders like msmodel.Plugin driven by r41/py/mcmp.py: host blocks of `block` samples split at every event, engine
 // calls of ≤ 512, tempo `bpm`, max-polyphony event value `maxPoly` (0 → 99), songPos ≥ 0 = the transport plays from that
-// song position (beats); panLawA = the host's ComputeLRVol cos/sin law (false: L = R = Final.Vol, like the harness'
+// song position (beats); flm = FL Studio Mobile's build (RefNote::initVol is then the voice velocity 0…1); panLawA = the host's ComputeLRVol cos/sin law (false: L = R = Final.Vol, like the harness'
 // default). The tables are built from `oscdataPath` (a missing file plays silent tables). Interleaved stereo float
 // samples (2·length); empty if the state is unusable.
 std::vector<float> renderReference (const std::vector<std::uint8_t>& state, const std::vector<RefNote>& notes, double sampleRate,
                                     int length, const std::string& oscdataPath, int block = 512, double bpm = 120.0, int maxPoly = 0,
-                                    double songPos = -1.0, bool panLawA = false);
+                                    double songPos = -1.0, bool panLawA = false, bool flm = false);
 } // namespace minisynth
 } // namespace lynx

+ 1 - 0
src/core/Song.h

@@ -747,6 +747,7 @@ struct ChannelDef
     PluginRef plugin;       // used when instrument == plugin
     std::vector<std::uint8_t> controllerState; // instrument == controller: FL Envelope Controller state
     std::vector<float> modelParams; // instrument == sakura / drumpad / boobass / drumsynth / harmless: FL's raw state parameters
+                                    // instrument == minisynth: { 1 } = FL Studio Mobile's build of the engine (core/MiniSynth.h)
     std::vector<std::uint8_t> pluginState; // instrument == sytrus / harmor / ogun / gms / morphine / fruitkick / bassdrum: the FL plugin's saved state (record 0xD5)
     SamplerSettings sampler; // used when instrument == sampler
     SynthSettings synth;     // used when instrument == synth

+ 26 - 4
tests/FlmImport182cTests.inc

@@ -91,7 +91,7 @@ inline Bytes sample (const std::string& name, const std::string& root, const std
 }
 
 inline Bytes module (std::uint32_t type, std::uint32_t id, const std::string& presetFile = {}, const std::string& presetName = "Default/Default",
-                     int keyLow = 0, int keyHigh = 127, int params = 4)
+                     int keyLow = 0, int keyHigh = 127, int params = 4, bool ramp = false)
 {
     Bytes b;
     u32 (b, type);
@@ -109,7 +109,7 @@ inline Bytes module (std::uint32_t type, std::uint32_t id, const std::string& pr
     lp32 (prst, presetName);
     Bytes prms;
     for (int k = 0; k < params; ++k)
-        f32 (prms, 0.5f);
+        f32 (prms, ramp ? (float) k / 100.0f : 0.5f); // ramp: every parameter its own value (order checks)
     return chunk ("RMOd", cat ({ b, chunk ("HEAD", h), chunk ("DESC", desc), chunk ("PRST", prst), chunk ("ADD1", add1), chunk ("PRMS", prms) }));
 }
 
@@ -282,7 +282,7 @@ inline Bytes project()
                                            module (7, 3) }),
                   rack (flm::kindNormal, {}, { sample ("Kick", "@R@", "Drum Samples\\Kick\\Kick 1.wav"), sample ("Snare", "@R@", "Drum Samples\\Snare\\Gone.wav") }),
                   rack (flm::kindNormal, { module (35, 2) }),
-                  rack (flm::kindNormal, { module (0, 2, {}, "Default/Default", 0, 127, 44) }),
+                  rack (flm::kindNormal, { module (0, 2, {}, "Default/Default", 0, 127, 44, true) }),
                   rack (flm::kindBus, { module (12, 2) }),
                   channel (flm::kindMaster, "MASTER", 0, { lane (1, "Level", { clip (8, 0, 16, 0, 1, { { 0, 0, -5 } }) }, 0, 0) }),
                   // 2 clips of content 1 (8 beats, 4-beat loop → 2 passes each) and one of content 2 starting 1 beat in
@@ -441,7 +441,29 @@ TEST (flm182c_imports_a_project)
     if (lead != nullptr)
     {
         const auto params = miniSynthParams (lead->pluginState);
-        CHECK (params.size() == 43 && std::all_of (params.begin(), params.end(), [] (float v) { return std::abs (v - 0.5f) < 1e-6f; }));
+        CHECK (params.size() == 43);
+        for (std::size_t k = 0; k < params.size(); ++k) // desktop parameter k = FLM's k + 1 (A/B inside FL, round 190n)
+            CHECK (std::abs (params[k] - (k == 3 ? 0.0f : (float) (k + 1) / 100.0f)) < 1e-6f); // (MW Dest 0.04: FLM's first step)
+        CHECK (miniSynthIsFlm (*lead)); // FLM's build of the engine
+        // FLM's build: balance pan (centre 1, 1) against the desktop's equal-power law, the velocity as it is
+        auto noisy = lead->pluginState;
+        const auto at = miniSynthParamOffset (noisy, 7); // OSC Noise (plays without the wave tables)
+        CHECK (at > 0);
+        if (at > 0)
+        {
+            const float one = 1.0f;
+            std::memcpy (noisy.data() + at, &one, 4);
+            // Init.Vol 1 is MIDI velocity 100 on the desktop; FLM's module takes 100 / 127 itself
+            const auto rms = [&noisy] (bool flm) {
+                const auto y = minisynth::renderReference (noisy, { { 0, 60, flm ? 100.0 / 127.0 : 1.0, 1.0, 0.0, 0.0, 20000 } }, 44100.0, 16384, "", 512, 120.0, 0, -1.0, true, flm);
+                double e = 0.0;
+                for (const auto v : y)
+                    e += (double) v * v;
+                return std::sqrt (e / (double) std::max<std::size_t> (1, y.size()));
+            };
+            const auto desktop = rms (false), mobile = rms (true);
+            CHECK (desktop > 1e-4 && mobile > desktop * 1.3 && mobile < desktop * 1.55); // +3 dB at centre
+        }
     }
     CHECK (report.converted.count ("FL Studio Mobile: MiniSynth") == 1 && report.unsupported.count ("FL Studio Mobile: MiniSynth") == 0);
     // effects: Graphic EQ, Reverb 2 and the legacy Reverb are mapped since round 188f (F5), the Limiter since 188h