File: LFPar.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 (79 lines) | stat: -rw-r--r-- 2,007 bytes parent folder | download | duplicates (3)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
class:: LFPar
summary:: Parabolic oscillator
related:: Classes/LFCub, Classes/LFPulse, Classes/LFSaw, Classes/LFTri
categories::  UGens>Generators>Deterministic


Description::

A sine-like shape made of two parabolas and the integral of a triangular wave.  It has audible odd harmonics and is non-band-limited.
Output ranges from -1 to +1.

classmethods::

method::ar, kr

argument::freq
Frequency in Hertz.

argument::iphase

Initial phase offset. For efficiency reasons this is a value ranging from 0 to 4.


argument::mul
Output will be multiplied by this value.

argument::add
This value will be added to the output.

Examples::

code::
// a plot
{ LFPar.ar(Line.kr(100, 800, 0.1)) }.plot(0.1);

// 440 Hz wave
{ LFPar.ar(440) * 0.1 }.play;

// modulating frequency:
{ LFPar.ar(XLine.kr(100, 2000, 10)) * 0.1 }.play;

// amplitude modulation:
{ LFPar.kr(XLine.kr(1, 200, 10)) * SinOsc.ar(440) * 0.1 }.play;

// used as both Oscillator and LFO:
{ LFPar.ar(LFPar.kr(3, 0.3, 200, 400)) * 0.1 }.play;

// used as phase modulator (behaves like a triangular modulator in FM):
// Compare:
{SinOsc.ar(440, LFPar.ar(1, 2, mul: 8pi))}.play
{SinOsc.ar(440 + LFTri.ar(1, mul: 8pi))}.play


// more examples:

{ LFPar.ar(LFPar.kr(LFPar.kr(0.2,0,8,10), 0, 400,800),0,0.1) }.play
{ LFPar.ar(LFPar.kr(0.2, 0, 400,800),0,0.1) }.play
{ LFPar.ar(800,0,0.1) }.play
{ LFPar.ar(XLine.kr(100,8000,30),0,0.1) }.play


// compare:

{ LFCub.ar(LFCub.kr(LFCub.kr(0.2,0,8,10),0, 400,800),0,0.1) }.play
{ LFCub.ar(LFCub.kr(0.2, 0, 400,800),0,0.1) }.play
{ LFCub.ar(800,0,0.1) }.play
{ LFCub.ar(XLine.kr(100,8000,30),0,0.1) }.play

{ SinOsc.ar(SinOsc.kr(SinOsc.kr(0.2,0,8,10),0, 400,800),0,0.1) }.play
{ SinOsc.ar(SinOsc.kr(0.2, 0, 400,800),0,0.1) }.play
{ SinOsc.ar(800,0,0.1) }.play
{ SinOsc.ar(XLine.kr(100,8000,30),0,0.1) }.play

{ LFTri.ar(LFTri.kr(LFTri.kr(0.2,0,8,10),0, 400,800),0,0.1) }.play
{ LFTri.ar(LFTri.kr(0.2, 0, 400,800),0,0.1) }.play
{ LFTri.ar(800,0,0.1) }.play
{ LFTri.ar(XLine.kr(100,8000,30),0,0.1) }.play
::