Old 01-31-2015, 12:40 PM   #1
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,241
Default EEL: keep selected only one item per MIDI pool

Having several sets of MIDI pooled items, and all items selected, you want to unselect all the pooled items except one of them to apply an action or script on them. This way the action won't repeat over all the pooled ones. You just need to apply it to one of them and the pooled ones will modify automatically.

Here is the script in action:

first 4 items are pooled copies. Next three red items are normal copies of the first items. So not pooled. Green happy item is me now since this is my first EEL script, just another normal item. And then three more pooled items, different from the first set of pooled items. It works for REAPER v4.60 and above.



Download link: https://stash.reaper.fm/23098/heda_Ke...IDI%20pool.eel

Thanks to X-Raym, for the help and inspiration

Last edited by heda; 01-31-2015 at 01:22 PM.
heda is offline   Reply With Quote
Old 01-31-2015, 01:03 PM   #2
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default Bravo !!

That is fantastic !!!

Well done, sir, this script will be helpful for every person who use MIDI pool items !
... and for me first !!

Thank you for sharing !
X-Raym is offline   Reply With Quote
Old 01-31-2015, 01:24 PM   #3
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,241
Default

Quote:
Originally Posted by X-Raym View Post
That is fantastic !!!

Well done, sir, this script will be helpful for every person who use MIDI pool items !
... and for me first !!

Thank you for sharing !
Thanks to you for your help !
updated post with download link.

Please test it and let's see if it has bugs... I hope not.
heda is offline   Reply With Quote
Old 01-31-2015, 01:39 PM   #4
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

It works perfectly, and it is very efficient !
You give birth to a beautiful script !

Thanks for the for me in the source code :P
Source code which contains as many comment lines as we could dream of : we can flawlessly READ the code. This is awesome Your script can also be a source of inspiration :P
X-Raym is offline   Reply With Quote
Old 02-01-2015, 02:47 PM   #5
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Warning: @import could not open 'X-Raym_Functions - console debug messages.eel'
Error: C:\Users\FnA\AppData\Roaming\REAPER\Scripts\heda_K eep selected only one item per MIDI pool.eel:35: 'msg_clean' undefined: 'msg_clean()'

Need something else?
FnA is offline   Reply With Quote
Old 02-01-2015, 02:53 PM   #6
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,241
Default

Quote:
Originally Posted by FnA View Post
Warning: @import could not open 'X-Raym_Functions - console debug messages.eel'
Error: C:\Users\FnA\AppData\Roaming\REAPER\Scripts\heda_K eep selected only one item per MIDI pool.eel:35: 'msg_clean' undefined: 'msg_clean()'

Need something else?
Ooops.. sorry.. I should have indicated that it has that dependency file from the debugging functions by x-Raym.
This one https://github.com/X-Raym/REAPER-EEL...20messages.eel
copy it to same scripts folder.
or you could just remove the @import line from the code and all the debugging functions. they all start with "msg_"
heda is offline   Reply With Quote
Old 02-01-2015, 03:06 PM   #7
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

That did it.

Appears to be working.

Good job.
FnA is offline   Reply With Quote
Old 02-01-2015, 03:09 PM   #8
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

@FnA
I advice to download my console debug script, as all my future scripts will be based on it, and maybe heda's one. Amongst other scripters probably
It is a small script that make more easy the process to code message and variable to be displayed in the console (Mainly for debugging purpose but not only). It can also be useful to you if you script in eel. you can find more info on the dedicated thread :P
X-Raym is offline   Reply With Quote
Old 02-01-2015, 04:27 PM   #9
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

I'll check it out.

heda, are you going to eel the transpose script? I don't really follow what is going on lately around here with eel 'arrays.' I was messing around and I think the transpose script can be handled using strings. Now that you have this, it could be macroed with the rename/transpose part. I won't bother if you're on it already.
FnA is offline   Reply With Quote
Old 02-01-2015, 05:02 PM   #10
heda
Human being with feelings
 
heda's Avatar
 
Join Date: Jun 2012
Location: Spain
Posts: 7,241
Default

Quote:
Originally Posted by FnA View Post
I'll check it out.

heda, are you going to eel the transpose script? I don't really follow what is going on lately around here with eel 'arrays.' I was messing around and I think the transpose script can be handled using strings. Now that you have this, it could be macroed with the rename/transpose part. I won't bother if you're on it already.
I am not trying to translate your python script to EEL... At least not yet. It works well as it is. I just did a custom action where this script to unselect pooled items is executed before the python transpose script and it works well.

EEL arrays are tricky. There is only one array space where you put all your arrays, and you have to define their sizes first in a very strange way. http://forum.cockos.com/showpost.php...37&postcount=9
heda is offline   Reply With Quote
Old 02-01-2015, 06:04 PM   #11
FnA
Human being with feelings
 
FnA's Avatar
 
Join Date: Jun 2012
Posts: 2,173
Default

Wow. I think I don't really need to break my skull on that then. Maybe for giggles I'll pick away at converting it some time. Well, some things are only available for python anyway. (SWS)
FnA is offline   Reply With Quote
Old 12-25-2020, 10:26 AM   #12
Stevie Boy
Human being with feelings
 
Stevie Boy's Avatar
 
Join Date: Jan 2011
Location: The Jungle
Posts: 43
Default

Bumping this to say thank you. Took me a while to find something that did this, almost was going to dive in to hacking another script to see if I could get it to do this, but found this just before.

I've never needed to before because one of the great things about REAPER how if it doesn't do something off the bat, then someone in the community has sussed it out already and extended the functionality.

This script is so handy if you are working on say a sample pack demo & you need to select & render only the first of a set of pooled items, saves so much time on manual selections a sthe project bay selects every instance of a named item.
Stevie Boy 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 05:30 AM.


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