Prout - multiple points time ramp

Hi folks,

I am quite new with Tdef / Prout: right there I use it in interaction with Pbindef, (~zzz goes to control a synth param inside a running Pbindef, which gives a new temporal layout to this param) - and it works great - but so far just with fixed values so it produces jumps, obviously ( Prout({ loop { 0.5.yield ; 1.3.yield ; 0.2.yield and so on } ).
I would like to be able to keep exactly this workflow, but replacing the succession of fixed values by a multiple points time ramp, like an envelope, to produce data glissandos, such as “go from 0 to 0.6 in 0.3 then from 0.6 to 1.3 in 0.2 then from 1.3 to 0.7 and so on…”
I hope it’s clear :wink:

Thanks a lot

(
Tdef(\seq, { var 
	            zzzseq = Prout({loop{ ??? .yield   } }).asStream;	   
	            loop({
~zzz = zzzseq.next;
		 ~dur.wait;
	})
                      }).play;
)

One way of getting continuous variation is to use Pseg. But you’ll still have to decide on how often the stream is advanced with .next.

(
Tdef(\seq, {
	var x;
	x = Pseg([0, 0.6, 1.3, 0.7], [0.3, 0.2, 0.5]).asStream;
	loop({
		x.next.postln;
		0.01.wait;
	})
}).play;
)

Hello @raphael,

I have been experimenting with this issue with Patterns and I found not yet the way to get the continuos glissando effect. Now I’m trying with Tdef, but still not glissando. There are many resources to generate points as the Pseg that mentions @jpdrecourt, but get glissandos is a bit tricky with Patterns. I found that Ndef manage them well, but maybe is not as your workflow. Here an example with a glissandos in freq and amp sine. Also, I got some tips that maybe using a Bus or trying Pmono could get this effect, but I still didn’t write a code. I hope this helps.

(
Ndef(\pline3,
	{SinOsc.ar(EnvGen.kr(Env([400,600,500,700,200,550,350,1000, 900, 1000, 400],
		[0.07,0.07,0.07,0.07,0.07,0.07,0.9, 0.1, 0.1])),
		0,
		EnvGen.kr(Env([0, 0.3, 0.3, 0],
		[0.1, 0.35, 1.9]), doneAction:2))}
).play
)

I wouldn’t say it’s tricky. It’s important to understand that there’s a fundamental difference between constant pitches which are slightly changing from event to event (“as if” glissando) and a sequence of events where each synth is performing a “real” glissando. To show it graphically:

(a)

o---
 o---
  o---
   o---


(b)

o
 \
  o
   \
    o
     \
      o
       \

To achieve the second type with Patterns you can use the asMap method for reading from a bus or define a SynthDef with an In ugen.
Examples for both types of glissando are collected in miSCellaneous_lib quark’s tutorial “Event patterns and LFOs”.

Thank you for you answer @dkmayer :slightly_smiling_face: