Old 06-25-2019, 10:29 AM   #1
Gass n Klang
Human being with feelings
 
Gass n Klang's Avatar
 
Join Date: Nov 2015
Location: Detmold - Germany
Posts: 583
Default Script Request: unbypass one random insertslot (for educational purposes)

hey guys,
I need a script that unbypasses one random insert slot of the selected track. It's for educational exercises. I do different settings on separate plugins and want the the user to guess which plugin is on. And I want to practise myself, so I don't want to see which plugin I activate. Would be sooo cool if somebody could do that.

I will have about 30 plugins in that track, so the script shouldn't be limited and unbypass one of the "used" slots. If that's not possible it could alternativly unmute or solo a random track. I'd then insert one fx per track and could do it that way.
Gass n Klang is offline   Reply With Quote
Old 06-25-2019, 02:49 PM   #2
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,538
Default

Code:
tr = reaper.GetSelectedTrack(0,0)
if tr then 
  cnt_fx = reaper.TrackFX_GetCount( tr )
  unbypassfxslot = math.floor(math.random()* cnt_fx)
  reaper.TrackFX_SetEnabled( tr, unbypassfxslot, true ) 
  for i= 1, cnt_fx do
    if i-1 ~= unbypassfxslot then  reaper.TrackFX_SetEnabled( tr, i-1, false )  end
  end
end
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote
Old 06-25-2019, 07:35 PM   #3
Gass n Klang
Human being with feelings
 
Gass n Klang's Avatar
 
Join Date: Nov 2015
Location: Detmold - Germany
Posts: 583
Default

Thanks a lot!!!
Gass n Klang is offline   Reply With Quote
Old 06-26-2019, 08:24 AM   #4
Gass n Klang
Human being with feelings
 
Gass n Klang's Avatar
 
Join Date: Nov 2015
Location: Detmold - Germany
Posts: 583
Default

It works beautifully.

Is it somehow possible to add some lines so that offline FX are excluded? That would be pretty awesome (as I could exclude some options to practise some some changes/plugin settings only)
Gass n Klang is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:02 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.