> 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?