ITEM MODIFIERS
Item Modifiers is a script that hooks up to my Functional Console script and allows for real-time procedural workflows for creating and mangling items.
People that have experience with 3D software packages (like Houdini or Blender) are likely familiar with workflows like this.
There is a lot to cover in this post, so I will start by explaining the design methodology behind item modifiers.
The main idea is to select an item or some items, and build up a modifier stack to process them in various ways. Modifiers are components that take the output from the previous component, process it, and pass it along to the next one. Here is a simple example:
In the example above, I am using the "Delay Builder" modifier to create a delay out of the selected item, using a pattern to select it, then reversing that pattern.
I can then hit the "Apply" button to apply all the existing modifiers and keep stacking. It is also possible to save entire modifier stacks as a file and load them later.
Another useful option is the generate lua script option through the copy menu:
This generates a lua script that executes what the entire modifier stack does in one go. So if you built up a modifier stack that does something you really like, you can integrate it deeply into your workflow.
In the example above you can see me triggering the generated lua script from the simple delay stack I built above with a hotkey.
I will list the installation steps next, then go into more detail about features and usage after that. Enjoy
Install js_ReaScript_API through ReaPack. Installing this is optional, however it needs to be installed if you want to use the "generate lua script" feature.
Launch BirdBird_Item Modifiers.lua
MODIFIERS
As described in the introduction, modifiers are the building blocks that create modifier stacks and are the backbone of the script.
While most of the names they have are self explanatory, I will list some special ones down below, this list will likely expand in the future. There are 39 modifiers in total at the time of writing this post.
Tag:
Tags an item selection with a name anywhere during the modifier stack. You can then use the "Get Tag" modifier to retrieve this selection. It is often useful to sandwich modifiers between "Tag" and "Get Tag" modifiers to run operations and keep working on a specific subset of the items.
Pattern Selection:
Selects items in a pattern determined by the checkboxes on the modifier GUI. Repeats and pattern selections combined with tagging is a good base to start building more musical modifier stacks.
Note that you can ctrl/cmd click any of the sliders you see to input a value manually. This will also let you go beyond the default ranges for the parameters.
BUTTONS
In this part I will go into what the buttons on the interface do.
Apply: Applies the modifier stack and clears it Reset: Resets all parameters on the current modifier stack Clear: Clears the modifier stack and reverts to your initial selection Seed: Generates a new seed that is used for modifiers that include randomness, this is useful to explore variations Select: Makes the modifier stack run on your new selection of items instead Save: Lets you save entire modifier stacks as a ".modstk" file that can be loaded through the load button. Load: Lets you load modifier stacks from ".modstk" files, or directly from the clipboard. Copy: There are a few options in the menu accessed through this button:
Copy as preset to clipboard
- This option copies the entire modifier stack to clipboard, which can then be loaded through the load menu. This makes it easy for people to share modifier stacks without having to toss files around.
Copy as command to clipboard
- This option copies the entire modifier stack as a valid Functional Console command.
Generate lua script
- This option generates a lua script that does what the entire modifier stack does in one go. You can then load it through the actions menu and use it however you want. This option will be greyed out if you don't have js_ReaScript_API installed.
MODIFIER LIST
The modifier list on the left is where you add modifiers to the modifier stack. By default the selected modifiers will go at the end of the stack. However you can drag the modifiers themselves to reorder them in the stack.
The filter box at the top lets you search all of the existing modifiers directly. You can focus this filter anywhere in the script by hitting the "f" key on your keyboard.
You can also right click modifiers to add or remove them to your favourites.
That is all of the basic functionality at the moment. In the post under this I will go into how the modifiers themselves were created, and how you can create them yourself.
Extra Notes
* This is an early version and may contain bugs.
* Undo points are finnicky with scripts that update the project in this manner, I am still thinking about how to handle them.
* Feel free to throw any cool modifier stacks that you have created into the thread here. I can build modifiers out of the cool ones and include them in the next versions under the special tag.
* Thanks to all friends that dealt with my ramblings on programming while I was developing this
MODIFIER BUILDER
The modifier builder is the companion script shipped with the main script that lets you create modifiers and test them on the fly. The new modifiers created through here will automatically show up in the main script as long as the user_modifiers.json file is selected during launch.
This editor is what I created first to create the default modifiers that are included with the script itself.
The controls for modifiers are generated from multiline text input on the fly, and can be tested live.
FORMAT
The multiline text has a simple format. It is a sequence of sections seperated by '>' on every line. The full format is:
Quote:
commands > controller_type controller parameters seperated by spaces > label
The "commands" mentioned here are Functional Console commands.
The parameters fetched from the controller are appended to the commands themselves during runtime.
The current controller types are:
sd -> slider double, expects 3 parameters (default value, min value, max value)
si -> slider int, expects 3 parameters (default value, min value, max value)
cb -> checbox, expects 1 parameter (default value, 1 = on, 0 = off)
- Checboxes let you filter out the entirety of commands in the first section during runtime
inpd -> double text input, expects 1 parameter (default value)
inpi -> integer text input, expects 1 parameter (default value)
inps -> string text input, expects 1 parameter (default value)
selp -> selection pattern
- This one has variable number of parameters determined by the first value in the second section. IE "selp=5 1 0 0 1 0" means that it has 5 parameters by default, and the sequence of 1s 0s afterwards are the default values.
The "Select" button lets you reset your initial selection to a new selection of items like it does in the main script.
Note that this is a developer tool at the moment, and while I put some safeguards in it is likely that I didn't test it as well as the main script. I will likely refine the editor more in the future.
Just pushed a new version.
There is now a small display that shows the initial selection the stack is working on.
User experience regarding initial selection to operate on has also been improved to iron out some of the rough edges and weirdness.
The select button no longer clears the stack, it instead switches the existing stack to run on the newly selected items.
Fixed modifier stacks not being ran when loading them.
Removed extra Functional Console dependency from the script, a version of it now ships with the script itself. (I have figured that having multiple packages that depend on eachother like I had at the beginning is a can of worms I don't want to open.)
There has been a lot of internal changes in this update, so please let me know if anything broke on your end.
Really awesome. Quick question, is it possible to apply the same operations on 2 or more clips that are in the same position in the timeline? See attachment, it applies different operations to the 2 clips.
I thought I'd seen everything after your other scripts but no!!!!!
It gets even better!
__________________ subproject FRs click here note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
Will give this a proper go soon but on first try apart from being amazing the only thing I wasn't keen on was that space bar got "captured" by the search bar at the top instead of start/stopping reaper.
I don't always use space bar as I've got other hardware to play/stop but sometimes I do and it was slightly frustrating (I feel bad to niggle about anything at all for such an amazing script lol)
I can see why you would want search to be the focus though so I don't mind either way really
Also. Do you take donations/have paypal etc. I checked but I couldn't find one on.
__________________ subproject FRs click here note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
All these item modifiers show above.are they in the script when I install or do I need to set it up myself?
Really looking forward to trying this tommorrow
I've been testing out your script and it's sooo cool man hahah really original for a DAW to have this kind of tool.
I was wondering if it was possible to consider a few things I thought would be cool to have while trying it out
A way to toggle bypass already inserted modifiers
A way to collapse and un-collapse all modifiers with a button maybe
Modifiers to filter out items by a volume threshold (so silent cuts are filtered out), another to arrange items by length and another to reposition items by time (either seconds, beats, ms, etc) between items, like separate items on the end by 1 second or 1/8, etc. like nvk's "reposition selected items" script basically.
For now that's what crossed my mind, so yeah. Thanks for the awesome script.
Last edited by tonalstates; 04-18-2022 at 11:32 PM.
First idea coming to my mind for what I could test this (did not try anything yet): Take a 1 bar loop you like. Repeat 64 times, so you have 64 bars.
Then experimenting with your tool, bringing more interest into this 64 bar loop, adding mutes after few (4 or 8 or 16) bars here and there (on different tracks, e.g. 1beat mutes on kick, or 1bar bass mutes). Or some fade ins, fade outs here and there. All with one click. Not sure if your tool can do all these already. Maybe detecting certain tracks from the track name (kick, bd, bass drum for example).
When I try to use this i get a message with something about Realmgui and OpenGL.and i have to close the script??
Code:
INSTALLATION
Install ReaPack
Add my repository to your ReaPack repositories.
Code:
https://raw.githubusercontent.com/Bi...main/index.xml
Install Item Modifiers through ReaPack.
Install ReaImGui through ReaPack.
Install js_ReaScript_API through ReaPack. Installing this is optional, however it needs to be installed if you want to use the "generate lua script" feature.
Launch BirdBird_Item Modifiers.lua
it seems i need opengl support for this,my laptop doesent have that.do i need that for this script to work?
Quote:
Originally Posted by Broken-Form
Would love to use this script. But cant as it seems to rely on opengl
I currently use ReaImGui for the user interface, which uses the GPU to render and uses OpenGL, unfortunately there is nothing I can do short of writing a fallback GUI at the moment which would be a massive undertaking.
Edit: Check the following post: https://forum.cockos.com/showpost.ph...6&postcount=32
Quote:
Originally Posted by musicbynumbers
Will give this a proper go soon but on first try apart from being amazing the only thing I wasn't keen on was that space bar got "captured" by the search bar at the top instead of start/stopping reaper.
I have a flag to disable this in the codebase as I have also found it to annoy myself at times as well, but it has not made its way to user settings yet
For the time being you can comment or delete this line out to disable filter auto-focus.
Quote:
Originally Posted by valankar
Really awesome. Quick question, is it possible to apply the same operations on 2 or more clips that are in the same position in the timeline? See attachment, it applies different operations to the 2 clips.
I have ideas on how to get this to work but it requires some big internal changes. As it stands I will likely be away from scripting for a while, so don't know when it would make it in.
I currently use ReaImGui for the user interface, which uses the GPU to render and uses OpenGL, unfortunately there is nothing I can do short of writing a fallback GUI at the moment which would be a massive undertaking.
A shame i could especially use the beat chopper and randomize features for my DnB Project
For folks getting the "failed to initialize OpenGL context" error, it would help to try and report what glview is saying in the ReaImGui thread as cfillion is describing in this post.
He also has a simple solution there with a .dll file to run ReaImGui scripts without OpenGL
For folks getting the "failed to initialize OpenGL context" error, it would help to try and report what glview is saying in the ReaImGui thread as cfillion is describing in this post.
He also has a simple solution there with a .dll file to run ReaImGui scripts without OpenGL
Awesome gonna look into it tommorrow when im in the studio
For folks getting the "failed to initialize OpenGL context" error, it would help to try and report what glview is saying in the ReaImGui thread as cfillion is describing in this post.
He also has a simple solution there with a .dll file to run ReaImGui scripts without OpenGL
I have a flag to disable this in the codebase as I have also found it to annoy myself at times as well, but it has not made its way to user settings yet
For the time being you can comment or delete this line out to disable filter auto-focus.
Thanks and all good
__________________ subproject FRs click here note: don't search for my pseudonym on the web. The "musicbynumbers" you find is not me or the name I use for my own music.
Wanted to test.
Version reaper657+dev0514_x64.
The script runs but when I try
activate any function Reaper crashes.
Perhaps this is due to the version of Reaper?