Forum Replies Created
-
AuthorPosts
-
The concatenation from Carl should work. You get the hex value. Another way would be by using tonumber:
pNumber=tonumber(panel:getModulatorByName("patchNumber"):getComponent() :getProperty("uiLabelText"), 16)
The last number “16” means converting to hex. “10” would convert to dec.
- This reply was modified 8 years, 2 months ago by Possemo.
Hi axxex. This is a thread about Opuswerks MKS-70 panel (for OS1.08 and OS3.x), not mine (the SuperJX OS4.x panel). So maybe we better discuss this on another thread or with facebook messenger. The bugs you encounter could be because you use the plugin version of Ctrlr. Please try the standalone ver of Ctrlr.
I would try this:
panel:setPropertyString("midiMessageChannel","1")
Hi dasfaker,
is “panelMidiPauseOut” not an option for you? For me it does the trick.For other params, the same hexa position can contain very different switches (not clean at all) and are the sum of the values of several switches (crazy).
Could it be that it is like on the Roland JX synths? Parameters, that do not require an entire Byte are packed together into the same Byte. E.g. Switch1 uses Bit0, SelectorX uses bit 1 to 2… and so on. If this is the case you can extract and set bits with Lua relatively easy.
You probably want a toggle button. Then you need to check “Button is toggle button”
I see it now, this is a different issue. Maybe input buffer too small? My problem was that I wanted to process the sysex messages just when they arrived, instead of waiting until all messages were arrived correctly (I put them just in a variable now).
Just to say, this has been removed on Windows ver. too. I don’t need it, so no problem for me. You can still acces the Snapshots with menu panel->MIDI Library.
- This reply was modified 8 years, 2 months ago by Possemo.
in the “export” menu you can choose if you want to save xml or binary.
But this will only work if your synth uses entire Bytes in the sysex-dump. there are some synths that are using “nibbleized” Bytes. Then it will start to get complicated…
Your idea with the global variables goes in the right direction. But global variables are part of Lua. Btw if you dont declare variables to be “local” variables in Lua are always global.
You could get all parameter values and put them in the right order into a string and send it to the synth. For this it is easiest to usea a Lua table where you put all parameter values – look at my panel, procedure called “getPanelValues”:-- make a table called "PatchDataValuesTable" PatchDataValuesTable={} -- start to fill the table -- byte (1) to (7) used for message prefix PatchDataValuesTable[1]="f0" PatchDataValuesTable[2]="41" PatchDataValuesTable[3]="38" PatchDataValuesTable[4]="00" PatchDataValuesTable[5]="24" PatchDataValuesTable[6]="30" PatchDataValuesTable[7]="01" -- GET the Patch Parameters (Global Parameters) PatchDataValuesTable[26]=string.format("%.2x",panel:getModulatorByName("A/B_Balance") :getModulatorValue()) PatchDataValuesTable[27]=string.format("%.2x",panel:getModulatorByName("DualDetune") :getValueMapped()) PatchDataValuesTable[28]=string.format("%.2x",panel:getModulatorByName("SplitPointUpper"):getValueMapped()) PatchDataValuesTable[29]=string.format("%.2x",panel:getModulatorByName("SplitPointLower"):getValueMapped()) PatchDataValuesTable[30]=string.format("%.2x",panel:getModulatorByName("PortaTime") :getModulatorValue())
Then you only need a small part of my procedure called “sendPatchToSynth”. On my example the length of the sysex message is 279.
-- Get current patch data from panel by executing "getPanelValues" getPanelValues() -- Concatenate all Table values to a string. Put a Space between values PatchDat=table.concat(PatchDataValuesTable," ",1,279) -- Convert the String to a Memoryblock MemB=MemoryBlock(PatchDat) -- send the Memoryblock to the synth panel:sendMidiMessageNow(CtrlrMidiMessage(MemB))
then you just nee a Button in Ctrlr and set the script “sendPatchToSynh” to “called when mouse is down…” in the Button settings.
February 8, 2016 at 12:57 pm in reply to: layer is still visible in uiPanelCanvasLayerVisibility #68396Hi audiosync. At the end I did not use Layers, but I experimented some time with it. Maybe this is of some use for you:
switchLayer=function() switch=panel:getModulatorByName("SwitchLayer"):getModulatorValue() if switch==1 then --Layer visible canvas=panel:getCanvas() canvas:getLayerByName("Libr"):setPropertyInt("uiPanelCanvasLayerVisibility", 1) elseif switch==0 then --Layer invisible canvas=panel:getCanvas() canvas:getLayerByName("Libr"):setPropertyInt("uiPanelCanvasLayerVisibility", 0) end end
In Roland language there are IPR sysex messages (Indvidual Parameter), APR (All Parameter) and BULK (All Patches – the wohle memory of the synth). Older synths probably just feature BULK or APR. So you will not be able to send single parameter values with a Ctrlr-fader or switch. You will have to use Lua scripting for this. With Lua scripting Ctrlr is able to do almost everything. APR and BULK are more features of a Librarian than an Editor. Look at my SuperJX-OS4.x panel. It is able to handle APR and DUMP. You can ask me if you have questions about the SuperJX panel.
I have to say that the SuperJX-OSv4.x Dumps are relatively simple. Most complex is the BULK. Some bytes are used for several different parameters which do not require an entire byte (switches and selectors).Hi atom, maybe this will be of some use for you:
macosx on windows with vmware
it is all free: VMWare-Player, MacOSX (is freely downloadable now).I have a MacOSx “Yosemite” on my WindowsPC with VMWare v10. It works quite well, but unfortunately the MOTU midiexpress128 does not work.
Save the panel with menu File->Save as. The .panel file is an xml file.
To my knowledge, the Ctrlr community encourages you to edit panels from other people. At least as long as there is no copyright disclaimer on startup. I learned and copyed a lot from other panels.
No, this was not right. We get still userdata with toString() method. As you said for this we need the toInteger method:
byte56=CtrlrLuaBigInteger(0) byte56:setBit(6,true) byte56:setBit(3,true) integerValue=byte56:getBitRangeAsInt(0,8)
start from first Bit(0), range is eight Bits(8)
Edit: Oops, it seems that for this you have to define the range as eight Bits(8). I don’t need the 8th Bit but it gave wrong results with a range of 7 Bits…
thanks atom! It pointed me in the right direction.
This worked for me:byte32=CtrlrLuaBigInteger(0) byte32:setBit(2,true) byte32:setBit(0,true) teststring=byte32:toString(16,2)
The string shows the number as Hex(16) with two digits(2)
I am stuck again. Maybe someone could help?
-- Byte 48 *********************************************************** byte48=CtrlrLuaBigInteger(0) APorta=panel:getModulatorByName("UpperPortamentoSw"):getModulatorValue() BHold =panel:getModulatorByName("LowerHoldSwitch") :getModulatorValue() if APorta==0 then byte48:setBit(4,false) elseif APorta==1 then byte48:setBit(4,true) end if BHold ==0 then byte48:setBit(2,false) elseif BHold ==1 then byte48:setBit(2,true) end PatchTable[49]=string.format("%.2x",Byte48)
The last line does not work. I cannot write the Byte into the Table:
Error message: [string “putToLibrary”]:179: bad argument #2 to ‘format’ (number expected, got userdata)
How can I convert the userdata into something useable, like a number or a string?
Thanks for reading 🙂
-
AuthorPosts