A UGen that cross-fades the contents of a bus with an input signal. A linear cross-fade can go from 0.0 (previous bus contents preserved, no input signal added) via 0.5 (previous signal attenuated by -6 dB, input signal attenuated by -6 dB and added) to 1.0 (contents completely replaced by input signal).
===Examples===
// cross-fade two synths
val sin = play {
Out.ar(0, SinOsc.ar(440) * 0.1)
}
val noise = play(target = sin, addAction = addAfter) {
XOut.ar(0, PinkNoise.ar(0.1), xfade = "xfade".kr(0))
}
noise.set("xfade" -> 0.5) // both signals heard
noise.set("xfade" -> 1.0) // just noise
noise.set("xfade" -> 0.0) // just sine
- See also
- Note
The argument order is different from its sclang counterpart.
- Companion
- class
Type members
Value members
Concrete methods
- Value Params
- bus
bus index to write to. For an audio-rate UGen, this is an audio-bus, for a control-rate UGen, this is a control-bus.
- in
signal to write to the bus. If the UGen is audio-rate, the input must also be audio-rate.
- xfade
cross-fade value. The new bus contents will be
old_bus_content * (1 - xfade) + in * xfade
- Value Params
- bus
bus index to write to. For an audio-rate UGen, this is an audio-bus, for a control-rate UGen, this is a control-bus.
- in
signal to write to the bus. If the UGen is audio-rate, the input must also be audio-rate.
- xfade
cross-fade value. The new bus contents will be
old_bus_content * (1 - xfade) + in * xfade