Error getting Sysex

Home Forums General Programming Error getting Sysex

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #72729
    swrdsrvrsd
    Participant
      • Topics: 2
      • Replies: 1
      • Total: 3

      I’m getting a Sysex dump from my Cheetah ms6 (i can see it in the midi in monitor):

      
      [22:51:52:000075]: Size:[    98] [System exclusive] No:[----] Val:[----] RAW:[f0 36 02 00 08 00 01 06 06 07 0e 03 03 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00 00 0f 0f 02 01 02 02 0c 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 0f 0f 00 00 00 00 00 00 00 00 0f 0f 00 00 00 04 00 00 02 00 00 00 00 00 00 00 00 00 01 01 0f 07 f7]
      

      I have a function attached to the “called when the panel receives a MIDI message” event:

      
      --
      -- Called when a panel receives a midi message (does not need to match any modulator mask)
      -- @midi   CtrlrMidiMessage object
      --
      
      midiMessageFromMs = function(--[[ CtrlrMidiMessage --]] midi)
      
      IDM = midi:getLuaData():getRange(7,12)
      console("IDM")
      console(IDM)
      end
      

      Everytime i get an error:

      
      Callback error: [midiMessageFromMs] 
      At line [-1]: [C]
      What: C
      Namewhat: global
      Name: console
      Error message: No matching overload found, candidates:
      void console(String const&) 
      At line [-1]: [C]
      What: C
      Namewhat: global
      Name: console
      Error message: No matching overload found, candidates:
      void console(String const&).
      Method disabled
      

      Does anyone know what I am doing wrong? It seem like the variable is getting a value?

      #72731
      Paul Scheidt
      Participant
        • Topics: 2
        • Replies: 11
        • Total: 13

        I had the same experience with console() under the latest Ctrlr build. Go download the 5.4.16 version and console will work.

        #72734
        goodweather
        Participant
          • Topics: 45
          • Replies: 550
          • Total: 595
          • ★★★

          Well… You don’t need to look so far and change your Ctrlr version.
          The answer is above in Ctrlr error answer… and is a classical one 😉

          Console() expects a string and nothing else.
          When you extract a piece of a memoryblock (midi:getLuaData():getRange(7,12)) this is not a string but also a memory block…

          You cannot directly convert a range to a string but you can visualize it:
          >>> console (LoadedProgramData:getRange(1,5):toHexString(1))
          2b 18 11 32 32

          You can however take a single byte and display it as a string (0x2b = 2*16 + 11):
          >>> console (tostring(LoadedProgramData:getByte(1)))
          43

          Some other minor remarks,
          I would avoid using “midi” as variable name. When you will have a lot of code you will not know what it is. Call it sMidiMessage or sMsg or MidiMessage or MidiMsg or …
          getLuaData() and getData() are the same. I’m using the last one.

          #72744
          swrdsrvrsd
          Participant
            • Topics: 2
            • Replies: 1
            • Total: 3

            Thanks so much for these tips!

            Is there a guide to the functions available in ctrlr? I assume they are not part of the LUA core?

            #72757
            goodweather
            Participant
              • Topics: 45
              • Replies: 550
              • Total: 595
              • ★★★

              I wrote a Step by Step guide some time ago. Busy to enhance it with a lot of Lua stuff…
              http://ctrlr.org/forums/topic/ctrlr-step-by-step-guide/

            Viewing 5 posts - 1 through 5 (of 5 total)
            • The forum ‘Programming’ is closed to new topics and replies.
            There is currently 0 users and 59 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