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

Sustained notes get cut off when oversampling is > 1 #10

Closed
AlexMitchellMus opened this issue Dec 3, 2019 · 5 comments
Closed

Sustained notes get cut off when oversampling is > 1 #10

AlexMitchellMus opened this issue Dec 3, 2019 · 5 comments
Assignees

Comments

@AlexMitchellMus
Copy link
Collaborator

AlexMitchellMus commented Dec 3, 2019

Oversampling set to 1 plays long sustained notes properly. However when set to x2,x4 or x8 the notes get cut off.

Example of SFZ that this is effecting (not limited to): https://github.com/sgossner/VSCO-2-CE/blob/SFZ/SViolinVib.sfz

@AlexMitchellMus AlexMitchellMus changed the title Sustained notes get cut off when oversampling is >= 4 Sustained notes get cut off when oversampling is >= x2 Dec 3, 2019
@AlexMitchellMus AlexMitchellMus changed the title Sustained notes get cut off when oversampling is >= x2 Sustained notes get cut off when oversampling is > 1 Dec 3, 2019
@paulfd paulfd self-assigned this Dec 3, 2019
@paulfd
Copy link
Member

paulfd commented Dec 3, 2019

Thanks, I'll check it out! is it SSD or HDD, and are you using the debug build still?

Edit: I can reproduce it quite easily in the Debug build, and it also happens in release for more "stringent" requirements (e.g. oversampling x4 for 32k preloading size on my current laptop, and less so at 64k). I'd still like the debug build to work as well as it possibly could so I'll target to have it working with sane parameters. To solve it properly it may take a bit of time though so bear with me :)

Note for self:

  • Use a thread pool for background loading now that this operation is not disk-limited anymore
  • Reduce the debug verbosity
  • Increase the preload size possibilities

Sorry, something went wrong.

@AlexMitchellMus
Copy link
Collaborator Author

AlexMitchellMus commented Dec 3, 2019

Debug build, and it's NVMe

@paulfd
Copy link
Member

paulfd commented Dec 14, 2019

Building for release this does not appear for me unless I'm very aggressive on both oversampling (high ratios) and preload size.

I chose in early development to not stream the samples (i.e. loading the full sample at once on request rather than loading samples chunk-by-chunk for quicker data access). This may have been unwise because i) if you oversample alot, the time it takes to load and oversampling a whole file at once can be quite daunting, and ii) the preload size does not only depend on the oversampling ratio, but also on the sample length which is a hidden parameter that may change between sfz instruments.

Considering both arguments and using it in practice, I am reconsidering my earlier decision and may just implement a form of streaming which adds complexity but has many advantages in practice.

@paulfd
Copy link
Member

paulfd commented Dec 14, 2019

You can try a release build using

mkdir build-release && cd build-release
../scripts/release_gcc.sh

@AlexMitchellMus
Copy link
Collaborator Author

I will close this for now, but as you mentioned, deeper changes may have to happen to fix it completely.

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

No branches or pull requests

2 participants