This forum is read-only. Please post new topics in our Q&A forum.

Variables for Knobs

General discussion about MIDI Translator

Moderators: florian, DvlsAdvct

Post Reply
gatoral
New User
Posts: 3
Joined: Tue Aug 03, 2010 2:05 am

Variables for Knobs

Post by gatoral » Tue Aug 03, 2010 2:14 am

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?

Attigo
Bome Forum Moderator
Posts: 366
Joined: Mon Nov 16, 2009 1:09 am

Re: Variables for Knobs

Post by Attigo » Tue Aug 03, 2010 8:22 pm

What commands do you want them to send?

Scott

gatoral
New User
Posts: 3
Joined: Tue Aug 03, 2010 2:05 am

Re: Variables for Knobs

Post by gatoral » Thu Aug 05, 2010 5:40 am

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.

Attigo
Bome Forum Moderator
Posts: 366
Joined: Mon Nov 16, 2009 1:09 am

Re: Variables for Knobs

Post by Attigo » Thu Aug 05, 2010 5:55 am

Ok, thats cool, do you know if they are Absolute or Relative (endless)?

Scott

gatoral
New User
Posts: 3
Joined: Tue Aug 03, 2010 2:05 am

Re: Variables for Knobs

Post by gatoral » Thu Aug 05, 2010 6:37 pm

Absolute

in_every_end
User
Posts: 9
Joined: Mon May 02, 2011 7:24 pm

Re: Variables for Knobs

Post by in_every_end » Mon May 02, 2011 7:31 pm

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! :)

Attigo
Bome Forum Moderator
Posts: 366
Joined: Mon Nov 16, 2009 1:09 am

Re: Variables for Knobs

Post by Attigo » Mon May 02, 2011 8:11 pm

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

in_every_end
User
Posts: 9
Joined: Mon May 02, 2011 7:24 pm

Re: Variables for Knobs

Post by in_every_end » Mon May 02, 2011 8:47 pm

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

Attigo
Bome Forum Moderator
Posts: 366
Joined: Mon Nov 16, 2009 1:09 am

Re: Variables for Knobs

Post by Attigo » Mon May 02, 2011 9:02 pm

No problem! Give me a shout if you are having any problems...

Scott

in_every_end
User
Posts: 9
Joined: Mon May 02, 2011 7:24 pm

Re: Variables for Knobs

Post by in_every_end » Tue May 03, 2011 4:28 pm

That seems to be working great mate :)

Attigo
Bome Forum Moderator
Posts: 366
Joined: Mon Nov 16, 2009 1:09 am

Re: Variables for Knobs

Post by Attigo » Wed May 04, 2011 12:01 am

Good stuff!

Post Reply