Lua: how do I get current MIDI Outout channel?

Home Forums General Programming Lua: how do I get current MIDI Outout channel?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #117819
    autodafe
    Participant
      • Topics: 5
      • Replies: 6
      • Total: 11

      I am writing and reading patch data from a file. so far so good.
      I need to send a MIDI CC message to my synth, but I need to send it to the currenlty selected MIDI Channel on ouput.
      How do I get access to MIDI out channel ? (teh one selected in MIDI->Outout->Channel) ???

      #117820
      proton
      Participant
        • Topics: 19
        • Replies: 94
        • Total: 113
        • ★★

        Simple LUA script where you check for those parameters in question, create 2 variables and assing the resulting values to them like so:

        outDevice = panel:getProperty(“panelMidiOutputDevice”)
        outChannel = panel:getProperty(“panelMidiOutputChannelDevice”)

        console(“currentOutDevice = “..outDevice)
        console(“currentOutChannel = “..outChannel)

        if you use console to see what the results are you should see something like this:

        LUA>> currentOutDevice = YAMAHA-CS80-OUT
        LUA>> currentOutChannel = 1

        Cheers!

        #117831
        autodafe
        Participant
          • Topics: 5
          • Replies: 6
          • Total: 11

          cool, thanks a lot!
          this solved my problem
          is there a list of these “global” properties somewhere? or list of properties and methods of the various modulators?
          it’s quite difficult to get the right properties sometimes if not looking into someone’s else code (thanks everybody by the way…)

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