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

Drumsynth filter disregards sample rate #6087

Closed
softrabbit opened this issue Jul 14, 2021 · 5 comments
Closed

Drumsynth filter disregards sample rate #6087

softrabbit opened this issue Jul 14, 2021 · 5 comments
Labels
Milestone

Comments

@softrabbit
Copy link
Member

Bug Summary

The filter in Drumsynth doesn't take into account sample rate, and so it doesn't sound the same e.g. when exporting with oversampling. Could be other parts too besides the filter.

Steps to reproduce

Create a beat pattern using some .ds sounds that use the filter, e.g. the TR606 ones. Export that to audio using different sample rates, the larger difference between them the better.

Expected behavior

Audio should sound the same.

Actual behavior

Audio doesn't sound the same.

Screenshot

Screenshot from 2021-07-14 20-29-01

Affected LMMS versions

Git master.

(Looks like this was introduced in #406 and guess who did that... 😳 )

@softrabbit softrabbit added the bug label Jul 14, 2021
@zonkmachine zonkmachine added this to the 1.3 milestone Jul 26, 2021
@zonkmachine
Copy link
Member

Could be other parts too besides the filter.

Yes. At least Noise Bands 1 and 2 also seem to be affected.

@softrabbit
Copy link
Member Author

Could be other parts too besides the filter.

Yes. At least Noise Bands 1 and 2 also seem to be affected.

Damn. That part seemed OK to me when I did some listening comparisons... The ones I found in addition:

  • Noise slope (in the aptly named variable NT) which seems to control a filter (LPF for values <0, otherwise HPF).
  • Overtones in mode 3 ("808 cymbal"), some kind of filter there too.
  • Distortion includes some downsampling (averaging up to 20 samples).
  • The "droop" rate of tone generation might be off, too.

The distortion and droop rate might be fixed simply through multiplying or dividing with a coefficient. The filters are harder, the optimal solution would probably be reverse engineering them to figure out the formulas for the magic numbers used. I have no idea how feasible that is. But who knows, maybe a DSP expert can see at a glance what is going on.

@zonkmachine
Copy link
Member

Damn. That part seemed OK to me when I did some listening comparisons... The ones I found in addition:

* Noise slope (in the aptly named variable NT) which seems to control a filter ...

* Overtones in mode 3 ("808 cymbal"), some kind of filter there too.

* Distortion includes some downsampling (averaging up to 20 samples).

* The "droop" rate of tone generation might be off, too.

I think it would be helpful with a setup of .ds files that demos the individual sound generators/filters separately. It would make troubleshooting so much easier.

@zonkmachine
Copy link
Member

I actually can't replicate this issue. It looks like it was fixed in ce722dd/#6610

@zonkmachine
Copy link
Member

^Closed as fixed. Please reopen this issue if you can still replicate it on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants