Push Knob to a sequential left and righ keystroke

olistreet

2008-04-10 10:16:50

Hi,

I´m in Ableton Live and I´m trying to do the following I have a BCR2000 Rotary Encoder and in the Browser View I am able to scroll up and down through my sample library that´s OK but I would love to use the pushing function on the top rotary encoders on my BCR2000 in order to select the desider samples, the problem is that in Live´s Browser the ability of open and close a folder in the browser is only effective by one clicking on the arrow next to the folder or by typing right arrow to expand and left arrow to close the folder, and then that´s my problem I don´t know how to assing first click where the focus is at this moment because my mouse pointer is away of the browser window.

Another solution maybe easier would be assing the fist push of the knob to the left arrow and the following to the right arrow and so on, I´m stuck here,

Thanks


Olistreet

Tuur

2008-04-10 12:11:06

You can create a toggle function with a variable.

Make 2 translators responding to the push, with the different keystrokes as output. Both of them have two rules:

Rules for translator 1:

g1=g1+1
if g1 > 1 then exit - do not execute outgoing action
(from memory here ;))

Rules for translator 2:

if g1 < 2 then exit - do not execute outgoing action
g1=0


Does this help?

IMO using keys is a better option than using mouse emulation anyway. I'm not using that unless there's no other option at all.

olistreet

2008-04-10 14:58:39

Hi Tuur,

I´m at work now, I´ll try this when I get home and I´ll let you know the results, I really appreciate your assistance

Thanks

Olistreet

olistreet

2008-04-10 18:37:59

Hello Tuur,

Back home, I´ve tried that code, and it partially works, It takes 3 pushes on the rotary button to go to right and then the next push goes to the right so it takes 4 push events instead of it it only should need 2 one for left and one for right, any idea of what could be wrong?

Thanks again


Olistreet

olistreet

2008-04-10 19:58:13

Hello Again,

after a little tweaking worked like it was supposed to work, highlighted that´s the only change I did to the code:

g1=g1+1
if g1 > 1 then exit - execute outgoing action
Rules for translator 2:

if g1 < 2 then exit - execute outgoing action
g1=0

Now....... well when I tried to browse one sub level it brought me back the superior level because the program doesn´t perform two or more right keystrokes in a row.
The program needs to know this:
-When I push the rotary encoder and then I scroll down it has to perform another right keystroke.

maybe a flag or a loop structure would be the right thing to do here, any ideas?

Thanks


Olistreet

joesapo

2008-04-10 22:01:15

Live's browser can be opened and closed using the keyboard combo 'CTRL+ALT+B'.

My MT template for browser navigation in Live is as follows;

Code: Select all

Up/Down/Left/Right : Map to the corresponding arrow keys
Browser : (Ctrl+Alt+B)(Alt+Left)(Esc)
Select  : (Ctrl+C)(Shift+Ctrl+B)(Alt+Left)(Ctrl+V)
Preview : (Shift+Enter) 
The 'Browser' button will open and close the browser, while controlling focus between the browser and the session view. The 'Select' button takes whichever clip you have highlighted in the browser and copies it to the last clip slot you were at in the session view.

You should be able to adapt some of the mappings above to your encoder. For example, if you have no need to move into subfolders in Live's browser, you can forget about the Left and Right arrow mappings. Also, the Preview mapping is strictly optional.

Let me know if you need a hand. ;)

olistreet

2008-04-11 16:04:19

Hi Joesapo,

As a matter of fact I really need to move into
subfolders because of the amount of folders in my sample
library and that´s what I´m looking into, I was thinking in if I can get the
value of the knob and translate it into a variable I could
compare it with the vaule of a global variable.
I know the value of the current knob position is stored in pp but I really don´t know how to compare it with my last position in order to get this thing right. That´s where I´m stuck at the moment,

Cheers

Olistreet

Tuur

2008-04-11 16:20:48

olistreet wrote:Back home, I´ve tried that code, and it partially works, It takes 3 pushes on the rotary button to go to right and then the next push goes to the right so it takes 4 push events instead of it it only should need 2 one for left and one for right, any idea of what could be wrong?
It should work (with 'skip outgoing'!), but it depends on how you defined the incoming action.

Make sure there is no 'pp' in there, you should only capture the first message and not the release of the button. It sends too many keystrokes otherwise!

Edit - but does this really help you? This only works 1 level deep, because it'll close the folder on the next click right?

olistreet

2008-04-12 13:04:32

Right!

I need to browse all my sample library wich has several sublevel folders I´m trying to compare the knob value 'pp' with a global variable, but I don´t know how to do that my programming skills.... no comment..

Tuur

2008-04-12 14:40:48

What will you do with comparing those? I'm not sure what you think that will solve...

Meanwhile, couldn't you just map the cursor keys to some of the BCR's buttons?

I think it will make the navigation a lot more intuitive that way.

Edit - :idea: I think I get what you're saying. I'm a bit busy right now, will see if I can post it tomorrow. It's going to use my original translators too by the way, so please confirm if you got those working first!

olistreet

2008-04-13 19:01:05

Hi,

Your original code worked out fine on my bcr endless encoders so I guess we are on the right track.


Thanks Tuur


Olistreet

Tuur

2008-04-13 19:40:27

Good. :)

What you could do is this. Add two more translators (up and down) for turning the encoder (you already have those I guess).

If you put g1=1 as a rule in the first (up) and g1=0 in the second one (down) the push will go a level deeper or back depending on your last movement (either up or down).

E.g. you could go deeper by scrolling down and pushing and close folders by going (one or more steps) up and pushing. Opening and closing also works as it already does of course in case you don't move at all.

All from memory, but it should work. ;)

olistreet

2008-04-14 21:17:08

OKAY

Well, here are the translators with the code, the first two are translators for up and down, then the third is for global variable assignment and then the two remaining are for right and left keystroke in that order, I don´t know where to put those late assignments that you told me Tuur g1=1 and g1=0 I´ve tried several times but I haven´t had any success any clue of what is missing here?

By the way, I was browsing ableton´s forums, as usual, and I found several posts of your own, in wich you say that you have the BCD2000, I was thinking maybe you want me to try this with the BCD2000 as I have one too, let´s say I´ll use a button to suply the push action on the rotary encoder, let me know if that could help you to help me to understand how this works.

Thanks

Olistreet


Image

Image


Image


Image


Image

Image

Tuur

2008-04-15 12:43:49

You should start with putting those last rules (g1=1 & g1=0) on top because right now they won't be executed at all! :)

Just click on the rule and on the (arrow) up button. Also, you should change my original rules to skip outgoing action.

If the knob is relative (can't check right now) other rules could be deleted if you ask me. Just map the correct message on the incoming triggers (again without pp).

You're right, I'm working on a BCD project and it's coming along but there's still a lot of work to do. On top of that it uses the next version of MT.

I also have a BCR (in the basement) but right now I'm focused on getting the BCD's up and running for primary control of Live. The BCR will be a nice add-on for FX and stuff later.

olistreet

2008-04-16 09:42:28

Hi Tuur,

I did some research in the bcr´s programming guide "....

Push Encoder 6 (MODE = controller mode of the respective control elements): Select “Absolute“ (AbS)."


and I assume that you can set the encoder to both values relative and absolute, so what I can do is just set this encoder to Relative and then keep working on your latest advices like erase the pp values later on i´ll let you know what the results are,

Thanks

Olistreet

Tuur

2008-04-16 11:24:50

Correct.

Set it to relative and remap the incoming actions.

They should look something like 'B0 13 40' and 'B0 13 41' instead of pp. The 'B0 13' part could be different depending on your midi channel and the knob you're mapping.

florian

2008-04-16 16:17:31

btw Olistreet, you can copy/paste your preset into this forum by selecting all translators in MT's main window (ctrl-A) and then copying them (Ctrl-C). Here in the forum, paste (Ctrl-V) it and it will be a human readable list of all translators and their mappings and rules.

Later,
Florian

olistreet

2008-04-17 23:47:49

I'm having difficulties with my computer right now, i'll post the results ASAP


Olistreet