A UGen that finds the largest value across the channels of its input signal, providing both the value and the index.
A UGen that finds the smallest value across the channels of its input signal, providing both the value and the index.
A UGen that finds the largest value in a buffer, providing both the value and the index.
A UGen that finds the largest value in a buffer, providing both the value and the index.
identifier of the buffer containing the values to analyze. It treats multi-channel buffers as monophonic, and indices will refer to the de-interleaved frames and channels.
when closed (zero), holds the last output value.
A UGen that finds the smallest value in a buffer, providing both the value and the index.
A UGen that finds the smallest value in a buffer, providing both the value and the index.
identifier of the buffer containing the values to analyze. It treats multi-channel buffers as monophonic, and indices will refer to the de-interleaved frames and channels.
when closed (zero), holds the last output value.
This is a UGen like Ramp
, but it always takes the shortest way around a
defined circle, wrapping values where appropriate.
This is a UGen like Ramp
, but it always takes the shortest way around a
defined circle, wrapping values where appropriate. This can be useful when
smoothing panning signals for speaker rings, for instance in Vector Base
Amplitude Panning.
The signal to be smoothed.
Ramp duration in seconds
The lower wrap value
The upper wrap value
Lag
Ramp
A digital filter UGen which aims at accurately modeling an analog filter.
A digital filter UGen which aims at accurately modeling an analog filter. It provides low-pass and high-pass modes, and the filter can be overdriven and will self-oscillate at high resonances.
Input signal to filter.
Cutoff frequency in Hertz.
Resonance of the filter. Resonance is minimal at 0.0
and high at 1.0
, above which the filter starts
overdrive and sound saturated (e.g. 1.2
).
Linear gain applied to the input signal.
The filter can be used in low-pass ( 0
) or high-pass
( 1
) mode.
Amount (amplitude) of noise added to the model.
A UGen that produces a scheduled sequences of trigger impulses.
A UGen that produces a scheduled sequences of trigger impulses. Trigger times
are provided as a list (buffer) of absolute offsets from time zero. A trigger is
output as a single control period of value 1
, after which output returns to
zero.
identifier of the buffer containing the offsets for the
triggers in seconds. The offsets are taken against the
start time of the synth or the last time a reset
was
received. They are not accumulative, and the behavior is
undefined if the values are not sorted in ascending
order. The buffer should be monophonic.
the number of values to use from the buffer. Typically,
this should be BufFrames.kr(buf)
.
resets the timer and begins reading the time offsets again at the start of the buffer.
this value is added to each of the buffer values. For
example, to delay the list of values all by half a
second, use a delay
of 0.5
. This parameter is only
updated at initialization or reset.
A UGen that produces a scheduled sequences of trigger impulses.
A UGen that produces a scheduled sequences of trigger impulses. Trigger times
are provided as a list (buffer) of relative durations between consecutive
events. A trigger is output as a single control period of value 1
, after
which output returns to zero.
identifier of the buffer containing the durations for
the triggers in seconds. A value represents a relative
offsets with respect to its predecessor. The first value
indicates the time between the start of the synth or
last reset
received and the first trigger. The buffer
should be monophonic.
the number of values to use from the buffer. Typically,
this should be BufFrames.kr(buf)
.
resets the timer and begins reading the time deltas again at the start of the buffer.
A UGen to store values in a buffer upon receiving a trigger.
A UGen to store values in a buffer upon receiving a trigger. When a trigger happens, the current input values are sampled and stored as the next consecutive frame of the buffer.
Storage starts at the buffer beginning and increments the write position until
the buffer is full. While the buffer is not yet full, the UGen outputs 1
,
then it outputs 0
. The buffer position can be reset using the reset
input.
Note that the UGen zeroes the buffer upon first instantiation, to ensure that out-of-date data is not confused with new data.
identifier of the buffer to write to. Its number of
channels should match those of in
.
(multi-channel) signal to write to the buffer. Its
number of channels should match those of buf
.
a non-positive to positive transition causes the UGen to append the current input values to the buffer
a non-positive to positive transition causes the write index into the buffer to be reset to zero. The contents of the buffer will also be filled with zeroes. If the buffer was full, the UGen output switches back to zero.
The argument order is different from its sclang counterpart.
A UGen for Vector Base Amplitude Panning (VBAP).
A UGen for Vector Base Amplitude Panning (VBAP). This allows for equal power panning of a source over an arbitrary array of equidistant speakers. Normally this would be a ring, a dome, or partial dome.
VBAP was created by Ville Pulkki. For more information on VBAP see http://www.acoustics.hut.fi/research/cat/vbap/ This version of VBAP for SC was ported from the ver. 0.99 PD code by Scott Wilson.
the number of output channels
the signal to be panned
id of a buffer containing data calculated by
VBAPSetup
. Its number of channels must correspond to
numChannels
+/- 180° from the median plane (i.e. straight ahead)
+/- 90° from the azimuth plane
A value from 0-100. When 0, if the signal is panned exactly to a speaker location the signal is only on that speaker. At values higher than 0, the signal will always be on more than one speaker. This can smooth the panning effect by making localisation blur more constant.
A UGen that finds the largest value across the channels of its input signal, providing both the value and the index.
A UGen that finds the largest value across the channels of its input signal, providing both the value and the index.
// randomly changing array of three numbers play { val tr = Impulse.kr(1) val sig = Vector.fill(3)(TIRand.kr(0, 100, tr)) sig.zipWithIndex.foreach { case (n, i) => n.poll(tr, s"sig[$i]") } val m = ArrayMax.kr(sig) m.value.poll(tr, "max-value") m.index.poll(tr, "max-index") () }
A UGen that finds the smallest value across the channels of its input signal, providing both the value and the index.
A UGen that finds the smallest value across the channels of its input signal, providing both the value and the index.
// randomly changing array of three numbers play { val tr = Impulse.kr(1) val sig = Vector.fill(3)(TIRand.kr(0, 100, tr)) sig.zipWithIndex.foreach { case (n, i) => n.poll(tr, s"sig[$i]") } val m = ArrayMin.kr(sig) m.value.poll(tr, "min-value") m.index.poll(tr, "min-index") () }
A UGen that finds the largest value in a buffer, providing both the value and the index.
A UGen that finds the largest value in a buffer, providing both the value and the index.
// simple test val b = Buffer(s) b.alloc(100) b.zero() b.set(33 -> 1.034) // verify that the 33rd value is detected... val x = play { val m = BufMax.kr(b.id) val tr = "poll".tr(1) m.value.poll(tr, "max-value") m.index.poll(tr, "max-index") () } // ...until we set a new maximum... b.set(74 -> 1.038); x.set("poll" -> 1) x.free(); b.free()
A UGen that finds the smallest value in a buffer, providing both the value and the index.
A UGen that finds the smallest value in a buffer, providing both the value and the index.
// simple test val b = Buffer(s) b.alloc(100) b.zero() b.set(33 -> -1.034) // verify that the 33rd value is detected... val x = play { val m = BufMin.kr(b.id) val tr = "poll".tr(1) m.value.poll(tr, "min-value") m.index.poll(tr, "min-index") () } // ...until we set a new minimum... b.set(74 -> -1.038); x.set("poll" -> 1) x.free(); b.free()
This is a UGen like Ramp
, but it always takes the shortest way around a
defined circle, wrapping values where appropriate.
This is a UGen like Ramp
, but it always takes the shortest way around a
defined circle, wrapping values where appropriate. This can be useful when
smoothing panning signals for speaker rings, for instance in Vector Base
Amplitude Panning.
Lag
Ramp
A digital filter UGen which aims at accurately modeling an analog filter.
A digital filter UGen which aims at accurately modeling an analog filter. It provides low-pass and high-pass modes, and the filter can be overdriven and will self-oscillate at high resonances.
A UGen that produces a scheduled sequences of trigger impulses.
A UGen that produces a scheduled sequences of trigger impulses. Trigger times
are provided as a list (buffer) of absolute offsets from time zero. A trigger is
output as a single control period of value 1
, after which output returns to
zero.
// trigger grains val b = Buffer(s) b.alloc(10) b.setData(Vector(1, 2, 3, 5, 8, 13, 21, 34, 55, 89).map(_ * 0.1f)) // quasi Fibonacci val x = play { val reset = "reset".tr val tr = ListTrig.kr(b.id, BufFrames.kr(b.id), reset) Timer.kr(tr).poll(tr, "timer") val env = EnvGen.ar(Env.perc(0.01, 0.1), gate = tr) SinOsc.ar(Seq(440, 460)) * env * 0.2 } x.set("reset" -> 1) // start anew x.free(); b.free()
A UGen that produces a scheduled sequences of trigger impulses.
A UGen that produces a scheduled sequences of trigger impulses. Trigger times
are provided as a list (buffer) of relative durations between consecutive
events. A trigger is output as a single control period of value 1
, after
which output returns to zero.
// trigger grains val b = Buffer(s) b.alloc(11) b.setData(Vector(1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89).map(_ * 0.1f)) // Fibonacci val x = play { val reset = "reset".tr val tr = ListTrig2.kr(b.id, BufFrames.kr(b.id), reset) Timer.kr(tr).poll(tr, "timer") val env = EnvGen.ar(Env.perc(0.01, 0.1), gate = tr) SinOsc.ar(Seq(440, 460)) * env * 0.2 } x.set("reset" -> 1) // start anew x.free(); b.free()
A UGen to store values in a buffer upon receiving a trigger.
A UGen to store values in a buffer upon receiving a trigger. When a trigger happens, the current input values are sampled and stored as the next consecutive frame of the buffer.
Storage starts at the buffer beginning and increments the write position until
the buffer is full. While the buffer is not yet full, the UGen outputs 1
,
then it outputs 0
. The buffer position can be reset using the reset
input.
Note that the UGen zeroes the buffer upon first instantiation, to ensure that out-of-date data is not confused with new data.
// fill buffer and plot on client side val b = Buffer(s) b.alloc(100) val x = play { val z = LFCub.kr(10) * EnvGen.kr(Env.linen(1, 2, 1), doneAction = freeSelf) Logger.kr(b.id, z, Impulse.kr(49), reset = 0) } // after synth has completed: b.getData(num = 100).foreach(_.plot()) x.free(); b.free()
The argument order is different from its sclang counterpart.
A UGen for Vector Base Amplitude Panning (VBAP).
A UGen for Vector Base Amplitude Panning (VBAP). This allows for equal power panning of a source over an arbitrary array of equidistant speakers. Normally this would be a ring, a dome, or partial dome.
VBAP was created by Ville Pulkki. For more information on VBAP see http://www.acoustics.hut.fi/research/cat/vbap/ This version of VBAP for SC was ported from the ver. 0.99 PD code by Scott Wilson.
// two-dimensional val a = VBAPSetup(2, Seq(0, 45, 90, 135, 180, -135, -90, -45)) // 8 channel ring val b = Buffer.alloc(s, a.bufferData.size) b.setn(a.bufferData) val x = play { val azi = "azi".kr(0) val ele = "ele".kr(0) val spr = "spr".kr(0) VBAP.ar(8, PinkNoise.ar(0.2), b.id, azi, ele, spr) } // test them out x.set("azi" -> a.directions(1).azi) x.set("azi" -> a.directions(2).azi) x.set("azi" -> a.directions(3).azi) // ... x.set("azi" -> a.directions(7).azi) x.set("azi" -> a.directions(0).azi) // try the spread x.set("spr" -> 20) x.set("spr" -> 100) // all speakers x.free(); b.free();
A UGen that finds the largest value across the channels of its input signal, providing both the value and the index.
multi-channel signal to analyze
BufMax
ArrayMin