File: LagUD.schelp

package info (click to toggle)
supercollider 1%3A3.11.2%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 71,152 kB
  • sloc: cpp: 387,846; lisp: 80,328; ansic: 76,515; sh: 22,779; python: 7,932; makefile: 2,333; perl: 1,123; javascript: 915; java: 677; xml: 582; yacc: 314; lex: 175; objc: 152; ruby: 136
file content (44 lines) | stat: -rw-r--r-- 1,141 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
class:: LagUD
summary:: Exponential lag
categories:: UGens>Filters
related:: Classes/Lag, Classes/Lag2, Classes/Lag3, Classes/Lag2UD, Classes/Lag3UD

description::
This is essentially the same as link::Classes/Lag:: except that you can supply a different 60 dB time for when the signal goes up, from when the signal goes down. This is useful for smoothing out control signals, where "fade in" should be different from "fade out".

classmethods::
method:: ar, kr

argument:: in
input signal.
argument:: lagTimeU
60 dB lag time in seconds for the upgoing signal.
argument:: lagTimeD
60 dB lag time in seconds for the downgoing signal.
argument:: mul
argument:: add

examples::
code::
// used to lag pitch
(
SynthDef(\lagud_help, { |out, freq=300, lagup=1, lagdown=5|
	Out.ar(out,
		SinOsc.ar( // sine wave
			LagUD.kr( // lag the frequency
				freq,
				lagup,
				lagdown
			),
			0, // phase
			0.2 // sine amplitude
		)
	);
}).add;
)

x = Synth(\lagud_help); // create the synth
x.set(\freq, 500); // set the frequency to a higher value (takes 1 second)
x.set(\freq, 100); // set the frequency to a lower value (takes 5 seconds)
x.free;
::