This forum is read-only. Please post new topics in our Q&A forum.

Invert Midi value problem

General discussion about MIDI Translator

Moderators: florian, DvlsAdvct

Post Reply
Michelle242
Power User
Posts: 25
Joined: Wed Feb 10, 2010 10:28 pm

Invert Midi value problem

Post by Michelle242 » Fri Jan 20, 2012 3:34 pm

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
Bome Software: Partner
Posts: 1351
Joined: Fri May 09, 2008 5:07 pm

Re: Invert Midi value problem

Post by DvlsAdvct » Thu Jan 26, 2012 6:13 am

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
Power User
Posts: 25
Joined: Wed Feb 10, 2010 10:28 pm

Re: Invert Midi value problem

Post by Michelle242 » Thu Jan 26, 2012 10:38 am

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
Bome Software: Partner
Posts: 1351
Joined: Fri May 09, 2008 5:07 pm

Re: Invert Midi value problem

Post by DvlsAdvct » Fri Jan 27, 2012 2:08 am

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
Bome Software: Partner
Posts: 1351
Joined: Fri May 09, 2008 5:07 pm

Re: Invert Midi value problem

Post by DvlsAdvct » Fri Jan 27, 2012 5:14 pm

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
Power User
Posts: 25
Joined: Wed Feb 10, 2010 10:28 pm

Re: Invert Midi value problem

Post by Michelle242 » Fri Jan 27, 2012 8:26 pm

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
Bome Software: Partner
Posts: 1351
Joined: Fri May 09, 2008 5:07 pm

Re: Invert Midi value problem

Post by DvlsAdvct » Fri Jan 27, 2012 8:41 pm

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
Power User
Posts: 25
Joined: Wed Feb 10, 2010 10:28 pm

Re: Invert Midi value problem

Post by Michelle242 » Thu Feb 02, 2012 7:54 pm

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
Bome Software: Partner
Posts: 1351
Joined: Fri May 09, 2008 5:07 pm

Re: Invert Midi value problem

Post by DvlsAdvct » Thu Feb 02, 2012 8:42 pm

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

Enjoy!

Post Reply