Simple vibrato examples
the while true way
#import Modules
var SinOsc sin ~> dac;
var SinOsc lfo ~> blackhole;
4 => lfo.freq;
5 => lfo.amp;
var int base;
spork {
while(true) {
lfo.last() + base => sin.freq;
samp => now;
}
};
repeat(3) {
foreach(note : [ `c3`, `d3`, `e3`, `g3` ]) {
note :=> base;
.25::second => now;
}
}
the Sifting way
Alternatively you can use the Sift
operator
#import Modules
var SinOsc sin ~> dac;
var SinOsc lfo ~> blackhole;
4 => lfo.freq;
10 => lfo.amp;
var int base;
lfo |> \a { a + base } |> sin.freq;
repeat(3) {
foreach(note : [ `c3`, `d3`, `e3`, `g3` ]) {
note :=> base;
.25::second => now;
}
}