Program Change verus Sysex

Home Forums General Programming Program Change verus Sysex

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13020
    lfo2vco
    Participant
      • Topics: 26
      • Replies: 162
      • Total: 188
      • ★★

      OK, back on the project after a forced break (my wife was very ill in hospital, she’s much better now).

      How do I get a Lua method that sends a Sysex message thus:

      pg = CtrlrMidiMessage({0xF0, 0x7F, 0x7F, 0x60, 0x01, 0x00, 0xb0, 0xc0, 0x00, 0xF7})
      panel:sendMidiMessageNow(pg)

      To replicate a uiSlider modulator that sends a Program Change? I can see in MIDI Monitor the first is sent as:
      [07:36:46:000187]: [System exclusive] RAW:[f0 7f 7f 7f 60 01 00 b0 c0 00 f7]
      and the second is sent as:
      [07:16:54:000025]: [Program change] RAW:[c0 00]

      In the SourceForge classes web page under LMidiMessage.cpp I can see “isProgramChange” listed. Can I apply this to the CtrlrMidiMessage above and if so how? I guess the next question is why does the MIDI Monitor only show two bytes being sent as a Program Change?

      Here is some noise I organised into an acceptable format:
      https://soundcloud.com/lfo2vco/a-dark-crystal

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

        Program change is 2 bytes: http://home.roadrunner.com/~jgglatt/tech/midispec/pgm.htm

        The sysEx looks exactly what it should look like.
        To send program change send just the tow bytes no need for any SysEx.

        #13027
        lfo2vco
        Participant
          • Topics: 26
          • Replies: 162
          • Total: 188
          • ★★

          Cheers for the fast response Atom.

          Before posting the question on the forum one of the messages I tried was:
          pg = CtrlrMidiMessage({0xc0, 0×00})
          panel:sendMidiMessageNow(pg)

          Which I take to be correct from your reply. However this caused the synth to start sending continuous streams of data, even when switched off and on again. I could only stop it when I quit Ctrlr!

          I guess that there is something I missed off the message or method. I’ll dig around a bit : )

          Here is some noise I organised into an acceptable format:
          https://soundcloud.com/lfo2vco/a-dark-crystal

          #13036
          lfo2vco
          Participant
            • Topics: 26
            • Replies: 162
            • Total: 188
            • ★★

            Haha, I am an idiot!

            I had the synth selected in MIDI Input, Controller & Output, thus was creating a right royal MIDI loop… so now all seems sorted.

            So I now have:

            if ret == 1 then
            	msb = 0xc0
            	lsb = 0x00
            elseif ret == 2 then
            	msb = 0xc0
            	lsb = 0x01
            end
            
            msb_lsb = CtrlrMidiMessage({msb, lsb})
            panel:sendMidiMessageNow(msb_lsb)
            
            DumpRequest = CtrlrMidiMessage({0xF0, 0x7F, 0x7F, 0x7F, 0x60, 0x01, 0x00, 0x03, 0xF7})
            panel:sendMidiMessageNow(DumpRequest)
            end
            

            This is part of the Popup Menu panel I am working on.

            Popup Menu Experiment


            I will put an attachment of the finished panel over there, it might help someone else try to do something similar.

            Cheers again Atom

            Here is some noise I organised into an acceptable format:
            https://soundcloud.com/lfo2vco/a-dark-crystal

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