How to emulate midi learn relative (2nd complement)

Post your groups/layouts here

Moderators: davidv, seb@plogue

classic bandana
Posts: 42
Joined: Mon Feb 22, 2016 9:14 am

How to emulate midi learn relative (2nd complement)

Postby classic bandana » Mon Apr 04, 2016 3:55 am

I wanna be able to link two variables in way just like how midi learn relative (2nd complement) works.
-Any ideas?

seb@plogue
Site Admin
Posts: 9593
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal
Contact:

Re: How to emulate midi learn relative (2nd complement)

Postby seb@plogue » Mon Apr 04, 2016 9:49 am

There is a parameter modulator (relative) which will send x increment(s) (on a +x trigger) and y decrement(s) (on a -y trigger) to the target parameter. You can see what is an "increment" for each parameter by clicking on the params button on a bidule UI, currently there's no way to change that value so you might need to set up something to multiply the x/y values you send to a relative parameter modulator.

Or do you want to create fake MIDI CCs in 2nd complement mode?

classic bandana
Posts: 42
Joined: Mon Feb 22, 2016 9:14 am

Re: How to emulate midi learn relative (2nd complement)

Postby classic bandana » Mon Apr 04, 2016 12:40 pm

Hi seb!

I just realized that I might have to re-shape my question a little bit to make more sense.
Here's example what I want to archieve:

For example I want to control Touch OSC parameter (in my mobile phone) using midi device's cc (BCR2000) in (relative 2nd complement) mode.
How would I accomplish this?
I cant convert from midi learn function to bidule parameters because it will loose relative function.
And if I extracted cc's coming from midi input device (1,127) and used them for ''relative pm'' it wouldnt work because relative pm doesent reset itself after midi device's cc (1,127) movement is stopped, in another words relative pm is continuously either 0 or 1

So is there a solution that enables me to use same kind of ''midi learn/2nd compliment'' mechanism without actually using midi learn relative function?

seb@plogue
Site Admin
Posts: 9593
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal
Contact:

Re: How to emulate midi learn relative (2nd complement)

Postby seb@plogue » Tue Apr 05, 2016 9:16 am

And if I extracted cc's coming from midi input device (1,127) and used them for ''relative pm'' it wouldnt work because relative pm doesent reset itself after midi device's cc (1,127) movement is stopped, in another words relative pm is continuously either 0 or 1


You know you can use a change so that you only get a +1/-1 on the exact sample the CC value was received (it will be 0 if it doesn't change) and use that to multiply the cc value so that it only gives non-zero on an event, using a MIDI activity set to only listen to that CC would also work.

classic bandana
Posts: 42
Joined: Mon Feb 22, 2016 9:14 am

Re: How to emulate midi learn relative (2nd complement)

Postby classic bandana » Wed Apr 06, 2016 8:32 am

seb@plogue wrote:
And if I extracted cc's coming from midi input device (1,127) and used them for ''relative pm'' it wouldnt work because relative pm doesent reset itself after midi device's cc (1,127) movement is stopped, in another words relative pm is continuously either 0 or 1


You know you can use a change so that you only get a +1/-1 on the exact sample the CC value was received (it will be 0 if it doesn't change) and use that to multiply the cc value so that it only gives non-zero on an event, using a MIDI activity set to only listen to that CC would also work.

Seb thanks for replay!
Im not sure if I did exactly as you suggested but I got the idea of it.
Now the issue is that when BCR knobs move fast the variable kind of stutters and moves very slowly, but when BCR knobs move slowly then variable behaves the same way
Here is pic for my approach, any ideas why variable stutters on fast knob movements?
Attachments
Untitled.png
Untitled.png (15.76 KiB) Viewed 2978 times

seb@plogue
Site Admin
Posts: 9593
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal
Contact:

Re: How to emulate midi learn relative (2nd complement)

Postby seb@plogue » Wed Apr 06, 2016 9:36 am

The increment value for a variable is 0.01 so yes it will move slowly, hence why I mentioned multiplying the increment send to the relative parameter modulator.

2nd complement is
if cc value is >= 1 && <= 63 -> increment by ccvalue steps
if cc value is > 63 -> decrement by (128 - ccvalue) steps

I don't remember off hand for sure how the BCR behaves but IIRC, if you turn fast it will start sending values > 1 and < 127 (meaning multiple increments/decrements).

What you have done will treat all incoming CCs as a single increment/decrement without checking its value.

classic bandana
Posts: 42
Joined: Mon Feb 22, 2016 9:14 am

Re: How to emulate midi learn relative (2nd complement)

Postby classic bandana » Wed Apr 06, 2016 11:06 am

Do u mean like this? If so its still dramatically different.
Attachments
Untitled1.png
Untitled1.png (12 KiB) Viewed 2974 times

seb@plogue
Site Admin
Posts: 9593
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal
Contact:

Re: How to emulate midi learn relative (2nd complement)

Postby seb@plogue » Thu Apr 07, 2016 9:15 am

No, that's not what I meant.

Something like this

CC Filter (so you only get the CC you want to use) - > pair of CC Value filters to split <= 63 and > 64
On each branch:
MIDI Activity -> CC Extractor -> Unit Converter set to Normalized [0, 1] to MIDI 7 bit

On the <= 63 branch -> multiply the output of unit converter by the MIDI Activity trigger output and send to the Relative Param Mod.
On the > 64 branch -> set up 127 - output of unit converter -> multiply the result by the inverse of the MIDI Activity trigger and send to the Relative Param Mod.

btw, you can have both branches merge back into a single Relative Param Mod.

classic bandana
Posts: 42
Joined: Mon Feb 22, 2016 9:14 am

Re: How to emulate midi learn relative (2nd complement)

Postby classic bandana » Thu Apr 07, 2016 10:11 am

seb@plogue wrote:On the > 64 branch -> set up 127 - output of unit converter -> multiply the result by the inverse of the MIDI Activity trigger and send to the Relative Param Mod.

Im almost there :D . When increasing everything fine but when decreasing then its not as quick as when increasing, am I missing something?
(Variable is 127, unit converters are both Normalized [0, 1] to MIDI 7 bit)
Attachments
Untitled3.png
Untitled3.png (23.17 KiB) Viewed 2939 times

seb@plogue
Site Admin
Posts: 9593
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal
Contact:

Re: How to emulate midi learn relative (2nd complement)

Postby seb@plogue » Thu Apr 07, 2016 10:15 am

you need to set up
127 - output of unit converter
which means

constant 127
CC Extractor to Unit Convert
take both output into a Binary Operator set to -
multiply that with the inverse of the MIDI Activity trigger

classic bandana
Posts: 42
Joined: Mon Feb 22, 2016 9:14 am

Re: How to emulate midi learn relative (2nd complement)

Postby classic bandana » Thu Apr 07, 2016 10:29 am

Do you mean like this? Now when decreasing knob slowly the variable doesnt move at all, it moves only on quick movement
Attachments
Untitled4.png
Untitled4.png (23.38 KiB) Viewed 2938 times

seb@plogue
Site Admin
Posts: 9593
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal
Contact:

Re: How to emulate midi learn relative (2nd complement)

Postby seb@plogue » Thu Apr 07, 2016 10:33 am

sorry, should have been 128 and not 127.

classic bandana
Posts: 42
Joined: Mon Feb 22, 2016 9:14 am

Re: How to emulate midi learn relative (2nd complement)

Postby classic bandana » Thu Apr 07, 2016 10:40 am

Beautiful, now it works great. Seb thank you so much for taking time for this and being patient with me.


Return to “Bidule Layouts”

Who is online

Users browsing this forum: No registered users and 1 guest