One Knob for two actions.

smokeatthepump

2014-04-14 01:05:04

First of all I have to say I love this software its enabling me to do some amazing things i never though possible. I have a question regarding the behaviour of a knob. I have an endless knob (on an APC40). What I am trying to accomplish is when I turn the knob one way it executes one keystroke, and if i turn it the other way it executes a second keypress, all regardless of the knobs actual position or value. I hope this is possible but the code to write it I believe is beyond me.

DvlsAdvct

2014-04-14 13:14:34

Hi smokeatthepump

Sorry, I didn't reply to your private message, but it's better for these to be on the forum anyway. :)

To do this what you need to do is have two translators which recognize that the knob is being turned left or right and have different outgoing messages. Found the reference in the forum here The rules would look something like:

Code: Select all

Translator 0: turn left
Options: stop=false
Incoming: MIDI B0 0E pp
Rules: gd=pp-ga
ga=pp
if pp==0 then exit rules, execute Outgoing Action
if gd>=0 then exit rules, skip Outgoing Action
Outgoing: Keystroke: 0

Translator 1: turn right
Options: stop=false
Incoming: MIDI B0 0E pp
Rules: if pp==127 then exit rules, execute Outgoing Action
if gd<=0 then exit rules, skip Outgoing Action
Outgoing: Keystroke: 1

smokeatthepump

2014-04-16 00:02:06

Wow that worked amazingly well! One last question regarding these knobs. Is there a way to ignore (using your example Incoming: MIDI B0 0E pp) just the message Incoming: MIDI B0 0E 00 of the knob in this rule because for some reason one of my buttons sends the same signal so when i turn the knob all the way to 00 it executes a command I have programmed to the button that sends the same signal. Thanks!

DvlsAdvct

2014-04-16 00:44:38

So, just to be clear, when B0 0E 00 comes in you want this message to stop sending? Because that means when you turn the knob to the left it will stop sending the 0 keystroke when you hit 0. To do that change the "if pp==0 then exit rules, execute outgoing action" to "if pp==0 then exit rules, skip outgoing action" in the Turn Left translator.

Let me know if that works
Jared

smokeatthepump

2014-04-16 01:07:38

I'm not really sure what I need so I'll describe the scenario. I am using what you posted to have the knob send a left and right command in a program. The knobs range is "B8 10 pp" , and I have a button which sends "B8 10 00". The problem is the knob works perfect but when it gets to the "B8 10 00" command on the knob it executes the command I have programmed to the key. I guess I'm trying to set a deadzone of sorts to the knob. so the pp range only covers "B8 10 01" through "B8 10 7F". I hope I am explaining it well enough.

smokeatthepump

2014-04-17 21:56:24

I may have figured out a way to do it if by pressing one pad on the apc40, I can send a command back into the apc40 to trick it into thinking I have pressed another hardware pad instead. The logic would work like this...

Press Button 1(B0 17 00) on APC40 > Bome waits 200ms and then sends a signal to the APC40 that I have pressed button 8(B8 17 00).

Is this at all possible?

DvlsAdvct

2014-04-17 22:49:10

Did you try that rule I posted, changing "execute" to "skip"?

smokeatthepump

2014-04-18 17:09:32

I tried what you posted but as you said when I get the the far left on the wheel it stops sending the keypress I have assigned to the knob.

DvlsAdvct

2014-04-18 17:23:09

Ah I was confused. The real issue a whole lot more complicated.

I'm looking at the stock MIDI mapping of the APC40, though, and I'm not seeing a button that sends that command, at least in the standard MIDI spec. Which button is it that is sending B0 0E 00? Usually buttons only send Note messages (ie 90 instead of B0)

Thanks
Jared

smokeatthepump

2014-04-19 15:37:20

It is the 8 buttons to the left of the "master" button right above the master fader and knob. Button 1 sends "B0 10 00" while Knob one if turned all the way to the left also sends "B0 10 00" same as Button 2 sends "B1 10 00" and knob 2 when turned all the way to the left also sends "B1 10 00". (this is the bottom set of knobs)

DvlsAdvct

2014-04-19 16:45:46

That's very strange interaction. Are you putting the apc40 in midi mode, or using it in ableton?

smokeatthepump

2014-04-26 03:51:27

I suppose I am using it in midi mode? I haven't done anything other than plug it in and open bome to listen for events. I'm not using it in Ableton.

Is there a way to send a mode change to the APC without having Abelton installed(I do have it installed if nessicary but I am trying to avoid having to use Abelton at all)? I found http://www.bome.com/forums/viewtopic.ph ... 3641#p8955 but I cant seem to get that to work.

Edit: I got it working using the thread above, I just had to enable the APC40 input in my Bome settings, it also solved the button and knob sharing the same value.