# Interpolated MIDI CC?

**URL:** <https://uzu.lurk.org/t/interpolated-midi-cc/1692>\
**Category:** Uncategorized\
**Created:** [18 July 2020 06:20 UTC](https://uzu.lurk.org/t/interpolated-midi-cc/1692 "2020-07-18T06:20:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaudVyd](https://uzu.lurk.org/letter_avatar_proxy/v4/letter/d/54ee81/32.png) [@DaudVyd](https://uzu.lurk.org/u/DaudVyd)\
**Post date:** [18 July 2020 06:20 UTC](https://uzu.lurk.org/t/interpolated-midi-cc/1692/1 "2020-07-18T06:20:04Z")

</div>

Hi Everyone,

I'm primarily interested in using TidalCycles with Reaktor, Kontakt, and other VSTs. Since I last explored Tidal it looks like _tidal-midi_ has retired. The new [MIDI Superdirt](https://tidalcycles.org/index.php/SuperDirt_MIDI_Tutorial) tutorial explains that CC patterns can be created like so:

d2 $ ccv "20 40 60 80 100" # ccn 30 # s "midi"

Does this create a curve and interpolate between the values? If not, are smooth transitions possible? For example, could I make a LFO with ccv?

Thanks,  
-d.vyd

---

<div class="post-metadata">

**Author:** ![artheist](https://uzu.lurk.org/user_avatar/uzu.lurk.org/artheist/32/594_2.png) [@artheist](https://uzu.lurk.org/u/artheist)\
**Post date:** [18 July 2020 15:48 UTC](https://uzu.lurk.org/t/interpolated-midi-cc/1692/2 "2020-07-18T15:48:17Z")

</div>

Yes, I actually did it recently. It is done in the same manner as any lfo, in your case:

```haskell
d2 $ ccv (range 20 100 saw) # ccn 30 # s "midi"

```

If you want the change to be slowly change, you can add a slow and/or segment depending on your liking.

```haskell
# ccn "27" # ccv (segment 64 $ slow 16 $ range 40 120 sine)

```

You can find all useful info about this here : [https://tidalcycles.org/index.php/SuperDirt\_MIDI\_Tutorial](https://tidalcycles.org/index.php/SuperDirt_MIDI_Tutorial)

Pay attention to the last example in this page, as you would probably want to control multiple midi CC at the same time.

---

<div class="post-metadata">

**Author:** ![DaudVyd](https://uzu.lurk.org/letter_avatar_proxy/v4/letter/d/54ee81/32.png) [@DaudVyd](https://uzu.lurk.org/u/DaudVyd)\
**Post date:** [18 July 2020 17:12 UTC](https://uzu.lurk.org/t/interpolated-midi-cc/1692/3 "2020-07-18T17:12:01Z")

</div>

that is good news. thank you @artheist.

---

<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 July 2020 21:09 UTC](https://uzu.lurk.org/t/interpolated-midi-cc/1692/4 "2020-07-18T21:09:53Z")

</div>

With recent versions of Tidal (I think post 1.0), continuous functions like `saw` need some structure, so you'd always need the segment, e.g.

```haskell
d2 $ segment 64 $ ccv (range 20 100 saw) # ccn 30 # s "midi"

```

To linearly interpolate between values you can use `smooth`, that again creates a continuous pattern so you'd need `segment` to sample from it again:

```haskell
d2 $ segment 64 $ ccv ("20 40 60 80 100") # ccn 30 # s "midi"

```

Also I think this example would only end up sending one event per cycle, because the structure comes from the `ccn`

```haskell
d1 $ ccn "27" # ccv (segment 64 $ slow 16 $ range 40 120 sine)

```

This would send 64 values per cycle:

```haskell
d1 $ ccv (segment 64 $ slow 16 $ range 40 120 sine) # ccn "27"

```
