-
Hi all, First of all, please note I have almost no experience creating or editing Ctrlr panels beyond a little dabble here and there, so please be kind :) I’m a bit user of Martin Tarenskeen’s fantastic panel for the PSS-580: http://ctrlr.martintarenskeen.nl/ One functionality is that the synth accepts updates of the entire patch rather than individual parameter changes, so Martin has included a ‘Put’ button which you need to press after making an edit for the changes to transmit. I’m wondering if there is a way in Ctrlr to make this happen immediately and automatically on mouse release? i.e. you click a dial, make the change and when you release the mouse the ‘Put’ action is executed automatically? Of course, true real time editing is not possible, and the unit’s MIDI buffer is easily clogged, so timing glitches etc are expected but this would at least reduce one step and make editing much faster. I am in touch with Martin directly and will of course relay any suggestions or changes to him! Thanks in advance for your help :) |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 8 replies
-
Hi @Kidwho! Welcome to Ctrlr. I added that function that fires when you press the PUT button to be fired by some of the dials on the panel! I have no idea whether that is a good thing for MIDI messaging (is it too much for the machine? etc), but will give you an idea how to do that! I also added the pssPut function to the EGPaint function that paints the graph. You can see where to add a callback function on the right side of the picture. When Fine Detune uiSlider is turned it will fire the same function that PUT does! PSS-580 (all fire pssPut)a_1_0_20210322_2022-01-19_23-16.zip |
Beta Was this translation helpful? Give feedback.
-
Hi @Kidwho! I'm back! There is actually a slightly more elegant and efficient way of doing this: First you create a function that fires when any modulator changes its value (See I you don't want a modulator to fire off the See attached: -- -- Called when any modulator changes on the panel -- -- @program modulator that changed -- @value new modulator value -- allModFire = function(--[[ CtrlrModulator --]] modulator, --[[ number --]] value) local mName=L(modulator:getName()) local set={ BANK = true, BB = true, FB = true, PMS = true, AMS = true, VDT = true, VIB = true, SUS = true, -- FM CARRIER PARAMETERS MUL_C = true, DT1_C = false, -- Won't fire pssPut() -- DT2_C = true, -- Won't fire pssPut() TL_C = true, LKSHI_C = true, LKSLO_C = true, RKS_C = true, AR_C = true, D1R_C = true, D2R_C = true, D1L_C = true, RR_C = true, SRR_C = true, AME_C = true, SIN_C = true, -- FM MODULATOR PARAMETERS DT1_M = true, DT2_M = true, MUL_M = true, TL_M = true, LKSHI_M = true, LKSLO_M = true, RKS_M = true, AR_M = true, D1R_M = true, D2R_M = true, D1L_M = true, RR_M = true, SRR_M = true, AME_M = true, SIN_M = true, } if set[mName] then pssPut() end end Regards. PSS-580 (global midi send 2)_1_0_20210322_2022-01-20_16-43.zip |
Beta Was this translation helpful? Give feedback.
-
I am the original author of this panel, and following this thread. If this can't be done I would like to try a timer callback function that checks every xxx (milli)seconds if any of the parameters in the patch have changed, and if so, fire pssPut. |
Beta Was this translation helpful? Give feedback.
-
I just found a way to send MIDI on mouse release. I create a component in a separate layer below a uiSlider that has a onMouseMove function which when triggered sends the MIDI after the user moves the mouse away from the uiSlider. But it only sends once because each uiSlider sitting above the uiComponent sets a flag to Possibly no need for timers or much lua code at all! Seems to work very well. -- -- Called when a modulator value changes -- @mod http://ctrlr.org/api/class_ctrlr_modulator.html -- @value new numeric value of the modulator -- setFlag = function( mod, value, source) sendFlag=true end -- -- Called when the mouse moves over a component -- mouseMove = function(--[[ CtrlrComponent --]] comp --[[ MouseEvent --]], event) if sendFlag == true then local m1 = panel:getModulatorByName("m1"):getModulatorValue() local m2 = panel:getModulatorByName("m2"):getModulatorValue() local sysex = string.format("F0 41 00 23 %.2x %.2x F7", m1, m2) panel:sendMidiMessageNow(CtrlrMidiMessage(sysex)) sendFlag = false end end |
Beta Was this translation helpful? Give feedback.
-
Hi guys, Thanks for all suggestions. I now use a timer callback, and re-use much of the LUA code that already was available in my panel. Didn't need much extra work and lines of code this way. Have not done heavy testing yet, but seems to work. Latest version 20220127 can be download for testing from my website http://ctrlr.martintarenskeen.nl |
Beta Was this translation helpful? Give feedback.
-
My wrong. Please try again, it should be visible now on
http://ctrlr.martintarenskeen.nl <http://ctrlr.martintarenskeen.nl/>
Op donderdag 27 januari 2022 om 04:48:28 -0800 schreef Kidwho
***@***.***>:
… Thanks so much everyone for all the hard work on this! What an
awesome and friendly community 🙂 @mtarenskeen
<https://github.com/mtarenskeen> trying to download the beta to test
out but can’t see it on the site? Thanks!
—
Reply to this email directly, view it on GitHub
<#411 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2YYOGDXUR2VDJ3MIZHWKLUYE5JZANCNFSM5MJRNWPA>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@mtarenskeen That's a nice solution, but could you not just do this? function pssAutoPut() -- This variable stops index issues during panel bootup if panel:getRestoreState() == true or panel:getProgramState() == true then return end timer:setCallback(1, timerCallback) timer:startTimer(1,1000) end function timerCallback() pssPut() --pssCopy() does this function do anything? timer:stopTimer(1) end ... instead of function pssAutoPut() -- This variable stops index issues during panel bootup if panel:getRestoreState() == true or panel:getProgramState() == true then return end timer:setCallback(1, timerCallback) timer:startTimer(1,1000) end function timerCallback1() local b = bank:getValue() local current = panel2data(b) CHANGED=false for i = 1,33 do if current[i] ~=editbuffer[i] then CHANGED=true break end end if CHANGED == true then for i=1,33 do console(""..current[i]) end pssPut() pssCopy() -- console("AUTOPUT SUCCEEDED?") timer:stopTimer(1) end end |
Beta Was this translation helpful? Give feedback.
Hi @Kidwho!
Welcome to Ctrlr.
I added that function that fires when you press the PUT button to be fired by some of the dials on the panel! I have no idea whether that is a good thing for MIDI messaging (is it too much for the machine? etc), but will give you an idea how to do that! I also added the pssPut function to the EGPaint function that paints the graph.
You can see where to add a callback function on the right side of the picture. When Fine Detune uiSlider is turned it will fire the same function that PUT does!
PSS-580 (all fire pssPut)a_1_0_20210322_2022-01-19_23-16.zip