Skip to content

Conversation

@michaelgregorius
Copy link
Contributor

Fix for #2047

Change all phase related variables in Oscillator from float to double.
The parameters for the getSample methods have not been changed to double
as it should suffice to only update the phase variables with double
precision.

Change all phase related variables in Oscillator from float to double.
The parameters for the getSample methods have not been changed to double
as it should suffice to only update the phase variables with double
precision.
@Umcaruje
Copy link
Member

Umcaruje commented Dec 6, 2016

Hey you're back 👋

@michaelgregorius
Copy link
Contributor Author

Hi @Umcaruje! Yes, I was absent for quite some time. I am now mainly working on my own small project in my spare time but this one intrigued me. :)

@BaraMGB
Copy link
Contributor

BaraMGB commented Dec 15, 2016

Is there something else to do for this, or can we merge it?

@michaelgregorius
Copy link
Contributor Author

As discussed in #2047 we might consider to add some more information to the compatibility warning dialog but such a change should be independent of this one.

@karmux
Copy link
Contributor

karmux commented Dec 18, 2016

@michaelgregorius I found a bug that I can only reproduce with changes from this pull request.

Default SEGuitar.xpf TripleOscillator instrument in blank project kills sound usually after 1-3 seconds of playing. Need to reopen project to get sound back. I didn't test all bundled instruments and this is only one I found so far.

I tried to debug with Valgrind but didn't see any related error, just millions of QT exceptions.

@michaelgregorius
Copy link
Contributor Author

@karmux I am not able to find a problem with the preset SEGuitar.xpf. Here's what I did:

  1. Open the "My Presets" tab.
  2. Pull SEGuitar.xpf into the Song-Editor.
  3. Open the plugin window and press keys for several seconds.

Can you please provide a more detailed description on how to reproduce the problem? Thanks!

@karmux
Copy link
Contributor

karmux commented Dec 18, 2016

@michaelgregorius after finishing testing in master I recompiled this PR and couldn't reproduce it anymore myself also. Very strange but glad that this issue is gone now :)

@karmux
Copy link
Contributor

karmux commented Dec 19, 2016

Unfortunately it's back. I compiled several times this PR and master and never was able to reproduce it in master but always here (sometimes need to reload lmms few times to reproduce).

@zonkmachine
Copy link
Contributor

@karmux I can't reproduce this. SEGuitar use a bunch of effect pluggins. Can you try and delete them one after the other from the sound and see if any one of them is causing this?

@Umcaruje
Copy link
Member

Default SEGuitar.xpf TripleOscillator instrument in blank project kills sound usually after 1-3 seconds of playing. Need to reopen project to get sound back.

Sounds like #1048 to me. It's caused by some LADSPA plugins IIRC

@karmux
Copy link
Contributor

karmux commented Dec 20, 2016

It seems to be TripleOscillator in general and random LADSPA effects happening only in this PR.

@michaelgregorius
Copy link
Contributor Author

@karmux Can you please provide a project file that can be used to reproduce the problem? Thanks!

@karmux
Copy link
Contributor

karmux commented Jan 4, 2017

@michaelgregorius it happens in every project, even in the empty default project. Culprits seems to be 3 LADSPA effects added to SEGuitar.

To reproduce: Use default TripleOscillator in default project, add CEq, CPhaserII and/or C*Plate2x2 effects and play some notes. Adding all three gives better chance to hit the bug. Sooner or later it plays just silence. These three LADSPA effects somehow are able to block sound completely from other instruments as well. Disabling or removing these three plugins gives sound back (no project reload needed).

All this happens only if I apply changes from this PR.

@michaelgregorius
Copy link
Contributor Author

Hi @karmux,

unfortunately I am still not able to reproduce the problem. Here's what I did:

  1. Start LMMS.
  2. Open the TripleOscillator from the default project.
  3. Go to the FX tab of the instrument and add a "C* Eq - 10-band equalizer", a "C* PhaserII" and a "C* Plate2x2".
  4. Play notes with the mouse using the keyboard of the instrument windows.

I have tested for several minutes but no silence appears.

Can someone else please check if the problem is reproducible on other systems as well?

@karmux, can you please check which of the three plugins has to be removed to get the sound back? I assume that only one of the plugins causes the problem. Thanks!

@karmux
Copy link
Contributor

karmux commented Jan 12, 2017

@michaelgregorius Any of these three plugins could crash the sound. Before I edited files manually but checked several times over that I edited them correctly. Now I learned how to merge PRs into my fork and merged it into my staging branch. Can't reproduce this issue anymore 👍 Sorry for delaying this fix to be merged.

@tresf tresf merged commit e3e14bb into LMMS:master Jan 12, 2017
@michaelgregorius michaelgregorius deleted the 2047-Oscillator-Phases-Out-Of-Sync branch January 25, 2017 22:20
@zonkmachine zonkmachine mentioned this pull request Jan 31, 2017
michaelgregorius added a commit that referenced this pull request Feb 4, 2017
…ync") (#3145)"

This reverts commit e3e14bb in an
attempt to fix issue #3292.

The problem that's addressed is very elusive:
* It cannot be reproduced reliably.
* It seems to be more prone to appear in release builds.
* It only seems to appear when two or more instruments are mixed into
  one channel.
* If you solo a problematic Triple Osc it goes away.

The observations above seem to indicate that there's rather a problem
with the mixing (due to multithreading?) and that the changes made to
Triple Osc seem to trigger this deeper problem more quickly.
sdasda7777 pushed a commit to sdasda7777/lmms that referenced this pull request Jun 28, 2022
…MMS#3145)

Change all phase related variables in Oscillator from float to double.
The parameters for the getSample methods have not been changed to double
as it should suffice to only update the phase variables with double
precision.
sdasda7777 pushed a commit to sdasda7777/lmms that referenced this pull request Jun 28, 2022
…ync") (LMMS#3145)"

This reverts commit 291942f in an
attempt to fix issue LMMS#3292.

The problem that's addressed is very elusive:
* It cannot be reproduced reliably.
* It seems to be more prone to appear in release builds.
* It only seems to appear when two or more instruments are mixed into
  one channel.
* If you solo a problematic Triple Osc it goes away.

The observations above seem to indicate that there's rather a problem
with the mixing (due to multithreading?) and that the changes made to
Triple Osc seem to trigger this deeper problem more quickly.
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

Successfully merging this pull request may close these issues.

6 participants