DISABLE_MIDI_DEVICE_LUA?

Home Forums General Programming DISABLE_MIDI_DEVICE_LUA?

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #31869
    kamder
    Participant
      • Topics: 9
      • Replies: 13
      • Total: 22

      hello ATOM and others
      is there a way for disabling and enabling midi_output_device with lua
      the deal :

      on panel load : midi_device disabled (setting to none )
      after a timer method the midi output is enabled (setting to my device )

      or is there a way to disable sending MIDI on start for a moment

      because in my daw (ableton live ) when my project is loaded , the host send automatically (snapshot) all modulators data via MIDI and I DO NOT WANT THIS
      because I WANT TO CONTROL WHEN MY PANEL SEND ALL MIDI DATA TO MY DEVICE

      note : the setting “panelMidiSnapshotAfterLoad” is disabled

      THANK A LOT !!!!!

      • This topic was modified 9 years, 7 months ago by kamder.
      • This topic was modified 9 years, 7 months ago by kamder.
      #31881
      zeoka
      Participant
        • Topics: 73
        • Replies: 466
        • Total: 539
        • ★★★

        Hi
        even if “excludeFromSnaphot” is enabled for modulators
        they are sent anyway.

        i have similar issue with few combos :
        they send a midi message when they are updated
        they are basic they are not different from others
        they don’t have a lua script that could create problem
        ctrlr 5.2.172

        #31896
        kamder
        Participant
          • Topics: 9
          • Replies: 13
          • Total: 22

          thank you zeoka ,i have also “excludeFromSnaphot” all my modulators
          but the data is sent anyway , i work in the source code , if i could find some solution….. , because on loading projects i do not want this bad stuff
          i want to 100% control my midi data with ctrlr
          this is a beautifull project and i want to give it the good way!!!

          #31967
          kamder
          Participant
            • Topics: 9
            • Replies: 13
            • Total: 22

            hello the only solution i have found is to link all modulators to a method sending midi data (one method in each modulators ) (with all modulators set to midi message none , no formula )

            conclusion : the modulators send midi via lua methods

            and after this i have created one modulator called “loaded_flag” and set this modulator to 1 after a determinate time (with timer)
            the method to set this modulator is executed “after panel loaded”:

            and before all my modulators methods:

            LOADFLAG = panel:getModulatorByName(“LOADED_FLAG”):getModulatorValue()

            if LOADFLAG == 1 then

            “my modulator send midi data” and other stuff

            end

            it work in this way , no unwanted midi data to my interface on starting DAW projects

            BUT IF YOU HAVE 3000 modulators GOOD LUCK LOL

            KAMDER.

            #31970
            zeoka
            Participant
              • Topics: 73
              • Replies: 466
              • Total: 539
              • ★★★

              hi
              you can in various way

              a loop in “called after the panel is loaded” that :

              before set the midiMessage to none for all mod (by a lua loop for exemple if 3000 mods) and when the panel is loaded a loop set all mods to syx or cc . this requires a inv script when the panel is closed !

              other method build the sysex formula when the panel is loaded using loops tables and vstIndexes. that’s working for now

              or “if panel:getBootstrapState() then” for all mods i don’t know yet how to do globally

              #31981
              kamder
              Participant
                • Topics: 9
                • Replies: 13
                • Total: 22

                thanks for your infos ! but i can’t set the midiMessage to none when the panel is closed (i quit the daw ) i have find only a call when panel is loaded in panel properties

                because to this i can not write an inv script to reset all modulators to none
                i prefer my method … but with my panel i have 3758 modulators
                and i have to create a separate method for each modulators and report the sysex command for each mod°

                VERY LONG AND FASTIDIOUS BUT I HAVE BEGIN THE STUFF YESTERDAY …….

                with this method “IN ANY DAW’S” (win , mac ,linux) i have a total control off the midi messages in output

                I HOPE ATOM ADD A “ENABLE/DISABLE MIDI MESSAGES OUT” in the panel properties in the future
                IT CAN BE GOOD ……….

                thanks.

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

                  I can add a property that “mutes” all MIDI DATA in and/or out i guess. I’ll have a look how hard will that be.

                  #32004
                  zeoka
                  Participant
                    • Topics: 73
                    • Replies: 466
                    • Total: 539
                    • ★★★

                    Thank you Atom

                    As Atom responds in other post , there is callbacks when the daw project file is
                    saved this is posible may be here to set midimessages to none with loops for many mods
                    it’s done now
                    An option could be ideal

                    Edit : Note Kamder that if you send messages via lua and you don’t use customcomps
                    when you’ll update patch you risk to send non wanted midimessages…

                    • This reply was modified 9 years, 7 months ago by zeoka.
                    #32018
                    kamder
                    Participant
                      • Topics: 9
                      • Replies: 13
                      • Total: 22

                      THANKS TO ATOM ! ,


                      @ZEOKA
                      : “when you’ll update patch” wath this ? note that my panel do not receive midi data , and the panel do not use the “preset system” off the daw’s , the panel only send midi data with a button “send data” , this is “simple” but no problems …

                      “As Atom responds in other post , there is callbacks when the daw project file is
                      saved this is posible may be here to set midimessages to none with loops for many mods
                      it’s done now
                      An option could be ideal”

                      THE PROBLEM is on some daw’s the project is saved automatically when the daw is running ‘every X seconds or when values change’ the callbacks can create some unwanted “midimessages to none”
                      CONCLUSION : AN OPTION FOR MUTING MIDI MESSAGES IS THE BEST DEAL !

                      kamder.

                      • This reply was modified 9 years, 7 months ago by kamder.
                      #32126
                      zeoka
                      Participant
                        • Topics: 73
                        • Replies: 466
                        • Total: 539
                        • ★★★

                        Solved

                        --
                        -- Called when the panel is created, no modulators will exist at this point
                        -- consider this the panels constructor
                        --
                        Panel_Dtb = function()
                        -- other stuffs
                        panel:setPropertyInt("panelMidiPauseOut",1) -- the property is there so repeat/until x~=nil unuseful
                        
                        end
                        --
                        -- Called when the panel has finished loading
                        --
                        Starting = function()
                        
                        --panel:setPropertyInt("panelMidiPauseOut",0)
                        -- unuseful the messages are sent after 
                        
                        function RestMidCallback(timerId)
                                   if timer:isTimerRunning(1) then
                                      timer:stopTimer(1)
                                  end
                                 panel:setPropertyInt("panelMidiPauseOut",0)
                               --other stuffs 
                              end
                        timer:setCallback (1,RestMidCallback)
                        timer:startTimer(1,1000)
                        end
                        #32156
                        kamder
                        Participant
                          • Topics: 9
                          • Replies: 13
                          • Total: 22

                          really thanks to add THIS FUNCTIONALITY !! i have updated the source code ! , i can now control (mute/demute) the midi messages on projects load !

                          thanks to atom programming !!!!!
                          thanks to zeoka methods !!!!!

                          KAMDER.

                          #32979
                          zeoka
                          Participant
                            • Topics: 73
                            • Replies: 466
                            • Total: 539
                            • ★★★

                            The method is not working with instances

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

                              I’ll check it out.

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

                                It works for me in the instance itself when i created just a button that sets/clears the property and a slider that sends a CC messages, it works. Maybe the initialization process of the instance is causing some issues ?

                                The property itself should not have any dependency on the intance type.

                                #33117
                                zeoka
                                Participant
                                  • Topics: 73
                                  • Replies: 466
                                  • Total: 539
                                  • ★★★

                                  Hi Atom
                                  I confirm in a panel with less than 200 mods
                                  the messages are sent anyway with instances and not with ctrlr and the method applied
                                  Tried exe and dll 32 and 64 bit

                                  Used loopbe and midi-ox when i started them

                                  It is an process initialization issue

                                  • This reply was modified 9 years, 6 months ago by zeoka.
                                Viewing 15 posts - 1 through 15 (of 15 total)
                                • The forum ‘Programming’ is closed to new topics and replies.
                                There is currently 0 users and 68 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