Store some part of a patterns in somewhere else?

Hi .

So I’m using midiout to send some patterns out and I have to repeat a part of code in all the other patterns to do so.
is there any way to store them inside a variable or something so I don’t have to repeat all of them in other subpatterns ?

z = Pbindef(\p1,
	\type, \midi,
	\midicmd, \noteOn,
	\midiout, m,
	\chan, 0,
)

Thanks .

Yep.

Pbindef(\p1,
	\type, \midi,
	\midicmd, \noteOn,
	\midiout, m,
	\chan, 0,
);

p = Pchain(
	Pbind(
		... all your note stuff in here...
	),
	Pbindef(\p1)
).play;

(Pbind(...) <> Pbindef(\p1)) means the same.

hjh

1 Like