-
Notifications
You must be signed in to change notification settings - Fork 757
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
Delay1's first output sample is its input, rather than 0 #1313
Comments
The
This will output Somehow I have a hard time testing this though. |
Trying your example (and a variant) I do get the expected result.
Returns: |
Probably close this one. I must have been seeing this only in my faulty (now-retired) local branch. Using a new local branch, forked off from very recent master, I don't see the problem anymore.
Same for kr. |
I need to reopen this issue. I just got bitten by it in a class yesterday.
The context in class was to demonstrate the lowpass-ish behavior of a two point averaging filter:
EDIT: What I don't understand is why we are getting different behavior in different systems, at different times. According to https://github.com/supercollider/supercollider/blame/28aea6c19309ee496dc73fb32a85fd8e1dc25016/server/plugins/FilterUGens.cpp#L1951, the line |
Yes, this is wrong, and I'll bump this up to the top of the list for the next batch of init sample fixes.
|
PR opened: #6110 I also tested all examples in this thread to confirm they're fixed. |
Are we absolutely sure this is correct, in Delay1?
Specifically
unit->m_x1 = ZIN0(0);
By definition, a delay line should be silent (i.e., 0) until the delay time has passed. The delay time here is 1 sample (ar) or 1 control block (kr). But instead of silence, this code replicates the first input value.
One user impact is that you can't use Delay1 on a trigger that occurs in the first sample or control block:
... prints nothing, where I'd have expected Poll's trigger input to be 0 in the first kr block, then 1 in the second. As a result, to delay an initial trigger (assuming kr) by 1 block, you have to use the clumsier construction
DelayN.kr(trig, 0.01, ControlDur.ir)
.The text was updated successfully, but these errors were encountered: