Continuous waveform?

Hi all, anyone know how to get a continuous sine/square/triangle/saw wave in tidal? Maybe with a synthdef but I'm not sure how to do that, sure someone on here must have.......
Thanks!

So, there's no way to do that out of the box, because if you trigger a synth with a pattern, it will be triggered on every event.
An idea I had playing with the clouds global effect is that you could define a synth as a global effect in superdirt, set some params like a gain, a freq, etc...
Maybe that explaination is not that good, but I will try to make an example to show you

Don't know... that's not so flexible, but it sounds and it's controllable :smiley:
https://www.youtube.com/watch?v=x1OFjWyyMt8

1 Like

Ah thank you! I will try this... could you please post the full script so I can try? :slight_smile:

I advice you... it's a mess!

(

(1..SuperDirt.maxSampleNumChannels).do { |numChannels|
  SynthDef("global_saw" ++ numChannels, { |dryBus, effectBus, sawgain=0, sawfreq1=440, sawfreq2=440, sawcutoff = 440, sawresonance = 0, sawpan = 0.5|
    var drySignal = In.ar(dryBus, ~dirt.numChannels);
    var signal = drySignal + (Saw.ar(sawfreq1) + Saw.ar(sawfreq2)) * sawgain;
    var filtered = RLPF.ar(signal, sawcutoff, sawresonance);
    Out.ar(effectBus, DirtPan.ar(filtered, ~dirt.numChannels, sawpan));
  }, [\ir, \ir]).add;
}

);

add as global effect

~dirt.orbits.do { |x|
  var saw = GlobalDirtEffect(\global_saw, [\sawgain, \sawfreq1, \sawfreq2, \sawcutoff, \sawresonance, \sawpan]);
  x.globalEffects = x.globalEffects.addFirst(saw)
  x.initNodeTree;
};

tidal parameters

let sawgain = pF "sawgain"
    sawfreq1 = pF "sawfreq1"
    sawfreq2 = pF "sawfreq2"
    sawcutoff = pF "sawcutoff"
    sawresonance = pF "sawresonance"
    sawpan = pF "sawpan"

I wouldn't know ha! Thanks again :slight_smile:

Do you mean something like this?

1 Like

hey sorry I have no idea how this works....so as i understand the following goes into supercollider -

(

(1..SuperDirt.maxSampleNumChannels).do { |numChannels|
SynthDef("global_saw" ++ numChannels, { |dryBus, effectBus, sawgain=0, sawfreq1=440, sawfreq2=440, sawcutoff = 440, sawresonance = 0, sawpan = 0.5|
var drySignal = In.ar(dryBus, ~dirt.numChannels);
var signal = drySignal + (Saw.ar(sawfreq1) + Saw.ar(sawfreq2)) * sawgain;
var filtered = RLPF.ar(signal, sawcutoff, sawresonance);
Out.ar(effectBus, DirtPan.ar(filtered, ~dirt.numChannels, sawpan));
}, [\ir, \ir]).add;
}

);

then the following goes into tidal or supercollider? When i pasted into supercollider it returned error? -

~dirt.orbits.do { |x|
var saw = GlobalDirtEffect(\global_saw, [\sawgain, \sawfreq1, \sawfreq2, \sawcutoff, \sawresonance, \sawpan]);
x.globalEffects = x.globalEffects.addFirst(saw)
x.initNodeTree;
};

then I'm guessing the following goes into tidal -

let sawgain = pF "sawgain"
sawfreq1 = pF "sawfreq1"
sawfreq2 = pF "sawfreq2"
sawcutoff = pF "sawcutoff"
sawresonance = pF "sawresonance"
sawpan = pF "sawpan"

anything else i should know?

The supercollider code needs to be executed when superdirt is started.

Take a look at this example that explains how to add a global effect on superdirt: SuperDirt/adding-global-effects.scd at develop · musikinformatik/SuperDirt · GitHub

Hi thanks. I'm not quite getting it...These are my steps. I run this first into supercollider:

~dirt.orbits.do { |x| x.globalEffects.postln }

Then this:

(

(1..SuperDirt.maxSampleNumChannels).do { |numChannels|
  SynthDef("global_saw" ++ numChannels, { |dryBus, effectBus, sawgain=0, sawfreq1=440, 
sawfreq2=440, sawcutoff = 440, sawresonance = 0, sawpan = 0.5|
var drySignal = In.ar(dryBus, ~dirt.numChannels);
var signal = drySignal + (Saw.ar(sawfreq1) + Saw.ar(sawfreq2)) * sawgain;
var filtered = RLPF.ar(signal, sawcutoff, sawresonance);
Out.ar(effectBus, DirtPan.ar(filtered, ~dirt.numChannels, sawpan));
  }, [\ir, \ir]).add;
}

);

Then this:

~dirt.orbits.do { |x|
var saw = GlobalDirtEffect(\global_saw, [\sawgain, \sawfreq1, \sawfreq2, \sawcutoff, \sawresonance, 
\sawpan]);
x.globalEffects = x.globalEffects.addFirst(saw)
x.initNodeTree;
};

~dirt.orbits.do { |x| x.globalEffects.postln; " ----------".postln; }

^ This last script reads this error:

ERROR: syntax error, unexpected NAME, expecting '}'
in interpreted text
line 5 char 3:

x.initNodeTree;
^
};
-----------------------------------
ERROR: Command line parse failed
-> nil

Sorry I have no understanding of supercollider language. Any ideas?

Missing ; after x.globalEffects = x.globalEffects.addFirst(saw)