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

Re: [sc-users] pdef inside synthdef



so what you want is to have parallel sequences of notes, each with different parameters?

then event type \phrase might be the way to go?

(
Pdef(\holi, { Pbind(\instrument, \holo,
			\freq, 50.rand + 1,
\dur, Pseq.new([20.rand * 0.1 , 0.5, 0.25, 0.5], inf); // dur arg
		})
);
)

Pdef(\seqs,
	Pbind(
		\type, \phrase,
		\instrument, \holi,
		\legato, 2,
		\pan, Prand([-1, 1], inf)
	)
).play;




hello thanks but removing  the synthdef doesnt work, i need to put a
pattern inside a synthdef because i need to be able to control the
pattern time with "set" when the synth is created .

On Mon, 22 Dec 2008 15:09:38 +0100, "Julian Rohrhuber"
<rohrhuber@xxxxxxxxxxxxxx> said:
 >hello im having a problem with pdef.  I need to put a pdef inside a
 >synthdef. Ive tried the following code but it doesnt work , the idea is
 >when i create a "holi" synth it shouild create a rythmical pattern , any
 >idea whats am i doing wrong?


 unfortunately, patterns cannot be part of a SynthDef. So you can't
 mix Pdef and ugens directly. But your example does not need any such
 combination, just remove the SynthDef and replace it by Pdef:

 (
 Pdef(\holi, Pbind(\instrument, \holo,
			\freq, 50.rand + 1,
			\dur, Pseq.new([20.rand * 0.1 , 0.5, 0.25,
 0.5], inf);  // dur arg
		)
 ).play;
 )



 >thanks
 >
 >
 >(
 >SynthDef(\holo, { arg freq= 229, amp = 0.1, pan= 0.0;
 >var signal, env;
 >env= EnvGen.ar(Env.perc, doneAction:2);
 >signal =SinOsc.ar(freq,0.5) * env;
 >
 >signal = Pan2.ar(signal, pan);
 >Out.ar(0,signal);
 >}).load(s);
 >)
 >
 >(
 >SynthDef(\holi, { arg freq= 9, amp = 0.1, pan= 0.0;
 >var signal, env;
 >  Pdef(\example1,
 >		Pbind(\instrument, \holo,
 >					\freq, 50.rand + 1,
 >					\dur, Pseq.new([20.rand * 0.1
 >, 0.5, 0.25, 0.5], inf);  // dur arg
 >
 >		)			).play;
 >
 >}
 >))
 >
 >
 >Synth(\holi)
 >
 >--
 >   simeon cosik
 >   simeon_cosik@xxxxxxxxxxx
 >
 >--
 >http://www.fastmail.fm - A fast, anti-spam email service.
 >
 >
 >_______________________________________________
 >sc-users mailing list
 >
 >info (subscription, etc.):
 >http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
 >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.beast.bham.ac.uk/research/sc_mailing_lists.shtml
 archive: https://listarc.bham.ac.uk/marchives/sc-users/
 search: https://listarc.bham.ac.uk/lists/sc-users/search/
--
  simeon cosik
  simeon_cosik@xxxxxxxxxxx

--
http://www.fastmail.fm - Faster than the air-speed velocity of an
                          unladen european swallow


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
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.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/