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

Effect enable fix #1176

Merged
merged 4 commits into from
Feb 11, 2017
Merged

Effect enable fix #1176

merged 4 commits into from
Feb 11, 2017

Conversation

daschuer
Copy link
Member

@daschuer daschuer commented Feb 5, 2017

This fixes th clicking sound when enabling/disabling effects and when turning to fully dry
https://bugs.launchpad.net/mixxx/+bug/1661781

@timrae
Copy link
Contributor

timrae commented Feb 6, 2017

I know it's kinda unrelated to this PR, but I'm on my way to bed and just noticed a bug on master:

Echo FX send knob appears to introduce a non-unity gain even when the knob is set to zero. Toggling the enable switch with send set to zero makes a very noticeable change in the volume, which makes the effect basically unusable.

@Be-ing
Copy link
Contributor

Be-ing commented Feb 6, 2017

Echo FX send knob appears to introduce a non-unity gain even when the knob is set to zero. Toggling the enable switch with send set to zero makes a very noticeable change in the volume, which makes the effect basically unusable.

Please test #1166

m_dMix(0),
m_pBuffer(SampleUtil::alloc(MAX_BUFFER_LEN)) {
m_dMix(0) {
m_pBuffer1 = std::make_unique<SampleBuffer>(MAX_BUFFER_LEN);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, there's no need for these to be allocated -- they can be member variables.

Copy link
Member

@rryan rryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you LGTM, this is a much cleaner implementation on top of the fixes. It would be nice to have a test so we can be sure this won't break again in the future.

@daschuer
Copy link
Member Author

daschuer commented Feb 6, 2017

I have put DEBUG_ASSERT(pInput != pOutput); into the code. This should be sufficient to notice regressions early.

@Be-ing
Copy link
Contributor

Be-ing commented Feb 6, 2017

DEBUG_ASSERT doesn't make Travis and AppVeyor tell us something broke though.

@@ -165,98 +165,77 @@ void EngineEffectChain::process(const ChannelHandle& handle,

EffectProcessor::EnableState effectiveEnableState = channel_info.enable_state;

if (channel_info.enable_state == EffectProcessor::DISABLING) {
channel_info.enable_state = EffectProcessor::DISABLED;
Copy link
Contributor

@Be-ing Be-ing Feb 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be outside the scope of this PR, but temporal effects like echo and reverb should continue to output what is left in their buffers after their enable switch is turned off to have a smooth tail out of the effect. This is really helpful for transitioning between tracks that are much different tempos. To do this, I think the effect needs to be able to handle the disabling process itself and tell the engine when it is disabled.

This is currently possible by turning the send knob (which is linked to the metaknob by default) all the way down, but it would be easier if this could be accomplished just by pressing the enable switch of the effect.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mmm.. What is done in music composing sometimes is that the effects run all the time, and the input volume to the effect is controlled.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Effects should only use the CPU if they need to.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue was discussed almost completely here:
https://bugs.launchpad.net/mixxx/+bug/1481170

Copy link
Contributor

@Be-ing Be-ing Feb 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I outlined a general idea at the end of the comments on that bug, but there are details that remain unresolved. Anyway, this PR does not introduce the issue, so there's no need for this PR needs to solve it.

@daschuer
Copy link
Member Author

The Failed build seems to be a Travis issue, so we could merge now.

@daschuer daschuer merged commit 94a4839 into mixxxdj:master Feb 11, 2017
@daschuer daschuer deleted the effect_enable_fix branch September 26, 2021 17:35
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.

5 participants