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

input leaks past filter, when synth is replaced only #43

Open
telephon opened this issue Feb 3, 2018 · 10 comments
Open

input leaks past filter, when synth is replaced only #43

telephon opened this issue Feb 3, 2018 · 10 comments

Comments

@telephon
Copy link
Collaborator

telephon commented Feb 3, 2018

// problem in attack phase: input leaks past filter

t = Steno.push(2);


t.filter(\f, { |in| (100, 200..1000).sum { |freq| BPF.ar(in, freq, 0.01) } });
t.quelle(\n, { WhiteNoise.ar(0.4) });



--!nf // evaluate this line several times


// each time, the noise comes through

t.fadeTime = 1;

--!nf // evaluate this line several times …
@telephon
Copy link
Collaborator Author

telephon commented Feb 4, 2018

@LFSaw do you have an idea where we have introduced this problem? I'll try and fix it, but maybe you have a hint.

@telephon telephon changed the title input leaks past filter input leaks past filter, when synth is replaced only Feb 4, 2018
@telephon
Copy link
Collaborator Author

telephon commented Feb 4, 2018

@LFSaw
Copy link
Contributor

LFSaw commented Feb 5, 2018

minor revelation it is not an order of execution (caused by the force-reload of everything):

s.boot;
t = Steno.push(2);


t.filter(\f, { |in| (100, 200..1000).sum { |freq| BPF.ar(in, freq, 0.01) } });
t.filter(\g, { |in| (100, 200..1000).sum { |freq| BPF.ar(in, freq, 0.01) } });
t.quelle(\n, { WhiteNoise.ar(0.4) });

t.settings.globalSettings // nothing set, also no proto or parent

--nf // evaluate alternate between these two lines
--ng

// each time, the noise comes through, still.

If I change the filter definition to something simple, the burst gets shorter

t.filter(\f, { |in| 0.5 * in });
t.filter(\g, { |in| 0.2 * in });
t.quelle(\n, { WhiteNoise.ar(0.4) });

--!ng

@telephon
Copy link
Collaborator Author

telephon commented Feb 5, 2018

probably the silence is detected earlier and the synth freed earlier then …

@LFSaw
Copy link
Contributor

LFSaw commented Feb 5, 2018

why is the freeselfwhensilent happening before the mix?

this.freeSelfWhenSilent(signal);

@LFSaw
Copy link
Contributor

LFSaw commented Feb 5, 2018

for the sake of ease of understanding, I'd appreciate tackling naming issues first.

Specifically, I'd like to get a definition of what is associated with variables

inputSignal // input to filter (first argument in user-settable function)
oldSignal // previous signal on bus (not necessarily the same as inputSignal)
signal // signal routed to outBus
tailSignal // signal routed to tailBus

is this correct for all?

@telephon
Copy link
Collaborator Author

telephon commented Feb 5, 2018

some corrections:

  1. inputSignal – input to filter (first argument in user-settable function) (maps to in arg).
  2. oldSignal – previous signal on bus (not necessarily the same as inputSignal, and not necessarily the filter input) (maps to out arg).
  3. signal – signal routed to outBus (currently, no. currently, this is also routed partly to tailBus, in the method writeToBus)
  4. tailSignal – signal read from tailBus (tailBus arg).

@telephon
Copy link
Collaborator Author

telephon commented Feb 5, 2018

why is the freeselfwhensilent happening before the mix?

because after the mix of the previous bus signal (oldSignal), it might never become silent. Probably we need to combine the mix parameter with the envelope. Because otherwise, we add the oldSignal to the mix twice (but this is unrelated to the current issue).

@telephon
Copy link
Collaborator Author

telephon commented Feb 5, 2018

btw. I've just moved the routing function from Steno to StenoSignal, for clarity.

telephon added a commit that referenced this issue Feb 5, 2018
this improves on #43, not clear yet if it is a full fix.
@telephon
Copy link
Collaborator Author

telephon commented Feb 5, 2018

This is now almost fixed …

just adding/removing parentheses leaks a little:

t = Steno.push(2);
t.filter(\f, { |in, e| BPF.ar(in, 600 * (e[\index] + 1), 0.01)  * 8 });
t.quelle(\n, { WhiteNoise.ar(0.4) });
--n[f f f]
--nf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants