Skip to content

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
Copy link
Contributor Author

BaraMGB commented Jan 9, 2017

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

@BaraMGB
Copy link
Contributor Author

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
Copy link
Contributor

@grejppi grejppi left a comment

Choose a reason for hiding this comment

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

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() ) ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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 pushed a commit that referenced this pull request Mar 19, 2017

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

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

@Umcaruje
Copy link
Member

Umcaruje commented Jun 1, 2017 via email

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

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

sdasda7777 pushed a commit to sdasda7777/lmms that referenced this pull request Jun 28, 2022
* fixes precision on knob dragging

* fixes precision on fader dragging

* diaplay a rounded float on knobs

* enter rounded value on fader

* add getRoundedValue() and getDigitCount() to floatmodel

* whitespace
sdasda7777 pushed a commit to sdasda7777/lmms that referenced this pull request Jun 28, 2022
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.

4 participants