ModalFreq
Control rate player
This uses the same pitch model as Event Patterns.
see the Pitch model here: Streams-Patterns-Events5
ModalFreq.new( degree, scaleArray, root, octave, stepsPerOctave )
degree
a control rate player such as StreamKrDur that outputs degrees 0..12
scaleArray
a FloatArray used to map degrees to pitches
root
octave
stepsPerOctave
This actually returns a Patch using the pseudo-ugen ModalFreqUGen.
Used as a kr rate Player.
(
m = ModalFreq.new(
StreamKrDur.new(Pseq(Array.series(12,1),inf), 0.25, 0.1),
FloatArray[ 1,3,5,7,9,11 ],
0,
StreamKrDur(Pbrown(2,6,1) + Pseq([0,1,2,4,8],inf),Prand([0.25,1.0,4.0,8.0])),
8
);
Patch({ arg freq=200;
Pulse.ar(
[freq, freq * 0.5],
LFNoise1.kr([0.3,0.1],0.5,0.5),
0.1)
},[
m
]).play
)
Used as a Stream.
It can be used directly in a Pbind, but there's not much point since the pattern event system already has the same pitch model.
(
Pbind(
\freq, ModalFreq(Pseq([1,2,3,4],inf))
).play
)
Here its used as a stream, and its StreamKrDur iterating the stream and setting the values of a bus on the server.
(
Patch({ arg freq=100,amp=1.0;
SinOsc.ar([freq,freq + 30],0,amp)
},[
StreamKrDur(
ModalFreq(Pseq([1,2,3,4],inf)),
Pseq([0.25,0.5,0.75],inf),
0.1),
1
]).play;
)