storing cc position -> outputting stored value +1 /-1?

fanboi

2008-11-16 23:42:49

yo. so im working on a very crude automap macro so that i can select a track, hit the macro switch and it will map my controller to this value. in theory it works so far (except for some stupid bugs thats ive narrowed down to timers (i think anyways)), so thats fine.

the big problem right now is that it outputs a value i tell it to, a fixed cc value. i want it to look at my knob and say "ok, this knob is not at 64, so we will map it to this value", or +1 / -1 from its current location. this is to prevent jumps when switching selected tracks.

so, how would i accomplish this then?
basicly what i want is a way to store the cc value, then output either the stored value or one above or below when i invoke my macro. i know its done with rules, but with my (very) limited knowledge of them i cant figure out how.

im assuming its a matter of assigning cc to a variable, then outputting the same cc message but with the variable instead of the pp? i tried to no luck so far anyways, so please correct me if im wrong :)

florian

2008-11-24 22:59:39

I must admit, I'm not getting exactly what you're after. It's much easier for me if you provided a concrete example, step by step what should happen in response to which message.

But, in general, Rules aren't that hard once you get your head around it ;)

To store a value, just use the "assignment" rule:

INCOMING: MIDI B0 07 pp
RULES:
g0 = pp
OUTGOING: MIDI B0 07 pp

So when any CC07 comes in, the global variable g0 will be set to the value of that controller.

Now if you want to output the direction that it's going, you could do something like that (the controller value can only go in steps of 1, never "jump"...).

INCOMING: MIDI B0 07 pp
RULES:
qq = g0
g0 = pp
if pp < qq THEN rr=qq-1
if pp >= qq THEN rr=qq+1
OUTGOING: MIDI B0 07 rr

Just as an example.
Florian

fanboi

2008-11-29 00:15:12

heh ok. i just re-read my post and i realise that yeah: i cant understand it either.

so i will explain what im doing at the moment, and what i need my rule setup to do (with this post then).

i have a macro that invokes a pretty long timer sequence that in short performs the following: selects a prameter, demaps it (in ableton live) then remaps it. so far so good.

now, say that i twiddle my knob to 92, then invoke the timer again but to a different track (this is the automapping macro i posted in another thread), it will map it there, but this particular track might have the parameters set to 31 (the macro values in the software then), so that when i turn my knob now it will send 93 in to bomes, and out to my software causing it to jump from 31 to 93 (since the knob last sent 92). what i want instead of this is to send out instead is basicly 1 step from the current value of my softwares macro knob, so that its impossible to cause it to jump.

so lets say that im on track 1, turning my eq knob to 50.
then i switch to track 2, which eq knob is at 38. when i turn my controller one step from 50 (which was the last value it was before switching) i want my software to recognise this as simply 38 + 1 step, instead of my current real midi value which now would be 51.

since i have 7 tracks and im switching quite frequently between them sometimes i end up with one knob turned almost all the way up, then switching to track that has the same eq macro knob mapped to my controller (through my automapping script) and this particular macroknob is now all the way down to -inf db (0). turning the knob then would mean that it would instantly jump from 0 to almost all the way up since this was my last knob position. i want to prevent this, allowing me to simply let the recent mapped macroknob to go up by one when turning left so that my knobtwiddling is relative to the value of the software knob rather then the realworld knob.



hope that makes sense :)
i know i have problems explaining what i mean sometimes hehe.

florian

2008-12-12 11:29:51

Hi Fanboi,

sorry, not time recently to check this out! Have you come further with your setup?

Florian

fanboi

2008-12-12 18:05:07

florian wrote:Hi Fanboi,

sorry, not time recently to check this out! Have you come further with your setup?

Florian
nope, ive been busy with some other things instead. i replied to your email, which is a better explanation of what i want to do i guess. ill quote it here for reference:
i have posted a topic on the forums that is indirectly linked to this macro: my thread about how to output N cc +1, as opposed to outputting current cc value +1,
this is to prevent jumps when swithcing as that macro i posted (the automapper) does unless you are using endless encoders. so outputting the cc number, but just outputting +1 on the
velocity instead of outputting say, pp, would in theory prevent jumps. only problem then would be that youd need to switch to another track or possibly an empty one to pull your knob down once you have reached its full scale, since then you wouldnt be able to output any more since you cant turn it further.
this is something that i want to improve this macro with, although im still not sure how to do it. to be honest i have been working on other things right now anyways (specifically a remapper with bank up/down for my yamaha dx7 to map the 32 program change buttons), so i havent put much thought into it. i will eventually i guess heh.
so basicly outputting +1 on each turn (edit: not on each turn, but whenever the cc value increases by one, send out +1 instead of current realtime cc value), no matter what current cc value you have, this is to be used together with the instant automap macro. its useful, but when working with very few knobs it can be more then a pain, because each time you switch to a track and your controllers position is far from the original, live will jump no matter if you have your controller pickup set to "pickup" or "value scaling". hopefully this will be a workaround for that. i dont have any endless encoders to try it either, but im sure it works way better with that. :)