Skip to content
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

Reverb time depends on the sample rate #563

Open
Banana71 opened this issue Nov 19, 2023 · 3 comments
Open

Reverb time depends on the sample rate #563

Banana71 opened this issue Nov 19, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Banana71
Copy link

I wanted to improve the latency of the miniDexed and experimented with the SampleRate and ChunkSize in the miniDexed.ini. I noticed that the ReverbTime behaves anti-proportionally to the SampleRate.

Is it possible to change the programming so that the reverb time is independent of the sample rate or should we just document the behavior?

Why all this: I noticed an audible latency between the miniDexed and the Roland RD-300 for sounds with a short attack time. With the following values, the latency can no longer be determined and even a Raspberry Pi 2 runs stable:
SampleRate=48000 (default)
ChunkSize=128 (default 256)

With a sample rate of 96000, the latency is measurably better but the reverb time is halved.

@probonopd
Copy link
Owner

probonopd commented Nov 19, 2023

Good observation! In other words, you are saying that we need to adjust the reverb time like this?

AdjustedReverbTime = DesiredReverbTime * correctionFactor

correctionFactor = SampleRate / DefaultSampleRate

where:

  • AdjustedReverbTime is the reverb time value adjusted for the new sample rate
  • DesiredReverbTime is the desired reverb time
  • SampleRate is the sample rate defined by the user
  • DefaultSampleRate is the default sample rate (48000)

@probonopd probonopd added the bug Something isn't working label Nov 19, 2023
@probonopd
Copy link
Owner

@Banana71 can you confirm the above? Then we could go about implementing it.

@Banana71
Copy link
Author

Banana71 commented Dec 9, 2023

AdjustedReverbTime = DesiredReverbTime * correctionFactor

correctionFactor = SampleRate / DefaultSampleRate

The formula describes the correct solution approach.

But the code for the reverb effect already works with a sample rate. Is the code in the effect incorrect? Are the variables not assigned correctly? What sample rate is mentioned in the code for the effect?

search for Samplerate:
Samplerate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants