Routing Pbindef to effect

I was playing around with trying to find a simple way to route the output of a Pbindef to an effect, and came up with this:

Pbindef(\a, \note, Pbrown(-12,12,3), \dur, 1/2, \legato, 0.1).play;
Ndef(\r).filter(0, GVerb.ar(_)).play;
Pbindef(\a, \out, Ndef(\r).bus);

Is this a reasonable syntax, or have I done something weird here?!

1 Like

That’s what I do.

I find it more intuitive and pattern-centric than the more documented or typical way of setting a pattern as a source for a nodeproxy

e.g.

Ndef(\n).source = Pbind(...)

Either way works the same - the \out property of the event is ultimately set to the bus of the nodeproxy but doing it the way you are has the benefit of retaining direct access to the pattern where you can compose or pchain it into other patterns which is not as straightforward, imo, with the nodeproxy source approach.

I think it boils down to a stylistic preference…

1 Like

I prefer to avoid having to mess with \out directly, so I might do something like this (using different “slots” on the Ndef to make a chain of various sources or effects):

Ndef(\r).filter(10, GVerb.ar(_)).set(\wet10, 0.2).play;
Ndef(\r)[0] = Pbindef(\a);

Pbindef(\a, \note, Pseq((0..3), inf));
Pbindef(\a, \dur, 1/4, \legato, 0.1);
1 Like

For reverb that’s probably the easiest way to go. You can also use miSCellaneous_lib’s PbindFx with Pbindefs as input for source and fxs. That allows to define the fx graph per event and replace source and fx key streams on the fly (PbindFx help file Ex. 7c). However, reverb is more CPU-intense and you’d probably not need separate reverbs for each event (except for strange reverb fxs with changing params). Exs. 2c and 2d compare sequenced and continously running reverb.

1 Like