-
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
sclang: fix signal_thresh_xf typo #5432
Conversation
dd64986
to
ae96fcd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elgiano - How do you think we should document this change? If any, can you please include it in the PR and tag me? If no documentation changes are needed, I'll approve
I think we could put a note that the function had a bug until the version where we fix it, like https://doc.sccode.org/Classes/Buffer.html#-cheby What do you think about something like this? @joshpar
@dyfer |
No. If there's version A and version B, and you run the same sclang code in both versions but the result is different (or the same server messages), that's an API change. |
@elgiano could you add the note in the documentation? I have a suggestion to put the version at the beginning of the sentence, what do you think?
|
ae96fcd
to
bdb93ad
Compare
Sure, but we miss the whole method, so I put this:
I've also put it to the top of the list of |
bdb93ad
to
86ca28b
Compare
Thanks @elgiano ! |
Purpose and Motivation
When calling
.thresh
on a Signal, the supplied threshold is squared:I would expect
thresh
to do the same operation on SimpleNumbers and Signals. Am I missing something?The threshold gets squared only for signal_thresh_fx, in
lang/LangSource/PyrSignal.cpp
:supercollider/lang/LangSource/PyrSignal.cpp
Line 216 in 6de068b
It looks like a copy-paste leftover from signal_ring4_xf, which is just above. Removing this line produces the expected behavior.
Types of changes
To-do list