Forum Replies Created
-
AuthorPosts
-
Yep, works like a charm. Thanks!
Hi Thorsten and Atom,
I closed all panels of r1196, but still r1209 crashes on my Mac. I have attached the crash report, which also tells you which system version I’m using.
Attachments:
You must be logged in to view attached files.Hi Thorsten,
I did download r1209, but on opening the application crashes. Do I first have to remove the older version (r1196)? Do you want me to send you the crash report?
Sjoerd
atom, thanks!
Thanks. I assume the same goes for creating an AU? (I’m on a Mac with my DAW.)
Well, after lots of trial and error I did discover the obvious. I have to use sysex and just send the appropriate sysex string with the usual variable xx, in my case: f0 b0 0d xx f7. So I learned again something valuable 😉
Still a question (if somebody is listening). Which of the export options creates a standalone panel?
This build works, at least for the ‘setComponentText’. Also the interface looks much better! I will use this version and let you (and this forum) know how things work out. Thanks for answering my questions and the new upload!
Hi Atom,
I’m on a Mac (10.7.5.) and use the latest stable version, because there are no recent nightly builds for Mac, right? So I downloaded the latest Windows version (December 31, 23:59, nice timing :-)) and with this version indeed ‘setComponentText’ works as expected.
BTW I noticed that this Windows version looks more “mature” (and certainly more ‘clean’ because of the menu options without the big icons…), and assume that it is further developed than the Mac version, so I wonder if you plan to update so it is on par with the Windows version. (In the meantime I will try to work with Ctrlr and MIDI on Windows…)
I wrote the above massage before reading your reply Atom, but in fact what I wrote there is what I want to do. The text to set will be a variable containing the string I want the Label to show. This text could of course be anything, depending on the used modulator.
Diving a bit deeper into Lua I managed to get the actual text of the ‘component’ using the following code:
aa = panel:getComponent(“LCDLabel-1”):getComponentText()
BUT when trying to set the text using this code:
panel:getComponent(“LCDLabel-1”):setComponentText(“Hello”)
nothing happens, not even an error message. What is the right code to set the text of a component in Lua?
Well, a visit to http://lua-users.org/wiki/StringLibraryTutorial (as somewhere in this forum advised by Atom) revealed more ways of ‘string.format’. But I couldn’t find %n, %N, %v… Are these specific to Ctrlr?
I just added also an explanation on this forum about how to use Ctrlr and Lua with a simple example. I am also a beginner so I thought it would be useful. But all honours go to msepsis for pointing me in the right direction!
December 28, 2012 at 3:36 pm in reply to: Specifying a unique midi message for each slider value? #5306I forgot to mention that for the pan values -1 to -7 I needed different sysex messages then for the pan values form +1 to +7 and also the value ‘0’ needed its own sysex string.
December 28, 2012 at 3:32 pm in reply to: Specifying a unique midi message for each slider value? #5305Well, with the excellent help of msepsis I made my first working method and as always things are much simpler when you know how to do it! (Of course one has to have some programming experience to understand the workings of a particular piece of code.)
I will explain what I needed and how I made this (very simple) method/script with Lua. I hope this will help someone who also is wondering about how to integrate Ctrlr and Lua ;-):
I needed a slider with values going from -7 to +7, with the value 0 being a bit special. This slider sets the pan-value of a certain preset (in this case for my Proteus-1 from Emu). On the panel I picked (right click mouse) from the slider option an ‘uiSlider’ and did set the type to ‘LinearHorizontal’ (choose from Slider Style in the ‘component’ part of the right panel of Ctrlr). I also did set the Minimum value to -7 and the Maximum value to 7 and Interval to 1. The Visible name is ‘pan’ and the Name [unique] is ‘PanSlider”. This last name is the name to be used in the method. Then in the Modulator part of the right panel I choose ‘Called when the modulator value changes’, clicked on the ‘+’ sign and added the name for my method, in this case ‘PanMethod’. In the MIDI part I did set the MIDI message type to ‘none’. Then I selected (click on the ‘\’ sign) the PanMethod and the Lua editor window opened. I typed the following Lua code in this window (the first 5 lines of code were already there):
—
— Called when a modulator value changes
—PanMethod = function(modulator, newValue)
panValue = panel:getModulatorByName(“PanSlider”):getModulatorValue()
–send appropriate sysex based on slider value:
if panValue < 0 then
mySysex = CtrlrMidiMessage({0xF0, 0x18, 0x04, 0x00, 0x03, 0x02, 0x02, panValue+128, 0x7F, 0xF7})
panel:sendMidiMessageNow(mySysex)elseif panValue == 0 then
mySysex = CtrlrMidiMessage({0xF0, 0x18, 0x04, 0x00, 0x03, 0x02, 0x02, 0x78, 0x7F, 0xF7})
panel:sendMidiMessageNow(mySysex)elseif panValue > 0 then
mySysex = CtrlrMidiMessage({0xF0, 0x18, 0x04, 0x00, 0x03, 0x02, 0x02, panValue, 0x00, 0xF7})
panel:sendMidiMessageNow(mySysex)end
endand saved the method. Now, when moving the slider, the appropriate pan-value is send to the Proteus-1!
Besides the quite easy way of coding, I discovered to my surprise that I could p[ut just decimal values in the sysex string (and even a simple formula) and still the sysex data are understand by the receiving device!
I’m on a Mac (10.7.5) and I have also at the same time Windows running on this machine. This is handy, because the help file for the Ctrlr Lua classes only opens on a windows machine. Now I understand how things work this help file is necessary when programming/scripting with Lua for Ctrlr.
December 28, 2012 at 11:45 am in reply to: Specifying a unique midi message for each slider value? #5299Hi msepsis,
This is just what I needed, especially your remark about when a script is triggered! I theory I did know what to do, using scripting with Lua and I did download a few panels. Studying the scripts made me aware of the possibilities, but also of the complexity of things, especially for beginners. I will study the recommended documentation and try to get and read a book about how to program with Lua. Thanks a lot and I will let you know how I fared.
December 27, 2012 at 5:20 pm in reply to: Specifying a unique midi message for each slider value? #5283Dunbar,
I have exactly the same “problem”. Did you come up with a solution? I have just started to make a panel for the Proteus-1 and already I encountered the need for unique sysex messages, in my case for de Pan-control. In the real world the values go from -7 to +7, but when studying the sysex string for these values they require for the positive values a different set of strings then for the negative values. Any input much appreciated.
If I need to use Lua to solve this, then can you or someone point me to a (small?) tutorial how to start with Lua in Ctrlr in the first place, because I have no clue!
-
AuthorPosts