BryanChi / BryanChi-FX-Devices

6 stars 3 forks source link

Partially fixed remove modulation bug #59

Closed Suzuki-Re closed 4 months ago

Suzuki-Re commented 5 months ago

The bug was that parameter gets modulation when right-dragging it even if users remove modulation link by double right-clicking it.

In RemoveModulationIfDoubleRClick function, FX[FxGUID][Fx_P].ModAMT[Mc] = 0, but 0 is not nil so FX[FxGUID][Fx_P].ModAMT[Mc] is true in the code below.

if FP.ModAMT[M] then
                Trk.Prm.Assign = FP.WhichCC
                AssigningMacro = M
                r.gmem_write(5, AssigningMacro) --tells jsfx which macro is user tweaking
                r.gmem_write(6, FP.WhichCC)
            end

Also did a bit of clean-up in General Functions because it's a bit chaotic. Removed duplicated and un-used functions, and reordered them, but not modified them so the change should not affect you. Moved GUI-related functions to the new GUI function.

EDIT: I forgot to mention it, but I changed automation mode buttons to one popup button. Color changes depending on the current mode.

Suzuki-Re commented 5 months ago

modamount However it still revives after re-opening the script for some reason. I'll leave this matter to you.

BryanChi commented 4 months ago

thank you Suzuki! I've merged the latest changes!

BryanChi commented 4 months ago

the new automation button is really nice!