[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] Immediate Pattern Update via Environment
Pbindef has the same problem in that it will start at the first \midinote
each time it is sent:
Pbindef(\Pattern1, \instrument, "bass").play;
Pbindef(\Pattern1, \midinote, Pseq([100, 69, 70], inf).asStream);
Pdefn(\Pattern1).event.place(\midinote, Pseq([36, 37, 38, 39, 51, 41,
42, 43, 44, 45, 46, 47, 48, 49, 50, 51], inf));
This doesn't work as the message is not understood by SC?!
There must be a conventional way of updating only certain notes in a pattern
on-the-fly with SC, it would seem a crazy omission otherwise.
Thanks for your help so far.
Julian Rohrhuber wrote:
>
>> > for me it seems to change immediately.
>>>
>>> I needed to use store rather than load.
>>>
>>> if you write:
>>> \midinote, Pfunc { e.midinote },
>>>
>>> this should work out.
>>>
>>>
>>
>>
>>Thank you Julian.
>>
>>This only brings to mind two other questions though, if I may?
>>
>>With the following in place:
>>
>>(
>> // Set Pattern1 environment first with initial values
>> Pdefn(\Pattern1).set
>> (
>> \instrument, "bass",
>> \midinote, Pseq([36, 37, 38, 39, 40, 41, 42,
>>43, 44, 45, 46, 47, 48, 49,
>>50, 51], inf).asStream,
>> \dur, Pseq([1.0,1.0,1.0,1.0], inf),
>> \legato, Pseq([0.9, 0.3, 0.3, 0.3, 0.3], 1),
>> \amp, 0.5,
>> \detune, 0.005
>> );
>> // Need to refer to Pattern1 environment in some way so
>>create a variable =
>>envir
>> e = Pdefn(\Pattern1).envir;
>> // Define Pattern1
>> Pdefn //(key,Pattern)
>> (
>> \Pattern1,
>> {
>> arg e;
>> Pbind
>> (
>> \instrument, e.instrument,
>> \midinote, Pfunc { e.midinote },
>> \dur, e.dur,
>> \legato, e.legato, //
>>/legato is a common synth parameter (find out
>>others)
>> \amp, e.amp,
>> \detune, e.detune
>> )
>> }
>> );
>>)
>>
>>I then change only one midinote in the sequence as follows:
>>
>>Pdefn(\Pattern1).set(\midinote, Pseq([36, 37, 38, 39, 51, 41, 42, 43, 44,
>>45, 46, 47, 48, 49, 50, 51], inf).asStream);
>>
>>This however, resets the pattern. How can I change one element of the
>>original Pseq whilst leaving the rest of the notes to play as per the
>>original Pseq?
>>
>>Can I also change multiple elements at a time, still leaving those
elements
>>that are unchanged in place?
>
> you may want to try:
> Pdefn(\Pattern1).event.place(\midinote, Pseq([36, 37, 38, 39, 51, 41,
> 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], inf));
>
> (here you need to do this for each key you wish to change, can be at
> the same time, but I forgot to implement key value pairs like in
> "set").
>
> the second time you do it, it should be updating immediately.
>
> Also have a look at Pbindef, maybe that helps you, too. The dewdrop
> lib(see quark) provides also further possibilities along these lines.
>
> --
>
>
>
>
>
> .
>
> _______________________________________________
> 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/
>
>
--
View this message in context: http://www.nabble.com/Immediate-Pattern-Update-via-Environment-tp22427171p22456133.html
Sent from the Supercollider - User mailing list archive at Nabble.com.
_______________________________________________
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/