# Week 6, lesson 4 - controlling Tidal with MIDI

**URL:** <https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260>\
**Category:** Week 6 - canons, scales, controlling MIDI etc\
**Created:** [29 May 2020 08:22 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260 "2020-05-29T08:22:21Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![ben](https://uzu.lurk.org/user_avatar/uzu.lurk.org/ben/32/362_2.png) [@ben](https://uzu.lurk.org/u/ben)\
**Post date:** [31 May 2020 20:03 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/22 "2020-05-31T20:03:08Z")

</div>

So sorry to keep talking in circles, but if I want to use MIDI input within mini-notation then my understanding from your previous posts is that I can not change the range in Tidal.

---

<div class="post-metadata">

**Author:** ![yaxu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/yaxu/32/2_2.png) [@yaxu](https://uzu.lurk.org/u/yaxu)\
**Post date:** [31 May 2020 20:24 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/23 "2020-05-31T20:24:28Z")

</div>

There's no mininotation for that, no.

---

<div class="post-metadata">

**Author:** ![ben](https://uzu.lurk.org/user_avatar/uzu.lurk.org/ben/32/362_2.png) [@ben](https://uzu.lurk.org/u/ben)\
**Post date:** [31 May 2020 21:09 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/24 "2020-05-31T21:09:00Z")

</div>

Okay. I'll continue to use OSC for this for now thanks.

---

<div class="post-metadata">

**Author:** ![yaxu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/yaxu/32/2_2.png) [@yaxu](https://uzu.lurk.org/u/yaxu)\
**Post date:** [31 May 2020 22:12 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/25 "2020-05-31T22:12:48Z")

</div>

I'm a bit confused now - Tidal only accepts OSC. The SC code converts between MIDI and OSC.

---

<div class="post-metadata">

**Author:** ![ben](https://uzu.lurk.org/user_avatar/uzu.lurk.org/ben/32/362_2.png) [@ben](https://uzu.lurk.org/u/ben)\
**Post date:** [31 May 2020 22:42 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/26 "2020-05-31T22:42:57Z")

</div>

You mean you're confused by what I said or by what SC/Tidal is doing? hahaha... If it was from me then I suggest we keep this going as long as possible ;p

If it was, then what I meant was that now that stuff like this works in mini-notation  
`d1 $ s "808 808bd ^miniName" # note "0 0 ^miniPitch1"`  
I can limit what I'm sending into Tidal's using OSC and MaxMSP easily (as I know it well), but not using MIDI under the one package of Tidal/SC as it is because the values get converted to 0-1 and there's no way to rescale them while still using mini-notation.

I feel like we might be a part of [this thread](https://club.tidalcycles.org/t/tidal-fictions/1276/4) now though, and I'm happy to drop this soon as well lol.

---

<div class="post-metadata">

**Author:** ![schmolmo](https://uzu.lurk.org/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@schmolmo](https://uzu.lurk.org/u/schmolmo)\
**Post date:** [2 June 2020 19:55 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/27 "2020-06-02T19:55:57Z")

</div>

yes, i'd be very interested in this, too! is there a way to have a keyboard controller alter the contents of a mininotation sequence? 🙂

---

<div class="post-metadata">

**Author:** ![yaxu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/yaxu/32/2_2.png) [@yaxu](https://uzu.lurk.org/u/yaxu)\
**Post date:** [3 June 2020 08:01 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/28 "2020-06-03T08:01:29Z")

</div>

A post was split to a new topic: [Using cP](https://uzu.lurk.org/t/using-cp/1319)

---

<div class="post-metadata">

**Author:** ![eris](https://uzu.lurk.org/user_avatar/uzu.lurk.org/eris/32/233_2.png) [@eris](https://uzu.lurk.org/u/eris)\
**Post date:** [6 June 2020 06:13 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/29 "2020-06-06T06:13:13Z")

</div>

It is, and I made [a video explaining how to to so about a year ago!](https://youtu.be/biynSrFygUo?t=650) I've fast-forwarded to the explanation of how to use Tidal's `cP` function along /w some SuperCollider code to do this, and there's a little demo at the end.

_(wow playing around with this now and I forgot how much fun this is!)_

---

<div class="post-metadata">

**Author:** ![ganz](https://uzu.lurk.org/user_avatar/uzu.lurk.org/ganz/32/64_2.png) [@ganz](https://uzu.lurk.org/u/ganz)\
**Post date:** [2 December 2020 11:52 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/30 "2020-12-02T11:52:34Z")

</div>

Hello Tidal users,

according to Alex above tutorial I tried to control Tidal with midi. But it doesn`t work. My setup is TC and Supercollider running on Macos 10.15, for the audio routing I now use Blackhole with the multichannel configuration for routing to Ableton Live. My hardware controller is a Novation LaunchControl XL. It automattically connects to Live and it works with Live. So I disconnected it manually from Live. Then I got the cc numbers from the Novation website. And I run the controller script. But it doesn`t work.

What is my mistake? Do I habe to add some code inside BootTidal.hs? And what is the meaning of

"  
MIDIIn.connect(2,2)  
"

 ![Bildschirmfoto 2020-12-02 um 15.15.43](https://club.tidalcycles.org/uploads/default/original/2X/4/497cbe6bdc5a0e133f337a03b596387d60c781ef.png) ![Bildschirmfoto 2020-12-02 um 15.36.36](https://club.tidalcycles.org/uploads/default/original/2X/4/44d3d1b8fc93e50ce04934d7263a1163ff23f880.png) ![Bildschirmfoto 2020-12-02 um 15.42.21](https://club.tidalcycles.org/uploads/default/original/2X/8/89d26885228121f5088059ff54e35cf9e5d51fc5.png)

---

<div class="post-metadata">

**Author:** ![yaxu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/yaxu/32/2_2.png) [@yaxu](https://uzu.lurk.org/u/yaxu)\
**Post date:** [2 December 2020 13:34 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/31 "2020-12-02T13:34:38Z")

</div>

That configuration looks good as far as I can tell. Do you see any useful messages in the supercollider post window when you run that?

One thing you could try is adding/removing 1 from the CC number, in case it's counting from 0 rather than 1.

Another is to find a midisnoop program to doublecheck the midi looks OK, but as it finds its way to ableton live, I don't see why it should make it to supercollider.

Unfortunately I have no real experience with MacOS midi, hopefully a fellow mac traveller will pass by with some better advice..

---

<div class="post-metadata">

**Author:** ![ganz](https://uzu.lurk.org/user_avatar/uzu.lurk.org/ganz/32/64_2.png) [@ganz](https://uzu.lurk.org/u/ganz)\
**Post date:** [3 December 2020 07:51 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/32 "2020-12-03T07:51:42Z")

</div>

Thank you, Alex. But I already tried out other CC numbers. That doesn`t seem to be the reason.

---

<div class="post-metadata">

**Author:** ![isaacMedina](https://uzu.lurk.org/user_avatar/uzu.lurk.org/isaacmedina/32/2279_2.png) [@isaacMedina](https://uzu.lurk.org/u/isaacMedina)\
**Post date:** [18 December 2020 20:16 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/33 "2020-12-18T20:16:31Z")

</div>

I went with the [Pd alternative to send OSC](https://raw.githubusercontent.com/tidalcycles/Tidal/main/pd/midi-osc-bridge.pd) from the TidalCycles userbase and it was very straightforward to use.

One issue tho, is that there is some latency (I'm guessing about 700-900 ms) from the moment the MIDI is triggered to when Tidal catches up.

This is not a MIDI-Controller to Pd issue, because there is no latency from the [ctlin] object to a number box. It is not related to the [netsend] object either, as I'm able to receive the values in Max from Pd with high time precision.

So that leads me to the possibility of changing the default delay value on SC that handles OSC, how can this be achieved?

---

<div class="post-metadata">

**Author:** ![yaxu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/yaxu/32/2_2.png) [@yaxu](https://uzu.lurk.org/u/yaxu)\
**Post date:** [18 December 2020 21:25 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/34 "2020-12-18T21:25:16Z")

</div>

The latency is probably mostly on the tidal side. By default it calculates events in 50ms (1/20 seconds) frames, and adds an additional 100ms latency on top. You can configure these in your BootTidal.hs file as cFrameTimespan and oLatency respectively.

---

<div class="post-metadata">

**Author:** ![isaacMedina](https://uzu.lurk.org/user_avatar/uzu.lurk.org/isaacmedina/32/2279_2.png) [@isaacMedina](https://uzu.lurk.org/u/isaacMedina)\
**Post date:** [18 December 2020 23:49 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/35 "2020-12-18T23:49:20Z")

</div>

Thanks! Adjusting these does improve the response from Tidal to the MIDI-Controller. 😄

---

<div class="post-metadata">

**Author:** ![leomallock2](https://uzu.lurk.org/user_avatar/uzu.lurk.org/leomallock2/32/1421_2.png) [@leomallock2](https://uzu.lurk.org/u/leomallock2)\
**Post date:** [3 January 2021 23:56 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/36 "2021-01-03T23:56:05Z")

</div>

Hey @yaxu (or anyone else to be honest.) I was just wondering how to just send midi clock to tidal from external gear? I don't want to control tidal externally other than CLOCK Thanks!! 🙂

---

<div class="post-metadata">

**Author:** ![yaxu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/yaxu/32/2_2.png) [@yaxu](https://uzu.lurk.org/u/yaxu)\
**Post date:** [4 January 2021 08:19 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/37 "2021-01-04T08:19:31Z")

</div>

Hi @leomallock2, it's more or less the same as sending any other midi, you send a clock message 48 times per measure or cycle `d1 $ midicmd "midiClock*48" # s "midi"` There's some information here: [https://tidalcycles.org/index.php/MIDI\_Clock](https://tidalcycles.org/index.php/MIDI_Clock)

---

<div class="post-metadata">

**Author:** ![leomallock2](https://uzu.lurk.org/user_avatar/uzu.lurk.org/leomallock2/32/1421_2.png) [@leomallock2](https://uzu.lurk.org/u/leomallock2)\
**Post date:** [4 January 2021 11:59 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/38 "2021-01-04T11:59:55Z")

</div>

Thanks Alex!

---

<div class="post-metadata">

**Author:** ![ben](https://uzu.lurk.org/user_avatar/uzu.lurk.org/ben/32/362_2.png) [@ben](https://uzu.lurk.org/u/ben)\
**Post date:** [4 August 2021 23:53 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/39 "2021-08-04T23:53:18Z")

</div>

I'm looking for a way to have MIDI CC inputs into Tidal only respond to cc's from certain channels. It seems like I need to modify the SC OSC/MIDI code to have it send over the channel number to Tidal but I'm having a hard time figuring it out.

@yaxu suggested this modification to SC on discord:

```haskell
osc.sendMsg("/ctrl", chan.asString + "-" + num.asString, val/127); 

```

then access it like `cF 1 "0-7"` from within Tidal.

I'm not able to get Tidal patches to react to the CC's however.  
Let me know if anyone has come across this or has any ideas thanks.

---

<div class="post-metadata">

**Author:** ![ben](https://uzu.lurk.org/user_avatar/uzu.lurk.org/ben/32/362_2.png) [@ben](https://uzu.lurk.org/u/ben)\
**Post date:** [7 August 2021 17:40 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/40 "2021-08-07T17:40:05Z")

</div>

I'm also trying to control `fast` with a midi controller. Any idea why this isn't working?

```haskell
fast (floor <$> (range 2 1 (cF 1 "20")))

```

---

<div class="post-metadata">

**Author:** ![yaxu](https://uzu.lurk.org/user_avatar/uzu.lurk.org/yaxu/32/2_2.png) [@yaxu](https://uzu.lurk.org/u/yaxu)\
**Post date:** [7 August 2021 19:01 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/41 "2021-08-07T19:01:04Z")

</div>

> [@ben](#):
>
> `fast (floor <$> (range 2 1 (cF 1 "20")))`

The first parameter to `fast` is of type `Rational` with alias `Time`, so you'll need to use `cR` or its alias `cT` instead of `cF`. You'll also need to remove the 'floor \<$\>`, which converts it to an integer.

[Previous page](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260.md?page=1)

[Next page](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260.md?page=3)
