PbindFX/Pfx/Pfxb to external hardware input

Hello,

Is there a simple way to play a whole pattern on a specific bus with Pfxb or PbindFX ?
Something like => Pfxb( Pbind(\dur, 1), \fx, \out, “hardware output”);

It would be very convenient to have the possibility to allocate a whole Pdef to a specific output. Some one as already done something similar while keeping the “fx included” paradigm?

Thanks

Hi,

as far as it concerns PbindFx, you can route to any available out num via the ‘out’ key (see help file Ex. 2d, there it’s an internal bus number though), similar as you could do with an ordinary Pbind.

Thanks Daniel,

I was not even trying that simple way cause it was not working with Pfxb
Thanks for the great work.

ph

For Pfxb, it’s possible but not at all obvious (I had to read the class source code to understand it):

s.boot;

(
SynthDef(\filter, { |out, gate = 1, ffreq = 2000|
	var sig = In.ar(out, 2);
	sig = LPF.ar(sig, ffreq);
	ReplaceOut.ar(out, sig);
}).add;

b = Bus.audio(s, 2);  // private bus
)

(
p = Pchain(
	Pfxb(
		Pbind(\degree, Pn(Pseries(0, 1, 8), inf), \dur, 0.25),
		\filter,
		\ffreq, 900
	),
	(out: b)  // set private bus here
).play;
)

s.scope(2, b.index);  // signal is on the private bus

p.stop;

I’m not sure this really fits into the pattern system’s design.

Patterns don’t play on buses. They create events. If those events play synths, they can pass parameters to tell the synths to play on specific buses.

So to “allocate a whole Pdef to a specific output” means to have the Pdef automatically forward an output-bus parameter to the pattern that it’s controlling. In most cases that would be by inserting \out, busIndex into the output events. But, as we just saw, Pfxb is different. There isn’t a standardized way that Pdef can do it.

In the ddwChucklib quark, I introduced the idea of a “musical process,” which is a pattern plus all of the resources needed to run the pattern. With this, you can write the constructor/destructor logic once in the “process prototype,” and then this runs automatically every time you create a playable instance of the prototype. Then this is an object which plays onto a bus.

hjh

use mididef in order to send midi out. if you are just trying to send control voltage out just scale the voltage of the signal to the desired output. if you are trying to make the same using opensoundcontrol just use oscfunc

MIDIdef and OSCFunc are for input (receiving). They don’t send anything to remote devices. Any readers trying to follow this advice will get terribly confused.

hjh