Invert Midi value problem

Michelle242

2012-01-20 15:34:20

Hallo, I have the following problem. I'd like to change all incoming midi values from for example 90 10 pp to the invert value with the modifier pp=pp*-1 If I try to do this no more midi comes out of the output. But when I type in pp=pp*-2 I get midi output again. But I need pp=pp*-1 . What's going wrong here? Please help!

DvlsAdvct

2012-01-26 06:13:45

Just to be sure, you want a knob to start at the left at 127 and go down to 0 as you turn it right, correct?

Michelle242

2012-01-26 10:38:02

Well it's not really a knob and it does not turn from left to right but yes, I want a fader to spit out the value of 127 if it's down continueing until 0 when it's up. Simple as that.

DvlsAdvct

2012-01-27 02:08:35

pp=pp/2
pp=pp+64
pp=pp-127
pp=pp*-1
g0=pp

I THINK those rules should do it. It worked on an older code I used for a knob, but it might be wrong. let me know. Make sure the outgoing message has g0 (or any available variable) for the outgoing velocity and pp as the incoming velocity. If you change the outgoing variable please be sure to change the variable in the rules.

DvlsAdvct

2012-01-27 17:14:44

I was actually putting some thought into this and I think it would work better if your rules were simply

pp=pp*-1
pp=pp+127

That should equal out to inverting the signal.

Michelle242

2012-01-27 20:26:11

Well thank you so much for your help. I will soon try out your suggestions. But I don't know if you really read my post exactly. Because if you did you would know that the rule pp=pp*-1 does not seem to work for me for some strange reason.

DvlsAdvct

2012-01-27 20:41:09

I did read your post, though I might be confused as to all of the steps you've used.

After you do pp=pp*-1 you have to add pp=pp+127

Then you should get MIDI. Or did you try that and then it still didn't work?

Michelle242

2012-02-02 19:54:34

Thaaaaaank you so much, DvlsAdvct. It seems I simply forgot to add "pp=pp+127" . Now it works! I thought too simple just thinking "Ok, invert must be *-1. But adding 127 is a logical step in this quotation! Thank you again! Now I can complete my program!

DvlsAdvct

2012-02-02 20:42:59

Yeah, it's something that stumped me when I first started doing this stuff. :)

Enjoy!