View Single Post
Old 01-31-2018, 07:17 AM   #6
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

I'm a bit further, now. But I'm still missing the important part. It's true, that the bypassing can be done with the LUA script. But, when I switch tracks, I need the button LED to update. There is a problems here, though.

When switching tracks, Reaper does only send an OSC command IF an FX is NOT bypassed (e.g. it will output /fx/"fx number"/bypassed/ [s] 1.000000, if an FX is NOT bypassed. But there is no OSC output, if a an FX is bypassed.
I would need a condition: if "/fx/"fx number"/bypassed/" is absent, then turn on LED. Is this possible?

Code:
@oscmsg

oscmatch("/fx/%{number}d/name")?( // focus on FX names
  oscparm(0,'s',fxname[number]); // get all FX names
  matchi("*EQ*",fxname[number],name) ? ( // check if there is "EQ" in FX name and focus on those plugins only
     oscmatch("/fx/%{number}d/bypass") + oscparm(0,'f') != 1 ? // this is the part, that is not working, because I'm checking for a condition that is absent
       (
	msg1 = 0x90 ; msg2 = 0x28 ; msg3 = 0x7F; // turn bypass LED on
	): 
        ( 
	msg1 = 0x90 ; msg2 = 0x28 ; msg3 = 0x00; // turn bypass LED off
        );
	midisend(midi_out);
	);
			
);
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote