Sending Midi Notes to a bidule rack

Home Forums General Using Ctrlr Sending Midi Notes to a bidule rack

Tagged: ,

Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #23215
    doudbassctrlr
    Participant
      • Topics: 2
      • Replies: 13
      • Total: 15

      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 programming

      Do 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.
      #23350
      doudbassctrlr
      Participant
        • Topics: 2
        • Replies: 13
        • Total: 15

        Hello,

        # 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
        Doud

        #23356
        atom
        Keymaster
          • Topics: 159
          • Replies: 2945
          • Total: 3104
          • ★★★★★

          This won’t work you are trying to build a note-on message with 4 bytes, not-on/not-off messages are 3 bytes only.

          #23364
          doudbassctrlr
          Participant
            • Topics: 2
            • Replies: 13
            • Total: 15

            I 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?

            #23434
            doudbassctrlr
            Participant
              • Topics: 2
              • Replies: 13
              • Total: 15

              I 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.
              #23436
              atom
              Keymaster
                • Topics: 159
                • Replies: 2945
                • Total: 3104
                • ★★★★★

                This 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.

                #23445
                doudbassctrlr
                Participant
                  • Topics: 2
                  • Replies: 13
                  • Total: 15

                  It 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 something

                  #23673
                  doudbassctrlr
                  Participant
                    • Topics: 2
                    • Replies: 13
                    • Total: 15

                    I 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 lot

                    #23676
                    dasfaker
                    Keymaster
                      • Topics: 80
                      • Replies: 793
                      • Total: 873
                      • ★★★

                      Select the following options in the MIDI menu of Ctrlr:

                      Input from plugin host
                      Output to plugin host

                      MIDI Thru -> Change channel: Input device -> Plugin host
                      MIDI Thru -> Plugin host -> Output device
                      MIDI Thru -> Change channel: Plugin host -> Output device

                      #23681
                      doudbassctrlr
                      Participant
                        • Topics: 2
                        • Replies: 13
                        • Total: 15

                        I 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…

                        #23683
                        dasfaker
                        Keymaster
                          • Topics: 80
                          • Replies: 793
                          • Total: 873
                          • ★★★

                          Then the problem must reside in some other place. On my computer those exact messages are being sent correctly.

                          #23787
                          doudbassctrlr
                          Participant
                            • Topics: 2
                            • Replies: 13
                            • Total: 15

                            Finaly 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?

                            #23791
                            dasfaker
                            Keymaster
                              • Topics: 80
                              • Replies: 793
                              • Total: 873
                              • ★★★

                              I’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.

                              #23980
                              doudbassctrlr
                              Participant
                                • Topics: 2
                                • Replies: 13
                                • Total: 15

                                I 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?

                                #23982
                                dasfaker
                                Keymaster
                                  • Topics: 80
                                  • Replies: 793
                                  • Total: 873
                                  • ★★★

                                  More 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.

                                  #23997
                                  doudbassctrlr
                                  Participant
                                    • Topics: 2
                                    • Replies: 13
                                    • Total: 15

                                    Thanks 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?

                                    #24003
                                    dasfaker
                                    Keymaster
                                      • Topics: 80
                                      • Replies: 793
                                      • Total: 873
                                      • ★★★

                                      Maybe 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 cable

                                      Correct.

                                      – 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.

                                      #24010
                                      doudbassctrlr
                                      Participant
                                        • Topics: 2
                                        • Replies: 13
                                        • Total: 15

                                        I 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…

                                      Viewing 18 posts - 1 through 18 (of 18 total)
                                      • The forum ‘Using Ctrlr’ is closed to new topics and replies.
                                      There is currently 0 users and 81 guests online
                                      No users are currently active
                                      Forum Statistics
                                      Threads: 2,495, Posts: 17,374, Members: 77,605
                                      Most users ever online was 12 on January 22, 2019 3:47 pm
                                      Ctrlr