Hello!
I’m new REAPER user and I like this DAW, but I miss some features. One of that is some kind of item container, because I like to make my drums from audio samples straight into timeline. I think it’s faster way to program beats, than using some drum sampler, then import samples, create MIDI, route outputs etc. But the problem was that if there are a lot small pieces of audio it’s hard to move them across the Project while you working on arrangement. So, the logic step is to glue them together. But if you later want to do some edits or make some fills it’s impossible, because you can’t restore original parts.
I discovered that there is ReaScript API, and maybe I can make this feature by myself. And so I did it! Introducing - the Superglue. I’m a not a very experienced programmer, in fact it is my second Python script ever. It took me two evenings to figure out the API and do programming. So I want to share it, because maybe others can improve it, if someone else misses this feature.
So, what this script really does? Essential it is the regular REAPER glue function which remembers the glued items and their state.
For example, here you have single items. In one track audio in second MIDI. You can’t glue together MIDI and audio items.
[IMG]http://**************/a/img199/8122/26828207.png[/IMG]
Made some edits.
[IMG]http://**************/a/img839/3361/89237070.png[/IMG]
Then I glued them together using my Superglue. You can’t glue across the tracks, because API returns nothing if you call REAPER functions, so I don’t know how then get and identify glued items.
[IMG]http://**************/a/img854/8467/50127464.png[/IMG]
Now you can do whatever you can do with items in REAPER (Move, Copy, Loop, Reverse, etc.). And then if you want to restore the original parts, you just do Remove Superglue and it will replace the item with restored parts. If you looped the item, it will restore parts only for first item in loop, but then you can glue it together again and loop it.
[IMG]http://**************/a/img833/5889/96417917.png[/IMG]
How it works? Very simple, it’s stores the glued items states in SQLLite file (superglues.db) in your project directory and adds GID tag to glued item name, so you can get parts later. GID is just a timestamp, I think it’s enough random for this kind of use and there is no need for complex hashes. You even possibly can copy the GID tag and paste it in different item which you want to replace with corresponding parts.
[IMG]http://**************/a/img42/6876/95966260.png[/IMG]
Try and use this script on your own risk of course!
It’s not damaging to project in any way, it’s a regular glue function that can remember what it did. If you move the project you should move the superglues.db file along manually, or you can try to experiment importing it in your media bay and disable its use in any way.
I used Python 2.7.5 and Windows 7 32bit PC.
There are two script files, one for adding Superglue (add_superglue.py) and other for removing Superglue (remove_superglue.py).
Good day for everyone!