Page 1 of 1

Variables for Knobs

Posted: Tue Aug 03, 2010 2:14 am
by gatoral
Hello. I'm using a Korg NanoKontrol with Midi Translator Classic and I'm wondering if there is a variable that would allow the knobs going up (clockwise) to send one command and the knobs going down (counterclockwise) to send another. Is this possible, and if so how can it be achieved?

Re: Variables for Knobs

Posted: Tue Aug 03, 2010 8:22 pm
by Attigo
What commands do you want them to send?

Scott

Re: Variables for Knobs

Posted: Thu Aug 05, 2010 5:40 am
by gatoral
Just simple keyboard commands. A clockwise turn would send a command such as Shift-A and a counterclockwise turn would send something like Shift-Z.

Re: Variables for Knobs

Posted: Thu Aug 05, 2010 5:55 am
by Attigo
Ok, thats cool, do you know if they are Absolute or Relative (endless)?

Scott

Re: Variables for Knobs

Posted: Thu Aug 05, 2010 6:37 pm
by gatoral
Absolute

Re: Variables for Knobs

Posted: Mon May 02, 2011 7:31 pm
by in_every_end
Hi all,

Does anybody have any info on this?
I'm trying to do the same with knobs on an mpd32.
i.e. a clockwise turn = arrow right, counter clockwise = left arrow.
These knobs are endless. * I think *

Any help on this would be grrreat! :)

Re: Variables for Knobs

Posted: Mon May 02, 2011 8:11 pm
by Attigo
Hey guys,

I've made an example here of this working, using a knob input, which I use B0 00 oo in the example. B0 00 being the first MIDI note on the first channel and oo being the 'local variable'. You just need to edit B0 00 to be the message from your knob, whatever that may be. I also use the 'global variable' ga, just because it is the first one.

Here is the code for how this works:

Code: Select all

[x] Translator 0: Knob Clockwise 
Incoming: MIDI B0 00 oo
Rules: if oo<ga then exit rules, skip Outgoing Action
Outgoing: Keystroke: Shift(A )

[x] Translator 1: Knob Anti-Clockwise
Incoming: MIDI B0 00 oo
Rules: if oo>ga then exit rules, skip Outgoing Action
Outgoing: Keystroke: Shift(Z )

[x] Translator 2: Track Knob Position
Incoming: MIDI B0 00 oo
Rules: ga=oo
Outgoing: (none)

There is 3 translators, it could normally be done in 1 but because you have keystrokes, a translator can only output 1 singular keystroke, and because there are 2 translators for this, we need to 'track' the knob position in another translator.

The first 2 translators basically check if the knob input is either higher or lower than the previously stored value. The previously stored value is set in the third translator. The third translator needs to be last so it tracks the position after the first 2 readings, this is basically setting the last knob position value.

And @in_every_end, the knobs on the MPD are physically endless, but they send an absolute value, as in after it reaches 127/7F, it stops sending messages when you turn it. Stupid, I know.

Hope this helps!

Scott

Re: Variables for Knobs

Posted: Mon May 02, 2011 8:47 pm
by in_every_end
Thanks Scott, this looks like it will do the job!
I'm new to using rules so just wondering, before I turn the knob for the first time will the ga variable have a value equal to 0 as no value will have been assigned to it yet.

Cheers

John

Re: Variables for Knobs

Posted: Mon May 02, 2011 9:02 pm
by Attigo
No problem! Give me a shout if you are having any problems...

Scott

Re: Variables for Knobs

Posted: Tue May 03, 2011 4:28 pm
by in_every_end
That seems to be working great mate :)

Re: Variables for Knobs

Posted: Wed May 04, 2011 12:01 am
by Attigo
Good stuff!