Преглед изворни кода

Round 190to check: --round190totest / --selftest "round190to" (src/Round190toCheck.inc, 23 checks), unit tests (tests/MixFx190toTests.inc), REA_rodada190to

The earlier checks follow the per-insert switch (QuickWins190sr #320, DetailsShot190kn's chain bypass, Round190tm's
icon row and Extra large order); Issue11c / Win190ev: the Master's arm and its take.

(cherry picked from commit 61e135a9a9e5857e2fafbb1609509a0726c430d9)
Ka1-S пре 5 дана
родитељ
комит
0436c8bc3e

+ 49 - 0
docs/analise/REA_rodada190to.md

@@ -0,0 +1,49 @@
+# REA round 190to: FL Studio 2026's per-insert effects switch, the Master's arm and the Current column's icons
+
+Queue 0.1.33 item 96 (issue #361 follow-up, round 190tm's open points 1-3). Clean-room: behaviour only, no code copied.
+Sources: REA round 146 (FL's insert writer, Ghidra), a survey of the .flp files on this PC, FL 2026's own `/R` renders
+and a live check of FL 2026 (12-01, GUI lock, safeinput before every batch, FL closed without saving by its own PID,
+audio settings untouched). Tags: **[DECOMP]** read in the decompiler, **[DATA]** files, **[EXEC]** FL's renders,
+**[LIVE]** seen in FL. Raw material: `/mnt/e/lynx-work/mixfx_190to/` (raw/, logs/, renders/).
+
+## 1. The effects switch is one flag per insert: 0xEC flags bit 0x04
+
+- FL's insert writer `FUN_00f3d620` writes the 0xEC flags `(dock & 3) << 6 | 1 phase | 2 swap | 4 effects on | 8 enabled
+  | 0x10 threaded off | 0x400 separator | 0x1000 solo | 0x4000 ...` [DECOMP, REA_rodada146].
+- Survey of 400 .flp files [DATA]: 23 have inserts without bit 0x04 — two FL demos, three copies of one of them, 18
+  autosaves of one user's project (two inserts each). The demos: "LeriQ - SHINE" insert 12 (0x48, four effects, the last
+  one switched off on its own) and "Astes - Bien Duro" inserts 82, 83, 84 (0x408 / 0x8, a Frequency Splitter each) and
+  76 (0x8, empty).
+- [LIVE raw a02, b03] Those inserts' "Enable effect slots / view editors" plugs are grey (switched off with effects);
+  empty inserts' plugs are dim. [LIVE raw a03] The Effects panel of SHINE's insert 12 still shows each slot's own LED
+  (on, on, on, off).
+- [LIVE raw a06] A click on the plug turns it orange and adds one History step, "enable/disable effect plugins" (the
+  FLEngine string). [LIVE raw a07] A click on an empty insert's plug changes nothing and adds no step.
+- [EXEC] `/R` renders of the Vocodex demo (Vocodex on insert 2) and of a copy with insert 2's bit 0x04 cleared: two renders
+  of the original agree (envelope correlation 0.996, spectrum 0.32 dB; FL's Vocodex is not sample-exact run to run), the
+  copy does not (envelope correlation 0.294, spectrum 2.98 dB, rms −1.64 dB): the vocoder is bypassed, the spoken word
+  plays dry. SHINE with insert 12's bit set differs from the original (local ESR median −19.5 dB vs −25.6 dB between two
+  FL renders of the same file). Clearing the Master's bit (SHINE) bypasses its Fruity Limiter (peaks reach full scale).
+- [LIVE raw a12] Extra large: the slots' names of an insert whose switch is off are dimmed and lose their darker cell, as
+  a slot switched off on its own does (raw a12j).
+
+## 2. The Master's and the Current column's icons [LIVE]
+
+- Wide (raw a02): the Master has the plug, the clock ("Track latency", 2 ms) and the arm dot ("Arm disk recording").
+  A click arms it (raw a09): a red ring, the hint "Record to: SHINE_2026-12-01 10-43-22_Master.wav", the Master selected.
+- The Current column has the plug (dim; its hint stays "Current", a click changes nothing, raw a04 / a05) and the arm
+  dot, no clock (raw h03-h06). Its arm arms the Current track: "Record to: ..._Current.wav", "Mixer - Current" (raw a10).
+- Extra large (raw a12, a12m): "Track latency" and "Arm disk recording" under the fader (left column, under the meter);
+  then the pan / stereo knobs and the slots' names; the plug under the names; the route arrow at the foot. The Current
+  column has the plug only.
+
+## 3. LYNX (round 190to)
+
+`MixerTrack::effectsOn` (`Song::slotActive (track, slot)` gates every processing path: the rack's slot plans, PDC,
+low latency, notes to slot instruments, hardware inserts, the .flp bounce of LYNX-only effects). Driven by the strip's
+plug, the Effects panel's FX button, the Simple layout's chain bypass and the Playlist inserts' FX switch; one undo step
+(FL's name in the Pattern layout). Saved as `"effectsOn": false`; .flp import / export of bit 0x04. Formats without such
+a switch (.als, DAWproject, FL Studio Mobile, a copy for LYNX 0.1.32) get every slot of the insert switched off (the same
+sound; the slots' own switches are lost, one line each). The Master's arm records through FL's "Record" positions on the
+Master (a tap in `RackRenderer::chunkMaster`); its take plays through the Master. The Current column draws the plug and
+the Current track's arm; Extra large uses FL's places.

+ 3 - 3
src/DetailsShot190kn.inc

@@ -214,13 +214,13 @@
                     dock->bypassChainForCheck();
                     offline.dispatchPendingMessages();
                     dock->refresh();
-                    check ("bypass: every effect of the chain off, the button lit",
-                           ! mixerops::anyEffectEnabled (offline.getSong(), insert) && dock->bypassLitForCheck());
+                    check ("bypass: the chain off (round 190to: the insert's effects switch), the button lit",
+                           ! mixerops::effectsPlaying (offline.getSong(), insert) && dock->bypassLitForCheck());
                     shots ("bypassed");
                     dock->bypassChainForCheck();
                     offline.dispatchPendingMessages();
                     dock->refresh();
-                    check ("bypass again: the chain back on", mixerops::anyEffectEnabled (offline.getSong(), insert) && ! dock->bypassLitForCheck());
+                    check ("bypass again: the chain back on", mixerops::effectsPlaying (offline.getSong(), insert) && ! dock->bypassLitForCheck());
                     // the top bar: Undo lit (edits made), Redo greyed
                     ui.transportTickForSnapshot();
                     saveArea (ui, ui.getToolbarBoundsForSnapshot(), prefix + "-simple-topbar.png");

+ 19 - 1
src/Main.cpp

@@ -2452,6 +2452,19 @@ public:
             quit();
             return;
         }
+        if (args.contains ("--round190totest"))
+        {
+            // LYNX --round190totest report.txt [shot prefix] (round 190to, QUEUE 0.1.33 item 96: FL's per-insert effects switch,
+            // the Master's and the Current column's icons, FL's Extra large icon places; also in --selftest): src/Round190toCheck.inc
+            juce::String log;
+            const auto i = args.indexOf ("--round190totest");
+            const auto shots = i + 2 < args.size() && ! args[i + 2].startsWith ("--") ? args[i + 2].unquoted() : juce::String();
+            const auto result = round190toCheck (log, shots);
+            juce::File (args[i + 1].unquoted()).replaceWithText (log + "round190to=" + result + "\n");
+            setApplicationReturnValue (result == "OK" ? 0 : 1);
+            quit();
+            return;
+        }
         if (args.contains ("--round190tmtest"))
         {
             // LYNX --round190tmtest report.txt [shot prefix] (round 190tm, QUEUE 0.1.33 items 91 and 93: Channel settings › Reload
@@ -11189,6 +11202,9 @@ private:
         // round 190tm: Reload re-reads the file, the Playlist ▾ Time markers, Song mode key markers, muted clips (src/Round190tmCheck.inc)
         juce::String round190tmLog;
         const auto round190tmResult = round190tmCheck (round190tmLog);
+        // round 190to: FL's per-insert effects switch, the Master's / Current column's icons, Extra large (src/Round190toCheck.inc)
+        juce::String round190toLog;
+        const auto round190toResult = round190toCheck (round190toLog);
         // round 190sr: #350, #349, QUEUE 0.1.33 items 42 / 43 (src/SmallBugs190srCheck.inc)
         juce::String smallbugs190srLog;
         const auto smallbugs190srResult = smallBugs190srCheck (smallbugs190srLog);
@@ -12658,7 +12674,7 @@ private:
                         && sidechainResult == "OK" && lanesResult == "OK" && arrange190cgResult == "OK" && livescr190drResult == "OK" && livewf190efResult == "OK" && livewf190emResult == "OK" && trackclips190neResult == "OK" && tracker190nwResult == "OK" && tracker190obResult == "OK" && rackauto190ooResult == "OK" && tracker190omResult == "OK" && rackauto190owResult == "OK" && versionsResult == "OK" && pluginsOffResult == "OK" && missingFilesResult == "OK"
                         && midigen190fmResult == "OK" && clipenv190giResult == "OK" && beatslaw190gxResult == "OK" && warplaw190ikResult == "OK" && editorScale190heResult == "OK" && sfModBase190heResult == "OK" && trackauto190gzResult == "OK" && community190hqResult == "OK" && rollup030Result == "OK" && rollup031Result == "OK" && rollup031s2Result == "OK"
                         && keys190nuResult == "OK" && rollup031s3Result == "OK"
-                        && helix4khs190ocResult == "OK" && rollup031s4Result == "OK" && sections190olResult == "OK" && rollup031s5Result == "OK" && simpleDuck190otResult == "OK" && tracks190peResult == "OK" && issue258Result == "OK" && issues190qrResult == "OK" && backlog190rcResult == "OK" && community190riResult == "OK" && flParity190tcResult == "OK" && q1a190rwResult == "OK" && iox190rmResult == "OK" && issues190rtResult == "OK" && perf190rnResult == "OK" && perf190sbResult == "OK" && cachecheck190tgResult == "OK" && undo190spResult == "OK" && menuwindows190skResult == "OK" && issues330skResult == "OK" && audioedit190stResult == "OK" && drumsynth190syResult == "OK" && smallbugs190srResult == "OK" && quickwins190srResult == "OK" && batch292_190swResult == "OK" && round190teResult == "OK" && yannik190sqResult == "OK" && rea190taResult == "OK" && round190tiResult == "OK" && round190tkResult == "OK" && round190tmResult == "OK" && batch334svResult == "OK" && details190tdResult == "OK" && qa190rbResult == "OK" && bugs190rvResult == "OK" && q6190saResult == "OK" && issue325Result == "OK" && keysheet190sjResult == "OK" && details190tbResult == "OK" && notes190tjResult == "OK" && children190thResult == "OK" && stab190rpResult == "OK" && repeats190pmResult == "OK" && mixerqol190qhResult == "OK" && autolive190qpResult == "OK" && issue282Result == "OK" && feel190qeResult == "OK" && toolbar190qgResult == "OK" && extras190qkResult == "OK" && extras190roResult == "OK" && playlistview190soResult == "OK" && custom190ssResult == "OK" && discord190quResult == "OK" && trialmark190qtResult == "OK" && optionsux190qxResult == "OK" && chordlane190pfResult == "OK" && nofl190rhResult == "OK" && downgrade0132Result == "OK" && autolinks190ovResult == "OK"
+                        && helix4khs190ocResult == "OK" && rollup031s4Result == "OK" && sections190olResult == "OK" && rollup031s5Result == "OK" && simpleDuck190otResult == "OK" && tracks190peResult == "OK" && issue258Result == "OK" && issues190qrResult == "OK" && backlog190rcResult == "OK" && community190riResult == "OK" && flParity190tcResult == "OK" && q1a190rwResult == "OK" && iox190rmResult == "OK" && issues190rtResult == "OK" && perf190rnResult == "OK" && perf190sbResult == "OK" && cachecheck190tgResult == "OK" && undo190spResult == "OK" && menuwindows190skResult == "OK" && issues330skResult == "OK" && audioedit190stResult == "OK" && drumsynth190syResult == "OK" && smallbugs190srResult == "OK" && quickwins190srResult == "OK" && batch292_190swResult == "OK" && round190teResult == "OK" && yannik190sqResult == "OK" && rea190taResult == "OK" && round190tiResult == "OK" && round190tkResult == "OK" && round190tmResult == "OK" && round190toResult == "OK" && batch334svResult == "OK" && details190tdResult == "OK" && qa190rbResult == "OK" && bugs190rvResult == "OK" && q6190saResult == "OK" && issue325Result == "OK" && keysheet190sjResult == "OK" && details190tbResult == "OK" && notes190tjResult == "OK" && children190thResult == "OK" && stab190rpResult == "OK" && repeats190pmResult == "OK" && mixerqol190qhResult == "OK" && autolive190qpResult == "OK" && issue282Result == "OK" && feel190qeResult == "OK" && toolbar190qgResult == "OK" && extras190qkResult == "OK" && extras190roResult == "OK" && playlistview190soResult == "OK" && custom190ssResult == "OK" && discord190quResult == "OK" && trialmark190qtResult == "OK" && optionsux190qxResult == "OK" && chordlane190pfResult == "OK" && nofl190rhResult == "OK" && downgrade0132Result == "OK" && autolinks190ovResult == "OK"
                         && trackstates190opResult == "OK" && rollup031s6Result == "OK" // (round 190op's item, reported but not counted in its branch: rollup 0.1.31 step 6)
                         && rollup031s7Result == "OK" && rollup031s8Result == "OK" && rollup032Result == "OK" && headerGearResult == "OK" && perTab259Result == "OK" && slots260Result == "OK" && hotfixPlacesResult == "OK" && startPageScrollResult.startsWith ("OK") // (round 190qf: slots260) (rollup 0.1.31 step 7, round 190pw; and the three rounds' items its branches reported but did not count:)
                         && slides190piResult == "OK" && automodes190paResult == "OK" && heldSteps190ozResult == "OK"
@@ -12802,6 +12818,7 @@ private:
                << "round190ti=" << round190tiResult << (round190tiResult == "OK" ? juce::String() : " | " + round190tiLog.replace ("\n", "; ")) << "\n"
                << "round190tk=" << round190tkResult << (round190tkResult == "OK" ? juce::String() : " | " + round190tkLog.replace ("\n", "; ")) << "\n"
                << "round190tm=" << round190tmResult << (round190tmResult == "OK" ? juce::String() : " | " + round190tmLog.replace ("\n", "; ")) << "\n"
+               << "round190to=" << round190toResult << (round190toResult == "OK" ? juce::String() : " | " + round190toLog.replace ("\n", "; ")) << "\n"
                << "smallbugs190sr=" << smallbugs190srResult << (smallbugs190srResult == "OK" ? juce::String() : " | " + smallbugs190srLog.replace ("\n", "; ")) << "\n"
                << "quickwins190sr=" << quickwins190srResult << (quickwins190srResult == "OK" ? juce::String() : " | " + quickwins190srLog.replace ("\n", "; ")) << "\n"
                << "audioedit190st=" << audioedit190stResult << (audioedit190stResult == "OK" ? juce::String() : " | " + audioedit190stLog.replace ("\n", "; ")) << "\n"
@@ -23268,6 +23285,7 @@ private:
 #include "Round190tiCheck.inc" // round 190ti: Slicex's pitch automation paths, the Playlist's Add key marker
 #include "Round190tkCheck.inc" // round 190tk: FL's automation timing for imported FL projects
 #include "Round190tmCheck.inc" // round 190tm: Reload re-reads the file, the Playlist ▾ Time markers, Song mode key markers, muted clips
+#include "Round190toCheck.inc" // round 190to: FL's per-insert effects switch, the Master's / Current column's icons, Extra large
 #include "SmallBugs190srCheck.inc" // round 190sr: #350, #349, QUEUE 0.1.33 items 42 / 43
 #include "QuickWins190srCheck.inc" // round 190sr: the quick wins (#318 ...)
 #include "Batch292Check190sw.inc" // round 190sw: #292 routing cables, #322 macOS's menu bar, #289 the hardware outputs export

+ 3 - 1
src/QuickWins190srCheck.inc

@@ -158,7 +158,9 @@
             {
                 const juce::Point<int> fxSwitch { list.getRight() - 8, list.getY() + 2 * trackinserts::rowHeight + 6 }; // (the add row, after 2 effects)
                 click (fxSwitch, {});
-                check ("320 the FX switch turns every effect off", ! mixerops::anyEffectEnabled (engine.getSong(), insert));
+                // (round 190to: FL's per-insert effects switch: off bypasses the chain, the slots keep their own switches)
+                check ("320 the FX switch turns the insert's effects off", ! mixerops::effectsPlaying (engine.getSong(), insert)
+                                                                            && mixerops::anyEffectEnabled (engine.getSong(), insert));
                 click (fxSwitch, {});
                 const auto& fx = engine.getSong().mixer[(std::size_t) insert].effects;
                 check ("320 and on again", fx.size() == 2 && fx[0].enabled && fx[1].enabled);

+ 8 - 5
src/Round190tmCheck.inc

@@ -410,9 +410,12 @@
                 settle (30);
                 const auto fx = strips.effectSlotsIconForSnapshot (1), clock = strips.latencyIconForSnapshot (1), arm = strips.armAreaForSnapshot (1);
                 const auto lname = juce::String ((int) layout);
+                // (round 190to, FL 2026 raw a12: Extra large splits it: latency and arm under the fader, the plug under the
+                // slots' names)
+                const auto xl = layout == mixerlayout::Layout::extraLarge;
                 check ("#361 layout " + lname + ": FL's icon row (effect slots, latency, arm) top to bottom, under the fader, above the route arrow",
-                       ! fx.isEmpty() && fx.getY() < clock.getY() && clock.getY() < arm.getY() && arm.getBottom() <= strips.getHeight()
-                           && fx.getY() > strips.getHeight() / 2,
+                       ! fx.isEmpty() && (xl ? clock.getY() < arm.getY() && arm.getBottom() < fx.getY() : fx.getY() < clock.getY() && clock.getY() < arm.getY())
+                           && juce::jmax (arm.getBottom(), fx.getBottom()) <= strips.getHeight() && juce::jmin (fx.getY(), clock.getY()) > strips.getHeight() / 2,
                        fx.toString() + " / " + clock.toString() + " / " + arm.toString());
                 check ("#361 layout " + lname + ": the Master has the icons too", ! strips.effectSlotsIconForSnapshot (0).isEmpty() && ! strips.latencyIconForSnapshot (0).isEmpty());
                 if (shots.isNotEmpty())
@@ -426,7 +429,7 @@
             settle (30);
             if (shots.isNotEmpty())
                 shoot (strips, strips.getLocalBounds().withWidth (juce::jmin (strips.getWidth(), 900)), "mixer-wide");
-            const auto fxOf = [&] { return mixerops::anyEffectEnabled (offline.getSong(), 1); };
+            const auto fxOf = [&] { return mixerops::effectsPlaying (offline.getSong(), 1); }; // (round 190to: the insert's switch)
             const auto fx = strips.effectSlotsIconForSnapshot (1).getCentre();
             check ("#361: insert 1's effects play (its icon lit)", fxOf());
             press (fx, left);
@@ -443,10 +446,10 @@
             settle (20);
             const auto& back = offline.getSong().mixer[1].effects;
             check ("#361: undo again: the slots as they were (the second one off on its own)", back.size() == 2 && back[0].enabled && ! back[1].enabled);
-            // an empty insert: nothing to switch
+            // an empty insert: nothing to switch (FL 2026: no change, no History step; round 190to a07)
             press (strips.effectSlotsIconForSnapshot (2).getCentre(), left);
             settle (20);
-            check ("#361: an empty insert's icon changes nothing", offline.getSong().mixer[2].effects.empty());
+            check ("#361: an empty insert's icon changes nothing", offline.getSong().mixer[2].effects.empty() && offline.getSong().mixer[2].effectsOn);
             // the clock: FL's latency menu (a menu, no window; dismissed here)
             press (strips.latencyIconForSnapshot (1).getCentre(), left);
             settle (40);

+ 274 - 0
src/Round190toCheck.inc

@@ -0,0 +1,274 @@
+    // Round 190to (QUEUE 0.1.33 item 96, issue #361 follow-up; FL 2026 live check 12-01, raw a02-a16): FL's per-insert effects
+    // switch (MixerTrack::effectsOn: the strip's plug icon and the Effects panel's FX button; the slots keep their own
+    // switches; .lynx "effectsOn", the 0.1.32 copy, FL's .flp bit 0x04), the Master's and the Current column's icons, and
+    // FL's Extra large icon places. Through the real components, off screen; no window is opened.
+    // Included in the app class of Main.cpp; --round190totest <report> [<shot prefix>] and --selftest "round190to".
+    juce::String round190toCheck (juce::String& log, const juce::String& shots = {})
+    {
+        using namespace lynx;
+        juce::String result = "OK";
+        const auto check = [&] (const juce::String& what, bool ok, const juce::String& detail = {}) {
+            log << (ok ? "ok   " : "FAIL ") << what << (detail.isNotEmpty() ? " (" + detail + ")" : juce::String()) << "\n";
+            if (! ok && result == "OK")
+                result = "ERROR " + what;
+        };
+
+        // ---- the project file and the copy for LYNX 0.1.32 (no UI)
+        {
+            auto s = Song::makeDefault();
+            s.mixer = Song::defaultMixer (3);
+            s.mixer[1].name = "Drums";
+            EffectSlot eq, delay;
+            eq.kind = EffectKind::eq;
+            delay.kind = EffectKind::delay;
+            delay.enabled = false;
+            s.mixer[1].effects.push_back (eq);
+            s.mixer[1].effects.push_back (delay);
+            const auto plainJson = ProjectFile::toJson (s);
+            check (".lynx: nothing written while the switch is on", ! plainJson.contains ("effectsOn"));
+            mixerops::setEffectsOn (s, 1, false);
+            const auto json = ProjectFile::toJson (s);
+            check (".lynx: \"effectsOn\": false on the insert", json.contains ("\"effectsOn\": false"));
+            juce::String error;
+            const auto back = ProjectFile::fromJson (json, error);
+            check (".lynx: read back, each slot's own switch kept", back && ! back->mixer[1].effectsOn && back->mixer[2].effectsOn
+                                                                         && back->mixer[1].effects.size() == 2 && back->mixer[1].effects[0].enabled
+                                                                         && ! back->mixer[1].effects[1].enabled,
+                   error);
+            const auto copy = olderlynx::forRelease (json, "0.1.32");
+            int lines = 0;
+            for (const auto& l : copy.lost)
+                if (juce::String (l.text).startsWith ("Inserts with their effects switched off") && l.detail.contains ("Drums") && ! l.sound)
+                    ++lines;
+            const auto reopened = copy.ok ? ProjectFile::fromJson (copy.json, error) : std::nullopt;
+            check ("the copy for 0.1.32: every slot of the insert off (the same sound), the key dropped, one view line",
+                   copy.ok && lines == 1 && ! copy.json.contains ("effectsOn") && reopened && reopened->mixer[1].effectsOn
+                       && reopened->mixer[1].effects.size() == 2 && ! mixerops::anyEffectEnabled (*reopened, 1),
+                   juce::String (lines) + " line(s)");
+            check ("the copy for 0.1.27 too (every step after it)", olderlynx::forRelease (json, "0.1.27").ok);
+            const auto plainCopy = olderlynx::forRelease (plainJson, "0.1.32");
+            check ("no line for a project without it", std::none_of (plainCopy.lost.begin(), plainCopy.lost.end(), [] (const olderlynx::Loss& l) {
+                       return juce::String (l.text).startsWith ("Inserts with their effects");
+                   }));
+        }
+
+        // ---- an FL project with an insert's effects switched off (FL 2026's demo "LeriQ - SHINE": insert 12, its four
+        // effects with their own LEDs on, on, on, off; FL's mixer: the plug grey, raw a02 / a03)
+        std::optional<Song> shine;
+        {
+            const auto fl = juce::SystemStats::getEnvironmentVariable ("LYNX_FL_INSTALL", "");
+#if JUCE_WINDOWS
+            const juce::String installed = "C:\\Program Files\\Image-Line\\FL Studio 2026";
+#else
+            const juce::String installed = "/mnt/c/Program Files/Image-Line/FL Studio 2026";
+#endif
+            const auto file = juce::File (fl.isNotEmpty() ? fl : installed)
+                                  .getChildFile ("Data/Demo projects/Demo songs/LeriQ - SHINE.flp");
+            if (file.existsAsFile() && juce::SystemStats::getEnvironmentVariable ("LYNX_NO_FL", "").isEmpty())
+            {
+                juce::MemoryBlock bytes;
+                file.loadFileAsData (bytes);
+                const auto* data = static_cast<const std::uint8_t*> (bytes.getData());
+                shine = importFlp (flp::parseProject (std::vector<std::uint8_t> (data, data + bytes.getSize())));
+                int off = 0;
+                for (const auto& m : shine->mixer)
+                    off += m.effectsOn ? 0 : 1;
+                const auto& fx = shine->mixer.size() > 12 ? shine->mixer[12].effects : CowVector<EffectSlot> {};
+                juce::String leds;
+                for (const auto& e : fx)
+                    leds << (e.enabled ? "1" : "0");
+                check ("SHINE (FL demo): insert 12's effects switched off, the only one", shine->mixer.size() > 12 && ! shine->mixer[12].effectsOn && off == 1,
+                       juce::String (off) + " off");
+                check ("SHINE: insert 12's slots keep their own switches (FL's LEDs: on, on, on, off)", leds == "1110", leds);
+            }
+            else
+                log << "     (FL Studio's SHINE demo not here: its import check skipped)\n";
+        }
+
+#if ! (JUCE_LINUX || JUCE_WINDOWS)
+        log << "the UI part skipped on this platform (the check pumps the message queue)\n";
+        return result;
+#else
+        const auto settle = [] (int ms) {
+            const auto end = juce::Time::getMillisecondCounter() + (juce::uint32) ms;
+            while (juce::Time::getMillisecondCounter() < end)
+            {
+                for (int i = 0; i < 256 && juce::detail::dispatchNextMessageOnSystemQueue (true); ++i) {}
+                juce::Thread::sleep (2);
+            }
+        };
+        const auto closeModals = [&settle] {
+            for (int k = 0; k < 20; ++k)
+                if (auto* modal = juce::Component::getCurrentlyModalComponent())
+                    modal->exitModalState (0);
+            juce::PopupMenu::dismissAllActiveMenus();
+            settle (50);
+        };
+        const auto shotScale = (float) juce::jlimit (1.0, 3.0, juce::SystemStats::getEnvironmentVariable ("LYNX_SHOT_SCALE", "1").getDoubleValue());
+        const auto shotSuffix = juce::SystemStats::getEnvironmentVariable ("LYNX_SHOT_SUFFIX", "");
+        const auto shoot = [&] (juce::Component& c, juce::Rectangle<int> area, const juce::String& name) {
+            if (shots.isEmpty())
+                return;
+            const auto picture = c.createComponentSnapshot (area, true, shotScale);
+            const juce::File file (shots + "-" + name + shotSuffix + ".png");
+            file.deleteFile();
+            juce::FileOutputStream stream (file);
+            juce::PNGImageFormat().writeImageToStream (picture, stream);
+        };
+        const auto layoutBefore = layoutstyle::current();
+        layoutstyle::setCurrent (layoutstyle::Style::pattern);
+        const juce::ScopedValueSetter<bool> shown (ui::showingForShots(), true);
+
+        AudioEngine offline (false);
+        {
+            auto s = Song::makeDefault();
+            s.mixer = Song::defaultMixer (4);
+            for (const int t : { 1, 2 })
+            {
+                EffectSlot eq, delay;
+                eq.kind = EffectKind::eq;
+                delay.kind = EffectKind::delay;
+                delay.enabled = t != 1; // (insert 1: the second one off on its own)
+                s.mixer[(std::size_t) t].effects.push_back (eq);
+                s.mixer[(std::size_t) t].effects.push_back (delay);
+            }
+            offline.setSong (std::move (s));
+        }
+        MainComponent mainUi (offline, false);
+        mainUi.setSize (1600, 900);
+        closeModals();
+        mainUi.selectTabForSnapshot (3);
+        settle (60);
+        auto& mixer = mainUi.getMixerForSnapshot();
+        auto& strips = mixer.getStripsForSnapshot();
+        auto source = juce::Desktop::getInstance().getMainMouseSource();
+        const auto press = [&source] (juce::Component& c, juce::Point<int> p, juce::ModifierKeys mods) {
+            const auto now = juce::Time::getCurrentTime();
+            const juce::MouseEvent e (source, p.toFloat(), mods, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, &c, &c, now, p.toFloat(), now, 1, false);
+            c.mouseMove (e);
+            c.mouseDown (e);
+            c.mouseUp (e);
+        };
+        const juce::ModifierKeys left (juce::ModifierKeys::leftButtonModifier);
+        const auto slotsOf = [&offline] (int t) {
+            juce::String leds;
+            for (const auto& e : offline.getSong().mixer[(std::size_t) t].effects)
+                leds << (e.enabled ? "1" : "0");
+            return leds;
+        };
+
+        // ---- the strip's plug: FL's per-insert flag, one undo step named as FL's History ("enable/disable effect plugins")
+        strips.setLayout (mixerlayout::Layout::wide);
+        settle (30);
+        press (strips, strips.effectSlotsIconForSnapshot (1).getCentre(), left);
+        settle (30);
+        check ("the plug switches the insert's effects off, the slots keep their own switches (FL raw a03)",
+               ! offline.getSong().mixer[1].effectsOn && slotsOf (1) == "10", slotsOf (1));
+        const auto label = offline.getHistoryLabel (offline.getHistoryPosition());
+        const auto flName = undonames::inLayout (label.action, label.actionArg, layoutstyle::Style::pattern, false);
+        check ("one undo step, FL's name", offline.canUndo() && flName == "enable/disable effect plugins", juce::String (flName));
+        // the Effects panel's FX button drives the same flag
+        auto& panel = mixer.getEffectsForSnapshot();
+        panel.setTrack (1);
+        settle (30);
+        const auto fxButton = panel.fxSwitchForCheck();
+        check ("the Effects panel shows its FX button", ! fxButton.isEmpty() && panel.getWidth() > 0, fxButton.toString());
+        press (panel, fxButton.getCentre(), left);
+        settle (30);
+        check ("the Effects panel's FX button switches the same flag back on", offline.getSong().mixer[1].effectsOn && slotsOf (1) == "10", slotsOf (1));
+        press (panel, fxButton.getCentre(), left);
+        settle (30);
+        check ("... and off again", ! offline.getSong().mixer[1].effectsOn && slotsOf (1) == "10");
+        offline.undo();
+        settle (20);
+        check ("undo: on again, the slots as they were", offline.getSong().mixer[1].effectsOn && slotsOf (1) == "10");
+        offline.redo();
+        settle (20);
+        check ("redo: off", ! offline.getSong().mixer[1].effectsOn);
+
+        // ---- the Master's arm (FL 2026: "Arm disk recording" on the Master too, raw a09)
+        const auto masterArm = strips.armAreaForSnapshot (0);
+        check ("the Master has the arm under its clock", ! masterArm.isEmpty() && masterArm.getY() > strips.latencyIconForSnapshot (0).getY(),
+               masterArm.toString());
+        press (strips, masterArm.getCentre(), left);
+        settle (30);
+        const auto masterArmed = offline.isInsertArmed (0);
+        closeModals();
+        press (strips, masterArm.getCentre(), left);
+        settle (30);
+        closeModals();
+        check ("a click arms the Master, a second one disarms it", masterArmed && ! offline.isInsertArmed (0));
+
+        // ---- the Current column (FL raw a02 / a10): the plug (dim, inert) and the Current track's arm, in FL's rows
+        const auto curPlug = strips.currentPlugIconForSnapshot(), curArm = strips.currentArmAreaForSnapshot();
+        check ("Wide: the Current column has the plug and the arm in the Master's rows",
+               ! curPlug.isEmpty() && ! curArm.isEmpty() && curPlug.getY() == strips.effectSlotsIconForSnapshot (0).getY()
+                   && curArm.getY() == masterArm.getY() && curPlug.getRight() <= strips.effectSlotsIconForSnapshot (0).getX(),
+               curPlug.toString() + " / " + curArm.toString());
+        const auto historyBefore = offline.getHistorySize();
+        press (strips, curPlug.getCentre(), left);
+        settle (30);
+        check ("the Current column's plug switches nothing (FL: no History step, raw a05)", offline.getHistorySize() == historyBefore);
+        press (strips, curArm.getCentre(), left);
+        settle (30);
+        const auto current = mixerops::currentTrack (offline.getSong());
+        const auto currentArmed = current > 0 && offline.isInsertArmed (current);
+        closeModals();
+        if (current > 0)
+            press (strips, strips.currentArmAreaForSnapshot().getCentre(), left);
+        settle (30);
+        closeModals();
+        check ("its arm arms the Current track (made at the first click), again: disarmed", currentArmed && ! offline.isInsertArmed (current),
+               juce::String (current));
+        if (shots.isNotEmpty())
+            shoot (strips, strips.getLocalBounds().withWidth (juce::jmin (strips.getWidth(), 900)), "mixer-wide");
+
+        // ---- Extra large (FL raw a12): latency and arm under the fader, the slots' names, the plug, the route arrow; the
+        // Current column: the plug only; an insert whose effects are off: its names dimmed, no darker cells
+        strips.setLayout (mixerlayout::Layout::extraLarge);
+        settle (40);
+        {
+            const auto clock = strips.latencyIconForSnapshot (1), arm = strips.armAreaForSnapshot (1), plug = strips.effectSlotsIconForSnapshot (1);
+            const auto list = strips.insertsAreaForSnapshot (1);
+            check ("Extra large: latency, arm, the slots' names, then the plug (FL's places)",
+                   ! list.isEmpty() && clock.getY() < arm.getY() && arm.getBottom() <= list.getY() + 1 && list.getBottom() <= plug.getY() + 1,
+                   clock.toString() + " / " + arm.toString() + " / " + list.toString() + " / " + plug.toString());
+            check ("Extra large: the Current column has the plug only", strips.currentArmAreaForSnapshot().isEmpty()
+                                                                         && strips.currentPlugIconForSnapshot().getY() == plug.getY());
+            const auto picture = strips.createComponentSnapshot (strips.getLocalBounds(), true, 1.0f);
+            const auto brightest = [&picture] (juce::Rectangle<int> r) {
+                float best = 0.0f;
+                for (int y = r.getY(); y < r.getBottom(); ++y)
+                    for (int x = r.getX(); x < r.getRight(); ++x)
+                        best = juce::jmax (best, picture.getPixelAt (x, y).getBrightness());
+                return best;
+            };
+            const auto row = [&strips] (int t) { const auto a = strips.insertsAreaForSnapshot (t); return a.withHeight (juce::jmin (a.getHeight(), 22)); };
+            const auto off = brightest (row (1)), on = brightest (row (2));
+            check ("Extra large: the switched-off insert's names dimmed (FL)", on > 0.5f && off < on * 0.8f,
+                   juce::String (off, 3) + " vs " + juce::String (on, 3));
+            if (shots.isNotEmpty())
+                shoot (strips, strips.getLocalBounds().withWidth (juce::jmin (strips.getWidth(), 900)), "mixer-xl");
+        }
+
+        // ---- the shots beside FL's (SHINE in Wide and Extra large; FL raw a02 / a12)
+        if (shine && shots.isNotEmpty())
+        {
+            offline.setSong (std::move (*shine));
+            settle (200);
+            strips.setLayout (mixerlayout::Layout::wide);
+            settle (60);
+            shoot (strips, strips.getLocalBounds(), "shine-wide");
+            strips.setLayout (mixerlayout::Layout::extraLarge);
+            settle (60);
+            shoot (strips, strips.getLocalBounds(), "shine-xl");
+            strips.setLayout (mixerlayout::Layout::wide);
+            settle (30);
+        }
+
+        strips.setLayout (mixerlayout::Layout::wide);
+        closeModals();
+        layoutstyle::setCurrent (layoutBefore);
+        return result;
+#endif
+    }

+ 1 - 1
tests/Issue11cTests.inc

@@ -56,6 +56,6 @@ TEST (issue11d_arm_click_arms_at_once_like_fl)
     CHECK (armClick (1, false) == ArmClick::arm);   // insert without (or with) an input: armed at once
     CHECK (armClick (1, true) == ArmClick::disarm);
     CHECK (armClick (126, false) == ArmClick::arm);
-    CHECK (armClick (0, false) == ArmClick::none);  // the Master
+    CHECK (armClick (0, false) == ArmClick::arm);   // the Master (round 190to: FL 2026 has its arm too, live check raw a09)
     CHECK (armClick (-1, true) == ArmClick::none);
 }

+ 197 - 0
tests/MixFx190toTests.inc

@@ -0,0 +1,197 @@
+// Round 190to (0.1.33, QUEUE item 96 / issue #361 follow-up): FL's per-insert effects switch (MixerTrack::effectsOn; FL .flp
+// 0xEC flags bit 0x04, REA_rodada146; FL 2026 live check 190to raw a02-a07, /R renders of the Vocodex demo and SHINE) and
+// the Master's "Arm disk recording" tap (raw a09).
+#include "core/AlsExport.h"
+#include "core/Effects.h"
+#include "core/DawProject.h"
+#include "core/FlmExport.h"
+#include "core/FlpExport.h"
+#include "core/FlpImport.h"
+#include "core/History.h"
+#include "core/LiveInput.h"
+#include "core/MixerOps.h"
+#include "core/RackRenderer.h"
+#include "core/TakeRecording.h"
+#include "core/UndoNames.h"
+#include "flp/Flp.h"
+
+namespace mixfx190to
+{
+// insert 1 plays the device input (0.25, monitored) through a Utility at the bottom of its Gain (a mute) and a Delay
+// switched off on its own
+lynx::Song switchSong()
+{
+    using namespace lynx;
+    auto s = Song::makeDefault();
+    s.channels.clear();
+    s.playlist.clear();
+    s.automations.clear();
+    s.mixer = Song::defaultMixer (3);
+    auto& m = s.mixer[1];
+    m.inputChannel = 0;
+    m.inputStereo = true;
+    m.monitor = InputMonitor::on;
+    auto mute = makeEffectSlot (EffectKind::utility);
+    mute.params[0] = 0.0f;
+    auto delay = makeEffectSlot (EffectKind::delay);
+    delay.enabled = false;
+    m.effects.push_back (mute);
+    m.effects.push_back (delay);
+    return s;
+}
+
+struct Rig
+{
+    lynx::RackRenderer renderer;
+    lynx::LiveInput input;
+    std::vector<float> in = std::vector<float> (256, 0.25f), l = std::vector<float> (256), r = std::vector<float> (256);
+
+    Rig()
+    {
+        renderer.prepare (48000.0, 512);
+        renderer.setLiveInput (&input);
+        input.channels[0] = in.data();
+        input.channels[1] = in.data();
+        input.numChannels = 2;
+    }
+    // the Master's output at sample 200 of the 12th block
+    float render (const lynx::Song& song)
+    {
+        auto state = lynx::RackState::build (song, nullptr, 48000.0);
+        for (int block = 0; block < 12; ++block)
+            renderer.process (state.get(), true, 0.0, 256, l.data(), r.data());
+        return l[200];
+    }
+};
+} // namespace mixfx190to
+
+TEST (mixfx190to_effects_switch_bypasses_the_chain_and_keeps_the_slots)
+{
+    using namespace lynx;
+    auto s = mixfx190to::switchSong();
+    CHECK (s.mixer[1].effectsOn && mixerops::effectsOn (s, 1) && mixerops::effectsPlaying (s, 1));
+    CHECK (s.slotActive (s.mixer[1], s.mixer[1].effects[0]) && ! s.slotActive (s.mixer[1], s.mixer[1].effects[1]));
+    {
+        mixfx190to::Rig rig;
+        CHECK (std::abs (rig.render (s)) < 1.0e-4f); // the Utility mutes the input
+    }
+    mixerops::setEffectsOn (s, 1, false);
+    // FL (live check 190tm g05, 190to a03): every slot keeps its own switch; the chain is bypassed
+    CHECK (s.mixer[1].effects[0].enabled && ! s.mixer[1].effects[1].enabled && ! mixerops::effectsPlaying (s, 1));
+    CHECK (mixerops::anyEffectEnabled (s, 1));
+    CHECK (! s.slotActive (s.mixer[1], s.mixer[1].effects[0]) && s.slotActive (s.mixer[1].effects[0]));
+    float off = 0.0f, slotsOff = 0.0f;
+    {
+        mixfx190to::Rig rig;
+        off = rig.render (s);
+    }
+    CHECK (off > 0.1f); // the input passes, the Utility doesn't run
+    // the same sound as every slot switched off (0.1.32's way to say it)
+    auto folded = s;
+    const auto changed = mixerops::foldEffectsSwitch (folded);
+    CHECK (changed == std::vector<int> { 1 } && folded.mixer[1].effectsOn && ! mixerops::anyEffectEnabled (folded, 1));
+    CHECK (! mixerops::anyEffectsSwitchedOff (folded) && mixerops::anyEffectsSwitchedOff (s));
+    {
+        mixfx190to::Rig rig;
+        slotsOff = rig.render (folded);
+    }
+    CHECK (off == slotsOff);
+    // on again: the mix as it was (the Utility mutes again, the Delay stays off)
+    mixerops::setEffectsOn (s, 1, true);
+    {
+        mixfx190to::Rig rig;
+        CHECK (std::abs (rig.render (s)) < 1.0e-4f);
+    }
+}
+
+TEST (mixfx190to_effects_switch_undo_name_and_history_label)
+{
+    using namespace lynx;
+    const auto before = mixfx190to::switchSong();
+    auto after = before;
+    mixerops::setEffectsOn (after, 1, false);
+    CHECK (! (before.mixer == after.mixer)); // (a change the history sees)
+    const auto label = describeChange (before, after);
+    CHECK (label.action == undonames::Action::effectsSwitch);
+    // FL 2026's History row (raw a06; FLEngine "enable/disable effect plugins")
+    CHECK (std::string (undonames::names (undonames::Action::effectsSwitch).fl) == "enable/disable effect plugins");
+}
+
+TEST (mixfx190to_flp_insert_flag_0x04_round_trip)
+{
+    using namespace lynx;
+    auto s = mixfx190to::switchSong();
+    s.mixer[1].inputChannel = -1;
+    s.mixer[1].effects.edit()[0] = makeEffectSlot (EffectKind::delay); // (an effect FL has: Fruity Delay)
+    s.mixer[1].effects.edit()[1].enabled = false;
+    mixerops::setEffectsOn (s, 1, false);
+    flpexport::Report report;
+    const auto project = flp::parseProject (flpexport::exportFlp (s, {}, report));
+    const auto it = std::find_if (project.mixer.begin(), project.mixer.end(), [] (const flp::MixerInsert& m) { return m.index == 1; });
+    CHECK (it != project.mixer.end());
+    if (it == project.mixer.end())
+        return;
+    CHECK ((it->flags & 0x04u) == 0); // FL's "effects on" bit off
+    const auto other = std::find_if (project.mixer.begin(), project.mixer.end(), [] (const flp::MixerInsert& m) { return m.index == 2; });
+    CHECK (other != project.mixer.end() && (other->flags & 0x04u) != 0);
+    const auto back = importFlp (project);
+    CHECK (back.mixer.size() > 2 && ! back.mixer[1].effectsOn && back.mixer[2].effectsOn && back.mixer[0].effectsOn);
+    if (back.mixer.size() > 2 && back.mixer[1].effects.size() == 2)
+        CHECK (back.mixer[1].effects[0].enabled && ! back.mixer[1].effects[1].enabled); // each slot's own switch kept
+}
+
+TEST (mixfx190to_formats_without_the_switch_get_every_slot_off)
+{
+    using namespace lynx;
+    auto s = mixfx190to::switchSong();
+    s.mixer[1].inputChannel = -1;
+    s.channels = Song::makeDefault().channels; // (a channel plays into insert 1: its track carries the devices)
+    if (! s.channels.empty())
+        s.channels.edit()[0].mixerTrack = 1;
+    mixerops::setEffectsOn (s, 1, false);
+    auto manual = s;
+    mixerops::setEffectsOn (manual, 1, true);
+    mixerops::setAllEffectsEnabled (manual, 1, false);
+    // Live: no switch for a track's device chain; the devices go over off (the same set as with every slot off)
+    {
+        const auto a = exportAls (s), b = exportAls (manual);
+        CHECK (a.xml == b.xml);
+        CHECK (std::any_of (a.notes.begin(), a.notes.end(), [] (const std::string& n) { return n.find ("Effects switched off on 1 insert") == 0; }));
+        CHECK (std::none_of (b.notes.begin(), b.notes.end(), [] (const std::string& n) { return n.find ("Effects switched off") == 0; }));
+    }
+    // DAWproject: each Device's "enabled" only
+    {
+        const auto a = exportDawProject (s), b = exportDawProject (manual);
+        CHECK (a.projectXml == b.projectXml);
+        CHECK (std::any_of (a.notes.begin(), a.notes.end(), [] (const std::string& n) { return n.find ("Effects switched off on 1 insert") == 0; }));
+    }
+    // FL Studio Mobile: one line (the sound stays)
+    {
+        FlmExportOptions o;
+        o.nowSeconds = 1.0e9;
+        const auto a = exportFlm (s, o), b = exportFlm (manual, o);
+        CHECK (a.bytes == b.bytes);
+        CHECK (std::any_of (a.lost.begin(), a.lost.end(), [] (const FlmExportLoss& l) { return l.text.find ("Inserts with their effects switched off") == 0 && ! l.sound; }));
+    }
+}
+
+TEST (mixfx190to_master_records_through_its_tap)
+{
+    using namespace lynx;
+    // FL 2026's Master has "Arm disk recording" (raw a09): its take holds what leaves the Master and plays through it
+    CHECK (armClick (0, false) == ArmClick::arm && armClick (0, true) == ArmClick::disarm && armClick (-1, false) == ArmClick::none);
+    auto s = mixfx190to::switchSong();
+    mixerops::setEffectsOn (s, 1, false); // (the input reaches the Master)
+    CHECK (takes::playbackInsert (s, 0, RecordSource::postEq) == 0 && takes::playbackInsert (s, 0, RecordSource::postTrack) == 0);
+    for (const auto point : { RecordSource::postEq, RecordSource::postTrack, RecordSource::postLevel })
+    {
+        mixfx190to::Rig rig;
+        rig.input.recording.store (true);
+        rig.input.taps[0].point.store ((int) point);
+        rig.input.taps[0].track.store (0);
+        rig.input.tapCount.store (1);
+        const auto out = rig.render (s);
+        const auto take = rig.input.taps[0].data[0][200];
+        CHECK (out > 0.1f && std::abs (take - out) < 1.0e-5f); // (the Master at unity: every position holds the output)
+    }
+}

+ 5 - 2
tests/Win190evTests.inc

@@ -111,8 +111,11 @@ TEST (win190ev_a_take_plays_where_fl_routes_it)
     song.playlistTracks[2].mode = lynx::PlaylistTrackMode::audio;
     song.playlistTracks[2].mixerTrack = 7;
     CHECK (playbackInsert (song, 7, RecordSource::postEq) == 7);
-    // no insert (Settings' "Record input audio" without armed inserts): a new one, as before
-    CHECK (playbackInsert (song, 0, RecordSource::externalInput) == -1);
+    // no insert (Settings' "Record input audio" without armed inserts, -1 since round 190to): a new one, as before
+    CHECK (playbackInsert (song, -1, RecordSource::externalInput) == -1);
+    // round 190to: the Master's own take (FL's Master "Arm disk recording") plays through the Master
+    CHECK (playbackInsert (song, 0, RecordSource::externalInput) == 0);
+    CHECK (playbackInsert (song, 0, RecordSource::postEq) == 0);
     CHECK (playbackInsert (song, 40, RecordSource::postEq) == -1);
 }
 

+ 1 - 0
tests/tests.cpp

@@ -18252,3 +18252,4 @@ TEST (fl_low_lifter_matches_fl_engine)
 #include "CacheCheck190tgTests.inc" // round 190tg (0.1.33, QUEUE item 85): the disk caches' integrity check (core/CacheCheck.h)
 #include "Notes358_190tjTests.inc" // round 190tj (issue #358): the Notes window's texts (core/ItemNotes.h)
 #include "AutoTime190tkTests.inc" // round 190tk (0.1.33, QUEUE item 92): FL's automation timing for imported FL projects; the NewTick fix
+#include "MixFx190toTests.inc" // round 190to (0.1.33, QUEUE item 96): FL's per-insert effects switch; the Master's arm tap