Thread: AAX and knobs
View Single Post
Old 11-14-2017, 12:31 PM   #19
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 145
Default

Quote:
Originally Posted by bozmillar View Post
Hey Trunca,

What did you end up doing to fix this? This has always bugged me that I can't make stepped knobs Ints or Enums because mouse drag gets all screwy.
Hi!

I fixed my issue like this...(Actually really idiotically solution)

Example from my compressor;

My compressor has 6 steps ratio knob.

I'm using "Double" instead of "Int".So i can turn it easily.

Code:
  GetParam(kRat)->InitDouble("Ratio", 0, 0, 5,1);
  GetParam(kRat)->SetShape(1.);
Then using this in process section.

Code:
    int Rat = GetParam(kRat)->Value();
    if (Rat == 0) mRat = 1.5;
    else if (Rat == 1) mRat = 2.0;
    else if (Rat == 2) mRat = 3.0;
    else if (Rat == 3) mRat = 4.0;
    else if (Rat == 4) mRat = 5.0;
    else if (Rat == 5) mRat = 10.0;
I can't find any other easy solution.I hope it helps.

Thanks.
Tunca is offline   Reply With Quote