How can i play my own synth in supercollider?

#1

From tidal cycles i want to play my own synthdefs within supercollider. Couldnt find a tutorial on this topic so im asking here.

0 Likes

#2

It’s pretty simple, just evaluate your SynthDef in Supercollider with SuperDirt loaded and in Tidal Cycles, use it like a sample.
For example, if you have a SynthDef called “drummm”, you can do something like :
d1 $ s “drummm” # sustain 0.8

1 Like

#3

Thats what i thought but it doesent seem to work.
When using my synthdef

SynthDef('tone', {
    var tone, env;
    tone = {SinOsc.ar(60)};
    env = {Line.ar(1, 0, 1, doneAction: 2)};
    Out.ar(0, Pan2.ar(tone*env, 0))
}).add;

i get this error

 ERROR: Message 'flop' not understood.
0 Likes

#4

It seems to be an error from your synth, not Tidal Cycles :confused:

0 Likes

#5

Sure but playing it in sc via Synth('tone') just works fine.
Do i have to add it to superdirt somehow?

0 Likes

#6

I’m not sure why you have the function brackets for tone and env. I would just write this:

SynthDef(‘tone’, {
var tone, env;
tone = SinOsc.ar(60);
env = Line.ar(1, 0, 1, doneAction: 2);
Out.ar(0, Pan2.ar(tone*env, 0))
}).add;

0 Likes