# Controlling external software synths with MIDI

**URL:** <https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341>\
**Category:** \[P\] Patreon Support\
**Created:** [October 27, 2017, 8:14pm UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341 "2017-10-27T20:14:09Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![im\_alive](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/im_alive/32/291_2.png) [@im\_alive](https://in-thread.sonic-pi.net/u/im_alive)\
**Post date:** [October 27, 2017, 8:14pm UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341/1 "2017-10-27T20:14:09Z")

</div>

Hello!

Is it possible to control external synth’s from sonic pi? I know you can send midi notes, but I am wondering if it’s possible to control a synths ADSR or any other knob/slider from Sonic Pi?

I’d be trying this out in ableton using the omnisphere 2 vst synth.

Thanks for the help!

-Lee

---

<div class="post-metadata">

**Author:** ![samaaron](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/samaaron/32/7_2.png) [@samaaron](https://in-thread.sonic-pi.net/u/samaaron)\
**Post date:** [October 27, 2017, 8:44pm UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341/2 "2017-10-27T20:44:20Z")

</div>

Hi there,

which external synth(s) are you trying to control, and what API(s) do they support (i.e. OSC/MIDI)?

---

<div class="post-metadata">

**Author:** ![im\_alive](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/im_alive/32/291_2.png) [@im\_alive](https://in-thread.sonic-pi.net/u/im_alive)\
**Post date:** [October 27, 2017, 11:23pm UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341/3 "2017-10-27T23:23:50Z")

</div>

I’m trying to control Omnisphere 2 and it supports midi

[https://support.spectrasonics.net/manual/Omnisphere2/concepts/automation/page02.html](https://support.spectrasonics.net/manual/Omnisphere2/concepts/automation/page02.html)

Thanks, Sam!!

---

<div class="post-metadata">

**Author:** ![samaaron](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/samaaron/32/7_2.png) [@samaaron](https://in-thread.sonic-pi.net/u/samaaron)\
**Post date:** [October 27, 2017, 11:36pm UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341/4 "2017-10-27T23:36:06Z")

</div>

Which OS are you running?

---

<div class="post-metadata">

**Author:** ![im\_alive](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/im_alive/32/291_2.png) [@im\_alive](https://in-thread.sonic-pi.net/u/im_alive)\
**Post date:** [October 27, 2017, 11:49pm UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341/5 "2017-10-27T23:49:36Z")

</div>

I’m using apple, osx yosemite on a macbook pro.  
And am using Ableton for my daw

---

<div class="post-metadata">

**Author:** ![samaaron](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/samaaron/32/7_2.png) [@samaaron](https://in-thread.sonic-pi.net/u/samaaron)\
**Post date:** [October 27, 2017, 11:54pm UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341/6 "2017-10-27T23:54:36Z")

</div>

Ok, then you just need to enable the built-in virtual loopback midi port to let you send midi from Sonic Pi to another app 🙂

---

<div class="post-metadata">

**Author:** ![im\_alive](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/im_alive/32/291_2.png) [@im\_alive](https://in-thread.sonic-pi.net/u/im_alive)\
**Post date:** [October 28, 2017, 12:01am UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341/7 "2017-10-28T00:01:41Z")

</div>

Thanks!!!

---

<div class="post-metadata">

**Author:** ![samaaron](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/samaaron/32/7_2.png) [@samaaron](https://in-thread.sonic-pi.net/u/samaaron)\
**Post date:** [October 28, 2017, 8:52am UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341/8 "2017-10-28T08:52:42Z")

</div>

A quick google turned up this which may help:

[http://www.johanlooijenga.com/tools/12-virtual-ports.html](http://www.johanlooijenga.com/tools/12-virtual-ports.html)

---

<div class="post-metadata">

**Author:** ![im\_alive](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/im_alive/32/291_2.png) [@im\_alive](https://in-thread.sonic-pi.net/u/im_alive)\
**Post date:** [October 28, 2017, 2:08pm UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341/9 "2017-10-28T14:08:36Z")

</div>

I got things set up and it’s all working! Midi CC messages and all.

An infinite amount of thanks to you, Sam!

---

<div class="post-metadata">

**Author:** ![samaaron](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/samaaron/32/7_2.png) [@samaaron](https://in-thread.sonic-pi.net/u/samaaron)\
**Post date:** [October 28, 2017, 5:41pm UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341/10 "2017-10-28T17:41:50Z")

</div>

Fab stuff - I love the video 🙂

Btw- top tip - if you find yourself combining `in_thread` and `loop` chances are you’ll be better off just using a `live_loop` instead!

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [December 7, 2017, 7:03pm UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341/11 "2017-12-07T19:03:28Z")

</div>

I’ve been playing with the super donate-ware synth HELM with Sonic Pi 3 on my Mac. Here is a video showing two parameters (volume and bpm) of the synth being controlled. Any of the other knobs and sliders can be controlled in a similar manner. Links to the code shown in the text below the video.

---

<div class="post-metadata">

**Author:** ![im\_alive](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/im_alive/32/291_2.png) [@im\_alive](https://in-thread.sonic-pi.net/u/im_alive)\
**Post date:** [December 9, 2017, 5:17pm UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341/12 "2017-12-09T17:17:21Z")

</div>

Thanks, Robin! You have had the answers to all my questions

---

<div class="post-metadata">

**Author:** ![jkbrogan](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@jkbrogan](https://in-thread.sonic-pi.net/u/jkbrogan)\
**Post date:** [February 22, 2019, 6:32pm UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341/13 "2019-02-22T18:32:18Z")

</div>

Hi all—I’m sending MIDI via Sonic Pi (3.1.0) to Logic Pro (10.4.4) in order to control some software synths.

- I have four live loops playing MIDI notes, each sending over the same port, but on its own channel (1–4 respectively), using the “channel: [x]” opt.
- In Logic, I have four independent tracks receiving MIDI via a corresponding MIDI channel (1–4).

However, each track in Logic is receiving all MIDI regardless of the channel that I’ve specified in the track’s Inspector—that is, instead of each track receiving only one note message, it receives all four.

- For example, Sonic Pi is playing a :c4 on MIDI channel 1, but instead of being received on only Track 1 in Logic, that :c4 is sounding on all four tracks. I only have Channel 1 selected as the MIDI channel for Track 1 in Logic, and Channel 2 for Track 2, etc.

Is this an issue with Sonic Pi or Logic?

---

<div class="post-metadata">

**Author:** ![samaaron](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/samaaron/32/7_2.png) [@samaaron](https://in-thread.sonic-pi.net/u/samaaron)\
**Post date:** [February 25, 2019, 10:38am UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341/14 "2019-02-25T10:38:00Z")

</div>

Hi there,

by default Sonic Pi’s `midi` function sends a MIDI event to _all_ connected MIDI devices on _all_ channels. This makes it very easy to get things working in simple cases. However, for more sophisticated uses, such as the one you’re describing where you’re working with multiple MIDI streams it clearly is an issue.

The solution to this is to use the `port:` and `channel:` opts to `midi` to restrict the outgoing messages to just a specific MIDI port and channel:

```ruby
midi :e1, sustain: 0.1, port: "moog_minitaur", channel: 1

```

Hope that this helps.

---

<div class="post-metadata">

**Author:** ![jkbrogan](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@jkbrogan](https://in-thread.sonic-pi.net/u/jkbrogan)\
**Post date:** [February 25, 2019, 3:04pm UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341/15 "2019-02-25T15:04:33Z")

</div>

Thanks Sam. As mentioned in my prior post, I’m already employing the “channel” (and even “port”) opts to specify individual MIDI channels. That said, in Logic, I’m still receiving MIDI data on all channels despite also specifying channels within that environment. I don’t know if it’s a Sonic Pi or Logic issue.

---

<div class="post-metadata">

**Author:** ![emlyn](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/emlyn/32/1460_2.png) [@emlyn](https://in-thread.sonic-pi.net/u/emlyn)\
**Post date:** [June 27, 2019, 10:27pm UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341/16 "2019-06-27T22:27:45Z")

</div>

You could use something like [Midi Monitor](https://www.snoize.com/MIDIMonitor/) (i believe it’s Mac only, but there are probably other options for other OSes if necessary) to check what MIDI is actually being sent, which should help determine where the problem comes from.

---

<div class="post-metadata">

**Author:** ![Carlo](https://avatars.discourse-cdn.com/v4/letter/c/c4cdca/32.png) [@Carlo](https://in-thread.sonic-pi.net/u/Carlo)\
**Post date:** [July 1, 2020, 4:08pm UTC](https://in-thread.sonic-pi.net/t/controlling-external-software-synths-with-midi/341/17 "2020-07-01T16:08:44Z")

</div>

A rather late answer to jkbrogan’s post from Feb '19:  
It’s a Logic Pro issue, not one of Sonic Pi: By default, Logic ignores the midi channel you specify to a track. However, you can change this: Project Settings \> Recording \> “Auto demix by channel if multitrack recording.” I’m afraid, you are supposed to do that newly for each project. But once this is done for your project you’re free to use all of Logic’s sounds simultaneaously, one instrument of the orchestra for each midi channel you set in your Sonic Pi code.
