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

suggest a fix for precision on knob dragging #3075

Merged
merged 7 commits into from Jan 12, 2017
Merged

Conversation

@BaraMGB
Copy link
Contributor

@BaraMGB BaraMGB commented Oct 13, 2016

fixes #3074 closed because it's a duplicate of:
fixes #3024
only for knobs at first.

BaraMGB added 2 commits Oct 13, 2016
@BaraMGB
Copy link
Contributor Author

@BaraMGB BaraMGB commented Jan 9, 2017

Okay, this should work. Can someone look at this?

@BaraMGB
Copy link
Contributor Author

@BaraMGB BaraMGB commented Jan 12, 2017

If no one is against this, I'll merge this within the next hours.

@BaraMGB BaraMGB merged commit 7cf6150 into LMMS:master Jan 12, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Copy link
Contributor

@grejppi grejppi left a comment

This PR has introduced a bug where Reset and Paste value show the current value instead of what they should

switch( m_dataType )
{
case Float: return QString::number( castValue<float>( scaledValue( val ) ) );
case Float: return QString::number( castValue<float>( scaledValue( floatmodel->getRoundedValue() ) ) );

This comment has been minimized.

@grejppi

grejppi Feb 9, 2017
Contributor

This function is used to convert any value into a string, not just the current value. Reset and Paste value are now incorrect:
image

This comment has been minimized.

@BaraMGB

BaraMGB Feb 10, 2017
Author Contributor

I have to look into it. Thank you for the hint!

This comment has been minimized.

@BaraMGB

BaraMGB Feb 10, 2017
Author Contributor

Yes, this is stupid. My intention was to fix the mixer bug ( 1.2345 % means 123,45 % ). I guess I revert this and search an other solution for this.

BaraMGB added a commit to BaraMGB/lmms that referenced this pull request Mar 19, 2017
@BaraMGB BaraMGB mentioned this pull request Mar 19, 2017
jasp00 added a commit that referenced this pull request Mar 19, 2017
@@ -713,6 +714,23 @@ float AutomatableModel::globalAutomationValueAt( const MidiTime& time )
}
}

float FloatModel::getRoundedValue() const
{
return static_cast<float>( static_cast<int>( value() / step<float>() + 0.5 ) ) * step<float>();

This comment has been minimized.

@Umcaruje

Umcaruje Apr 29, 2017
Member

So this is causing a problem in the tripleoscillator coarse detune knobs:
image
The negative values are off by one.
And when you set it to zero
image
The actual value is -1 as you fixed this to use the true value in #3437
image

This comment has been minimized.

@BaraMGB

BaraMGB Jun 1, 2017
Author Contributor

okay, got a fix for that. Is there an issue filed for? @Umcaruje

@Umcaruje
Copy link
Member

@Umcaruje Umcaruje commented Jun 1, 2017

int digits = 0;
while ( steptemp < 1 )
{
steptemp = steptemp / 0.1f;

This comment has been minimized.

@zapashcanon

zapashcanon Jun 3, 2017
Contributor

steptemp = steptemp * 10.0f; // easier to figure, and probably faster (but I guess the compiler already optimise it...)

This comment has been minimized.

@BaraMGB

BaraMGB Jun 3, 2017
Author Contributor

Thank you, I added this in this PR #3597.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.