File: InterplEnv.schelp

package info (click to toggle)
supercollider 1%3A3.7.0~repack-4%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 34,364 kB
  • sloc: cpp: 197,140; ansic: 72,013; lisp: 63,505; sh: 14,009; python: 1,992; perl: 766; makefile: 679; java: 677; xml: 326; yacc: 309; lex: 175; ruby: 173; objc: 65
file content (76 lines) | stat: -rw-r--r-- 2,758 bytes parent folder | download | duplicates (2)
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
class:: InterplEnv
summary:: envelope specification
related:: Classes/IEnvGen, Classes/Env
categories:: Control, Envelopes

description::
An InterplEnv is a specification for a segmented envelope. InterplEnvs can be used both server-side, by an link::Classes/IEnvGen:: within a SynthDef, and clientside, with methods such as at. An InterplEnv can have any number of segments. An InterplEnv can have several shapes for its segments.

note::InterplEnv is now replaced by Env, and  will be removed in the future. Env supports all functionality of InterplEnv::

subsection::Differences between InterplEnv and Env
InterplEnvs do not have release or loop nodes.  They are of a fixed duration. Mostly, it is meant to be used with IEnvGen, where 'times' are actually an strong::index into the envelope:: shape.

ClassMethods::

private::initClass

method::new
Create a new envelope specification.

argument::levels
an array of levels. The first level is the initial value of the envelope.

argument::times
an array of durations of segments in seconds. There should be one fewer duration than there are levels.

argument::curve
a link::Classes/Symbol::, link::Classes/Float::, or an link::Classes/Array:: of those. Determines the shape of the envelope segments.

The possible values are:
table::
## code::\step:: || || flat segments
## code::\linear:: || code::\lin:: || linear segments, the default
## code::\exponential:: || code::\exp:: || natural exponential growth and decay. In this case, the levels must all be nonzero and the have the same sign.
## code::\sine:: || code::\sin:: || sinusoidal S shaped segments.
## code::\welch:: || code::\wel:: || sinusoidal segments shaped like the sides of a Welch window.
## code::\squared::  || code::\sqr:: || squared segment
## code::\cubed:: || code::\cub:: || cubed segment
## a link::Classes/Float:: || || a curvature value for all segments. 0 means linear, positive and negative numbers curve the segment up and down.
## an link::Classes/Array:: of symbols or floats || || curvature values for each segment.
::

argument::offset
used to offset an envelope into negative starttimes.

copymethod:: Env *newClear

InstanceMethods::

private::prAsArray

method::plot
Plot this envelope's shape in a window.

argument::size
The size of the plot.

argument::bounds
The window bounds (a link::Classes/Rect::).

argument::minval

argument::maxval

argument::parent

method::asArray
Converts the InterplEnv to an Array in a specially ordered format. This allows for InterplEnv parameters to be settable arguments in a link::Classes/SynthDef::.

subsection::Client-side Access and Stream Support

method::at
Returns the value of the InterplEnv at time.
code::
InterplEnv([0, 1, 0.707], [0.2, 1.3], [\lin, \sin]).at(0.5);
::