Skip to content

maximvdberg/reasamplomatic-multi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReaSamplOmatic5000 multi

ReaSamplOmatic500 multi lets you arrange ReaSamplOmatic5000 instances on a keyboard layout. This project aims to give REAPER a sampler such as FL Studio's DirectWave Sampler or the TX16Wx Software Sampler, while also integrating with REAPER routing.

The script is powered by the excellent reapy, and uses tkinter for the GUI.

You might also be interested in MPL's ReaSamplomatic5000 manager, which is similar but focuses mainly on single-note (drum) samples. Definitely check out his useful ReaSamplomatic5000 scripts too! The mpl_Export selected items to RS5k instances on selected track scripts are especially useful together with this script.

Contents

  1. Dependencies and Installation
  2. Usage notes
  3. Planned features
  4. Limitations
  5. License

Dependencies and Installation

Make sure you have Python 3 installed and that it is detected by REAPER. You can install the newest Python version from python.org. tkinter should be installed by default. To install reapy, run

python -m pip install python-reapy

in a terminal, or use whatever Python package manager you have installed. If you also have Python 2 installed, you might need to write python3 instead of python.

Next you need to enable reapy in REAPER. You can run the included action/script reasamplomatic_multi_enable_reapy.py for this, or see the instructions over here.

Optional dependencies

  • For automatic pitch detection, you need to install the JS ReaScript API via ReaPack (search for js_ReaScriptAPI: API functions for ReaScripts). For this to work, you need to install ReaSamplOmatic Multi via ReaPack as well.
  • For drag-and-drop support, install the tkinterdnd2 Python package.
  • To show useful tooltips on hover, you need to install the tkinter-tooltip Python package.

To install these last two dependencies, run the following in a terminal:

python -m pip install tkinterdnd2 tkinter-tooltip

Getting the script

You can add the following repository to ReaPack:

https://github.com/maximvdberg/reasamplomatic-multi/raw/master/index.xml

You can then run the script from within REAPER, or use the included action reasamplomatic_multi.py.

Alternatively, you can download the script from this repository, and run it with Python.

Usage notes

Overview

After succesfull installation using ReaPack, you can find Script: reasamplomatic_multi.py in the actions menu. Simply run it (setting a keyshortcut is recommended) to launch the sampler. Note that on Windows it migh take a while to start up. Alternatively, you can run the script outside of REAPER with Python.

After startup, the multi sampler will show all ReaSamplOmatic5000 instances on the selected track. Press Add to add one. Simply drag it with the mouse to move it, and drag the edges to resize.

Use ctrl+click to add items to the selection. Right click and drag for a nice and quick rectangle select. Hold alt to stretch the items.

Right click anywhere to list a bunch of actions. Most actions will apply to your selection.

Options are available at the top of the window. If you installed tktooltip (which is recommended), they all have a short description. For instance, check freeze to stay on the selected track, and not follow the selection any more. Check sync to disable syncing with REAPER, which might be too slow on Windows.

Feature list

A short list of miscellaneous features:

  • Zoom & resize Scroll the view with the mouse wheel, or click the middle mouse button and drag. Zoom with ctrl+mousewheel, or the + and - buttons. Change the piano notes size with alt+mousewheel. The window is freely resizable (and you can change the default size in the script).
  • Layering The note ranges align vertically such that they don't overlap. This allows for easy layering of multiple samples.
  • Syncing The multi sampler will automatically reflect changes in REAPER, such as renaming of tracks and ReaSamplOmatic5000 instances. Some changes (that take much longer to check) are only updated on refocusing the multi sampler window.
  • Pitched By setting the Pitched option, newly added ReaSamplOmatic5000's are set to the Note (Semitone shifted) mode, instead of Sample (Ignores MIDI note), and Obey note-offs is enabled. Enable this option when adding pitched samples, and disable when adding (unpitched) percussion. You need to install the JS ReaScript API for the Detect pitch to be automically run for added samples. See the optional dependencies.
  • Groups The multi sampler integrates with MIDI routing in REAPER. See creating groups for more information.
  • Parameter copy You can copy and paste specific parameters of the ReaSamplOmatic5000 instances. See copying parameters for more information.
  • Drag and drop You can drag and drop samples into the window. Note that to drag and drop from the REAPER media explorer, you need to enable the D&D REAPER option. Go here to find out why.
  • Solo and mute You can solo and mute note ranges.
  • MIDI You can click on the notes on the piano below to send MIDI data to REAPER. Velocity is dependent on the height of your mouse.
  • Defaults If you want, you can change some default values at the top of the script (short descriptions are given). You can change behaviour as well as appearance.
  • Colors The multi sampler also uses the track colors. You can set the alpha parameter at the top of the script to change how to colors are used.

Creating groups

The Separate action takes all ReaSamplOmatic5000 instances on the current track, and separates them over new tracks. It adds a MIDI-route from the selected track to these tracks. This is useful for individual effects processing (for instance when sampling drums: for the bass drum, the snare, hi-hats, etc.). You can still edit the ranges in the original multi sampler window.

You can select any of these tracks and use the multi sampler on them individually. This acts essentially as a group, where you can add and tweak additional FX for this set of ReaSamplOmatic5000s as you please. Selecting the original parent track again gives you access to all groups at once. In fact, the GUI will show all ReaSamplOmatic5000 instances which are reached through MIDI routing from the selected track (up to a recursion limit, which you can change at the top of the script).

When the Create bus option is ticked, an additional bus track is created. You can make a folder of the created track with this as the parent track to mix everything together. If you have the SWS extension installed, this is done automatically!

When the Separate overlap option is not ticked, all ReaSamploMatic5000s with overlap will be send to the same track when separating. This is handy for instance when designing a snare consisting of multiple samples, which need to remain mixed together when applying FX.

Copying parameters

The Copy/paste params actions lets you copy any parameters of a specific instance of ReaSamplOmatic5000 to a selection of instances. For instance, you can copy only the ADSR envelope, while leaving the other parameters unchanged.

To start, select a single note range and right click to open the action menu. Then select Copy/paste params. Two sets are available:

  • sample concerning sample parameters, such as the ADSR, looping, etc.
  • note concerning note and MIDI parameters, concerning note ranges, playback pitch, etc.

A popup will open where you can select which parameters to copy. Fill anything in for the fields you want to copy and simply leave the other ones empty. Afterwards you can select the target note ranges and use the Paste params action to copy the parameters to the selection.

Keyboard shortcuts

There are keyboard shortcuts for most actions. You can edit them and add more in the script file. You should use the tkinter syntax for this (I think the present bindings should provide a good example).

Action Binding Description
add a Add a ReaSamplOmatic5000 instance
refresh r Resync with REAPER
separate g Separate selection, see here
detect pitch D Call Detect pitch function of selection
scroll to center z Scroll the view to C2
close instance ui c Close the FX windows of selection
undo ctrl+z Call undo inside REAPER
redo ctrl+Z Call redo inside REAPER
freeze f Toggles the Freeze option
dnd reaper q Toggles the D&D REAPER option
sync Toggles the Sync option
pitched w Toggles the Pitched option
name by midi Toggles the Name by MIDI option
create bus Toggles the Create bus option
separate overlap e Toggles the Separate overlap option
copy ctrl+c, y Copy selection
paste ctrl+v, p Paste selection
delete Delete, d Delete selection
select all ctrl+a Select all note ranges
solo toggle m Solo selection
unsolo all M Unsolo selection
mute toggle s Mute selection
unmute all S Unmute selection
reset solo and mute x Unmute and unsolo all note ranges
params copy (sample) b Copy parameters, see here
params copy (note) B As above, but a different set.
params paste n Paste parameters.

Planned Features

  • Allow refresh to reconnect after closing & reopening REAPER.
  • A way to save user settings without requiring them to edit the script.
  • Shortcut to zoom to fit all note ranges.
  • Testing! There are probably still many bugs, so please let me know if you find any.

Limitations

Docking

As far as I know, Tk windows cannot be docked in REAPER, so docking the multi sampler is sadly not possible.

Drag and drop from inside REAPER

Since drag-and-dropping anything from REAPER freezes the REAPER window, communication with reapy will hang. So the loop which checks for changes in REAPER (such as switching tracks and name changes) will then hang too, which freezes everything.

This can be circumvented by disabling communication with REAPER whenever doing drag and drop. However, we don't know when the user might initiate drag and drop. As a workaround, we can disable REAPER communication altogether when the multi sampler window is not focused.

The option D&D REAPER does precisely this: turn it on to enable drag-and-drop from inside of REAPER, at the cost of the multi sampler only being updated when its window is focused. If you know a more elegant solution to this, let me know!

Performance on Windows

Performance on Windows is sadly not amazing. Reapy uses Python sockets for communication with REAPER, which seem to be quite slow on Windows. If you notice REAPER becoming laggy when having the multi sampler active, this is most likely due to the automatic syncing with REAPER. To solve this, you can turn off the Sync option to disable this, and instead manually use the Refresh action (default shortcut is r) whenever you need it.

It is also recommended you turn off Audio/Close audio device when stopped and application is inactive in the REAPER preferences. Otherwise, REAPER will stop the audio device when focusing the multi sampler window, which can take quite some time.

Additionally, the Tk implementation on Windows is very inefficient in comparison to other platforms. I found the responsiveness of dragging/resizing to be somewhat sluggish, and start up times are quite long.

Miscellaneous

There is some flickering while zooming. I'm pretty sure this is a limitation on how tkinter works, as I don't think it is impossible to pause the render callback during resizing. Please tell me if you know of a way to circumvent this!

When on top is enabled, the tooltips and right click menus will be rendered behind the main window. This seems to be bug in the tkinter tooltip library. Disable On top to see the tooltips again.

License

The script is licensed under the GNU GPLv3, see license.

About

A REAPER script for arranging multiple ReaSamplOmatic5000 instances on a keyboard layout.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages