Midi Channel (0y or yy) in LUA

Home Forums General Programming Midi Channel (0y or yy) in LUA

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #35274
    m.tarenskeen
    Participant
      • Topics: 30
      • Replies: 113
      • Total: 143
      • ★★

      What’s the LUA code to get the value of the MIDI channel that is set in the MIDI->Output->Channel menu in Ctrlr?

      In the sysex editor in the properties window in my Panel I can do something like
      FO 42 3y 31 10 24 F7 (just an imaginary example) where y is the MIDI channel value between 0x00 and 0x0F – if I understand correctly. Correct me if I am wrong.
      Now I need to construct a similar SysEx string in my LUA code.

      What’s the LUA version of this y variable?

      #35356
      m.tarenskeen
      Participant
        • Topics: 30
        • Replies: 113
        • Total: 143
        • ★★

        I solved this by adding a method that I use with “called when a MIDI channel changes for a panel”, using the values that are automatically passed as arguments there and storing the channel number in a global variable.
        Works for what I want to do.

        #35366
        fredo
        Participant
          • Topics: 2
          • Replies: 6
          • Total: 8

          Yes, I do the same.
          Only issue : you don’t get the initial value after Ctrlr is launched and restores the previously selected value.

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

            What’s the LUA code to get the value of the MIDI channel that is set in the MIDI->Output->Channel menu in Ctrlr?

            panel:getPropertyString(“panelMidiOutputChannelDevice”)

            #35373
            m.tarenskeen
            Participant
              • Topics: 30
              • Replies: 113
              • Total: 143
              • ★★

              Thanks. I knew it had to be something like that! But rather than asking friendly and skilled Ctrlr/Lua users in this forum to tell me things like this I’d rather know where I can find such information myself?

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

                Just open or create a new panel. Enter Edit mode. To the right you have the panel properties. Click on tab “Utility”. There’s the list of all panel variables. The same with every modulator.

                #35467
                m.tarenskeen
                Participant
                  • Topics: 30
                  • Replies: 113
                  • Total: 143
                  • ★★

                  Thanks dasfaker!
                  I have used the feature a lot while working on the newest version of my Korg DS-8 editor.
                  The DS-8 has a Multi FX section. There are 6 parameters/knobs. But both the function, visible name, and even SysEx command for 5 of the 6 parameters changes when the first parameter (which selects the Effect mode) is changed. This needed some serious Lua+Ctrl magic to get right 🙂
                  Now in the Panels download section for who is interested.

                  MT

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