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

Center setting for stereo #53

Closed
probonopd opened this issue Mar 21, 2022 · 2 comments
Closed

Center setting for stereo #53

probonopd opened this issue Mar 21, 2022 · 2 comments

Comments

@probonopd
Copy link
Owner

Right now "center" seems to be 9th dot from the left = 8th from the right?

For me it would feel more natural to have a center ("middle") position for stereo panning, with the same number of dots left and right from the selected setting (maybe even marked with ":" instead of "." to make it easy to spot).

Wdyt @rsta2?

@rsta2
Copy link
Contributor

rsta2 commented Mar 21, 2022

I will look into this.

@rsta2
Copy link
Contributor

rsta2 commented Mar 21, 2022

This patch changes the behavior as wanted:

diff --git a/src/userinterface.cpp b/src/userinterface.cpp
index 2df0fdc..9e768de 100644
--- a/src/userinterface.cpp
+++ b/src/userinterface.cpp
@@ -198,11 +198,10 @@ void CUserInterface::PanChanged (unsigned nPan, unsigned  nTG)
                CString TG;
                TG.Format ("TG%u", nTG+1);
 
-               char PanMarker[CConfig::LCDColumns+1];
-               memset (PanMarker, '.', CConfig::LCDColumns);
-               PanMarker[CConfig::LCDColumns] = '\0';
-               unsigned nIndex = nPan * CConfig::LCDColumns / 127;
-               if (nIndex == CConfig::LCDColumns)
+               assert (CConfig::LCDColumns == 16);
+               char PanMarker[CConfig::LCDColumns] = ".......:.......";
+               unsigned nIndex = nPan * (CConfig::LCDColumns-1) / 127;
+               if (nIndex == CConfig::LCDColumns-1)
                {
                        nIndex--;
                }

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

No branches or pull requests

2 participants