Help getting switches bidirectional

Discuss Lemur and share techniques.
Post Reply
logarishm
Newbie
Posts:10
Joined:20 Apr 2015 20:34
Contact:
Help getting switches bidirectional

Post by logarishm » 07 May 2015 01:38

Hello!

I´m getting nuts with this, and can´t find anything in the forum...
I have a group of switches in radio mode to select the LFO sync tempo on my hardware synth and it works fine.

Image

What i want is turn ON the corresponding switch when i move the tempo knob in the synth. In any knob or fader assigned to a CC there is bidirectional comunication and i want to get this switches bidirectional too.

For the output i use cltout() function. And i´m trying to use an script in ON MIDI mode to change the activated switch. The midi target, CC number etc in the script is allrigth, and the script works fine on a fader (for testing purposes) with this expresion:

Code: Select all

x=subarray(MIDI_ARGS,1,1)/127;
It gets the value of the control, converts it to 0.000-1.000 value and it´s just fine.
But when trying to apply it to the switches doesn´t work. What i have at this moment is this:

Code: Select all

decl val=subarray(MIDI_ARGS,1,1)/4;  //get a value between 0 and 31;
set(switches.x,1,val);
Any help? Any experience with something like this?

Thanks!! :)

Softcore
Regular
Posts:1639
Joined:04 Nov 2012 08:34

Re: Help getting switches bidirectional

Post by Softcore » 08 May 2015 18:32

;)

Code: Select all

decl val=subarray(MIDI_ARGS,1,1)/4;  //get a value between 0 and 31;
Switches.x=0;
Switches.x[val]=1;

logarishm
Newbie
Posts:10
Joined:20 Apr 2015 20:34
Contact:

Re: Help getting switches bidirectional

Post by logarishm » 08 May 2015 23:09

Ohhhh, thank you very much!!!
I,ll try this tomorrow first in the morning... You saved my life... ;)

All the best!

logarishm
Newbie
Posts:10
Joined:20 Apr 2015 20:34
Contact:

Re: Help getting switches bidirectional

Post by logarishm » 09 May 2015 15:56

Softcore

It worked perfectly. I really apreciate your help.

Thanks!! :D


Post Reply