# Playing code through DAW

**URL:** <https://in-thread.sonic-pi.net/t/playing-code-through-daw/713>\
**Category:** \[P\] Patreon Support\
**Created:** [February 5, 2018, 4:31am UTC](https://in-thread.sonic-pi.net/t/playing-code-through-daw/713 "2018-02-05T04:31:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GWB70](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/gwb70/32/410_2.png) [@GWB70](https://in-thread.sonic-pi.net/u/GWB70)\
**Post date:** [February 5, 2018, 4:31am UTC](https://in-thread.sonic-pi.net/t/playing-code-through-daw/713/1 "2018-02-05T04:31:05Z")

</div>

Hi There :

I’m new on Sonic Pi,

i’ve already read “Quick Start” tutorial and

"Creative programming workshop with Sonic Pi ".

Am not figured out, how can i to play my code through a DAW ?,

and set it up into multiple channels for especific synths ?

I use Reason 7,and it supports several midi control messages;

i’d like to send it too,while code is playing.

Can someone write me the code for it ?

Thank you in advance !

---

<div class="post-metadata">

**Author:** ![Gisbert](https://avatars.discourse-cdn.com/v4/letter/g/d6d6ee/32.png) [@Gisbert](https://in-thread.sonic-pi.net/u/Gisbert)\
**Post date:** [February 5, 2018, 2:00pm UTC](https://in-thread.sonic-pi.net/t/playing-code-through-daw/713/2 "2018-02-05T14:00:15Z")

</div>

Hey, welcome!

You should be able to send midi to a DAW using this code:

```
#Sending midi with Sonic Pi

live_loop :channel1 do
  midi 62, channel: 1
  sleep 0.5
end

live_loop :channel2 do
  midi 74, channel: 2
  sleep 0.75
end

```

I´m using Sonic Pi as a sequencer for Ableton live and Reaktor and it works fine.  
When using it with Ableton, I have to open Ableton first, then Sonic Pi for the midi connection to work.

Also check the ‘language’ documentation on midi in the help section of Sonic Pi.

Cheers.

---

<div class="post-metadata">

**Author:** ![GWB70](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/gwb70/32/410_2.png) [@GWB70](https://in-thread.sonic-pi.net/u/GWB70)\
**Post date:** [February 5, 2018, 4:11pm UTC](https://in-thread.sonic-pi.net/t/playing-code-through-daw/713/3 "2018-02-05T16:11:14Z")

</div>

Hi Gisbert:

Thank you very much !  
I was using a similar program before called “ChucK”,  
but this one is much more affordable.

I’ll try as you said.

Best regards !

---

<div class="post-metadata">

**Author:** ![Gisbert](https://avatars.discourse-cdn.com/v4/letter/g/d6d6ee/32.png) [@Gisbert](https://in-thread.sonic-pi.net/u/Gisbert)\
**Post date:** [February 5, 2018, 10:26pm UTC](https://in-thread.sonic-pi.net/t/playing-code-through-daw/713/4 "2018-02-05T22:26:26Z")

</div>

Well, I´m also still a newbie in this forum…  
Good luck!
