No internet connection
  1. Home
  2. How to

How to send MIDI Program Change messages with SoundFlow

By Erik Groysman @Erik_Groysman
    2020-10-21 22:52:37.143Z

    Hello!

    I am trying to get Soundflow to replace Lemur on my tablet to control Spitfire articulations via UACC. It seems that in this version of SF we can assign most MIDI but not program changes. Is there a way this can be done, or maybe I need to script this?

    I need a control change on CC 32 at various levels of scale for each articulation.

    • 5 replies
    1. Hi Erik,

      Just to clarify - you're talking about having a SoundFlow script send program changes - not receive them - right?

      1. EErik Groysman @Erik_Groysman
          2020-10-21 23:12:15.704Z

          Yes!

          1. Cool :)

            To send a program change message out on "SoundFlow Custom Midi Output 1" on channel 1 and set to program 15, do this:

            sf.midi.send({
                outputNum: 1,
                midiBytes: [0xC0, 15],
            });
            

            The 0xC0 is the status byte that indicates the type of message and the channel. Channels are 0-based in the binary MIDI format, so 0xC0 is MIDI channel 1, whereas 0xC1 would be MIDI channel 2. The C part means it's a program change message.

            1. I often use this as a reference to understand how to construct the midiBytes array:

              https://ccrma.stanford.edu/~craig/articles/linuxmidi/misc/essenmidi.html
        • E
          In reply toErik_Groysman:
          Erik Groysman @Erik_Groysman
            2020-10-21 23:25:13.415Z

            Thank you! I will check this out.
            I hope this can be added to standard MIDI functionality in the future for the folks that aren't super handy with scripting!