-
Notifications
You must be signed in to change notification settings - Fork 48
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
Cracked sound generated when modulation enabled at high frequency #101
Comments
Possibly caused by out of range values in pcm multi, but not sure what the fix would be. Lines 288 to 301 in 205ff94
EDIT: Can someone test this midi on real hardware and report what happens? |
Gui got more development? |
No, this is my own branch. |
I tested this out on my SC-88Pro and SC-55mkII, both do not produce this cracked sound. |
Seems to fix the problem for mk2: diff --git a/src/pcm.cpp b/src/pcm.cpp
index 0cd1c29..b048fb0 100644
--- a/src/pcm.cpp
+++ b/src/pcm.cpp
@@ -1410,7 +1410,9 @@ void PCM_Update(uint64_t cycles)
int v1 = v2 + (mult2 >> 13) + ((mult2 >> 12) & 1); // 10
int subvar = v1 + (mult3 >> 6) + ((mult3 >> 5) & 1); // 11
- ram1[3] = v1;
+#define Clamp(v, x0, x1) (v < x0 ? x0 : v > x1 ? x1 : v)
+
+ ram1[3] = Clamp(v1, -0x80000, 0x7ffff);
int tests = test;
tests <<= 12;
@@ -1423,7 +1425,7 @@ void PCM_Update(uint64_t cycles)
int v4 = reg1 + (mult4 >> 6) + ((mult4 >> 5) & 1); // 14
int v5 = v4 + (mult5 >> 13) + ((mult5 >> 12) & 1); // 15
- ram1[1] = v5;
+ ram1[1] = Clamp(v5, -0x80000, 0x7ffff);
} Here's an audio comparison before/after: CrackleFixRenders.zip The crackling version seems to have a lot more noise overall but I think it's just reverb from the crackling. If you invert one of the tracks and play them simultaneously the only thing left is the crackling. |
Kind of offtopic question: where did you get the version with GUI? |
He said it was his own branch. |
Gui is in my fork and can be downloaded here: https://github.com/mckuhei/Nuked-SC55/releases/tag/gui-v1.0 |
I'd propose merging this with master branch, no matter how specific this bug might be. |
2024-10-20.08-31-27.mp4
Test midi:
Crackedsound.zip
The text was updated successfully, but these errors were encountered: