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

Vibed - Issues exporting at 192 kHz #7221

Open
zonkmachine opened this issue Apr 23, 2024 · 5 comments
Open

Vibed - Issues exporting at 192 kHz #7221

zonkmachine opened this issue Apr 23, 2024 · 5 comments
Labels

Comments

@zonkmachine
Copy link
Member

zonkmachine commented Apr 23, 2024

System Information

Ubuntu 22.04

LMMS Version(s)

1.2.2, master at bda042e

Bug Summary

Vibed has issues exporting at 192 kHz.

Expected Behaviour

It exports at 192 kHz all the time?

Steps To Reproduce

Export VibedExport.mmp.txt at 192 kHz! (remove .txt)
Observe the curve (see image).
Export the project again but adjust the knob Length (string length) to 2.
The exported soundfile now looks like expected.

The steps above was done with fpe debugging flags set so no floating point errors detected.

Screenshots / Minimum Reproducible Project

vibed

@Rossmaxx
Copy link
Contributor

If you are talking about oversampling, that is indeed bugged and i remember @LostRobotMusic campaigning for it to be removed.

@zonkmachine
Copy link
Member Author

zonkmachine commented Apr 23, 2024

If you are talking about oversampling,

I'm not. I'm talking about export frequency sampling rate. Please test the steps above.

@zonkmachine
Copy link
Member Author

...Sampling rate.

@Rossmaxx
Copy link
Contributor

Please test the steps above.

That's my main limitation rn. I don't have my pc with me so can't test anything.+ College sucking up my time and energy.

@michaelgregorius
Copy link
Contributor

This is caused in the constructor of VibratingString.cpp. Line 46 seems to be the relevant line:

int stringLength = static_cast<int>(m_oversample * sampleRate / pitch) + 1;

m_oversample is 0 here which means that stringLength becomes 1.

Why is m_oversample though? That's because of this line in the constructor:

m_oversample{2 * oversample / static_cast<int>(sampleRate / Engine::audioEngine()->baseSampleRate())},

oversample is set to 1, sampleRate is set to 192000 and Engine::audioEngine()->baseSampleRate() is 44100.

This gives 2 * 1 / (192000 / 44100) ~ 2 / 4.35 ~ 0.46. This rounds down to 0 for the int.

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

3 participants