View Single Post
Old 06-25-2016, 02:57 PM   #7
Smaasten
Human being with feelings
 
Join Date: Dec 2015
Posts: 47
Default

--[[
* ReaScript Name: js_Split selected notes by drawing a line with the mouse.lua
* Description: Split (slice) multiple selected notes by drawing a "cutting line" with the mouse in the MIDI editor piano roll.
* Notes that intersect the cutting line will be split at the position of intersection.
* If snap-to-grid is enabled in the MIDI editor, the notes will be split at the grid.
*
* Instructions: The script must be linked to a shortcut key.
* To use, position mouse in the 'notes' area of the piano roll, press the shortcut key once,
* and then move the mouse to draw the cutting line.
*
* In the script's USER AREA (near the beginning of the script), the user can customize:
* - The thickness of the cutting line
* - Whether all notes or only selected notes should be split.
*
* Note: Since this function is a user script, the way it responds to shortcut keys and
* mouse buttons is opposite to that of REAPER's built-in mouse actions
* with mouse modifiers: To run the script, press the shortcut key *once*
* to start the script and then move the mouse *without* pressing any
* mouse buttons. Press the shortcut key again once to stop the script.
* (The first time that the script is stopped, REAPER will pop up a dialog box
* asking whether to terminate or restart the script. Select "Terminate"
* and "Remember my answer for this script".)
*
* WARNING: - As with any ReaScript that involves moving or stretching notes, the user should
* take care that there are no overlapping notes, both when starting and when
* terminating the script, since such notes may lead to various artefacts.
* - Even if there are no obviously overlapping notes, artefacts may still be encountered
* during the drawing of the cutting line. This will not affect the eventual slicing of the notes.
* - Glueing the MIDI item often helps to sort out the notes that cause artefacts.
Smaasten is offline   Reply With Quote