[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Global Variables and Ppar



Hmm, it "should" work.

But ~mel is shorthand for currentEnvironment[\mel].
So perhaps something in your code is changing currentEnvironment
As a simple work around, try

	Ppar([topEnvironment[\bd], topEnvironment[\mel] ]).play

(Look in the Environment help page for more details.)

Cheers,

RJK

> On Dec 23, 2016, at 8:32 AM, robin149 <prandrews@xxxxxxxxxxxxx> wrote:
> 
> Could someone explain why this works:
> 
> 
> (
> var mel, bd;
> //bass drum pattern
> bd = Pbind(*[
> 	instrument:\bd,
> 	dur:Pseq([Pseq([2],14),4],inf),
> 	amp:0.4,
> ]);
> 
> //melody pattern
> mel = Pbind(*[
> 	stepsPerOctave: 7,
> 	instrument:\varsaw,
> 	dur:Pseq([0.5, 0.25, 0.25], inf),
> 		note:Pseq([0,1,0,-1],inf),
> 	]);
> 
> Ppar([mel, bd]).play.trace;
> )
> 
> but this doesn't:
> 
> (
> //bass drum pattern
> ~bd = Pbind(*[
> 	instrument:\bd,
> 	dur:Pseq([Pseq([2],14),4],inf),
> 	amp:0.4,
> ]);
> 
> //melody pattern
> ~mel = Pbind(*[
> 	stepsPerOctave: 7,
> 	instrument:\varsaw,
> 	dur:Pseq([0.5, 0.25, 0.25], inf),
> 		note:Pseq([0,1,0,-1],inf),
> 	]);
> )
> 
> Ppar([~mel, ~bd]).play
> 
> ? Strangely, ~mel.play works fine. What am I missing here please?
> 
> 
> 
> 
> 
> --
> View this message in context: http://new-supercollider-mailing-lists-forums-use-these.2681727.n2.nabble.com/Global-Variables-and-Ppar-tp7629702.html
> Sent from the SuperCollider Users New (Use this!!!!) mailing list archive at Nabble.com.
> 
> _______________________________________________
> sc-users mailing list
> 
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: https://listarc.bham.ac.uk/marchives/sc-users/
> search: https://listarc.bham.ac.uk/lists/sc-users/search/


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/