Home › Forums › General › Panels, Components, Macros › For people who use the juno 106
Tagged: For people who use the juno 106
- This topic has 12 replies, 7 voices, and was last updated 7 years, 9 months ago by Amir.
-
AuthorPosts
-
November 11, 2013 at 11:20 am #14923
I have an issue, Im trying to get the sysex data to dump for each patch that I’m loading but I cant seem to figure out a way to do it. The screenshot mechanism works great to send the data to the juno but I was hoping I could save my patches to CTRLR first, is this possible?
-Luke
November 11, 2013 at 2:39 pm #14944Hi Luke,
Msepis helped me out when I started my panel, hte following it what he advised and I think it may help you too:
One question regarding sysex, I’m hoping that the panel will be able to reflect patch changes made on the 3P. Will this require extra scripting or settings to be made in the Ctrlr panel?
yes.. you will need to get familiar with getting data and assigning values to modulators (knobs, sliders, buttons, etc).. Basically what you need to do is create a program change knob (or two buttons, – and +) that send a multimessage to your synth. first message is a program change, second message is a sysex program dump request.
Then on your panel itself (just click on “blank” space on your panel) go to the properties on the far right and look for “called when the panel receives a MIDI message”.
You’ll need to create a Lua method there called something like midiMessageRecieved. You need to create some hook that determines whether the message coming in is a program dump. Best ways to do this is ether by getting the nth byte to see if it is equal to your synth’s message ID for a program dump, or get the size of the message to compare to what a program dump’s byte length is. Here’s some example code of getting the 4th byte to see if it is equal to 0×10 (0x before a number represents HEX) which in my synths’s case indicates the message is a program dump from the synth:
midiMessageReceived = function(midiMessage) --this is a comment, it is ignored by the lua interpreter --create a variable "IDM" which is the value of the 4th byte of any incoming MIDI message: IDM = midiMessage:getLuaData():getByte(4) --is the fourth byte of incoming midi message equal to 0x10? if IDM == 0x10 then --if yes, then run another method called "assignValues" assignValues(midiMessage) --this next line is just a console message that alerts you that the script has run this far. View these in the "Lua Console" console ("program change sent, standby for panel update...") end end
IF the message is a program dump from the synth, you’ll then get the bytes that contain the values for your parameters, assign them to a variable (each one) and then assign that variable as the value for each modulator on your panel.
Here’s a shortened example of my “assignValues” method:function assignValues(midiMessage) -- create a variable that contains all bytes of program data from the synths program dump, get this info from synth's manual: programData = midiMessage:getData():getRange(7,256) -- cool, we've got everything, all we need to do now is actually assign the values to the modulators. --NOTE: use "setValueMapped" if the modulator is a combobox with custom values. --use "setModulatorValue" if the modulator is a typical modulator with a value range of, say 0-127 panel:getModulatorByName("Osc 1 Octave"):setValueMapped(programData:getByte(1), false) panel:getModulatorByName("Osc 1 Semitone"):setValueMapped(programData:getByte(2), false) panel:getModulatorByName("Osc 1 Detune"):setModulatorValue(programData:getByte(3), false, false, false) --continue for ALL parameters within your program dump.. . end
The complete thread is here:
Here is some noise I organised into an acceptable format:
https://soundcloud.com/lfo2vco/a-dark-crystalNovember 11, 2013 at 4:45 pm #14950Thanks for the help, I have actually begun taking apart atoms panel and trying to make it work a bit more smoothly based off of the sys ex data found here: http://www.hinzen.de/midi/juno-106/howto-02.html
I’m currently having issues with this LUA method though, it compiles ok but it is giving me a runtime error when i get the midi message dump.
function assignvalues(midiMessage) programdata=Midimessage:getdata():getrange(0,30) panel:getModulatorByName("LFO Rate"):setModulatorValue(programData:getbyte(6), false) panel:getModulatorByName("LFO Delay"):setModulatorValue(programData:getbyte(7), false) panel:getModulatorByName("DCOLFO"):setModulatorValue(programData:getbyte(8), false) panel:getModulatorByName("DCOPWM"):setModulatorValue(programData:getbyte(9), false) panel:getModulatorByName("Noise"):setModulatorValue(programData:getbyte(10), false) panel:getModulatorByName("VCFFREQ"):setModulatorValue(programData:getbyte(11), false) panel:getModulatorByName("VCFRES"):setModulatorValue(programData:getbyte(12), false) panel:getModulatorByName("VCFENV"):setModulatorValue(programData:getbyte(13), false) panel:getModulatorByName("VCFLFO"):setModulatorValue(programData:getbyte(14), false) panel:getModulatorByName("VCFKYBD"):setModulatorValue(programData:getbyte(15), false) panel:getModulatorByName("VCA"):setModulatorValue(programData:getbyte(16), false) panel:getModulatorByName("ENVA"):setModulatorValue(programData:getbyte(17), false) panel:getModulatorByName("ENVD"):setModulatorValue(programData:getbyte(18), false) panel:getModulatorByName("ENVS"):setModulatorValue(programData:getbyte(19), false) panel:getModulatorByName("ENVR"):setModulatorValue(programData:getbyte(20), false) panel:getModulatorByName("SUB"):setModulatorValue(programData:getbyte(21), false) panel:getModulatorByName("SUB"):setModulatorValue(programData:getbyte(22), false) panel:getModulatorByName("VCFLFO"):setModulatorValue(programData:getbyte(22), false) Switchers1 = midimessage:getLUAdata():getbyte(23) bi = BigInteger(byte) panel:getModulatorbyName("Range"):SetValueMapped(bi:getBitRangeasInt(0,3), false) panel:getModulatorbyName("Waveform"):SetValueMapped(bi:getBitRangeasInt(2,3), false) panel:getModulatorbyName("Chorus"):SetValueMapped(bi:getBitRangeasInt(2,5), false) Switchers2 = midimessage:getLUAdata():getbyte(24) bi = BigInteger(byte) panel:getModulatorbyName("LFO or Manual"):SetValueMapped(bi:getBitRangeasInt(0,1), false) panel:getModulatorbyName("ENVGate"):SetValueMapped(bi:getBitRangeasInt(1,1), false) panel:getModulatorbyName("VCFPolarity"):SetValueMapped(bi:getBitRangeasInt(2,1), false) panel:getModulatorbyName("HPF"):SetValueMapped(bi:getBitRangeasInt(3,2), false) end
November 11, 2013 at 5:21 pm #14951the methods in Lua are case sensitive so “SetValueMapped” should be “setValueMapped” start with that
November 12, 2013 at 7:07 am #14978Wow after going over my code about a thousand times I’ve managed to get it to work! I’m so happy!
The only issue I’m having now is trying to get my head around the LUA scripting for breaking apart a byte into its 7bit information for the changes in buttons and updating the coding on the panel. Does anyone have a panel I could check out where I could reference how this is done?
November 12, 2013 at 12:15 pm #15007I have pasted some info that should help, this is from the previous thread.
Count the bits from right to left thus: 76543210
So getBitRangeAsInt(0,2) means starting at the first bit (0) get two bits (2)Some of the combobox bytes are expressed like this in the Kiwi-3P user manual:
Byte (20) DCO1 Wave/Range,
Data Type 0000yyxx,
xx =DCO 1 Range 00=16′ 01=8’10=4′
yy =DCO 1 Wave 00=Saw 01=Pulse 10=SquareSo the on receiving the MIDI message from the synth Lua treats it like this:
byte = programData:getByte(20) bi = BigInteger(byte) panel:getModulatorByName("DCO 1 Range"):setValueMapped(bi:getBitRangeAsInt(0,2), false) panel:getModulatorByName("DCO 1 Waveform"):setValueMapped(bi:getBitRangeAsInt(2,2), false)
And to get the data into Byte 20 for a Sysex dump Lua treats it like this:
dco1range = panel:getModulatorByName("DCO 1 Range") dco1waveform = panel:getModulatorByName("DCO 1 Waveform") bi = BigInteger(0) bi:setBitRangeAsInt (0,2,dco1range:getValue()) bi:setBitRangeAsInt (2,2,dco1waveform:getValue()) byte20 = bi:getBitRangeAsInt(0,7)
Here is some noise I organised into an acceptable format:
https://soundcloud.com/lfo2vco/a-dark-crystalNovember 13, 2013 at 4:54 am #15150Okay this is going to sound quite noob but I’ve done this according to how I assume the binary data is being interpreted but its not being read into the comboboxes correctly.
byte = programData:getByte(20) bi = BigInteger(byte) panel:getModulatorByName("DCO 1 Range"):setValueMapped(bi:getBitRangeAsInt(0,2), false) panel:getModulatorByName("DCO 1 Waveform"):setValueMapped(bi:getBitRangeAsInt(2,2), false)
I currently have the combo box content such as this
16’=001
8’=010
4’=001it seems to sometimes read a value but not correctly which I’m guessing is probably because its not reading the combo box values I’ve set but rather 0-whatever as modulator values(in that specific case 0=16′ 8’=1 4’=2)
Is there a more simple way to fix thisNovember 13, 2013 at 4:58 am #15153Also disregard that i copied your code, my code is different but I made sure its all correct to my knowledge.
November 13, 2013 at 11:32 am #15178Hi Luke,
I did the same thing regarding the Combobox contents first time around. I’m no expert just passing on what Atom and Msepsis have taught me.
The Combo contnets are a linear list from top to bottom, so you only need to put:
16′
8′
4′Then in Lua reference the items something like this:
dcoOneRangeMessage = function(mod, value) -- Get the combo's value comboValue = DCO1Range:getModulatorValue() -- Send appropriate sysex based on combo's value if comboValue == 00 then mySysex = CtrlrMidiMessage({0xF0, 0x7F, 0x7F, 0x7F, 0x60, 0x01, 0x00, 0xb0, 0x08, 0x00, 0xF7}) panel:sendMidiMessageNow(mySysex) elseif comboValue == 01 then mySysex = CtrlrMidiMessage({0xF0, 0x7F, 0x7F, 0x7F, 0x60, 0x01, 0x00, 0xb0, 0x08, 0x20, 0xF7}) panel:sendMidiMessageNow(mySysex) elseif comboValue == 02 then mySysex = CtrlrMidiMessage({0xF0, 0x7F, 0x7F, 0x7F, 0x60, 0x01, 0x00, 0xb0, 0x08, 0x40, 0xF7}) panel:sendMidiMessageNow(mySysex) end end
So comboValue == 00 is the first item, 01 the second and so on.
Here is some noise I organised into an acceptable format:
https://soundcloud.com/lfo2vco/a-dark-crystalFebruary 18, 2014 at 4:33 am #19533Did anyone figure out how to set up the grouped sysex controls for the 106. I’m using the 106 panel to control my MKS7 and it’s the parameters 16 (range, chorus, wave) and 17 (Noise, HP filter, VCA ENV and PWM) that I want to get working.
May 13, 2014 at 9:48 pm #23379Hello,
It’s been a long time …
Did anyone figure out how to set up the grouped sysex controls for the 106. I’m using the 106 panel to control my MKS7 and it’s the parameters 16 (range, chorus, wave) and 17 (Noise, HP filter, VCA ENV and PWM) that I want to get working.
I’m too looking for a panel for my mks7…. Did you make some improvement thanks1 ?
May 31, 2015 at 5:50 pm #48684I’m working on a panel for the MKS 7.
It’s almost working.
I still have some issues with an UIcombo. I need to initialize the values of the combo because i alway have an error message when a load the panel. I can’t perform arithmetic on global variable (nil value).
Do you have a workaround for that issue ?
Cheers.
July 13, 2016 at 11:35 pm #69546LukeYouth, did you ever finish this?
I have been reading a ton of stuff on here and following the code that you guys posted here but I can’t get my panel to stop crashing. Can you send me your panel?
Thanks!
-
AuthorPosts
- The forum ‘Panels, Components, Macros’ is closed to new topics and replies.