Daniel Mayer
2014-09-05 00:11:37 UTC
Asking myself if this is intended,
DemandEnvGen's levelBias works like this
(
SynthDef(\offset_test_1, { |out = 0, levels = #[0,1], times = #[1,1],
levelScale = 1, levelBias = 0, timeScale = 1, gate = 1, t_reset = 1|
var freq = DemandEnvGen.kr(
Dseq(levels, inf),
Dseq(times, inf),
1, 1, gate, t_reset, levelScale, levelBias, timeScale
) + 30;
Out.ar(out, SinOsc.ar(freq.poll, 0, 0.1) * EnvGen.kr(Env.asr, gate, doneAction: 2))
}).add;
)
// levelBias isn't there from the beginning but reached at the next level
x = Synth(\offset_test_1, [levelScale: 20, levelBias: 200]);
// reset at next breakpoint, means drift to levelBias at breakpoint thereafter
x.set(\levelBias, 300, \t_reset, 0.5)
// immediate reset also doesn't immediately add levelBias
x.set(\levelBias, 200, \t_reset, 2)
x.release;
Ok, the last behaviour, restarting from 0, is at least consistent in itself
but not adding levelBias from the start isn't in complicance with EnvGen:
(
SynthDef(\offset_test_2, { |out = 0, levels = #[0,1,0], times = #[1,1],
levelScale = 1, levelBias = 0, timeScale = 1, gate = 1|
var freq = EnvGen.kr(Env(levels, times), gate, levelScale, levelBias, timeScale);
Out.ar(out, SinOsc.ar(freq.poll, 0, 0.1) * EnvGen.kr(Env.asr, gate, doneAction: 2))
}).add;
)
// Here offset is added immediately
x = Synth(\offset_test_2, [levelScale: 20, levelBias: 200, timeScale: 5]);
x.release;
So actually an offset cannot be passed immediately to DemandEnvGen,
it must be added outside, right ?
Greetings
Daniel
-----------------------------
www.daniel-mayer.at
-----------------------------
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/
DemandEnvGen's levelBias works like this
(
SynthDef(\offset_test_1, { |out = 0, levels = #[0,1], times = #[1,1],
levelScale = 1, levelBias = 0, timeScale = 1, gate = 1, t_reset = 1|
var freq = DemandEnvGen.kr(
Dseq(levels, inf),
Dseq(times, inf),
1, 1, gate, t_reset, levelScale, levelBias, timeScale
) + 30;
Out.ar(out, SinOsc.ar(freq.poll, 0, 0.1) * EnvGen.kr(Env.asr, gate, doneAction: 2))
}).add;
)
// levelBias isn't there from the beginning but reached at the next level
x = Synth(\offset_test_1, [levelScale: 20, levelBias: 200]);
// reset at next breakpoint, means drift to levelBias at breakpoint thereafter
x.set(\levelBias, 300, \t_reset, 0.5)
// immediate reset also doesn't immediately add levelBias
x.set(\levelBias, 200, \t_reset, 2)
x.release;
Ok, the last behaviour, restarting from 0, is at least consistent in itself
but not adding levelBias from the start isn't in complicance with EnvGen:
(
SynthDef(\offset_test_2, { |out = 0, levels = #[0,1,0], times = #[1,1],
levelScale = 1, levelBias = 0, timeScale = 1, gate = 1|
var freq = EnvGen.kr(Env(levels, times), gate, levelScale, levelBias, timeScale);
Out.ar(out, SinOsc.ar(freq.poll, 0, 0.1) * EnvGen.kr(Env.asr, gate, doneAction: 2))
}).add;
)
// Here offset is added immediately
x = Synth(\offset_test_2, [levelScale: 20, levelBias: 200, timeScale: 5]);
x.release;
So actually an offset cannot be passed immediately to DemandEnvGen,
it must be added outside, right ?
Greetings
Daniel
-----------------------------
www.daniel-mayer.at
-----------------------------
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: http://www.listarc.bham.ac.uk/marchives/sc-users/
search: http://www.listarc.bham.ac.uk/lists/sc-users/search/