Mouse Wheel speds to control "Direct Access" in plugins

Forums

Hi Rui, I know you think it's already implemented... (GitHub issues)... but the truth is, it's not. :)

Permalink

yes it is

  1. mouse mid(wheel)-button click will reset/center to default value of the "direct access" parameter value;
  2. Shift- or Ctrl+wheel turning will change the "direct access" slider value up or down; without the shift/ctrl keyboard modifiers it just serves to scroll the plugin list as usual;

got that?

Permalink

I never would have figured it out... did anyone else know?
Another hidden feature I was unaware of. Figuring something like this out isn't easy.

Now I understand that if you didn't use Ctrl/Shift, you could accidentally change values ​​when scrolling through the plugin rack when it's full.

Another issue is that if you drag, you can see the change in the tooltip, but the drag isn't precise.

With the mouse wheel, it's more precise because it's step-by-step, but you don't see the tooltip.

I think this is the biggest flaw in the quick access feature. You can't see the numerical value; I think it should always be visible in the interface... but it's also true that I've tried and haven't found a solution... There simply isn't enough space; you either read the plugin name/alias or the value. Both don't fit.

Thank you for letting me know.

It's now functional and useful. Thank you very much.

The faders in Qtractor allow for coarse adjustments using the "mouse wheel" and fine adjustments with "mouse wheel + [CTRL]".

I think it would be useful to have in "Direct Access":
Coarse Adjustment: mouse wheel + [SHIFT]
Fine Adjustment: mouse wheel + [CTRL]

What do you think?

				// Compatible with integer and decimal values
				fDelta *= 0.5f;
				if (pWheelEvent->modifiers() & Qt::ControlModifier)
					fDelta *= 0.5f;

				fValue = pDirectAccessObserver->valueFromScale(
					fScale + fDelta, bLogarithmic);
					
				//If it's integral, we round up
				if (pDirectAccessParam->isInteger())
					fValue = round(fValue);
				
				pDirectAccessParam->updateValue(fValue, true);

Despite everything, it still falls short for, for example, the programs of an SF2... but at least both types will have coarse and fine adjustment.

Changing the scale seems to fix it... if the number of options is high... However, I've realized that my proposed solution doesn't work.

If the number of options is small, the slider gets stuck when rounding, even with [SHIFT].

For integer parameters, the number of available steps would need to be known in advance. I'm not sure if this information is available.

				// Compatible with integer and decimal values
				fDelta *= 0.5f;
				if (pWheelEvent->modifiers() & Qt::ControlModifier) {
					// Change scale depending on whether it is integral or not.
					if (!pDirectAccessParam->isInteger()) {
						fDelta *= 0.5f;
					} else {
						fDelta *= 0.1f;
					}
				}
				fValue = pDirectAccessObserver->valueFromScale(
					fScale + fDelta, bLogarithmic);
					
				//If it's integral, we round up
				if (pDirectAccessParam->isInteger())
					fValue = round(fValue);
				
				pDirectAccessParam->updateValue(fValue, true);

For integer parameters, the number of available steps would need to be known in advance. I'm not sure if this information is available.

yes, you can infer the number of steps from minimum and maximum values:

    if (pDirectAccessObserver->isInteger()) {
         const int iNumSteps = int(pDirectAccessObserver->maxValue() - pDirectAccessObserver->minValue());
         ...
     }

hth.

I've managed to solve it with a different approach.

...line:1632

			if (pDirectAccessObserver) {
				const bool bLogarithmic = pDirectAccessParam->isLogarithmic();
				float fValue = pDirectAccessObserver->value();
				const float fScale = pDirectAccessObserver->scaleFromValue(
					fValue, bLogarithmic);
				float fDelta = (pWheelEvent->angleDelta().y() < 0 ? -0.1f : +0.1f);
				if (!pDirectAccessParam->isInteger()) {
					fDelta *= 0.5f;
					if (pWheelEvent->modifiers() & Qt::ControlModifier)
						fDelta *= 0.5f;
				
					fValue = pDirectAccessObserver->valueFromScale(
						fScale + fDelta, bLogarithmic);


				// Case integer
				} else {
					if (pWheelEvent->modifiers() & Qt::ControlModifier)
						fValue = fValue + (fDelta * 10);
					if (pWheelEvent->modifiers() & Qt::ShiftModifier)
						fValue = fValue + (fDelta * 100);
				}


				pDirectAccessParam->updateValue(fValue, true);
...

what about this?

				float fDelta = (pWheelEvent->angleDelta().y() < 0 ? -0.1f : +0.1f);
				if (pDirectAccessParam->isToggled())
					fDelta *= 10.0f;
				else
				if (pDirectAccessParam->isInteger()) {
					const float fNumSteps
						= pDirectAccessObserver->maxValue()
						- pDirectAccessObserver->minValue();
					fDelta *= (10.0f + fDelta) / fNumSteps;
					if ((fNumSteps > 10.0f) &&
						(pWheelEvent->modifiers() & Qt::ShiftModifier)) {
						fDelta *= 2.0f;
					}
				} else {
					fDelta *= 0.5f;
					if (pWheelEvent->modifiers() & Qt::ControlModifier)
						fDelta *= 0.5f;
				}

check it out,... please?

cheers

It works great! Thanks!!!

I've noticed that 10 is a more appropriate value for coarse integer adjustment. In fact, it's the increment value in the integer spinboxes when you press [CTRL] in the plugin properties window.

I'm not sure if it would be worthwhile to change in properties window to [SHIFT] instead of [CTRL] to maintain consistency with integer values in Direct Access.

However, for floating-point values, [CTRL] currently already works fine-tuning, just like in Direct Access.

				float fDelta = (pWheelEvent->angleDelta().y() < 0 ? -0.1f : +0.1f);
				if (pDirectAccessParam->isToggled())
					fDelta *= 10.0f;
				else
				if (pDirectAccessParam->isInteger()) {
					const float fNumSteps
						= pDirectAccessObserver->maxValue()
						- pDirectAccessObserver->minValue();
					fDelta *= (10.0f + fDelta) / fNumSteps;
					if ((fNumSteps > 10.0f) &&
						(pWheelEvent->modifiers() & Qt::ShiftModifier)) {

						fDelta *= 10.0f; // <<<<<<<<<<<<    Work better with 10

					}
				} else {
					fDelta *= 0.5f;
					if (pWheelEvent->modifiers() & Qt::ControlModifier)
						fDelta *= 0.5f;
				}
				fValue = pDirectAccessObserver->valueFromScale(
					fScale + fDelta, bLogarithmic);
Permalink

I'll enjoy it, no doubt about it.
It's a significant improvement in usability. :)

Add new comment

The content of this field is kept private and will not be shown publicly.

Markdown

  • Parses markdown and converts it to HTML.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type='1 A I'> <li> <dl> <dt> <dd> <h2 id='jump-*'> <h3 id> <h4 id> <h5 id> <h6 id> <img src alt height width> <strike> <pre> <p> <br>
  • Lines and paragraphs break automatically.

Filtered HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <b> <i> <pre> <img src alt height width> <strike>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
File attachments
Unlimited number of files can be uploaded to this field.
2 MB limit.
Allowed types: jpg jpeg gif png txt doc docx xls xlsx pdf ppt pps odt ods odp zip gz bz2 xz patch diff wav ogg flac ogv mp4 qtz.