Forum Replies Created
-
AuthorPosts
-
DnaldDoog, I got your reply by email but turned to a ghost posts online. Don’t worry.
Actually there was something wrong in the denybblizing script:
if total > 0 then...
I removed it since we need all values even 00 that was nudging all the values.
and that changed everything I now have all the correct values for my algo name so all the labels showing the right infos and the button switch the good current settings.
Yes I would really like to get your exemple for nybllizing with the 0000HHHH 0000LLLL structure that would be awesome! It’s my next step so it may be very useful.
Thanks π
Hi everybody,
This is working very well and you were absolutely right, setModulatorValue doesn’t work, the right method is
panel:getModulatorByName("ModulatorName"):getComponent():setValue(Value,true)
I experienced a little glitch with my code to update the panel from the received sysex of the current parameter values from the Ensoniq DP4
I can get the algo Index from the 4 DSP given in hexadecimal
I have a string with all the algo names listed
My problem is that the value of the algo index is in hex and the string argument index is an integer
i don’t know where to convert the given value with the tonumber method
this is my script to update the algo name in a the dedicated label from the EditBufferMessage which is actually my cleaned MemoryBlock
function UAAlgoLblDecode(EditBufferMessage) AlgoIndexUA = EditBufferMessage:getByte(16) -- Get Algo For Unit A from Edit Buffer Sysex Message in hex format AlgoName = {"No Effect","Small Room Rev","Large Room Rev","Hall Reverb","Non Lin Reverb 1","Small Plate","Large Plate","Gated Reverb","Reverse Reverb","MultiTap Delay","Dual Delay","Tempo Delay","Parametric EQ","Guitar Amp 1","VCF-Distortion","Speaker Cabinet","Rotating Speaker","EQ-Compressor","No Effect","Expander","InversExpander","8 Voice Chorus","EQ-Chorus-DDL","Flanger","Phaser-DDL","PitchShift-DDL","Pitch Shifter","Guitar Amp 2","VanderPolFilter","Sine/Noise Gen","No Effect","No Effect","Vocoder Low","Vocoder Mid 1","Vocoder Mid 2","Vocoder High","Pitch Shift 2U","Pitch Shift 2U #2","EQ-Tremolo-DDL","EQ-Vibrato-DDL","EQ-Panner-DDL","De-esser","Duck / Gate","3.3 sec DDL 2U","3.3 sec DDL 2U #2","Tunable Speaker","Non Lin Reverb 2","EQ-Flanger-DDL","FastPitchShift","No Effect","Guitar Amp 3","No Effect","No Effect","EQ-DDL-withLFO","Reverse Reverb 2","Rumble Filter","No Effect","No Effect","Keyed Expander","Non Lin Reverb 3"} AlgoNameUA = AlgoName[AlgoIndexUA+1] -- Index position (+1) of the Algoname string, from an hex value that needs to be converted to decimal. AlgoTextUA = string.format("%s", AlgoNameUA) if AlgoNameUA ~= nil then panel:getLabel("lblAlgoUA"):setText(AlgoTextUA) else AlgoLabelUA = "Select Algo UA" end end
How to convert “AlgoNameUA”, which is an hex value from the EditBufferMessage, to a decimal number that corresponds to the index position of my algoName string ?
Right now if the value is 32, the given Index of the string ins 50(dec equivalent). so it’s not good.
thanks a lot in advance guys !
It took me a whole day to understand This paragraph in the manual. It made no sense to me.
I read your guide “Ctrlr-Step-by-Step-v13.pdf” T’es franΓ§ais Goodweather?Hi,
Maybe I’m off the track but this is the way I pictured it.
Let’s take the message received from above
03 02 02 00 05 03 06 0F 07 05 07 02 06 03 06 05 02 00 04 03 06 0F 06 0E 06 06 06 09 06 07...
They say in the manual : offset 01 to 16 = Preset name
To me, byte offset 1 to 16 from the given raw message is
03 02 02 00 05 03 06 0F 07 05 07 02 06 03 06 05
raw message offset would be
offset 1 = 03
offset 2 = 02
offset 3 = 02
offset 4 = 00
etcThe “clean” message with the right offset position corresponding to the manual would be without the interleaved blank nybbles:
32 20 53 6F 75 72 63 65 20 43 6F 6E 66 69 67
offset 1 = 32
offset 2 = 20
offset 3 = 53
…
It means ” 2 Source Config” in ASCII
So truncating the zeros and pairing the 2nd numbers gives the useful hexadecimal bytesAccording to the manual it’s written for this particular message : “data segment size 163 bytes, 326 Nybbles”
Message format – 8 bit data bytes must be transmitted and received using the 7 bit data format of MIDI, where the MSB of these data bytes must always be zero, so each of the 8 bit data byte is converted to two 4 bit nybbles for transmission. These nybbles each sent as bytes whose upper four bits are all zero. This is a description of the format of all nybblized data bytes within the packet frame as they are transmitted or received via MIDI.
0000HHHH with H = Hi 4 bits of data byte – transmitted first
0000LLLL with L = Lo 4 bits of data byte
This represents how the 8 bit byte HHHHLLLL would be transmitted.I’m not used to manipulate bits and bytes, LSB, MSB, etc maybe there’s just a very logical and academic way to deal with the raw sysex message received according to this very structure.
To me, removing the first 0 of a pair of number would do the job to get hex bytes with the right offset position.
I will face the same structure when I’ll set all my knob values to send to the unit since the message formula is :F0 0F 40 00 (header) 00 (ID) 01 (Msg type) 00 01 (Command type) 00 0U (DSP Unit) 00 0P (0ppp pppp Algo Parameter) 00 00 0v 0V (Value) F7
with
mmmmmmmm = parameter value MSByte
llllllll = parameter valuer LSByteSo if I want to send value 127 for Param 3 on the Unit C the message would be :
F0 0F 40 00 00 01 00 01 00 02 00 03 00 00 07 0F F7
Is it a common way to send and receive sysex messages?
Maybe there’s a 1 line LUA function to decypher sent/received message with this format but I don’t know.- This reply was modified 3 years, 11 months ago by damien. Reason: typo
Thanks Dnaldoog for the script, this is exactly what I needed.
I’ll place it in the midiMessageReceived global method with few adjustments.
If the dump is an “Edit Buffer” message type (type 25) with the right size (334 bytes) then the message will be denybblized and the decoding of the current status (bypass, currently selected unit, algo parameter etc) occures…To reply to goodweather I want to denybblize it because all the instructions in the sysex manual provide in a big table the offsets position for 8bit bytes hex values for every algo parameters. The offset starts at 0 position from the 9th 8bit byte of the full message.
I already set all my LUA script with this structure according to the reference manual like this:
CD_Routing = midiMessage:getLuaData():getByte(155) -- 0,3 [0=Serial 1=parallel 2=Feedback1 3=Feedback2]
So first of all I need to get the string structured with hexadecimal bytes.
I’m sure there is better ways to decode the incoming message and process it but this is the most logical to me.
goodweather if you can get your hands on a DP4 or a DP4+ that would be great for sure. For electronic music, it’s a classic. They are nearly identical, the DP4+ has one or two extra algo and can switch between +4dB and -10dB levels. I would buy another one without hesitation but they are pretty hard to find those days and the price is going up like crazy. I remember paying mine for about 300CAD but in 2020 a good deal would be around 500USD, the DP4+ is a bit more expensive.
They are 25+ years old units and start to fail nowadays. Mine is switched On for 3 weeks now with the Ctrlr pannel project and it fried few days ago π I have to recap the PSU the voltages are totally out of specs and probably some regulators are dead, especially a LM2926T that is discontinued for decades and is hard to find. I’ll fix it anyway they are not hard to repair. I already ordered the parts.
Everybody is raving for the phaser and modulation effects, but if you dig deeper into it, the chorus are huge, the pitchshifter that uses 2 DSP is as good as the Eventide H3000, the plate reverbs are gritty in a good way. People loves it but they don’t even know what they are capable of, they stay on the presets, hence the Ctrlr pannel π So I highly recommand this unit if you want character. We have everything emulated in VST nowadays but this is the kind of unit that keeps his place legitimately in a studio rack. Don’t hesitate to ask me if you need more info.Have a good weekend guys, take care.
- This reply was modified 3 years, 11 months ago by damien. Reason: typo
May 7, 2020 at 10:02 pm in reply to: Midi Value LUA calculation method in Ctrlr [Two’s complement, Frac Table] #118249Thanks guys for your tips! I’ll decypher everything you said and I’ll adapt your method to my project.
This combo trick used as a middleman is neat.thanks, I’ll get back to you very soon π
May 6, 2020 at 10:04 pm in reply to: Midi Value LUA calculation method in Ctrlr [Two’s complement, Frac Table] #118226Hi Dnaldoug and goodweather,
That’s precious tips from both of you.
The formula to get the two following bytes from the sysex MSB & LSB is so simple I was struggling to find it πI’ll go this way as Dnaldoug said.
UAParamValue02MSB = midiMessage:getData():getByte(XX) *128 UAParamValue02LSB = midiMessage:getData():getByte(XX+1) UAParamValue02=UAParamValue02MSB+UAParamValue02LSB
This is absolutely perfect and I can apply this method for each parameters.
I’ll try also to “stringify” the different variables for each parameters and use it in a global method that will simplify the script as goodweather mentionned.
I finished the GUI 99% every button is connected with LUA methods already. on value change like on/off or select/unselect some tabs switch occure etc that’s the 1step of my progress
I’m currently working on decoding the sysex sent by the DP4 and updating the appropriate pots values buttons labels etcNext will be to assign the right sysex formula to the differents knobs depending on the current algo.
Next will be to create a scrolling menu with the different presets and algo for the 4 units with the dedicated program change or algo index sysex message.
Next will be to manage the sysex dump backups with the load/write functions. this is pretty easy compared to the rest.
And last but not least, check if everything is working properly, every param change etcI work on this for 2 weeks now, and at the beginning I just wanted to have a “remote” from the computer to emulate the buttons actions but Ctrlr opened me some new doors to LUA. It’s so powerful I could not imagine that, once the DP4 panel will be ready I’ll work on other units like yamaha spx etc I think I started with the most difficult, the other unit with 20 algos, program change, 1 DSP and 3 routing config will be a piece of cake π
Thanks you both for your precious help. I’ll probably ring a bell for other issues.
Damien
Attachments:
You must be logged in to view attached files.Hi,
thanks goodweather, this is an excellent idea, I thought about that at the beginning, but I am not sure about how to assign algo parameter names, min max values, value method calculation (positive integer, signed integer, fractions, 16bit word etc) in tables for each and every parameters depending their bytes offset in the received sysex.
I have to store the values, and translate them to ctrlr modulator values with a huge global method.They have to refresh everytime the algo value change or one of the 4 different DSP is selected this is a lot of statements to set.
If this is possible that would be definitely the way to go I would only have 10 to 30 pots and the would change their behaviour and name according to the algos in the Buffer Edit sysex dump.
Also some algos have 1 parameter, some have 20 so if only one, the 19 others have to hide.
This is pro script πTo sum up, 59 algos, 10 commons parameters, and, 1 to 20 dedicated paramaters with variable calculation method (signed int., int, frac, signed frac, table, etc)
Let me think about that this weekend, because If I go down this route I’ll need some help later on π
Is this kind of script already implemented on a panel I can check the code on?
I attached my panel GUI with 2 different algos for unit 1. You’ll get an idea.
DP4 algo ex 1
DP4 algo ex 2thanks for your help Goodweather
Hi,
I answered already but it’s awaiting for moderation.Well, thanks goodweather for your reply. That’s an excellent idea, I was thinking about that at the beginning but I’m not sure about my LUA skills and opted for the more static way of dealing pots banks. Not that sure now that’s a good idea.
I’ll check the “dynamic” method this weekend with 30 fixed modulator knobs and assign them some values (name, min max midi value, method calculation etc) depending on the algo set or received from the Edit Buffer dump from the Unit.I will probably need some help with that later on. But you are right, it’s more script based with various statements but after all it’s not 30potsx59algos and values to create and to assign the unit values to. Thanks!
EDIT
Alright I experimented a little bit and found out that some tabs were not referenced because I did not need them.
Let’s say i have algo 1, algo 2, 3 , 5 , 7
each one is assigned to a tab like tab 1 for algo 1, tab 2 for algo 2, tab 3 for algo 3 and tab 5 for algo 5…
BUT tab index 4 is not assigned, then the tab 5 for algo 5 becomes tab 4.
Thats a trick to know.So I created tabs from 0 to 59 even if some are not used and it works!
take care
April 30, 2020 at 8:14 am in reply to: uiImageButton alpha chanel color buildup if zoom is not 1.0 #118107Worst case scenario I’ll export the sprites again with the color tone of the background behind the light glow and the button shadows. It will probably do the trick.
I’ll let you know
thanksApril 30, 2020 at 3:09 am in reply to: uiImageButton alpha chanel color buildup if zoom is not 1.0 #118105Hi, thanks a lot! yes it’s going to be very realistic with all the features implemented (algo selection and tweaking, routing etc for every unit like a VST controlled external DSP.
Well, I tried the repaint function in all my buttons methods when value changes but it doesn’t work, I still have the same issue with colors building up. It’s like if the refresh function is not happening.
I tried to repaint only the modulator and I get an error :
Error : Attempt to call method “repaint” (a nil value)
this is the script “ModeTabsSelect” linked to the Select button as an exemple :
ModeTabsSelect = function(mod, value) panel:getComponent("ModeTabs"):setProperty ("uiTabsCurrentTab", 0, false) panel:getModulatorByName("ViButComSelect"):repaint() end
It should select a new tab and refresh the button but no it does not work.
Can you please help with that, I am getting mad at it π
thanks a lot
I succeed in creating 4 different methods for the 4 different buttons with a short function like this :
ModeTabsSelect = function(mod, value) panel:getComponent("ModeTabs"):setProperty ("uiTabsCurrentTab", 0, false) end
And I assigned this method for the Select button.
Same variation for the other 3 buttons.
Keeping it simple is always the way to go.
The current workaround is to edit the pannel file in a text editor (I use Smultron) and I add the name of the resource into the image source tag bracket for each modulator. Not the easiest way but it works.
I had the same issue yesterday. I had to organise my GUI with several layers, one with the graphic (backgroun image) with deeper index and the one upppon the other (dynamic label).
It’s like using z-index in CSS.
First create a new layer in the Ctrlr Layer editor : Panel > Layer Editor.
Save then, you open your file with a text editor.
Check the “iPanelCanvasLayerUid” values of your different layers. They show up early (around line 150) in the “uiPanelEditor” tag.
<uiPanelCanvasLayer uiPanelCanvasLayerName="LayerAlwaysBehind" uiPanelCanvasLayerUid="LayerUid0" uiPanelCanvasLayerColour="0x000000" uiPanelCanvasLayerVisibility="1" uiPanelCanvasLayerIndex="0"/> <uiPanelCanvasLayer uiPanelCanvasLayerName="LayerOnTopOfTheOther" uiPanelCanvasLayerUid="LayerUid1" uiPanelCanvasLayerColour="0x000000" uiPanelCanvasLayerVisibility="1" uiPanelCanvasLayerIndex="1"/>
Then for the modulator you want to be always on top (visible)
Replace the following value of your component :componentLayerUid="LayerOnTopOfTheOther" uiType=""/>
cheers
Thanks Goodweather. This is exactly what I needed. I already replied but I don’t know why my answer is not available.
Thanks Goodweather. I’ll display the truncated string via a LUA script as recommanded. cheers
Thanks for the reply but it’s not exactly what I was looking for.
I am looking for the correct way to get the value of the tab that is currently opened but I can’t figure it out.Let’s say the tab X is currently opened. I want to be able to get this tab value so that I can create a statement like: If condition “a” and “tab X” is currently open then…
thanks
Hi guys, I am working on a panel and can’t use images as well.
It’s a problem since I want to design a realistic GUI.
Can you please help me with that or at least send me a link to the previous working version for mac?
I currently use 5.3.198 for Mac
The version 5.3.196 for Mac is not in the nightly directory.Thanks a lot!
EDIT:
Code fixedViButComDelayRght = function(mod,value,source) local t={ {0xF0,0x0f,0x40,0x00,0x00,0x01,0x00,0x02,0x00,0x09,0xf7}, {0xF0,0x0f,0x40,0x00,0x00,0x01,0x00,0x02,0x08,0x09,0xf7} } for _,v in ipairs (t) do panel:sendMidiMessageNow(CtrlrMidiMessage(v)) os.execute(sleep(200)) end end
Thanks !
- This reply was modified 4 years ago by damien. Reason: code fixed
-
AuthorPosts