Correct midi on expression from menu

Discuss Lemur and share techniques.
tput73
Newbie
Posts: 25
Joined: 11 Mar 2013 13:11

Correct midi on expression from menu

Post by tput73 »

I have succeeded in getting a ctl
message out of a ranged menu
but I need 4 separate out messages
How does this work?
Thanks
T
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Correct midi on expression from menu

Post by Softcore »

I assume you are talking about the "menu" object and that you want controller outs that are not subsequent so you cannot use the object's factory midi mapping.

If all these assumptions are correct......

add script in menu....

on expression selection, any

Code: Select all

if (selection==0) ctlout(insert your desired values here);
if (selection==1) ctlout(insert your desired values here);
........
if (selection==n) ctlout(insert your desired values here);
where n is the amount of menu object -1. (menu items index numbers)

I hope this helps!
tput73
Newbie
Posts: 25
Joined: 11 Mar 2013 13:11

Re: Correct midi on expression from menu

Post by tput73 »

you rule softcore!

it worked however how I'm using it in Traktor causes the need for a
refresh of message(press) to set moodifiers correct, not sure why.

So i went back to custom buttons. Same issue?


T
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Correct midi on expression from menu

Post by Softcore »

Hmmmmmm! What exactly are you trying to pull?

I read "modifiers" which, if I recall correctly is a way for Traktor to create something like your own "shift" functions - for example a button sending some Midi CC 0 - 127 values doing a different job in the software according to what a modifier's state is, from 1 to 8 if I recall.

If thats the case, make sure that you 've got all the momentary-toggle mumbo jumbo stuff for your modifiers mapping correct inside Traktor's options. It should work either with custom buttons or with menus Im not sure though if the above script will suffice for this case.

If you break it for me down to specific instructions ( i.e. what exactly you want the menu to send as midi messages) we will work it out! ;)
tput73
Newbie
Posts: 25
Joined: 11 Mar 2013 13:11

Re: Correct midi on expression from menu

Post by tput73 »

Yup you got the traktor modifiers correct.
Here's what i'm trying to do...

4 custom buttons,A,B,C,D
Upon expression A sets modifier to 0, B to 1, C to 2, D to 3
The mod sets which deck to apply looping,pitching etc all currently mapped.

I didn't have this issue when I was using just one custom button to go from mod = 0, to mod = 1. But now with four
Also have scripts in each button to set the rest
Of four to off.
i occasionally have to double tap?
T
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Correct midi on expression from menu

Post by Softcore »

I see......

I remember, in the mapping settings of traktor you can set a midi message to increment a value, decrement a value or set it to a specific value....

So, in the case of the modifiers, set the mappings so that for example CC 12 sets modifier explicitly to 0, CC 13 explicitly to 1, and so on and so on.....and not make it decrement or increment....I believe this way it will work either with custom buttons or with menu - and in fact if you use consecutive CC numbers you dont even need scripts in the menu object - just use the object's midi mapping from CC 13 to CC 16 (for the example given)
tput73
Newbie
Posts: 25
Joined: 11 Mar 2013 13:11

Re: Correct midi on expression from menu

Post by tput73 »

Right on,
I had them set to direct.
I ended up going with the custom buttons as it involved less presses.

More important in my template is to get fx choices containers
pictured in 43 template onto my page.

there are four containers in 43 pictured in attachment.
when I try to copy each individual fx choice with container (3 per container except for last fx slot which is 1)

The fourth one copied ends up controlling the first.
Like they must stay in these containers?
I have looked at scripts but being such a nooob I cant get it?
Here is link to 43 on liines member library.
http://liine.net/en/community/user-library/view/333/

On my page I have all fx choices within one container i guess
T
Attachments
Screen Shot 2013-03-22 at 6.36.19 AM.png
Screen Shot 2013-03-22 at 6.36.19 AM.png (85.44 KiB) Viewed 3074 times
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Correct midi on expression from menu

Post by Softcore »

Post your template here and we can fix it - probably the scripts need some changes in the object references.....

A Knob inside 4 containers can be named Knob in all four of them because the path name changes from the containers' names....Once you pull the four Knobs ut of the containers though each one gets a different name (Knob, Knob2, Knob3, Knob4) breaking any scripts that previously were referencing only "Knob"....

Just to give you an idea what might be wrong! ;)
tput73
Newbie
Posts: 25
Joined: 11 Mar 2013 13:11

Re: Correct midi on expression from menu

Post by tput73 »

Yup,
That makes sense. I tried going through
All the coding and my brain went to
mush.
So I just resized everything I could
and used the handy dandy smart container.

But that makes me think..

How would I go about getting a midi out
message from traktor to open a hidden container?
I guess this is similar to my other question
With midi thru, I just can barely 'express'
myself in lemur at this point.
T
Softcore
Regular
Posts: 1613
Joined: 04 Nov 2012 08:34

Re: Correct midi on expression from menu

Post by Softcore »

The truth is...MIDI_ARGS is not that well documented in the manual but whatever the case....heres what you CAN do (I did it the other day) to solve a lot of your questions.

Set up Lemur.....

Add a monitor object - delete its value.

Add a script, execution on MIDI, type of message you want to observe, desired target, 0 to 127, 1 to 16.

then in the script simply type:

Code: Select all

Monitor.value=MIDI_ARGS;
Now, send from your software to Lemur the midi message which you'd like to observe. For example send from your software to Lemur the midi message that you want, whenever sent, a hidden container will be opened. Now all you have to do is to observe the arguments. Lets say for example your monitor shows the values {144,60,127} (I think this is some sort of note message, consider it just an example ;) )

Now add another script...lets name it showcontainer, execution on MIDI, type of message you observed, desired target, 0 to 127, 1 to 16.

and then type

Code: Select all

If (MIDI_ARGS={144,60,127}) show(Container,1);
Actually, you just type whatever midi arguments you observed in the first script - I just used what I used in my example above! ;)

This proecedure is pretty much generic - after you get the hang of it, you will realize you dont have to "listen" to all midi values (0 to 127) or all channels (1 to 16) to "catch" the desired message, but the above should get you going! ;)
Post Reply