Limit knob range + double knob + invert knob

RadekPilich

2010-12-29 21:06:44

Hi guys,

I am new to programing BMTE, could you please advice me on how to program this?

1. I want a knob to send narrower values. For example - there is a GAIN knob in application with +/-30dB gain. Lets say I want to use only +/-6dB of that range, more specifically, I want the physical knob on my controller to control that +/-6dB, so that when it is turned to left the gain will be -6dB(as opposed to default -30dB) and when turned to right the gain will be +6dB(as opposed to default +30dB).

2. I want to use ONE knob for both LP a HP filter (2 separate VSTs). I want the left half of the physical knob to operate frequency of the LP filter a the right half of the physical knob to operate frequency of the HP filter.

3. How do I invert knob function? So that when the physical knob is on 0, the virtual is on 127 and vice versa.

Thanks for getting me started!

R.

RadekPilich

2010-12-30 16:04:47

OK, so I managed to set it up myself :) I had to take pen and paper and use a bit of my linear equations knowledge :D

Here are the scripts:

1. Limit knob rabge
pp=pp/4
pp=48+pp
exit rules, execute Outgoing Action

2. Double knob
Knob One - left half of the physical knob:
if pp<64 then Goto "64-"
if pp>63 then pp=0
if pp==0 then exit rules, execute Outgoing Action
Label "64-"
pp=2*pp
pp=127-pp
exit rules, execute Outgoing Action

Knob Two - right half of the physical knob:
if pp>64 then Goto "64+"
if pp<65 then pp=127
if pp==127 then exit rules, execute Outgoing Action
Label "64+"
pp=2*pp
pp=256-pp
exit rules, execute Outgoing Action

3. Invert knob
I haven't tried this, but it should work:
pp=127-pp
exit rules, execute Outgoing Action

Attigo

2011-01-04 17:55:06

Good work!