thestk/stk

ModalBar - Control numbers mixed up

zonkmachine opened this issue · 0 comments

Hello there!

I'm trying to get the ModalBar vibrato to update values during a note but to my horror all I'm doing is making the Stick direct mix to go louder. It looks like some control numbers have been mixed up.

From documentation Here:
https://ccrma.stanford.edu/software/stk/classstk_1_1ModalBar.html

Vibrato Gain = 1
Vibrato Frequency = 11
Direct Stick Mix = 8

In code here it says something else so it could be a documentation error.

stk/src/ModalBar.cpp

Lines 12 to 14 in 67d573b

- Vibrato Gain = 8
- Vibrato Frequency = 11
- Direct Stick Mix = 1

But in the code the SKINI variable names seem to more correspond with the actual code being wrong.

stk/src/ModalBar.cpp

Lines 166 to 169 in 67d573b

else if (number == __SK_Balance_) // 8
vibratoGain_ = normalizedValue * 0.3;
else if (number == __SK_ModWheel_) // 1
directGain_ = normalizedValue;

Should probably be:

 else if (number == __SK_Balance_) // 8 
   directGain_ = normalizedValue;
 else if (number == __SK_ModWheel_) // 1 
   vibratoGain_ = normalizedValue * 0.3;