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

Inconsistent use of PAN_MAX in the pan law (in NotePropertiesRuler ) #1167

Closed
oddtime opened this issue Feb 7, 2021 · 4 comments
Closed

Comments

@oddtime
Copy link
Contributor

oddtime commented Feb 7, 2021

I have noticed one inconsistent use of PAN_MAX in src/gui/src/PatternEditor/NotePropertiesRuler.cpp line 487:

	if ( fValue > PAN_MAX ) {
		fPanL = 2*PAN_MAX - fValue;
		fPanR = PAN_MAX;
	} else {
		fPanL = PAN_MAX;
		fPanR = fValue;
	}

I guess it is an oversight , since there PAN_MAX = 0.5 = middle point in pan parameter domain for the widget ( i.e. [0;1] ).
The computation is correct but PAN_MAX refers to the gain weights and not to the pan parameter, in addition if we want to use PAN_MAX explicitly in the pan law, the expressions should be different

I have modified it in pull req #1015 which is still open.

@cme
Copy link
Contributor

cme commented Feb 8, 2021

Excellent. I think this is my fault. All the more argument for commonising code like this! :)

@oddtime
Copy link
Contributor Author

oddtime commented Feb 8, 2021

All the more argument for commonising code like this!

We could actually, we already have the pan law as static functions in Sampler

@oddtime
Copy link
Contributor Author

oddtime commented Apr 19, 2021

Actually this part could get even simpler... #1242

@theGreatWhiteShark
Copy link
Contributor

Fixed in #1273

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

3 participants