Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor bug in an IEnvGen example #1276

Closed
eleses opened this issue Dec 14, 2014 · 0 comments
Closed

minor bug in an IEnvGen example #1276

eleses opened this issue Dec 14, 2014 · 0 comments
Labels
comp: help schelp documentation

Comments

@eleses
Copy link
Contributor

eleses commented Dec 14, 2014

The documentation contains the following example (2nd one):

// index with an SinOsc ... mouse controls amplitude of SinOsc
// use offset so negative values of SinOsc will map into the Env
(
{
    var sin = SinOsc.ar(440, 0, MouseX.kr(0, 1));
    // use offset so negative values of SinOsc will map into the Env
    var env = Env([-1, -0.7, 0.7, 1], [ 0.8666, 0.2666, 0.8668 ], \lin, -1.0);
    IEnvGen.ar(env, sin) * 0.1
}.play;
)

The line beginning with var env should most likely read

var env = Env([-1, -0.7, 0.7, 1], [ 0.8666, 0.2666, 0.8668 ], \lin, offset: -1.0);

instead. Offset is not the next parameter in order to Env; releaseNode is the next param but it has no effect here. You will get some DC-biased sound (hopefully unbiased by your output capacitor before it reaches speakers/phones) out of the example as-is (without offset), but it's probably not what's intended given the comment right above it...

@telephon telephon added the comp: help schelp documentation label Dec 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: help schelp documentation
Projects
None yet
Development

No branches or pull requests

2 participants