# Using Tidal to control modular synths with CV

**URL:** <https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863>\
**Category:** TidalCycles\
**Tags:** resources\
**Created:** [16 May 2020 07:36 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863 "2020-05-16T07:36:12Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![mashaal](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mashaal/32/2100_2.png) [@mashaal](https://uzu.lurk.org/u/mashaal)\
**Post date:** [23 May 2020 10:26 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/22 "2020-05-23T10:26:13Z")

</div>

![Screen Shot 2020-05-23 at 5.50.06 pm](https://club.tidalcycles.org/uploads/default/original/1X/7974d7877c9bb896468fb23880712d994350682c.png)

I had a play with triggered envelopes, its pretty wild the shapes you can make.

---

<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:** [23 May 2020 15:11 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/23 "2020-05-23T15:11:22Z")

</div>

Nice!!

---

<div class="post-metadata">

**Author:** ![mashaal](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mashaal/32/2100_2.png) [@mashaal](https://uzu.lurk.org/u/mashaal)\
**Post date:** [23 August 2020 02:34 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/24 "2020-08-23T02:34:45Z")

</div>

Bit of an update: I've been working on a `slew` method for these CV instruments...

```haskell
d1 $ pitch "0 10 8 1" # scale "<12 31 8>" # x 0 # slew 3 0.5 1

```

`slew` accepts a strengh (in semitones), a rate (in step length), and a multiplyer (+1/-1) for slewing up or down.

and I made a quick demo video...

[![](https://img.youtube.com/vi/3VslGhidKk4/hqdefault.jpg "SuperDirt Voltage: Tidal Cycles + CV (Modular)") ](https://www.youtube.com/watch?v=3VslGhidKk4)

---

<div class="post-metadata">

**Author:** ![boastmodernist](https://uzu.lurk.org/user_avatar/uzu.lurk.org/boastmodernist/32/1994_2.png) [@boastmodernist](https://uzu.lurk.org/u/boastmodernist)\
**Post date:** [29 November 2020 15:19 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/25 "2020-11-29T15:19:22Z")

</div>

Thank you so much for putting together the repository!! I'm very excited to control my Morphagene and my Moog Mother-32 using Tidal 🙂

I hope to make contributions to this once I get the hang of it

---

<div class="post-metadata">

**Author:** ![mashaal](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mashaal/32/2100_2.png) [@mashaal](https://uzu.lurk.org/u/mashaal)\
**Post date:** [1 December 2020 10:56 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/26 "2020-12-01T10:56:29Z")

</div>

Awesome 😊 let me know if U need any help

---

<div class="post-metadata">

**Author:** ![borboto](https://uzu.lurk.org/letter_avatar_proxy/v4/letter/b/e19adc/32.png) [@borboto](https://uzu.lurk.org/u/borboto)\
**Post date:** [8 July 2021 11:45 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/27 "2021-07-08T11:45:33Z")

</div>

Hi everyone,

Newbie here, can you please help me with the following items:

> Add the `voltage.scd` synths to your active SuperDirt synth definitions.

How do I do this? Is it adding it to the supercollider like include("voltage")?

> Evaluate the `voltage.tidal` definitions after starting Tidal. These can also be added to your Tidal startup file.

Is this placing the content inside voltage.tidal on the start of my tidal file? Similar to declaring variables?

Thanks in advance,  
Pedro

---

<div class="post-metadata">

**Author:** ![miraflores](https://uzu.lurk.org/user_avatar/uzu.lurk.org/miraflores/32/1960_2.png) [@miraflores](https://uzu.lurk.org/u/miraflores)\
**Post date:** [24 November 2021 17:18 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/28 "2021-11-24T17:18:44Z")

</div>

Hi peeps, anybody knows how much voltage can Tidal output, does it go all the way to +10/-10 ? or only +5/-5 ?

does the line "n = n \* 5" in the SC code below (volatge.scd) represents the output voltage ? if I change it to "n= n \* 10" will it output the double?

```haskell
  (
    SynthDef (\voltage, { | out,
      channel,
      n,
      rate = 1,
      delta,
      begin,
      end,
      portamento = 0 |
      var slew, env, phase;
      n = n * 5;
      slew = (portamento);
      rate = rate;
      env = Env ([n, n + slew], [delta / rate]);
      phase = Line.ar (begin, end, delta / rate);
      OffsetOut.ar (channel, IEnvGen.ar (env, phase));
    }).add
  );

```

---

<div class="post-metadata">

**Author:** ![qaciwq](https://uzu.lurk.org/letter_avatar_proxy/v4/letter/q/51bf81/32.png) [@qaciwq](https://uzu.lurk.org/u/qaciwq)\
**Post date:** [24 November 2021 19:40 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/29 "2021-11-24T19:40:29Z")

</div>

Hi. I recommend calibrating/testing with VCV Rack Scope module if u didint already, because it can be tricky e.g. for me output value changes depening on supercollider global volume (s.volume.volume) which can be neat way to transpose notes/modualtion. Try something like `d1 $ volt "0 1" # x 2` and lookup volts in scope. For me it goes between `0` and `10`. `-0.5 0.5`volts goes from `-5` to `5`.  
But I changed `n = n * 5`; to just `n=n` because its more intuitive to me. Then Tidal value equals Supercollider output and range of `1` is `10V` in my setup. U can see Supercollider ouput by adding `.poll` to signal e.g. `OffsetOut.ar (channel, IEnvGen.ar (env, phase).poll);`

---

<div class="post-metadata">

**Author:** ![miraflores](https://uzu.lurk.org/user_avatar/uzu.lurk.org/miraflores/32/1960_2.png) [@miraflores](https://uzu.lurk.org/u/miraflores)\
**Post date:** [30 November 2021 22:20 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/30 "2021-11-30T22:20:44Z")

</div>

Hey nice recommendation! thnx a lot I will try this.

---

<div class="post-metadata">

**Author:** ![mashaal](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mashaal/32/2100_2.png) [@mashaal](https://uzu.lurk.org/u/mashaal)\
**Post date:** [13 December 2021 01:46 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/31 "2021-12-13T01:46:53Z")

</div>

I originally added the \* 5 to make a a 0/1 value scale to 0/5. But in theory i think you would be limited the the max range of whatever audio card you are using.

---

<div class="post-metadata">

**Author:** ![mashaal](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mashaal/32/2100_2.png) [@mashaal](https://uzu.lurk.org/u/mashaal)\
**Post date:** [13 December 2021 01:53 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/32 "2021-12-13T01:53:44Z")

</div>

I've debated whether or not to keep 0/1 values for some of these helpers, only to find out i constantly have to type out decimals way too oftern.

Do you have any preferences to this? I know some of the tidal djf filters work with larger values 2000 etc... I could be better this way? Then you might be able to use some syntax like (500 .. 2000) a bit easier?

FYI, I have a few small updates to these helpers which allow you to use the native scale helpers with the pitch instrument. I realised that I actually overwrote that in the current version.

If you've made any more modifications I'd love to see them!

---

<div class="post-metadata">

**Author:** ![qaciwq](https://uzu.lurk.org/letter_avatar_proxy/v4/letter/q/51bf81/32.png) [@qaciwq](https://uzu.lurk.org/u/qaciwq)\
**Post date:** [13 December 2021 13:34 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/33 "2021-12-13T13:34:26Z")

</div>

Hey. Thanks for the package. One way filter/or other parameter defining can be done is by creating new Tidal function where input and output min maxes are scaled. Something like linlin in supercollider maybe? Then just letting users know that they can define ranges some way in README or examples.

```haskell
.linlin(inMin, inMax, outMin, outMax, clip:)
2000.linlin(0, 20000, 0, 1)
eurorack_filter = linlin_similar 0 2000 0 1

```

Not sure how to do this in Tidal though.

Only thing I added to package is synth/function for short triggers, because sometimes I had trouble making it work default way:

```haskell
  (
    // For very short triggers
    SynthDef (\tr, { |out, channel, sustain, width=0.00001|
      OffsetOut.ar(channel, LFPulse.ar(1/sustain, width:width));
    }).add
  );

```

```haskell
tr tr = n tr # s "tr"

```

---

<div class="post-metadata">

**Author:** ![johanw](https://uzu.lurk.org/letter_avatar_proxy/v4/letter/j/278dde/32.png) [@johanw](https://uzu.lurk.org/u/johanw)\
**Post date:** [16 January 2022 10:45 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/34 "2022-01-16T10:45:13Z")

</div>

I wonder, is there a plan to allow the modular to control the Tidal clock/tempo, i.e., where Tidal would be following triggers from a clock module? I suppose this would also allow for syncing to a DAW with a trigger track.

I'm a complete beginner, about to start learning Tidal, and the CV examples in this thread are super interesting. I have no idea whether syncing to clock signals would be simple or difficult. From the documentation and forums, it looks like there's a focus on getting Ableton Link to work for Tidal synchronisation .. but all that seems rather complex, while using triggers can be simple and reliable 🙂

(Edit. Maybe something like [BeatTrack | SuperCollider 3.12.2 Help](https://doc.sccode.org/Classes/BeatTrack.html) would apply?)

---

<div class="post-metadata">

**Author:** ![colevscode](https://uzu.lurk.org/user_avatar/uzu.lurk.org/colevscode/32/2190_2.png) [@colevscode](https://uzu.lurk.org/u/colevscode)\
**Post date:** [16 January 2023 05:04 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/35 "2023-01-16T05:04:07Z")

</div>

@mashaal First thanks a ton for this. I've learned so much going through your code.

I'm struggling to get clean 1v/octave output using the pitch synth. What I've noticed is that there are audible pops between each note. For example, here's a simple sequence:

```haskell
d1 $ n "30 30" # s "pitch" # x 0 

```

and the resulting output:  
 ![Screen Shot 2023-01-15 at 9.05.49 PM](https://club.tidalcycles.org/uploads/default/original/2X/5/5e14be182c1d89dac42b259cd32865e795adc6bf.png)

Any thoughts about what could be causing this?

---

<div class="post-metadata">

**Author:** ![mashaal](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mashaal/32/2100_2.png) [@mashaal](https://uzu.lurk.org/u/mashaal)\
**Post date:** [16 January 2023 09:52 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/36 "2023-01-16T09:52:59Z")

</div>

Could you try adjusting the `legato` value? It looks like the signal is doubling on itself during the start/end of a loop.

```haskell
d1 $ n "30 30" # s "pitch" # x 0 # legato 0.95

```

Would this resolve it? Maybe we can adjust the scd instrument to close the voltage a tiny bit earlier.

---

<div class="post-metadata">

**Author:** ![colevscode](https://uzu.lurk.org/user_avatar/uzu.lurk.org/colevscode/32/2190_2.png) [@colevscode](https://uzu.lurk.org/u/colevscode)\
**Post date:** [16 January 2023 12:50 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/37 "2023-01-16T12:50:52Z")

</div>

I've been on a bit of a journey.

Legato of 0.95 created an audible gap between each note. I played around with it but couldn't quite smooth it out. The closest was 0.995 which gave me this:

![Screen Shot 2023-01-16 at 3.53.09 AM](https://club.tidalcycles.org/uploads/default/original/2X/f/f8b0a9226a4a815f117789cda8b4fd18cc9bcca5.png)

Still audible, but better. Then just for fun I tried longer legato values, and found that 1.1 changes the pops into peaks with what looks like double the voltage (compare min/max values):

![Screen Shot 2023-01-16 at 3.54.19 AM](https://club.tidalcycles.org/uploads/default/original/2X/3/3dbc474b6f9ae0adc2ed101a520b6f0a59c5b7a0.png)

That got me thinking, perhaps what I'm hearing is actually two overlayed synths outputting the same DC voltage, which is getting summed. (I guess that's what you meant by "the signal is doubling on itself during the start/end of a loop.") I restarted SC with `s.plotTree` to observe the nodes being generated, and found this:

![Screen Shot 2023-01-16 at 4.24.46 AM](https://club.tidalcycles.org/uploads/default/original/2X/4/4ef9a5204c51f70fc378e1b45670650e127f2c69.png)

Which led me to [this discussion](http://tidalcycles.org/docs/patternlib/tutorials/course2#julian-rohrhuber-commentary) about `dirt_gate`. I tried adjusting the `fadeTime` and `fadeInTime` values but it didn't change anything. Finally I tried forcing the `fadeTime` to zero by replacing the `dirt_gate` synth and overwriting this line:

```haskell
var env = EnvGen.ar(Env([0, 1, 1, 0], [fadeInTime, sustain, fadeTime], \sin), levelScale: amp, doneAction: 14);

```

with this:

```haskell
var env = EnvGen.ar(Env([0, 1, 1, 0], [0, sustain, 0], \sin), levelScale: amp, doneAction: 14);

```

That gave me the cleanest sound so far. Still there's a faintly audible pulse but I think I can live with it. Here are the results:

![Screen Shot 2023-01-16 at 4.44.34 AM](https://club.tidalcycles.org/uploads/default/original/2X/b/bccf0b97aa7aadc836525fa97f0cbe38ad1682a6.png)

Now I wonder, is there any way to use the input signal from multiple groups in a SynthDef in order to output a consistent DC regardless of how many copies of the synth are currently playing?

---

<div class="post-metadata">

**Author:** ![colevscode](https://uzu.lurk.org/user_avatar/uzu.lurk.org/colevscode/32/2190_2.png) [@colevscode](https://uzu.lurk.org/u/colevscode)\
**Post date:** [16 January 2023 13:27 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/38 "2023-01-16T13:27:36Z")

</div>

I'm finding that legato 0.995 is close enough to a zero fadeTime in the dirt\_gate envelope.

My goal is to be able to use the pattern itself for the gate, rather than needing a separate gate pattern. I'm happy to report that with a small change to your gate synth, I think I've got it. Here's my gate:

```haskell
SynthDef (\gate, { | out,
	channel,
	n |
	n = if (n > 0, 1, 0);
	OffsetOut.ar (channel, DC.ar (n));
}).add

```

I'm using a function to stack the gate and pitch sounds, so I can pass a pattern to both at once:

```haskell
ss :: Pattern Int -> Pattern ControlMap -> Pattern ControlMap
ss orbit pat = stack [pat # s "pitch" # legato 0.995 # x (orbit*2), pat # s "gate" # x (orbit*2 + 1)]

d1 $ ss 0 $ n "c6 ~ ef6 f6 ~ as6 b6 c7 "

```

I'm pretty happy with the result:

![Screen Shot 2023-01-16 at 5.26.04 AM](https://club.tidalcycles.org/uploads/default/original/2X/8/87ca155831941b72c7cf63844f14768871be5c02.png)

---

<div class="post-metadata">

**Author:** ![mashaal](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mashaal/32/2100_2.png) [@mashaal](https://uzu.lurk.org/u/mashaal)\
**Post date:** [16 January 2023 14:59 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/39 "2023-01-16T14:59:43Z")

</div>

Oh that's an interesting way to stack pitch and gate. The added gate logic makes sense, would you like to PR that?

I wonder if there's a way to shorten the legato value by `0.005` in the synth def itself, which would mean you could write a bit more cleaner tidal code... and it might have more consistent results in general?

Running 2 or more cv outputs on one channel will sum all the cv values. I think this theoretically is what it should do? Though I have only run into this by accident myself.

---

<div class="post-metadata">

**Author:** ![colevscode](https://uzu.lurk.org/user_avatar/uzu.lurk.org/colevscode/32/2190_2.png) [@colevscode](https://uzu.lurk.org/u/colevscode)\
**Post date:** [16 January 2023 17:51 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/41 "2023-01-16T17:51:46Z")

</div>

I think the problem generally with shortening the envelope via legato or by messing with fadeTime is that the target we're shooting for is infinitesimally small. We're trying to perfectly line up these envelopes so that they don't overlap or underlap, which both cause audible clicks.

I think superdirt, and tidal generally, wasn't designed with DC voltage in mind. the patterns create discrete envelopes, one per note, but dc voltages should be continuous and slide between values. That means somehow smoothing the output across multiple notes.

---

<div class="post-metadata">

**Author:** ![mvdirty](https://uzu.lurk.org/user_avatar/uzu.lurk.org/mvdirty/32/2179_2.png) [@mvdirty](https://uzu.lurk.org/u/mvdirty)\
**Post date:** [16 January 2023 18:19 UTC](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863/42 "2023-01-16T18:19:15Z")

</div>

I’ve been using these synthdefs only for clocking so far, but am very soon to use them for modulation, so these latest replies were of great interest and I’ve been doing a little SC and SuperDirt reading today to learn more.

(To use this for pitch/mod/etc., I’d need it to hold pitch and some types of modulation indefinitely after setting their value, would eliminate the summing of values, and optimally would remove all slewing.)

[NB: I’m returning months later to strike out text which I subsequently learned is not just irrelevant, it is incorrect and would make things worse. superdirt-voltage must use OffsetOut because of how it bypasses superdirt’s output handling.]

~~I’m too far from done reading to suggest any changes yet, but did bump into this link (via the SuperDirt source code) which might provide an incremental improvement via use of `Out` instead of `OffsetOut` as in the current superdirt-voltage source.~~

~~[https://club.tidalcycles.org/t/not-using-offsetout/1368~~](https://club.tidalcycles.org/t/not-using-offsetout/1368~~)

[Previous page](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863.md?page=1)

[Next page](https://uzu.lurk.org/t/using-tidal-to-control-modular-synths-with-cv/863.md?page=3)
