-
Notifications
You must be signed in to change notification settings - Fork 758
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
Signal.hammingWindow not implemented correctly #4323
Comments
good catch! there is almost certainly no good reason for this. feel free to file a PR to correct the formula. |
Since this is fairly old code, I wonder how many projects are dependent
upon it. I don't imagine the change will be drastic, though.
Nonetheless, this to be done tomorrow.
…On Thu, Feb 21, 2019 at 23:48 Nathan Ho ***@***.***> wrote:
good catch! there is almost certainly no good reason for this. feel free
to file a PR to correct the formula.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4323 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEaAb15kEpgGZ9R3DL1IDTcHuFDzdWdUks5vP6DZgaJpZM4bJA5D>
.
|
My gut feeling, based on some 16-17 years of following list traffic, is that hammingWindow is rarely used. That's not a scientific survey, of course, but if it were very popular, I expect it would have come up on the list from time to time, and I don't recall that it did. |
I know of people using it. In the past, a good strategy has been: rename the current one |
Terribly sorry, but: I can't seem to propagate my changes in SCClassLibrary to work at all. I've changed the Signal.sc file in DEVELOPING.md didn't seem to help. Do I have to go through the build process for this? |
maybe you haven't made the changes in the library that sclang actually uses. If you open the preferences and open the tab "Interpreter" you may be able to see the path. |
When I hit Ctrl Shift L, I see the message: which I've double-checked and made sure that the file I'm making changes to is in that directory. Still, it doesn't work. Very strange. |
Ach. Nevermind. It's because the directory is protected so all changes were rejected, so I needed admin privileges. I don't think SuperCollider IDE reports when it cannot save a file. |
maybe worth another issue! |
File saving fails silently in Linux too. That's awful. #4325 |
This is awaiting the PR. I'll close this. |
Please do not close until PR is merged. |
Oops. My apologies! |
np! just helps keep track of what we can actually claim as "fixed" :) we have had seemingly innocuous PRs go stale and never merge in the past |
fixed in #4324! |
Thanks for that @khoin ! |
The Hamming window is an instance of the Generalized Hamming window with a particular coefficient to cancel out the largest side lobe; it can be seen described here: J.O.S' SASP, or seen implemented elsewhere: MATLAB, Octave, SciPy, etc.
I'll pull the equation from Wikipedia:
where a0 = 0.53836... and a1 = 0.46164... yields the Hamming window.
The current SuperCollider code for Signal.hammingWindow is this:
which corresponds to a0 = 0.5 and a1 = 0.39, and is given an example here:
Is this a bug, or is there a rationale behind choosing such coefficient that does not match with the standard definition of Hamming windows? I looked at the blame and that part hasn't been changed for 17 years.
In any case, a window should not have its peak not at 1 either.
A proposed fix:
The text was updated successfully, but these errors were encountered: