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

Re: [sc-users] changing parameters in a running Pbind



On December 28, 2015 8:55:15 AM Daniel Mayer <daniel-mayer@xxxxxxxx> wrote:

Am 28.12.2015 um 00:34 schrieb Rags musicaal <ragsmusica@xxxxxxxxx>:

This is the pattern. I want to change f1 on the fly with a midi controller.
(
~seqArp1 = Pseq(([60, 74, 67, 74, 64, 79, 72, 79]-24).midicps, inf).asStream;
~patArp1 = Pbind(
	\instrument, \vocal,
	\freq, ~seqArp1,
	\f1, HERE I NEED SOMETHING,
	\dur, 0.25
	).play;
)

Should I use a bus?

Hi,

you don't need to employ a bus here

It depends on the desired behavior. The desired behavior is, here, incompletely specified: Rags' post says only that a MIDI controller should "change f1 on the fly" but really we need more details before implementing any solution.

Key question: Do you want the MIDI controller to specify a value that each note will hold separately? Or do you want the controller to update all the notes continuously (like holding down keys on a MIDI keyboard and moving a controller while the notes are playing)?

Daniel's approach here handles the first case. It does not do the second.

(
// define MIDIFunc to assign midi num to variable
MIDIFunc.noteOn { |vel, num, chan, src| ~f1 = num };

MIDIIn.doNoteOnAction(1, 1, 55, 60); // spoof a note on

~seqArp1 = Pseq(([60, 74, 67, 74, 64, 79, 72, 79]-24).midicps, inf);
~patArp1 = Pbind(
	\instrument, \vocal,
	\freq, ~seqArp1,
	\f1, Pfunc { ~f1.midicps },
	\dur, 0.25
	).trace.play;
)

If the second is what you want, you have two choices:

1. Use a control bus. The MIDIFunc should do ~myKrBus.set(theValue), and the Pbind would then include \f1, ~myKrBus.asMap -- now all synths will read f1 from the bus.

2. Or, create a Group and have the Pbind put all the synths into that group: \group, ~myGroup. Then the MIDIFunc can do ~myGroup.set(\f1, theValue).

For myself, I tend to use buses because then I can switch transparently between external control and automation synths. Control buses cost no more CPU than setting regular controls. That's a matter of personal preference, though -- nothing wrong with using a Group.

hjh

Sent with AquaMail for Android
http://www.aqua-mail.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/