Forum Replies Created
-
AuthorPosts
-
Hi Baus,
Not sure if I understand, but if you want one layer sitting under another layer to be editable there must be no objects in the top layer directly above that control you want the user to change. If there is nothing in the layer above obstructing those controls then those controls in the bottom layer should be accessible.
December 19, 2020 at 9:50 am in reply to: How paramater values are stored in the Ctrlr VST and sent back to the device? #121139Hi Damien,
Maybe something like this using stateData?
You can save all sysex data as one long string and on load send packets of data back to the synth by locating each F0 in the string:
“Called When Ctrlr state is saved”
m=MemoryBlock(allpaneldata)
stateData:setProperty("myBigString",m:toHexString(1))
and recover with something like:*
“Called When Ctrlr state is loaded”
local str = stateData:getProperty("myBigString") local data = MemoryBlock(str) for i = 0, data:getSize() - 1 do if data:getByte(i) == 240 then panel:sendMidiMessageNow(CtrlrMidiMessage(data:getRange(i, 600):toHexString(1))) -- i.e.sysex message = 600 bytes end end
*Untested pseudocode. Let me know if this is what you mean.
Also more reading:
In that example data is saved emulating a table key/value structure
See source code of my Juno Alpha panel.
There might be some link to external jquery or css that is trying to access an external http:// page. It might need to be changed to https:// in the code.
https://stackoverflow.com/questions/18251128/why-am-i-suddenly-getting-a-blocked-loading-mixed-active-content-issue-in-fire
I would do it differently.
See this post
ctrlr.org/forums/topic/standalone-images-not-loading/#post-115534
It always works for me.
Hi there BNj,
Try this one instead ctrlr.org/juno-alpha/; it should work or rather, I would like to know if it does work and as far as I know that MKS-50 panel only works on channel1
It is Canvas Bounds you have to change
Hi leopard86,
Many ways to do this, but for simple debugging and no error checking, create a multidimensional lua table of all the modulator names and their CC numbers:
t={ -- global table lfo={cc=23,val=0}, vcf={cc=8,val=0}, vca={cc=26,val=0}, A={cc=13,val=0}, D={cc=14,val=0}, S={cc=18,val=0}, R={cc=20,val=0}, }
Create a single callback function attached to each control in the table:
This will record the value to the table t{}.saveValue = function(mod,value,source) local name=L(mod:getName()) t[name].val=value end
Next create a mouse down callback function for a button, which on click will loop through the table and send each message in the table as CC:
sendAll = function(comp,event) for k, v in pairs(t) do panel:sendMidiMessageNow(CtrlrMidiMessage({0xB0, v.cc, v.val})) -- just channel 1 console(string.format("sent value for %s - %d [hex %.2x] using cc#%d", k, v.val, v.val, v.cc)) end end
Let me know if you need code for testing on different channels or see here how to do that https://ctrlr.org/forums/topic/novation-bass-station-2-panel/page/2/#post-119592
See example panel attached
Attachments:
You must be logged in to view attached files.Hi flopasen,
Attached is a panel EnzoF04 and I had been working on. I don’t have a SIX-TRAK or SCI-MAX so I can’t vouch for its working, but maybe it will help you. The trouble is the deciphering of the sysex is pretty complex and you might find it very confusing. It is!
Good luck and let me know if this panel helps you or even works with your synth.
Posted with the kind permission of EnzoF04
Attachments:
You must be logged in to view attached files.In a generic mousedown method/callback function, you can get the modulator userdata and the name of the modulator through comp.
You would first get the name of the component that fired the mousedown.
local mName=L(comp:getOwner:getName())
and then you can do an if/else on the name passed in for example.
See panel attached:
Attachments:
You must be logged in to view attached files.In the lua editor, Right click on the lua cube and create a function by clicking on Add Method.
Then you can access that function globally and call it from multiple parts of your panel.
------global------function myRandom = function() return (math.random(0, 512)) end ------global------function a = function() local b = myRandom() return b + b end b = function(n) if n == true then return myRandom() end end console(tostring(a())) console("" .. b(true)) console(tostring(myRandom()))
Regards,
- This reply was modified 3 years, 5 months ago by dnaldoog.
Hi Goodweather,
By all means – that would be fantastic, otherwise the post will eventually get buried with all the other posts as time goes on! I plan to do a few of these eventually, especially for subjects that keep popping up on the forums.
Thank you!
Hey Spiffo,
here’s another simple panel that uses layers. I posted it here
https://ctrlr.org/forums/topic/did-i-mess-up-my-panel-size/but will attach it here again.
Attachments:
You must be logged in to view attached files.That code is really only for other people to reference as it contains some interesting functionality. It would never be used in your panel. I posted it there to be able to refer back to it down the track! 🙂
That code is really only for other people to reference as it contains some interesting functionality. It would never be used in your panel. I posted it there to be able to refer back to it down the track! 🙂Hi llatham,
Here is a panel which should serve as a template for a new panel.
I created 4 layers for four partials, each with a separate control.
A global variable
k3
is set in an init script that changes the sysex for each partial and is changed by the uiCombo callback function.It should give you a start for working out how to change sysex depending on which partial is selected. It might be safer to just edit each sysex value per partial manually, but that will be a lot of work.
I haven’t consulted the manual for correct figures.
I put the offsets into a lua table
partialOffset={0x20,0x40,0x60,0x7f}
with arbitrary figures. Unfortunately this does involve lua!Regards,
John
Attachments:
You must be logged in to view attached files.So there is a problem there – you have set all the components to a too large size making the panel itself too large.
See solution in post #post-120399 below
Great Spiffo!
See this panel for an example of layers ctrlr.org/zoom-rfx-2000-editor/
If you click on the EXTRA button each selection from the combo is a separate layer with the top section always visible in a top layer.
Regards,
There are seven values. The first is not 1, it’s 0
so 0-6 = 7 valuesI know – it’s always confusing and when I first tested this in order to answer your question I naturally put (7-modulatorValue)+61, but it was wrong. I think it’s difficult to think of 0 as a value sometimes! It gets me every time!
So 0-11 = 12 values, yes!
🙂
Hi llatham,
Did
(6-modulatorValue)+61
work ??Hi Spiffo,
That’s right – a layer covers the whole panel, but if a component is not covered by another object in a layer above it, it can be accessed, so with a bit of design, so it’s actually a very useful feature.
Also, in those if else statements, that last
else
is not necessary.function switch_tab_contents()
mod1 = panel:getModulatorByName(“modulator-2”):getModulatorValue()
if mod1 == 0 then
panel:getCanvas():getLayerByName(“Layer3”):setVisible(true)
panel:getCanvas():getLayerByName(“Layer4”):setVisible(false)elseif mod1 == 1 then
panel:getCanvas():getLayerByName(“Layer3”):setVisible(false)
panel:getCanvas():getLayerByName(“Layer4”):setVisible(true)elseend
end — functionThanks for that Spiffo!
Something weird going on with that Tabs-Experiment panel though.
When you first open it, there’s a tab group inside another one, but when you click on the comboBox it disappears forever!
-
AuthorPosts