How to make oscillators in control functions non-continuous?

#1

Is it possible to make an oscillator non-continuous such as sine or saw to stop it from looping? So # gain saw would would run through the saw ramp once and hold at its end value?

I’m open to other methods to achieve what I need if anyone has a recommendation. I still want the pattern that the function alters to loop, just not the function itself.

x,
lagauche

1 Like

#2

There’s envL which ramps from zero to one over the first cycle. To really make use of it, you need some setup that allows you to get the current cycle count “now”. I’m not quite sure how that works in the latest version.

0 Likes

#3

Ah not finding documentation on that. Can it do sinusoidal type shapes or just a float to float linear ramp?

0 Likes

#4

There was a hack for this but it doesn’t work in the new Tidal. Rather than re-implement the hack, I’ve been thinking about how to do this ‘properly’. Howabout:

d1 $ sound "bd*8" # gain (trigBy 1 envL)

Where trigBy 1 resets the envelope whenever pattern with id 1 (in this case itself, d1). Should be easy to implement

0 Likes

#5

Ok! I’ve committed a fix for master, so that this works now:

d1 $ sound "cp*3" # gain (trigger 1 envL)
0 Likes

#6

Thanks for working on this!! I haven’t had a chance to DL the updated master yet.

I don’t understand yet what this does but will try ASAP!. Can I still pattern envL and set its range like # gain (trigger 1 (range 0.3 1 (slow 4 envL)))?

0 Likes

#7

You can try out the new version with cabal install https://hackage.haskell.org/package/tidal-1.0.11/candidate/tidal-1.0.11.tar.gz

Yes that would work, see the demo here: https://twitter.com/yaxu/status/1118207896280608768

0 Likes