# 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:** 1

<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:** [29 May 2020 08:22 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/1 "2020-05-29T08:22:21Z")

</div>

Here's the basics covered with controlling Tidal from MIDI. There's a bit more to cover here in terms of tips and tricks, so I think I'll do another video soon.. In the meantime feel free to ask questions, as it'll help me decide what to cover, thanks!

[![](https://img.youtube.com/vi/XZH4IoBG5Pg/maxresdefault.jpg "[TidalClub] Lesson 6.4 - MIDI input") ](https://www.youtube.com/watch?v=XZH4IoBG5Pg)

---

<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:** [29 May 2020 18:49 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/2 "2020-05-29T18:49:57Z")

</div>

Thanks @yaxu.

Can you give an example on how to set up a singular controller for input into Tidal, and not all connected controllers? I expected this to be as easy as assigning MIDI outputs but it doesn't seem to be.

---

<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:** [29 May 2020 19:52 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/3 "2020-05-29T19:52:19Z")

</div>

Also, can you give an example on how to use a cc number inside of mini-notation while limiting it's incoming range?

---

<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:** [30 May 2020 00:02 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/4 "2020-05-30T00:02:02Z")

</div>

This connects my device:

```haskell
MIDIIn.connect(2,2)

```

However I can't immediately work out what these numbers correspond too.. 😕

---

<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:** [30 May 2020 00:03 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/5 "2020-05-30T00:03:03Z")

</div>

There's not a way to put ranges on things inside the mininotation. What problem do you have in mind?

---

<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:** [30 May 2020 02:42 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/6 "2020-05-30T02:42:19Z")

</div>

Is there somewhere in the docs that outlines how to send note data to Tidal? I know we got this working once upon a time, but it's been quite some time since I tried to get this working and I don't know if the utils necessary survived the rework.

---

<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:** [30 May 2020 02:46 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/7 "2020-05-30T02:46:51Z")

</div>

Like if you want a controller (that goes from 0-127) to control a pitch in mini-notation that’d you’d like to go from 0-7, for instance.

---

<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:** [30 May 2020 03:51 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/8 "2020-05-30T03:51:45Z")

</div>

PS: Limiting the range on the sending side is trivial with OSC, or with a MIDI controller that's easy to configure, but it would be really nice to be able to limit the range of incoming MIDI for mini-notation on the Tidal side as well, in situations where the controllers are hard to re-configure.

Is there a way with an function that lives outside the mini-notation maybe?

---

<div class="post-metadata">

**Author:** ![flaminggarlic](https://uzu.lurk.org/user_avatar/uzu.lurk.org/flaminggarlic/32/115_2.png) [@flaminggarlic](https://uzu.lurk.org/u/flaminggarlic)\
**Post date:** [31 May 2020 14:23 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/9 "2020-05-31T14:23:26Z")

</div>

Is it possible to use cc values in the same mini notation pattern as other values?  
For intstance: d1 $ n " 1 5 ^41 6" # s "bd"

---

<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 14:58 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/10 "2020-05-31T14:58:21Z")

</div>

Yes. And it’s very cool.

The only issue I’m running into is limiting the range to only the desired values, otherwise it can be hard to control.

---

<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 15:27 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/11 "2020-05-31T15:27:47Z")

</div>

If you want to stop a pattern going over a certain amount you can use e.g. `min 0.5 <$>` to limit to 0.5. Does that help?

I'm wondering if you can filter a CC stream into another one like this:

```haskell
setF "maxed" $ min 0.8 <$> "^33"
d1 $ sound "bd" # speed ("^maxed" + 1) 

```

My initial experiments say no, but I'm not sure why..

---

<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 15:30 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/12 "2020-05-31T15:30:07Z")

</div>

The superdirt code already scales the 0 - 127 CC values so they go to 0-1. So to go from there to 0 - 7 you'd do e.g. `"^33" * 7` or `range 0 7 "^33"`

---

<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 16:39 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/13 "2020-05-31T16:39:26Z")

</div>

I hadn't thought about the automatic range reduction to 0-1 but that makes sense.

But say I wanted the CC value to be one amongst others in mini-notation. So something like:  
`"0 1 ^33 7"`  
What would be the best way to limit its range in this case, since the `setF` function isn't working?

Thanks @yaxu

---

<div class="post-metadata">

**Author:** ![flaminggarlic](https://uzu.lurk.org/user_avatar/uzu.lurk.org/flaminggarlic/32/115_2.png) [@flaminggarlic](https://uzu.lurk.org/u/flaminggarlic)\
**Post date:** [31 May 2020 17:05 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/14 "2020-05-31T17:05:40Z")

</div>

That's awesome. Not sure which controllers you have access to but some midi controllers have the ability to set the range, the Novation sl series does this if I remember correctly (the one Alex shows in his setup in the video).

---

<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 17:42 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/16 "2020-05-31T17:42:05Z")

</div>

I'll try to look into the issue with state, but otherwise, you can't do things like that in the mini-notation - it's designed for sequencing really. You can do stuff like `fastcat [0, 1, min 0.5 <$> cF_ "33", 7]` outside of the mininotation though

---

<div class="post-metadata">

**Author:** ![John\_Murphy](https://uzu.lurk.org/user_avatar/uzu.lurk.org/john_murphy/32/579_2.png) [@John\_Murphy](https://uzu.lurk.org/u/John_Murphy)\
**Post date:** [31 May 2020 18:07 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/17 "2020-05-31T18:07:03Z")

</div>

Is there any way to record the movement of the knobs/keys ?  
It's pretty awesome getting them in, but it would be even cooler if we could store sweeps/etc. into a value, either in tidal or in supercollider so that we could reference it during, or potentially save the motion for a composed piece ?

I've been investigating that today, so this is a very relevant topic!

---

<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 18:37 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/18 "2020-05-31T18:37:06Z")

</div>

Thanks @yaxu.

For now I'll limit the values on the incoming side (and experiment with `fastcat`), but let us know if you ever find a way to alter them on the Tidal side. Cheers.

---

<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 19:16 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/19 "2020-05-31T19:16:04Z")

</div>

Actually now that I think about it I'm confused by this @yaxu:  
`The superdirt code already scales the 0 - 127 CC values so they go to 0-1`

If the values get automatically scaled to 0-1 then limiting the MIDI range that's incoming into Tidal wouldn't help much. With no way to scale the incoming MIDI from within Tidal then MIDI control is only currently useful for control values (or maybe in binary struct type patterns). Is that correct?

---

<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 19:59 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/20 "2020-05-31T19:59:27Z")

</div>

It's normalised to 0..1, but you can change that in tidal with `range`.

To correct myself, it isn't really superdirt handling midi input.. The code you paste in to enable midi input is a standalone piece of supercollider code that takes MIDI as input and sends the messages to Tidal as OSC network messages. If you want supercollider to send 0..127, then in you can edit that code, changing instances of `val/127` to `val`.

---

<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:00 UTC](https://uzu.lurk.org/t/week-6-lesson-4-controlling-tidal-with-midi/1260/21 "2020-05-31T20:00:05Z")

</div>

Not currently, it'd be nice to explore though!

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