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

SF2 pitch knob screwed by export #2204

Closed
softrabbit opened this issue Jul 23, 2015 · 4 comments
Closed

SF2 pitch knob screwed by export #2204

softrabbit opened this issue Jul 23, 2015 · 4 comments

Comments

@softrabbit
Copy link
Member

https://lmms.io/forum/viewtopic.php?f=7&t=3471

Confirmed on master:

  • Add Triple oscillator and SF2 player, dial the same pitch bend on both (keep range at 1) and compare sound.
  • Put down a few notes and export to file.
  • Listen to resulting file, pitches don't match.
  • Listen to the project after rendering and the pitch bends won't match until the SF2 pitch range is changed to something else and back.

Initialization problem?

@tresf
Copy link
Member

tresf commented Jul 23, 2015

Sounds similar to #1286 :)

@Moth-Tolias
Copy link

sounds exactly like the problem I described in issue #2084 .
...I'd like to mention here that this, the linked issue, and #2085 are effectively stopping me from producing with lmms...

@michaelgregorius
Copy link
Contributor

Some more results here. To reproduce follow these steps (using master):

  1. Start LMMS.
  2. Add an Sf2 Player.
  3. Load a SoundFont into the player that you have just added.
  4. Add two notes which are a half tone apart for the Sf2 Player, e.g one bar of A4 followed by one bar of G#4.
  5. Add a pitch automation for the player. e.g. using the available automation lane. The automation should stay at 0 for the A4 and then increase to 100 for the G#4.
  6. Play back the two notes in LMMS. Both notes should sound the same now, i.e. play an A4.
  7. Render to a file.
  8. Listen to the rendered file. The notes that are played are A4 and A#4 now!
  9. Play back in LMMS again. The notes sound like A4 and A#4 here as well.
  10. Set the automation for the G#4 to 50.
  11. Play back in LMMS. Now both notes are at A4 again.
  12. Render to file again.
  13. The file now also contains two A4 notes.

So it seems like before the rendering step a value of 100 means to use the complete pitch range of 1 semitone but during and after rendering a value of 50 indicates to use the complete pitch range.

The problem also manifests in the other direction, i.e. when using an A4 followed by an A#4 and then setting the automation to -100 for the A#4. After rendering the value has to be changed to -50 to correct the automation and to make both notes play A4 again.

I assume that a value of 100 should always indicate to use the full range and that 50 is the incorrect value?

@M374LX
Copy link
Contributor

M374LX commented Aug 12, 2015

More details found.

It looks like a emit sampleRateChanged(); statement inside a Mixermethod is enough to cause the pitch problem, which means that the cause might be in one of the slots connected to the Mixer::sampleRateChanged() signal.

In the case of exporting a project, this happens because ProjectRenderer calls Mixer::setAudioDevice(), which in turn emits the signal.

M374LX added a commit to M374LX/lmms that referenced this issue Aug 12, 2015
M374LX added a commit to M374LX/lmms that referenced this issue Aug 13, 2015
Fix the SF2 gain problems that persisted in issue LMMS#2204
ThomasJClark pushed a commit to ThomasJClark/lmms that referenced this issue Sep 12, 2015
ThomasJClark pushed a commit to ThomasJClark/lmms that referenced this issue Sep 12, 2015
Fix the SF2 gain problems that persisted in issue LMMS#2204
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants