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

VeSTige: Notes play at the wrong pitch when using the JACK backend. #6038

Closed
DarkRTA opened this issue Jun 2, 2021 · 3 comments · Fixed by #6068
Closed

VeSTige: Notes play at the wrong pitch when using the JACK backend. #6038

DarkRTA opened this issue Jun 2, 2021 · 3 comments · Fixed by #6068
Assignees

Comments

@DarkRTA
Copy link

DarkRTA commented Jun 2, 2021

Whenever I am using the JACK backend with VeSTige, all of the notes play about 147 cents too sharp. I have a feeling its probably some sampling rate mismatch weirdness as switching to the SDL backend seems to fix it.

Affected LMMS versions

1.2.2
1.3.0.alpha.1.102

@DarkRTA DarkRTA added the bug label Jun 2, 2021
@DarkRTA DarkRTA changed the title VeSTige Instrument: Notes play at the wrong pitch when using the jack backend. VeSTige: Notes play at the wrong pitch when using the JACK backend. Jun 2, 2021
@PhysSong
Copy link
Member

PhysSong commented Jun 2, 2021

The value you mentioned is about 48000/44100, so it's likely a sample rate issue.
Which VST plugin is problematic? Is that for only some specific plugins, or all VSTs?

@DarkRTA
Copy link
Author

DarkRTA commented Jun 2, 2021

This is affecting every VSTi I tried.

@PhysSong
Copy link
Member

PhysSong commented Jun 4, 2021

Bug confirmed. This is what's happening:

When a VST plugin is initialized, it gets the sample rate data from shared memory. VstSyncController, the class which fills the data, is initialized while Song is constructed. At this point, Mixer hasn't opened an audio device and returns at 44100Hz.
After that, Mixer::initDevices opens the specified audio device. The processing sample rate changes at this point, but the function doesn't notify the change. In the reported case, the sample rate is 48000Hz, but VstSyncController doesn't know the sample rate has been changed from 44100Hz to 48000Hz, making VSTs think it's running at 44100Hz.

The fix should be straightforward, only one or two lines in Mixer::initDevices are sufficient.

Meanwhile, you can work around the bug by exporting literally anything after starting LMMS. After the export, VSTs will receive the correct sample rate information and will run without such problems.

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

Successfully merging a pull request may close this issue.

2 participants