# Week 5, lesson 3, superdirt synths part 2!

**URL:** <https://uzu.lurk.org/t/week-5-lesson-3-superdirt-synths-part-2/1193>\
**Category:** Week 5 - notes, chords, arpeggios and Algoraoke\
**Created:** [26 May 2020 08:39 UTC](https://uzu.lurk.org/t/week-5-lesson-3-superdirt-synths-part-2/1193 "2020-05-26T08:39:31Z")\
**Posts on this page:** 7\
**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:** [26 May 2020 08:39 UTC](https://uzu.lurk.org/t/week-5-lesson-3-superdirt-synths-part-2/1193/1 "2020-05-26T08:39:31Z")

</div>

Hi [@cycle1](https://uzu.lurk.org/groups/cycle1), if you're interested in getting your hands dirty with synthesis, @eris has a great video for you !

[![](https://img.youtube.com/vi/qZKDI8sVy8Q/maxresdefault.jpg "[for TidalClub] Making your own synths") ](https://www.youtube.com/watch?v=qZKDI8sVy8Q)

Here's the code:

```haskell
SynthDef(\test, {
 |out,sustain=1,freq=440,speed=1,begin=0,end=1,pan,accelerate,offset,clamp=1|
 var line, env, volume, tone, outAudio;
 freq=freq*speed;
 line = Line.ar(begin,end,sustain/speed,doneAction: Done.freeSelf);
 env = Env.new(levels: [0, 1, 0.9, 0], times: [0.1, 0.5, 1], curve: [-5, 0, -5]);
 volume = IEnvGen.ar(env, line);
 tone = (Pulse.ar(freq,line)+Pulse.ar(freq*1.01,line)+Pulse.ar(freq*0.99,line))/3;
 outAudio = RLPF.ar(tone*volume, 20000*clamp*volume,0.3);
 OffsetOut.ar(out,DirtPan.ar(outAudio, ~dirt.numChannels, pan, volume));
}).add;

```

At the time of writing the subtitles are auto-generated, we're looking into getting them edited.

See also [this comment](https://club.tidalcycles.org/t/week-5-lesson-3-adding-and-using-superdirt-synths/1115/9) by @julian, who made SuperDirt, and clears up some things about envelopes I wasn't sure about in [my own video on the topic](https://club.tidalcycles.org/t/week-5-lesson-3-adding-and-using-superdirt-synths/1115).

---

<div class="post-metadata">

**Author:** ![gnozo](https://uzu.lurk.org/user_avatar/uzu.lurk.org/gnozo/32/100_2.png) [@gnozo](https://uzu.lurk.org/u/gnozo)\
**Post date:** [26 May 2020 18:08 UTC](https://uzu.lurk.org/t/week-5-lesson-3-superdirt-synths-part-2/1193/2 "2020-05-26T18:08:14Z")

</div>

Awesome crash course on supercollider, which was quite alien to me. This opens so many possibilities! I will definitely try to dig deeper.  
Also, the patterning trick seemed new to me :

`d1 $ n"[7 0 3 0]*4" |+ n "<0 5 2 3>*2" |+ s "supersaw"`

It seems the same pattern undergoing sequential transposition? I thought I could rewrite it this way :  
`d1 $ hurry 2 $ n "<[7 0 3 0] [12 5 8 5] [9 2 5 2] [10 3 6 3]>*2" # s "supersaw"` but not!

Only this worked :  
`d1 $ hurry 2 $ n "<[7 0 3 0]*2 [12 5 8 5]*2 [9 2 5 2]*2 [10 3 6 3]*2>" # s "supersaw"`

It still seems a bit magical. Applying this type of transformation to rhythms is cool for breaks : `d1 $ n"[7 0 3 0]*4" |+ n "<0 5 2 3>*2" |+ s "drum"` )!

Thanks a lot for this video!

---

<div class="post-metadata">

**Author:** ![bcgreen](https://uzu.lurk.org/user_avatar/uzu.lurk.org/bcgreen/32/763_2.png) [@bcgreen](https://uzu.lurk.org/u/bcgreen)\
**Post date:** [26 May 2020 21:31 UTC](https://uzu.lurk.org/t/week-5-lesson-3-superdirt-synths-part-2/1193/3 "2020-05-26T21:31:50Z")

</div>

Thanks, @eris!

---

<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:** [26 May 2020 22:14 UTC](https://uzu.lurk.org/t/week-5-lesson-3-superdirt-synths-part-2/1193/4 "2020-05-26T22:14:04Z")

</div>

I've gone through this myself, and it cleared things up for me nicely too, thanks @eris!

---

<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:** [27 May 2020 21:55 UTC](https://uzu.lurk.org/t/week-5-lesson-3-superdirt-synths-part-2/1193/5 "2020-05-27T21:55:09Z")

</div>

Ah yeah! I tend to separate out beat-level and cycle-level events like this because I'm thinking of it as an arpeggio over a chord progression, but I suppose it does have the pleasant side-effect of disambiguating the rhythmic end of things.

I've also got some helper functions that will constrain sequences like this to a given octave range that I should maybe cover. That way, you can do stuff like `n "[7 0 3 0]" |+ n (slow 8 ((run 8) * 5))` to have a nice descending circle-of-5ths progression without having your pitches fly off into supersonic frequencies.

(also I'm so happy my video was helpful- thanks for the feedback!)

---

<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:** [31 May 2020 02:28 UTC](https://uzu.lurk.org/t/week-5-lesson-3-superdirt-synths-part-2/1193/6 "2020-05-31T02:28:47Z")

</div>

Hi Eris,

Great stuff, nice intro to SynthDefs, and really nice sounds too !

Cheers

@

---

<div class="post-metadata">

**Author:** ![FlashBlaze](https://uzu.lurk.org/letter_avatar_proxy/v4/letter/f/4af34b/32.png) [@FlashBlaze](https://uzu.lurk.org/u/FlashBlaze)\
**Post date:** [11 June 2020 13:53 UTC](https://uzu.lurk.org/t/week-5-lesson-3-superdirt-synths-part-2/1193/7 "2020-06-11T13:53:31Z")

</div>

Woah! Thanks a lot for this video. Wasn't even aware one could even create synths such easily.
