One byte midi messages received as empty

Home Forums General News and releases One byte midi messages received as empty

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #6309
    Llamatron
    Participant
      • Topics: 7
      • Replies: 27
      • Total: 34

      One byte long midi messages are received as empty by the method called when the panel receives a midi message, I had this problem with active sense (message is FE), and midi clock (message is F8).

      I noticed this problem when I had a script crashing Ctrlr completely when doing a getByte(0) on an active sense message.

      using this code at the very start of the method it is not crashing and I see the messages in console everytime an active sense message is received.

      s = midiMessage:getSize()
      if s == 0 then
      console(“Size is null, exit”)
      return
      end

      Midi clock seems to behave the same, and it even freezes Ctrlr completely when it is active.

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

        I removed support for realtime messages from LUA for a reason. All the LUA callbacks are done asynchronously, that is the callback can be done very very long after the actual message has been received, LUA is in the same thread as the GUI, if you draw to much in the gui then the callbacks will slow dowm, if you add REALTIME messages that do callback (remember each i byte messages does one callback), then you get serious performance issues.

        I added the support for those messages, that is you will get the 1byte inside the MidiMessage not 0, but i have not changed anything else.

        #6322
        Llamatron
        Participant
          • Topics: 7
          • Replies: 27
          • Total: 34

          The thing is that I don’t really need support for thoses messages, but my synth keeps sending active sense messages every 300 ms and there is no way to stop it.

          If you think Ctrlr shouldn’t support realtime messages you are probably right, but in that case I think it would be better if they don’t trigger the LUA method at all, instead of calling it with an empty message.

          rev 1284 apprently still calls the method with no data.

          Thanks for your quick answer.

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

            Yeah i just added the MidiClock, i updated the nightly ActiveSense is there, maybe i’ll add an option to a panel to just ignore realtime messages.

            #6327
            Llamatron
            Participant
              • Topics: 7
              • Replies: 27
              • Total: 34

              Works perfectly in rev 1285, thanks a lot for the fast fix.

              I agree that making an option to ignore realtime messages would probably be a good idea.

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

                Hi
                Reactivate this post…
                Could be nice if ctrlr get 0xFE ActiveSensing messages :
                If ctrlr receives fe then
                if “émoticône” ~= happy
                set happy “émoticône” ,set color orange, setText “wired”,send identity request
                end
                elseif ctrlr doesn’t receive fe until 420 ms then
                set unhappy “émoticône” ,set color grey, setText “unwired” ,set manufacturer/model/version texts to ——-,send identity request
                end

                Something like that How ? Possible for now ?
                Tried on a modulator set on “Active sensing” message without sucess

                • This reply was modified 10 years ago by zeoka.
                • This reply was modified 10 years ago by zeoka.
                Attachments:
                You must be logged in to view attached files.
                #22283
                atom
                Keymaster
                  • Topics: 159
                  • Replies: 2945
                  • Total: 3104
                  • ★★★★★

                  I can try to do something like that, but i must say this might cause issues, i’ll get back to you if that’s a good idea at all.

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

                    Cool !
                    Thank you Atom

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

                      Have you tried setting the special panel property “Ignore realtime MIDI messages on Input” i just remember that i did that option for this purpose, if it’s set to true no 1 byte messages will ever pass thru to the panel.

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

                        No haven’t see that it could be very practicle for midi monitoring 😉

                        The idea is using this byte instead
                        My panel will be “all automatic” (perf & samples names can’t be sent to the device so I can’t manage *.sys at all and there is too much params so I request edits all the time.Anyway the sampler needs own file to play and needs to save separately.For automation i’ll use 64 macro’s instead editor params.I’ve solved many midi messages (not all) sent to the device when the panel loads caused by lua scripts
                        Theese messages are not wrong but I want control WHEN the panel sends edit reqs
                        for example when simply fe is not received ! )
                        Hope this thing will be possible and efficient
                        thank you

                        • This reply was modified 10 years ago by zeoka.
                        #22308
                        atom
                        Keymaster
                          • Topics: 159
                          • Replies: 2945
                          • Total: 3104
                          • ★★★★★

                          If the option works for you (unselect it and see if you are getting Active Sense messages in Lua) you can always set it in Lua, panel properties can be changed at runtime from Lua, so you can alter that setting anytime you want.

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

                            Thanks Atom !
                            using lua and timers + modulatorlinkedtopanelprop I’ve done many work !

                            I’ve solved all my non-wanted midi msg at start up too !
                            Actually I isolate 0xfe by :

                            --
                            -- Called when a panel receives a midi message (does not need to match any modulator mask)
                            -- @midi   http://ctrlr.org/api/class_ctrlr_midi_message.html
                            -- 
                            MidiReceive = function(midi)
                            database()
                            size = midi:getSize()
                            <strong>    if size ~= nil then 
                                   panel:getModulatorByName("Smiley"):setModulatorValue(0,false,false,false) 
                               end 
                            </strong>etc etc etc 

                            How I could get the data (254) of this byte ? I could affinate this

                            Anyway I get it
                            If my update button is off my panel is off
                            if I push update but there is no 0xfe ,the smiley stay unhappy and the update returns off
                            if I push update but there 0xfe , wire smiley is happy and update stay on
                            if I set midi input off or turn off the vp , the wire smiley is unhappy and update returns off
                            nice

                            • This reply was modified 10 years ago by zeoka.
                            Attachments:
                            You must be logged in to view attached files.
                          Viewing 12 posts - 1 through 12 (of 12 total)
                          • The forum ‘News and releases’ is closed to new topics and replies.
                          There is currently 0 users and 95 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