You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Brownian noise sounds better when the random walk is reflected at the boundaries like this:
double brown = _lastBrownSample;
for (i = 0; i < bufferFrames; i++) {
double white = ((long)sGetNextRandomNumber()) * (double)(1.0f / LONG_MAX);
brown += white;
if (brown > 32.0) brown -= brown - 32.0;
if (brown < -32.0) brown -= brown + 32.0;
sample = (float)brown * 0.03125 * _volume;
*buffer++ = sample;
}
_lastBrownSample = brown;
I've also added a new member variable which stores the last sample so that the transition is always seamless. Currently, there are occasionally subtle click noises when the difference between the first and last sample happen to be large.
The text was updated successfully, but these errors were encountered:
The Brownian noise sounds better when the random walk is reflected at the boundaries like this:
I've also added a new member variable which stores the last sample so that the transition is always seamless. Currently, there are occasionally subtle click noises when the difference between the first and last sample happen to be large.
The text was updated successfully, but these errors were encountered: