[sc-users] [CRUCIAL] starting new InstrGateSpawners from InstrGateSpawner

felix felix at crucial-systems.com
Wed Jun 27 10:56:38 PDT 2007


igs.args[0] would be a Pseq

if you .value a Pseq you get the same Pseq back

while the InstrGateSpawner is playing it will be getting its values
from a stream made with pseq.asStream
this is the same way that Pbind works.


a = Pseq([1,2,3],inf).asStream;
b = Pseq([1,2,3],inf).asStream;
c = Pseq([1,2,3],inf).asStream;
u = Pseq([1,2,1],inf).asStream;

l = (); // dictionary to hold the recent values

i = InstrGateSpawner({ arg a,b,c; ... },
		Pfunc({ arg igs; var v;
					// get the next value in the a stream
					v = a.next;
					// store it
					l[\a] = v;
					v
			}),
		Pfunc({ arg igs; var v;
					v = b.next;
					l[\b] = v;
					// get values out of the storage
					l[\a] * v
			}),
			
		//etc




On 6/26/07, Charlls Quarra <charlls_quarra at yahoo.com.ar> wrote:
>
> Hi,
>
> i have various InstrGateSpawners that feed the delta
> from a Pseq like
>
> u = Pseq for deltas..
> InstrGateSpawner({ arg a , b , c; ... } , [ Pseq for a
> , Pseq for b, Pseq for c ] , u ).play
> InstrGateSpawner( ----- , u ).play
> ...
>
> and now, i want to replace some of the Pseq with a
> Pfunc _and_ read pattern stream current values, but
> Pfunc is passed the igs (from InstrGateSpawner i
> assume) and retrieveing igs.args[0].value doesn't seem
> to work to fetching the current value, how do i
> retrieve the values that are being feed in a
> particular igs to be used possibly from some of the
> patterns?


More information about the sc-users mailing list