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

Fix for Mixer volume percentage labels are off by a factor of 100 #5661

Merged
merged 2 commits into from
Sep 21, 2020

Conversation

DigArtRoks
Copy link
Contributor

(#2340)

Add m_conversionFactor to the AutomatableModelView. This factor will be applied to the model->value when displaying
it in the contextmenu of the control for the reset and copy actions. The factor will be applied when copying the value to
the clipboard. When pasting from the clipboard, the value will be divided by the factor.

Remove the model->displayValue() calls when updating the reset/copy/paste action text labels as this gives e.g. in the
Equalizer the wrong action text for the Frequency knobs.

In the Fader class, remove the m_displayConversion variable but rather use the new m_conversionFactor variable.
Rewire the setDisplayConversion() function to set the m_conversionFactor to 1.0 or 100.0.

Faders in FxMixer show now the correct context menu. Copying and pasting values between faders or even volume knobs
in tracks shows consistent behavior. Other faders (like in Eq) show the old behavior.

Replace PR #5654

@LmmsBot
Copy link

LmmsBot commented Aug 29, 2020

🤖 Hey, I'm @LmmsBot from github.com/lmms/bot and I made downloads for this pull request, click me to make them magically appear! 🎩

Linux

Windows

🤖
{"platform_name_to_artifacts": {"Linux": [{"artifact": {"title": {"title": "(AppImage)", "platform_name": "Linux"}, "link": {"link": "https://8671-15778896-gh.circle-artifacts.com/0/lmms-1.2.2.694-linux-x86_64.AppImage"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/8671?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}], "Windows": [{"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://8669-15778896-gh.circle-artifacts.com/0/lmms-1.2.2.694-mingw-win32.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/8669?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://8670-15778896-gh.circle-artifacts.com/0/lmms-1.2.2.694-mingw-win64.exe"}}, "build_link": "https://circleci.com/gh/LMMS/lmms/8670?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link"}, {"artifact": {"title": {"title": "32-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/a6h34vqc51716cd5/artifacts/build/lmms-1.2.2-msvc2017-win32.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/35166231"}, {"artifact": {"title": {"title": "64-bit", "platform_name": "Windows"}, "link": {"link": "https://ci.appveyor.com/api/buildjobs/v2nmnywspx7buto5/artifacts/build/lmms-1.2.2-msvc2017-win64.exe"}}, "build_link": "https://ci.appveyor.com/project/Lukas-W/lmms/builds/35166231"}]}, "commit_sha": "083f7954a05b227af8e91aab6ba8fb6cbc9ee9f6"}

include/AutomatableModelView.h Outdated Show resolved Hide resolved
src/gui/widgets/Fader.cpp Outdated Show resolved Hide resolved
@PhysSong
Copy link
Member

PhysSong commented Sep 9, 2020

It generally looks good. Let's wait for other developer's feedback.

Copy link
Member

@Spekular Spekular left a comment

Choose a reason for hiding this comment

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

Seconding PhysSong's comments, looks like a reasonably unintrusive fix otherwise.

…MMS#2340)

Add m_conversionFactor to the AutomatableModelView. This factor will be applied to the model->value when displaying
it in the contextmenu of the control for the reset and copy actions. The factor will be applied when copying the value to
the clipboard. When pasting from the clipboard, the value will be divided by the factor.

Remove the model->displayValue() calls when updating the reset/copy/paste action text labels as this gives e.g. in the
Equalizer the wrong action text for the Frequency knobs.

In the Fader class, remove the m_displayConversion variable but rather use the new m_conversionFactor variable.
Rewire the setDisplayConversion() function to set the m_conversionFactor to 1.0 or 100.0.

Faders in FxMixer show now the correct context menu. Copying and pasting values between faders or even volume knobs
in tracks shows consistent behavior. Other faders (like in Eq) show the old behavior.
@DigArtRoks
Copy link
Contributor Author

Additional commit to take into account the review comments concerning coding style of PhysSong.

Copy link
Member

@DomClark DomClark left a comment

Choose a reason for hiding this comment

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

LGTM. FYI, the changes to AutomatableModelView.cpp will conflict with #5627.

@PhysSong PhysSong merged commit 2f37281 into LMMS:master Sep 21, 2020
@DigArtRoks DigArtRoks deleted the fix_2340_2 branch September 26, 2020 09:49
IanCaio added a commit to IanCaio/lmms that referenced this pull request Oct 5, 2020
	Fixes conflict introduced by LMMS#5661 ("Fix for Mixer volume percentage labels are off by a factor of 100") on src/gui/AutomatableModelView.cpp.
IanCaio added a commit to IanCaio/lmms that referenced this pull request Oct 5, 2020
	Fixes conflict introduced by LMMS#5661 ("Fix for Mixer volume percentage labels are off by a factor of 100") on src/gui/AutomatableModelView.cpp.

	Note: This merge was force-pushed after a hard reset, because there were some issues with submodules being included on the last time I pushed the merge. That new merge is an attempt to fix that.
sdasda7777 pushed a commit to sdasda7777/lmms that referenced this pull request Jun 28, 2022
…MMS#5661)

Add m_conversionFactor to the AutomatableModelView. This factor will be applied to the model->value when displaying
it in the contextmenu of the control for the reset and copy actions. The factor will be applied when copying the value to
the clipboard. When pasting from the clipboard, the value will be divided by the factor.

Remove the model->displayValue() calls when updating the reset/copy/paste action text labels as this gives e.g. in the
Equalizer the wrong action text for the Frequency knobs.

In the Fader class, remove the m_displayConversion variable but rather use the new m_conversionFactor variable.
Rewire the setDisplayConversion() function to set the m_conversionFactor to 1.0 or 100.0.

Faders in FxMixer show now the correct context menu. Copying and pasting values between faders or even volume knobs
in tracks shows consistent behavior. Other faders (like in Eq) show the old behavior.
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