Home › Forums › General › Using Ctrlr › Sending Midi Notes to a bidule rack
Tagged: Midi notes, rack
- This topic has 17 replies, 3 voices, and was last updated 9 years, 11 months ago by doudbassctrlr.
-
AuthorPosts
-
May 10, 2014 at 4:13 pm #23215
Hello,
I have just come to discover Ctrlr and the great possibilities it provides.
The project I have in mind is to build a “master” vst to control many others that are included in my effects rack.
Between each effect and Ctrlr vst is placed a mute “moot 2.3” vst. The idea is to create some livemode configurations triggered by a pad or a pedal controller.– I am able to send a cc midi message to Ctrlr which then send the midi Note required by “moot” for the control of individual vst
– What I need is to check if some livemode program button is on and thereafter
send appropriate set of activation notes… it looks like I need some lua code?
## My troubles:
– I could not find any, rather exhaustive, help about Ctrlr variables and functions I would have to use in lua.
– I know almost nothing about how midi informations are transmitted and how to send midi notes via lua programmingDo you have any Idea and ressources I can use for that purpose?
Thanks a lot- This topic was modified 9 years, 11 months ago by doudbassctrlr.
May 13, 2014 at 5:05 pm #23350Hello,
# I have tried to put in “called when modulator value is changed” a method with the following “forum-inspired” code:
messageToSend=MemoryBlock({0x90,0x3C,0x00,0x40}) message = CtrlrMidiMessage({0x90,0x3C,0x00,0x40}) panel:sendMidiMessageNow(message)
I have saved it and compiled but nothing happens, I have no output…
# I don’t understand either how I can call some specific modulator values for tests. How does it work?
# Is it possible also to define say a live configuration using uicombos and
according to the selected name send the appropriate set of midi notes?Thanks a lot for consideration
DoudMay 13, 2014 at 5:40 pm #23356This won’t work you are trying to build a note-on message with 4 bytes, not-on/not-off messages are 3 bytes only.
May 13, 2014 at 7:44 pm #23364I have tried using a true Note-On message but it does not solve, even worth:
I get back the “Callback error” message.I am not used to manipulating midi, and english either (sorry for that), but I thought I should in any case see something in the output. Does the first byte include in itself some constraints on the structure that follows?
May 15, 2014 at 12:52 pm #23434I had several attempts to solve my program sending midi notes problem.
Finally, as I cannot see any midi output when executing
panel:sendMidiMessageNow(midimessage)
as the method used when modulator value is changed, I was wondering if the output is the same as the midi message option for uibuttons.
More precisely I use Ctrlr as a vst in Bidule with no midi input or output devices but toggling each button through a learn functionnality. Non-method midi notes (the one I can access in the ui options) are then sent without any troubles to other vst. But when the method is called I get nothing new…
Are the outputs of these two different ways to proceed not the same?- This reply was modified 9 years, 11 months ago by doudbassctrlr.
May 15, 2014 at 1:32 pm #23436This lua call should send MIDI to the VST host, it depends on what is the midiMessage object in lua. If the object is a valid midi message it should get delivered to the host, if it’s not, it’s a bug and i’ll look into it.
May 15, 2014 at 6:21 pm #23445It seems that everything is correctly plugged in, I am able to switch on/off the “moot” vst. Ctrlr midi output is also received in a midi monitor in Bidule that attests for the Note-On midi sending when I use the pre-build options for sending midi messages. But the lua method called at modulator values changes do not produce any signal.
I tried the following:
myMethod=function(mod, value) p=CtrlrMidiMessage({0x80,0x3C,0x10}) m={0xF0; 0x18, 0x21, 0x01, 0x55, 0x16, 0xF7} panel:sendMidiMessageNow(CtrlrMidiMessage(m)) panel:sendMidiMessageNow(p) end
I hope both are good midi messages (the second one m is taken from working code in the forum). No new output at modulator values changes.
Here is the version of Ctrlr I use:
Revision = ac6a31852a8e26ddbf6a7133f87f1fd6dac8a6c4, Build date = Thu 04/24/2014, Branch = Nightly, Juce = 3.0.5, Boost = 1.52.0, Lua = 5.1.4,I also noticed two disturbing features, that might help:
– midi messages go through when the midi device is plugged in the midi input of the vst although the only option in the midi menu that is checked is the “output to plugin host” option
– Even with the working pre-build version for sending midi notes (i.e. using uibutton Midi tab), I get nothing in the ctrlr integrated midi monitor for output, only input monitor displays somethingMay 20, 2014 at 10:39 am #23673I have never used Lua before but I am a bit familiar with C++.
I think I will be able to go further in the vst construction if I can fix the midi sending problems.
Do anybody know what is going wrong with the Lua method given in the above replies?
Do you have any simple test for me to check if sending midi message through Lua is working correctly?
Thanks a lotMay 20, 2014 at 11:51 am #23676Select the following options in the MIDI menu of Ctrlr:
Input from plugin host
Output to plugin hostMIDI Thru -> Change channel: Input device -> Plugin host
MIDI Thru -> Plugin host -> Output device
MIDI Thru -> Change channel: Plugin host -> Output deviceMay 20, 2014 at 3:36 pm #23681I have just tried this combinaison of options but nothing new.
It seems to me that “Output to plugin host” should be sufficient as, for the moment, I am just trying to send Midi messages through the Lua method as I toggle the uibutton…May 20, 2014 at 6:21 pm #23683Then the problem must reside in some other place. On my computer those exact messages are being sent correctly.
May 23, 2014 at 9:54 am #23787Finaly one reassuring point. I am not going completly wrong with the lua code and it should lead to delivering midi messages.
– Which version of Ctrlr are you using?
– Is it working with the vst version?I tried to use another DAW as plugin host (Reaper) and build a new vst with all the indicated options for delivering midi messages checked. I inserted only one uibutton and attributed the Lua method to be sent when modulator value is changed. It does not work either…
Any new idea?May 23, 2014 at 10:37 am #23791I’m using the same version as you (Revision = ac6a31852a8e26ddbf6a7133f87f1fd6dac8a6c4) and with the vst version.
Maybe the problem resides in the button values. Try to create a normal slider and assign it the lua code, give it a try.
May 27, 2014 at 2:39 pm #23980I have tried the lua code with a new slider in a new panel using the indicated options but nothing new.
What I am now sure of is that the Lua code is well read since a console test can well be printed when modulator value is changed. However what I cannot figure out is why sendMidiMessageNow(…) function do not produce any output.
Is there another function that would lead to a midi message output?May 27, 2014 at 4:25 pm #23982More precisely I use Ctrlr as a vst in Bidule with no midi input or output devices
Be aware that you must select a midi output port to allow midi messages to be sent.
May 28, 2014 at 11:31 am #23997Thanks a lot for your help. I now get the programmed midi notes. I am getting closer now to a solution, however I am getting confused about some routing points. More specificaly: it seems that sendMidiMessageNow() can only send midi to a Midi output device while Midi options of the uicomponent can lead to the plugin output… Am I wrong?
Now, here is how it works for me:
– To get Lua method programmed midi messages working I had to select an output device and I had none, so I used a virtual midi cable
– The plugin output won’t deliver Midi messages from the Lua Method and I can uncheck all the MidiThru options and output to plugin. And it still works as far as the output virtual cable is correctly plugged in.So strange… I do not understand this routing issue…
Any idea?May 28, 2014 at 3:38 pm #24003Maybe it’s better to get a response from Atom, as it’s his software, but the whole concept is to build panels to control midi devices, so it’s logical that a midi output must be selected to transmit midi messages out.
I don’t understand the part about the uicomponent… all midi out messages (lua messages and modulator messages) sent from a panel are transmitted to the midi out port.
Now, here is how it works for me:
– To get Lua method programmed midi messages working I had to select an output device and I had none, so I used a virtual midi cableCorrect.
– The plugin output won’t deliver Midi messages from the Lua Method and I can uncheck all the MidiThru options and output to plugin. And it still works as far as the output virtual cable is correctly plugged in.
I don’t understand what you mean here. The MIDI Thru options allow to transmit messages from the host to the midi device and from the midi device to the host. Those options are not related to the midi messages generated by the panel.
May 28, 2014 at 7:09 pm #24010I agree that MidiThru do not concern midi messages delivered by the panel but it was the options you previously adviced me to check…
The “output to plugin host” however should do the job as far as I understand it and it does when Lua script is not involved, that is when I want to use the Midi messages pre-build options in the uibutton side panel.
Now I thought that sendMidiMessageNow(..) from Lua would deliver midi messages the same way (i.e. to the plugin output) and was not linked to any output device port… -
AuthorPosts
- The forum ‘Using Ctrlr’ is closed to new topics and replies.