Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER General Discussion Forum

Reply
 
Thread Tools Display Modes
Old 05-14-2016, 11:40 PM   #1
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default MIDI editor tools: warp, stretch, deselect etc

A variety of scripts for useful MIDI editor tools.

This GIF demonstrates some of the CC editing tools:



INSTALLATION: All the scripts can be easily installed via the ReaPack extension.

HELP: Most of the scripts contain extensive Descriptions and Instructions inside the script file itself. These can be read in REAPER's built-in script editor (by clicking the "Edit" button in the Actions list), or in ReaPack's "About" window. To help you get going, also refer to the next post, and if you have any queries, please post them in this thread.

PERFORMANCE TIP: If the MIDI editor gets slow and jerky when a certain VST plugin is loaded, check for graphics driver incompatibility by disabling graphics acceleration in the plugin.

PIN-ON-TOP: if the ReaScriptAPI extension is installed, script GUIs will automatically attach pin-on-top buttons.

MULTI-CHANNEL MIDI EDITING: REAPER has advanced multi-channel editing features (particularly if combined with the channel-related scripts below). Channels can be employed as 16 all-purpose groups that can be independently edited, similar to FL Studio's "color groups". In particular, if "nodes" are drawn in one channel and the connecting curve in another (which the "Connect nodes" script can easily do), it is easy to re-selected and edit the nodes separately.


MOUSE EDITING SCRIPTS vs LEFT-DRAG MOUSE MODIFIERS

The "js_Mouse editing" scripts (such as Warp, Stretch and Arch) resemble Reaper's own left-drag mouse modifier actions (such as "Draw CCs", Arpeggiate, "Paint notes", etc), in that the scripts follow mouse movement and continue to run until the user stops the script.

However, the scripts are more advanced than the native actions:

* The scripts' functioning (such as the ramp shape or the channel of inserted CCs) can be tweaked while the script is running, using the mousewheel, mouse middle button and right button.

* Whereas native actions can only be started and stopped by left-dragging and lifting the mouse button, the scripts be started and stopped in multiple ways (in addition to left-dragging), allowing a more customized and streamlined workflow.



KEYBOARD SHORTCUTS vs TOOLBAR BUTTONS

* All the scripts can be linked to easy-to-remember keyboard shortcuts such as "S" = Stretch, "1" = 1-sided Warp, "A" = Arch, etc.

* Alternatively (or additionally), the "Mouse editing" scripts can be linked to toolbar buttons and executed using REAPER's native "toolbar arming" features, or a scripted alternative (instructions in the script file, or this later post). This GIF is old and outdated, but still demonstrates toolbar arming:




-----------------------------------------------------------------------

LFO Tool
The mighty LFO Tool has its own thread.


General tools
* MIDI Inspector: A MIDI Inspector that improves on the native Properties windows in several ways.
* Insert empty space in time selection -- without moving MIDI and tempo markers off the grid

MIDI editing tools
* Quick draw linear, sine or LFO curves
* Arch and Tilt CC curves to mouse position
* 1-sided warp (accelerate)
* 2-sided warp (and stretch)
* Insert CC at mouse position, leaving others selected
* Stretch and Compress
* Connect CCs with smooth Bézier curves or any other weird and warped ramps
* Remove redundant CCs
* Deselect all MIDI events outside time selection

* Fit selected events to time selection in last clicked lane
* Fit selected events to time selection in lane under mouse
* Fit all selected events to time selection
* Set time selection to selected events in last clicked lane
* Set time selection to selected events in lane under mouse

* Split / Trim notes by drawing a line with the mouse
* Select and deselect MIDI notes by step pattern

Tools for multi-channel MIDI editing
(Described in another thread.)
* Option - Selecting single note or CC in active take sets channel for new events
* Option - Switching active take sets channel for new events to channel of existing events
* Set MIDI send channel of selected tracks to channel of existing MIDI events in track
* Deselect all MIDI except in active channel of active take
* Set MIDI send channel of selected tracks to channel of existing MIDI events in track
* Autoincrement MIDI send channels of selected tracks
* Select active MIDI channel

Notation scripts
* Select all notes that have customized display lengths or positions
* Set beaming of selected notes to custom rhythm
* Set display length of selected notes to double and add staccato articulation
* Set display length of selected notes to quadruple and add staccatissimo articulation
* Set displayed length of selected notes to custom value

Inline MIDI editor
Most of the MIDI editing scripts will also work in the inline editor.
* Select active MIDI channel
* Select CC lanes to show

... and many other scripts! Please browse through the ReaPack repository for the "js_" scripts.

--------------------
Donations

A taste of the other nifty scripts in ReaPack:
Kawa's script pack / X-Raym's script pack / Lokasenna's Theory Helper / mpl's script pack / eugen's TrackFXs Routing Matrix / airon's Color Swatch Tool
Attached Images
File Type: png MIDI Inspector with FileBox eXtender pin-on-top button.png (9.4 KB, 4668 views)

Last edited by juliansader; 02-13-2019 at 02:49 PM.
juliansader is offline   Reply With Quote
Old 05-14-2016, 11:43 PM   #2
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default Connect nodes

A versatile script for inserting curves between CC nodes.

MODES: WARP and BÉZIER:

The script offers two modes (selected by right-clicking the mouse):

* Warp: The user can the shape of the connecting ramps by moving the mouse. Middle-click switches between linear/power curves and sine curves. This mode is particularly useful for replacing existing LFOs with new shapes:




* Bézier: The script tries to find the smoothest curve to connect all selected nodes. Useful for smoothing transitions between CCs that were drawn at low resolution, or smoothing jagged curves:




MOUSEWHEEL AND MIDI CHANNELS:

* The mousewheel changes the channel of the inserted MIDI events.
* If the MIDI editor is set to "Edit only the active MIDI channel", the script will only select nodes that are in the active channel.

These channel features are very useful for keeping the ramps and the nodes in separate channels, so that the nodes can easily be re-selected and edited:


Last edited by juliansader; 02-13-2019 at 12:53 PM.
juliansader is offline   Reply With Quote
Old 05-14-2016, 11:43 PM   #3
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default 2-sided warp (and stretch) selected events in lane under mouse:

2-sided warp (and stretch) selected events in lane under mouse:
* Events to the left of the mouse are stretched separately from events to the right. Moving the mouse up or down warps the events toward or away from the mouse.
* Useful for changing a linear ramp into a more complex logistic-type curve.
* Useful for accelerating and decelerating a series of evenly spaced notes, as is typical in a trill.


Last edited by juliansader; 02-07-2017 at 02:06 AM.
juliansader is offline   Reply With Quote
Old 05-14-2016, 11:45 PM   #4
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default Stretch and Compress

Stretch or Compress selected events:

* REAPER has mouse actions for stretching notes together with all CCs in all lanes underneath them, but not for stretching CCs (or sysex events) in individual lanes, separate from other lanes. (See also http://forum.cockos.com/showpost.php...&postcount=138)

Similar to any DAW's "smart tool" the script's mode is determined by the initial position of the mouse:

* If the initial mouse position is within a CC lane or the piano roll, the script will stretch only events in that lane.

* Depending on initial mouse position relative to the selected events inside the lane, the script will stretch from the left side, right, top or bottom.

* If the initial position is over a lane divider and the mouse is moved to the left or right, the script will stretch ALL selected events in all lanes together.

* If the initial position is over a lane divider and the mouse is moved up or down into a lane, Compress mode is activated.

* In Compress mode, the mousewheel, middle- and right-click can adjust the compression curve. In Stretch mode, the mousewheel inverts the selected events.


Last edited by juliansader; 02-09-2019 at 03:25 PM.
juliansader is offline   Reply With Quote
Old 05-14-2016, 11:46 PM   #5
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default Split or trim notes by drawing a line with the mouse

Split or trim notes by drawing a line with the mouse:


Last edited by juliansader; 02-13-2019 at 12:23 PM.
juliansader is offline   Reply With Quote
Old 05-15-2016, 01:11 AM   #6
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default Insert CC or pitchwheel event at mouse position, leaving others selected

Insert CC or pitchwheel event at mouse position, leaving others selected:
* One of the simplest imaginable functions: inserting a single CC or pitchwheel event. But due to an unfortunate idiosyncracy of the MIDI editor, it is not possible to use a mouse modifier to insert a CC or pitchwheel event while leaving others selected.
* With snap-to-grid enabled, it is useful for inserting endpoint 'nodes' beneath notes.



https://raw.githubusercontent.com/Re...20selected.lua

Last edited by juliansader; 02-07-2017 at 02:08 AM.
juliansader is offline   Reply With Quote
Old 12-23-2016, 01:07 PM   #7
bbjz
Human being with feelings
 
Join Date: Oct 2016
Posts: 11
Default

Quote:
Originally Posted by juliansader View Post
Deselect all MIDI events outside time selection (from all tracks):



https://raw.githubusercontent.com/Re...0tracks%29.lua
Are you aware that in the video posted of this tip, the cursor disappears off the top of the screen and so no one can tell what menu selections or buttons are being clicked to affect the desire action. I've tried it in both Chrome and IE with the same results, so it's not a browser issue.
bbjz is offline   Reply With Quote
Old 05-27-2016, 08:32 PM   #8
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default Remove redundant CCs

Remove redundant CCs:
* Simple, one-click action that works with 7-bit CCs, channel pressure and pitchwheel - useful for cleaning up after drawing LFOs, ramps etc.
* User can choose whether to limit to selected/all events, last clicked lane / lane under mouse / all lanes.


Direct download link: js_Remove redundant CCs.lua

EDIT: This script (like most of my other scripts) have several settings in the USER AREA that the user can customize. But in case the user doesn't want to edit scripts, here are two versions with slightly different presets:
js_Remove redundant CCs (from selected events in lane under mouse).lua
js_Remove redundant CCs (from selected events in last clicked lane).lua

Last edited by juliansader; 06-29-2016 at 12:24 PM.
juliansader is offline   Reply With Quote
Old 05-28-2016, 12:26 AM   #9
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,791
Default

Nice

Edit: How can we send you private message ?

Last edited by X-Raym; 05-28-2016 at 12:33 AM.
X-Raym is offline   Reply With Quote
Old 05-29-2016, 06:52 PM   #10
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 938
Default

Conversely, we probably need an action to select all CCs in a lane not under a note. Users can then set these to a value of their choice or delete them altogether.
pcartwright is offline   Reply With Quote
Old 06-03-2016, 01:18 PM   #11
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by pcartwright View Post
Conversely, we probably need an action to select all CCs in a lane not under a note. Users can then set these to a value of their choice or delete them altogether.
This is already possible, albeit with a stepwise combination of four actions:

1) Make sure "CC selection follows note selection" is on.

2) Run action "Select all notes"

2b) Sometimes 2 does not trigger the CC selection, so one has to do something like wiggling the notes left and right, move them up or down, or cntl-click (toggle selection) on one of the notes to remind REAPER to select all the CCs. I am not sure if there is a better way to do this.

3) Run action "Invert selection"

4) Run SWS action "Delete selected events in last clicked lane"

Unfortunately, because of 2b, these steps can probably not be combined in a custom action.

(The "Deselect all MIDI events outside time selection" script can be used to limit the deletion to the time selection.)
juliansader is offline   Reply With Quote
Old 06-15-2016, 09:05 AM   #12
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by Fergler View Post
This seems to be affecting much more than just the selected notes, e.g.:

Before:
http://puu.sh/ptamy/2067033266.png

After:
http://puu.sh/ptann/f783758985.png

Now it's all f'd up past where I made the edit.

Sometimes undo/redo fixes it, too, which is bizarre.

I'm using 1-sided and 2-sided to test this

Another version of this I can reproduce:
1. Select some MIDI events in between 2 other chunks of MIDI (like I did in the screenshots)
2. Use either 1 sided or 2 sided hotkey
3. Alter, press hotkey again to stop
4. Appears fine but does not play back correctly
5. Glue, reveal why it doesn't play back correctly. Entire MIDI is bonkers
Weird...

You are welcome to send me any MIDI or RPP that would allow me to reproduce the problem.

EDIT:
The fact that each of the notes at the bottom pitch has been weirdly extended to the beginning of the next note makes me think that there is some mix-up of note-ons and note-offs. It may be related to the bug report Overlapping notes problem. I have encountered the bug when moving or stretching notes onto existing notes, but not yet when using the warping scripts.

The MIDI in your example looks like drumkit MIDI. Are there perhaps overlapping notes or notes of zero length? The selected note at the bottom left looks suspiciously short, and may be overlapping with the preceding unselected one.

EDIT 2:
The good news is that I have been able to reproduce the problem.

The bad news is that the problem appears to be caused by overlapping notes, and unfortunately there is no way around it: ReaScript simply cannot handle overlapping notes. I have tested REAPER's native functions such as MIDI_SetEvt, MIDI_SetNote and MIDI_InsertNote, as well as SWS's alternative FNG functions, but no luck.

I suggest that the best solution is to simply avoid using any ReaScript when there are overlapping notes. (In fact, given the innumerable bug reports related to overlapping notes that have nothing to do with scripts, it is probably prudent to avoid overlapping notes altogether in REAPER.)

P.S. The problems with overlapping notes are not actually REAPER's own fault, since the standard MIDI specifications themselves do not allow for overlapping notes. REAPER's MIDI editor can visually represent overlapping notes and can 'remember' them in its internal memory, but as soon as the notes are converted to actual MIDI, overlapping notes get jumbled up.

EDIT: REAPER v5.32 has fixed the API bugs with overlapping and zero-length notes! These should not cause problems any more.

Last edited by juliansader; 02-06-2017 at 10:56 PM.
juliansader is offline   Reply With Quote
Old 06-24-2016, 06:46 PM   #13
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default Split notes by drawing a line with the mouse

Split notes by drawing a line with the mouse:
* Intended to mimic the functionality of FL Studio's Slice Tool.



Available in ReaPack, or direct download links:
js_Split selected notes by drawing a line with the mouse
js_Split notes by drawing a line with the mouse

[EDIT: There is useful discussion regarding this script in the original Feature Request thread: diagonal line split - midi notes.]

EDIT 2016-07-08: The new Trim notes script works similarly:


Last edited by juliansader; 07-08-2016 at 05:46 AM.
juliansader is offline   Reply With Quote
Old 06-27-2016, 09:08 AM   #14
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,644
Default

Nice! loving all of these thanks!
__________________
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.
musicbynumbers is offline   Reply With Quote
Old 06-27-2016, 09:41 AM   #15
Jason Brian Merrill
Human being with feelings
 
Jason Brian Merrill's Avatar
 
Join Date: Jun 2006
Location: Northeastern PA, USA
Posts: 20,789
Default

These are all excellent, thank you!~
__________________
Beliefs do not require respect. People do.
Jason Brian Merrill is offline   Reply With Quote
Old 07-04-2016, 02:34 PM   #16
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Major update:

I am trying to replicate the user interface and user experience of FL Studio and Cubase. In these DAWs, MIDI editing functions can be selected by means of toolbar buttons, so the user is not limited to using (and remembering) keyboard shortcuts.

My scripts that edit the "lane under mouse" (such as Stretch, Tilt, Draw, Arch etc) could previously not be selected using toolbar buttons, since the mouse needs to be positioned over the CC lane when the script starts.

In the new versions of these scripts:
1) The scripts can be linked to toolbar buttons. Clicking a toolbar button will select ('arm') the script to be applied next.
2) A single keyboard shortcut and a single mousewheel shortcut are all that is needed to run any selected ('armed') script.

EDIT 2017-01-30: New update: Any of the scripts that use the mousewheel can now be controlled via the single mousewheel modifier that is linked to the "js_Run..." 'control script' - even if those scripts are called from their own keyboard shortcuts.

I.e. if you prefer to run the scripts via easy-to-remember keyboard shortcuts such as "C" = Compress/Expand, "A" = Arch linear, "shift+A" = Arch sine, etc., all these scripts can now be controlled via the single mousewheel shortcut. No need anymore to remember a different mousewheel modifier combination for each script!


This keyboard shortcut and mousewheel shortcut must be linked to the new 'control script' with the long (but hopefully descriptive) name of
"js_Run the js_'lane under mouse' script that is selected in toolbar (link this to shortcut and mousewheel).lua".

This script will call the 'armed' script that has been selected in the toolbar.

For detailed instructions, please read the header of the abovementioned ""js_Run..." script (in REAPER's script editor, or in ReaPack's "About" window), or follow the discussions in the posts below.

Example of a MIDI editor toolbar:


Demonstration of toolbar-linked scripts:



EDIT:

The following instructions are included inside the js_Run script:

[TL/DR version:
1) Add all of the 'lane under mouse' scripts to the toolbar.
2) Link the js_Run script to a keyboard shortcut as well as a mousewheel shortcut.
3) Now any 'lane under mouse' script that is activated in toolbar can be run using the shortcuts assigned in step 2.
4) EDIT 2017-01-30: Moreover, even if the script was called from its own keyboard shortcut, it can still be controlled via the single mousewheel modifier that is linked to "js_Run...".]


Description:
This script helps to improve the UI by allowing js_ MIDI editing functions to be selected via toolbar buttons, similar to FL Studio and other DAWs.

Any js_ script that edits the 'lane under mouse' and that has been linked to a toolbar button can be run using a single keyboard shortcut that has been linked to this script -- therefore no more need to remember a different shortcut for each script.

This script currently works with the following js_ MIDI editing scripts:
~ Arch with sine curve
~ Arch with linear or power curve
~ Stretch
~ Tilt
~ Compress or expand
~ 1-sided warp (accelerate)
~ 2-sided warp (and stretch)
~ Draw linear or curved ramp in real time
~ Draw linear or curved ramp in real time (chasing start values)
~ Draw sine curve in real time
~ Draw sine curve in real time (chasing start values)
~ Split notes
~ Split selected notes
~ Trim notes
~ Trim selected notes
~ Remove redundancies (in lane under mouse)
~ Move ALL selected events to mouse position

Any user-customized variants of these scripts can also be added to the toolbar.

NOTE: The scripts listed above are those that work with events in the lane under mouse. Since the mouse needs to be positioned over the MIDI editor's CC lanes or notes area for these scripts to work, they cannot be run directly from toolbar buttons.

Scripts that work with events in the last-clicked lane (such as variants the LFO Tool or the Remove Redundancies script) can be run directly from the toolbar.

Instructions:
* This script must be linked to a keyboard shortcut (such as "S") as well as a mousewheel shortcut (such as Ctrl+mousewheel).
* This script should not be linked to a toolbar button.
* The js_ MIDI functions listed above should each be linked to a toolbar button. (They can also be linked to their own keyboard shortcuts, but this is not necessary.)
* To run the selected js_ MIDI function:
* 1) click its button, which will light up,
* 2) move the mouse to its position in the CC lane or notes area, and
* 3) press the shortcut key for this "Run the js_..." script.

Note: Since this script 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".)


EDIT:
The standard arming method (right-click to arm and then left-click to run the action) actually does work - but only in the piano roll area, not in the CC lane. For some reason, REAPER's toolbar arming does not work in the CC lane. The Trim notes script, for example, can be run via the standard toolbar arming method.


Last edited by juliansader; 09-17-2017 at 10:30 PM.
juliansader is offline   Reply With Quote
Old 07-04-2016, 04:30 PM   #17
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 5,791
Default

Very ambitious project and very promising Thanks for your work !!
X-Raym is offline   Reply With Quote
Old 07-04-2016, 04:41 PM   #18
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,644
Default

very cool! will try asap!
__________________
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.
musicbynumbers is offline   Reply With Quote
Old 07-04-2016, 05:27 PM   #19
kkostovas
Human being with feelings
 
Join Date: Sep 2015
Posts: 71
Default

What now??

If this is a dream...please say so.


Thank you...
kkostovas is offline   Reply With Quote
Old 07-04-2016, 08:49 PM   #20
ceanganb
Human being with feelings
 
Join Date: May 2009
Location: Brazil
Posts: 278
Default

I have one complaint: how dare you call it simple? It's phenomenal, and f... useful. Thanks a lot for that!
__________________
Ceanganb
ceanganb is offline   Reply With Quote
Old 07-05-2016, 07:13 AM   #21
lowellben
Human being with feelings
 
lowellben's Avatar
 
Join Date: Aug 2010
Location: They put me in a home.
Posts: 2,929
Default

Quote:
Originally Posted by juliansader View Post
Major update:

My scripts that edit the "lane under mouse" (such as Stretch, Tilt, etc) could previously not be selected using toolbar buttons, since the mouse needs to be positioned over the CC lane when the script starts.
This was a huge problem for me, yes! So frustrating having to position the mouse over the CC lane without toolbar options!! This is AMAZING. AMAZING UPDATE. PLEASE keep this going! You rock!!
__________________
47.8% of statistics are made up.
lowellben is offline   Reply With Quote
Old 09-30-2017, 08:59 AM   #22
srdmusic
Human being with feelings
 
Join Date: Dec 2016
Posts: 502
Default

Hey Julian, Is there a way to get your scripts to apply to multiple midi items?

For example, I'd like to draw a linear line or a curved line across multiple midi parts. If I use the pencil tool it works but not scripts.

This also seems to be the case for scripts that increase or decrease CC data which I believe is a stock script.
srdmusic is offline   Reply With Quote
Old 10-01-2017, 10:10 AM   #23
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by srdmusic View Post
Hey Julian, Is there a way to get your scripts to apply to multiple midi items?
Unfortunately not, since scripts do not (yet) have proper access to the list of editable takes in an editor. I have submitted a FR some time ago: ReaScript: Functions to get and set editable/visible state of takes in MIDI editor. In that thread, I describe a (lengthy) workaround to get editable takes, but it will not work reliably in all situations.
juliansader is offline   Reply With Quote
Old 01-10-2018, 09:36 AM   #24
ClassicMan
Human being with feelings
 
Join Date: Mar 2017
Posts: 98
Default How To Use "Insert linear ramps between CCs"

I am new to Reaper having moved from Sonar and would like to use one of your scripts.

I need to be able add specified start and end CC points and draw a smooth and gradual line between them.

For example add CC11 40 and 100 points then add a smooth gradient between them.

It seems that your Insert linear or shaped ramps between selected CCs or pitches in lane under mouse will do the job. I have downloaded and installed the ReaPacks and your script is listed under "Extensions".Would someone please help with details on how I actually now use the script. What do I do next to see this work with my selected CC data.

Many thanks.
ClassicMan is offline   Reply With Quote
Old 01-10-2018, 11:01 AM   #25
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by ClassicMan View Post
I am new to Reaper having moved from Sonar and would like to use one of your scripts.

I need to be able add specified start and end CC points and draw a smooth and gradual line between them.

For example add CC11 40 and 100 points then add a smooth gradient between them.

It seems that your Insert linear or shaped ramps between selected CCs or pitches in lane under mouse will do the job. I have downloaded and installed the ReaPacks and your script is listed under "Extensions".Would someone please help with details on how I actually now use the script. What do I do next to see this work with my selected CC data.

Many thanks.
Welcome to REAPER!

Since you are new here, I am not quite sure in how much detail I should describe each step -- could you let me know if you are already familiar with the following features?

* REAPER's Actions list and the different sections such as "Main", "MIDI editor", etc? (The different sections in REAPER's Actions list are not only relevant to scripts, but also to all other native actions and custom actions. By dividing actions into sections, REAPER allows you to use the same shortcut for different actions in different sections, so that you don't run out of shortcut keys. For example, when working in the main Arrange window, you can use "S" to split items, and while working in the MIDI editor, you can use "S" to split notes.)

* Assigning keyboard shortcuts and mousewheel shortcuts to actions in the Actions list? (Most users like to assign mousewheel shortcuts, such as shift+mousewheel, to zooming and scrolling actions.)

* It is simpler to run my scripts via keyboard shortcuts, but you can optionally link them to toolbar button too. Do you know how to customize REAPER's toolbars and link actions to toolbar buttons?

Last edited by juliansader; 01-10-2018 at 11:26 AM.
juliansader is offline   Reply With Quote
Old 01-10-2018, 11:32 AM   #26
ClassicMan
Human being with feelings
 
Join Date: Mar 2017
Posts: 98
Default

Hello juliansader,

Thank you so much for such a prompt reply; very impressive.

Quote:
Originally Posted by juliansader View Post
* Are you familiar with REAPER's Actions list and the different sections such as "Main", "MIDI editor", etc?
Yes, I'm fine with Reaper's Actions list; I've already used it quite a few times. I also understand the different sections. I'm on my third project with Reaper and have used the MIDI editor extensively.

Quote:
Originally Posted by juliansader View Post
* Do you know how to assign keyboard shortcuts and mousewheel shortcuts to actions in the Actions list? (Most users like to assign mousewheel shortcuts, such as shift+mousewheel, to zooming and scrolling actions.)
Yes, I've assigned keyboard shortcuts to actions. I haven't assigned mousewheel shortcuts although I think I'm ok with that too as I see that we can just move the wheel to assign it just like pressing a keyboard key.

Quote:
Originally Posted by juliansader View Post
* It is simpler to run my scripts via keyboard shortcuts, but you can optionally link them to toolbar button too. Do you know how to customize REAPER's toolbars and link actions to toolbar buttons?
Yes, I've customised Reaper's toolbar and added custom buttons assigned to Actions. I's be quite happy to run your scripts via keyboard shortcuts though.

Thanks again for your help, it's much appreciated.
ClassicMan is offline   Reply With Quote
Old 01-10-2018, 03:07 PM   #27
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

You are familiar with almost everything that is needed to use my scripts, so the next steps should be easy:

INSTALLATION: If ReaPack has installed correctly, and you have already downloaded the scripts (Extensions -> ReaPack -> Synchronize packages), my scripts should show up in the Actions list's MIDI editor section. Do you see them there?

You can assign a keyboard shortcut to the "Insert linear or shaped ramps between selected CCs or pitches in lane under mouse" script, similar to how you assign a shortcut to any native action (I personally use ctrl+alt+V, for example), and if you press the shortcut while the mouse is over some CC lane with selected CCs, the script will insert CCs in-between the selected CCs in that lane.


GETTING HELP: Most of my scripts provide extensive Descriptions and Instructions. These can be read in two ways:
* by opening the script file in any text editor (or in REAPER's built-in script editor, by clicking the "Edit" button in the Actions list),
* or via ReaPack's browser, by right-clicking the script and selecting "About this package". (ReaPack's "About" window automatically updates as you scroll through the scripts, so it is an easy way to browse script descriptions.)


MOUSE MODIFIERS VS CONTINUOUS SCRIPTS: The "js_Insert..." script, like most other actions, runs once and then quit. Some other scripts, such as my Warp scripts, are more like the left-drag mouse modifier actions with which you draw CCs: the script continues to run while you move the mouse, until you stop the script.

However, continuous scripts respond to shortcut keys and mouse buttons in an opposite way to mouse modifier actions:
* To run a mouse modifier action, you press the keyboard modifiers (such as ctrl) and the mouse button together, and then hold them all down while moving the mouse.
* In contrast, to run continuous scripts, press the shortcut key *once* to start the script and then move the mouse or mousewheel *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".)


MOUSEWHEEL SHORTCUTS: By default, REAPER can only link one Action with one mousewheel shortcut (such as Ctrl+Shift+mousewheel with "Zoom vertically").

However, linking each of my scripts to its own mousewheel shortcut is not ideal, since it would mean that the user must remember several modifier combinations, one for each script. (Mousewheel modifiers such as Ctrl+Shift+mousewheel are more difficult to remember than keyboard shortcuts such as "A".)

My scripts therefore uses a trick by which one script, namely "js_Run..." (which acts like a kind of 'master control' script) broadcasts mousewheel movements to all other scripts. You only have to link this one script to a mousewheel+modifier shortcut, and its mousewheel shortcut can then control the curve of any of the other scripts such as Arch or Compress.


Quote:
Originally Posted by ClassicMan View Post
I have downloaded and installed the ReaPacks and your script is listed under "Extensions".
If you are referring to the ReaPack browser, scripts should be listed under "Scripts", and only "ReaPack package manager" (or perhaps other extensions) should be listed under "Extensions".

Last edited by juliansader; 01-11-2018 at 03:06 AM.
juliansader is offline   Reply With Quote
Old 01-11-2018, 10:55 AM   #28
ClassicMan
Human being with feelings
 
Join Date: Mar 2017
Posts: 98
Default

Quote:
Originally Posted by juliansader View Post
You are familiar with almost everything that is needed to use my scripts, so the next steps should be easy:

INSTALLATION: If ReaPack has installed correctly, and you have already downloaded the scripts (Extensions -> ReaPack -> Synchronize packages), my scripts should show up in the Actions list's MIDI editor section. Do you see them there?
Yes, I see your scripts in the Actions MIDI Editor section.

Quote:
Originally Posted by juliansader View Post
..... You can assign a keyboard shortcut to the "Insert linear or shaped ramps between selected CCs or pitches in lane under mouse" script, similar to how you assign a shortcut to any native action (I personally use ctrl+alt+V, for example), and if you press the shortcut while the mouse is over some CC lane with selected CCs, the script will insert CCs in-between the selected CCs in that lane.
I followed your directions and placed my mouse over the CC lane with selected CCs then pressed my shortcut.

The small dialogue opened with the four options but I don't know what they mean.

I tried changing them to see what happens but they reverted back to the previous settings.

Another question:
Is there a way I can set the start and end points so the line drawn by your script starts and ends with the numbers I set.

For example, set start at 40 and end at 100

Quote:
Originally Posted by juliansader View Post
GETTING HELP: Most of my scripts provide extensive Descriptions and Instructions. These can be read in two ways:
* by opening the script file in any text editor (or in REAPER's built-in script editor, by clicking the "Edit" button in the Actions list),
* or via ReaPack's browser, by right-clicking the script and selecting "About this package". (ReaPack's "About" window automatically updates as you scroll through the scripts, so it is an easy way to browse script descriptions.)
I found your descriptions and instructions via ReaPack's browser. Thanks for that.

Michael
ClassicMan is offline   Reply With Quote
Old 01-11-2018, 11:24 AM   #29
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 22,942
Default

Quote:
Originally Posted by ClassicMan View Post
For example, set start at 40 and end at 100
These actions will work depending from which value you start drawing them, and depending where your mouse is when you end the action by pressing the key binding again. So, watch the mouse info in MIDI editor when you're in CC lane to choose your starting and ending points:

EvilDragon is online now   Reply With Quote
Old 01-11-2018, 12:36 PM   #30
ClassicMan
Human being with feelings
 
Join Date: Mar 2017
Posts: 98
Default

Quote:
Originally Posted by EvilDragon View Post
These actions will work depending from which value you start drawing them, and depending where your mouse is when you end the action by pressing the key binding again. So, watch the mouse info in MIDI editor when you're in CC lane to choose your starting and ending points:
Thanks EvilDragon, that's a great tip and very helpful.

However, I'm missing something very basic here. Although the script is installed and when I place my mouse over a CC lane with a selection and press my shortcut key the dialogue opens, but the script seems to not do anything.

When I drag my mouse the CC events are drawn in but in the default manner as without any script.

In the video, start and end points are entered then a smooth gradient between them is drawn in. How is that done?

ClassicMan is offline   Reply With Quote
Old 01-11-2018, 01:12 PM   #31
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by ClassicMan View Post
The small dialogue opened with the four options but I don't know what they mean.
Cool, it seem that everything is working correctly!

Which of the four options are unclear?

The "Shape" option is perhaps not self-explanatory. You can choose between
* a "sine" shape by entering "s",
* linear or power curve by entering a number. The number is the exponent of the function y = x^number, so 1 implies a linear, straight line; 2 implies a quadratic curve, etc.


Quote:
Originally Posted by ClassicMan View Post
I tried changing them to see what happens but they reverted back to the previous settings.
The script does not recall last-used settings. However, you can change the default values by editing the script's "USER AREA".


Quote:
Originally Posted by ClassicMan View Post
Is there a way I can set the start and end points so the line drawn by your script starts and ends with the numbers I set.
To set start and end values, you have to insert or select CCs with those specific numbers, before running the script.

As EvilDragon mentioned above, you can check the precise CC values in the MIDI editor before inserting them.

My script "js_Insert CC or pitch at mouse position, leaving others selected" is particularly useful for inserting CC nodes before running the Insert ramp script, as in the Pitch lane in the GIF.


Quote:
Originally Posted by ClassicMan View Post
However, I'm missing something very basic here. Although the script is installed and when I place my mouse over a CC lane with a selection and press my shortcut key the dialogue opens, but the script seems to not do anything.
Do you mean that no CCs are inserted in the lane?

Could you perhaps upload a GIF to illustrate the problem? (I am not quite sure what is happening.)


Quote:
Originally Posted by ClassicMan View Post
When I drag my mouse the CC events are drawn in but in the default manner as without any script.
The script inserts CCs *after* you have selected or drawn the initial CC "nodes", so it will not change the left-drag drawing action.


Quote:
Originally Posted by ClassicMan View Post
In the video, start and end points are entered then a smooth gradient between them is drawn in. How is that done?
Which of the CC lanes in the GIF are you referring to?
juliansader is offline   Reply With Quote
Old 01-11-2018, 01:42 PM   #32
ClassicMan
Human being with feelings
 
Join Date: Mar 2017
Posts: 98
Default

Thank you so much juliansader,

I now have it working through using the dialogue box.

How do I run the script without the dialogue box?
ClassicMan is offline   Reply With Quote
Old 02-04-2018, 12:22 PM   #33
JoostJanssensDS
Human being with feelings
 
Join Date: Feb 2017
Posts: 23
Default

Hi Julian,

thanks for these wonderful scripts, I've been using them for quite some time now, and love them. Today, however, I ran into what seems to be a rather strange message when trying to use your compress script on the velocity of a percussion part. Whenever I try to use this script, I get this message:

''There appears to be overlapping notes among the selected notes.

In particular, at position 34.1.50

The action 'Correct overlapping notes' can be used to correct overlapping notes in the active take.''

Even when doing correct overlapping notes, the script throws the same message on the screen. And, for surely, the script can be used even with overlapping notes right? I hope you can help me.

Thanks in advance.

Joost
JoostJanssensDS is offline   Reply With Quote
Old 02-04-2018, 01:05 PM   #34
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by JoostJanssensDS View Post
And, for surely, the script can be used even with overlapping notes right? I hope you can help me.
Overlapping notes? Eeck! Run away!

REAPER is unfortunately not compatible with overlapping notes. REAPER uses the standard specifications for MIDI files to store the data of its MIDI items, and according to these specifications, overlapping notes (same pitch and same channel) are not admissible MIDI data: Each note consists of two separate MIDI events, a note-on event and a note-off event, and each note-on event must be paired with the next note-off event. (Think of MIDI keyboards from the 1980's, streaming MIDI events through MIDI cables: A new note can only start after the previous note at the same pitch has ended.)

REAPER's MIDI editor can *temporarily* remember the locations of overlapping notes while a user is editing, but most (or all) of REAPER's other functions, including Gluing, Humanize, Quantize, etc, are not compatible with overlapping notes, and may result in artefacts such as zero-length notes or infinitely extended notes.

As mentioned in several bug reports, including Humanize function is affecting non-selected notes in a MIDI item, REAPER's own native functions such as Humanize don't warn the user about overlapping notes before blundering ahead. It would be much better and much more user-friendly if they did.

BTW, most of the other older DAWs, such as SONAR, also base their MIDI items on the MIDI file specifications, but some of the newer DAWs, such as Studio One, have moved away from these specifications in order to avoid the limitations.)


Quote:
Originally Posted by JoostJanssensDS View Post
Even when doing correct overlapping notes, the script throws the same message on the screen.
If you get the same error message even after correcting overlapping notes, something may be wrong. Could you please check whether ALL the overlapping in the active take were in fact removed?
juliansader is offline   Reply With Quote
Old 02-05-2018, 09:08 AM   #35
JoostJanssensDS
Human being with feelings
 
Join Date: Feb 2017
Posts: 23
Default

Quote:
Originally Posted by juliansader View Post
If you get the same error message even after correcting overlapping notes, something may be wrong. Could you please check whether ALL the overlapping in the active take were in fact removed?
Hi Julian, thanks for your kind and very informative answer. In answer, yes I checked. There were no overlapping notes in the sense that you explained. It was a percussion part with just a few short hits after another, not even busy, but just a few notes to accentuate some subbeats.
JoostJanssensDS is offline   Reply With Quote
Old 02-05-2018, 09:44 AM   #36
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by JoostJanssensDS View Post
Hi Julian, thanks for your kind and very informative answer. In answer, yes I checked. There were no overlapping notes in the sense that you explained. It was a percussion part with just a few short hits after another, not even busy, but just a few notes to accentuate some subbeats.
You are welcome to PM me an RPP with the problematic MIDI item, so that I can investigate the problem.
juliansader is offline   Reply With Quote
Old 05-14-2016, 11:45 PM   #37
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default Arch and Tilt

Arch and Tilt:

This script arches the selected events towards the mouse.

* If the mouse is outside the range of the selected events, either to the left or to the right, the events are Tilted towards the mouse.

* The steepness of the arch can be changed using the mousewheel, and middle-click switches between a sine curve and a linear curve.

* Useful for when you want to tweak an existing, complex CC or velocity curve up or down, so that you do not need to re-draw the curve.

* Useful for quickly applying and auditioning crescendo-decrescendo (fade-in and fade-out) curves.


Last edited by juliansader; 05-17-2019 at 12:47 PM.
juliansader is offline   Reply With Quote
Old 05-15-2016, 01:11 AM   #38
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default Select and deselect MIDI notes by step pattern

EDIT 08-01-2016:


TIPS:
If it seems that the script does not apply the correct pattern, perhaps check the following:
~ Are the notes in the editor's active take?
~ Are the MIDI editor's grid setting correct? If the grid length is longer than the distance between the notes' start positions, the script will regard all these notes as a single chord or glissando.

This script works well with the "js_Deselect all notes outside time selection (from all takes).lua" script. Use the piano roll keys to select all notes in a range of pitches, and then run the Deselect script to limit the note selection to the time selection.

Last edited by juliansader; 05-25-2018 at 05:46 AM.
juliansader is offline   Reply With Quote
Old 05-15-2016, 01:11 AM   #39
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default MIDI Inspector

EDIT 2019-02-17:

js_MIDI Inspector:

A script that shows important information about the active MIDI take, selected notes, and selected CCs.

The script can open a separate GUI window, or it can be "docked" inside the regions/markers lane of the MIDI editor:





The MIDI Inspector improves on REAPER's native Properties windows in several ways:
* The GUI is continuously updated and does not interfere with MIDI editing.
* If multiple events are selected, value ranges are shown.
* Note, CC and take information are all shown simultaneously.
* Note and CC positions can be displayed in any of REAPER's time formats - as well as additional, more accurate formats.
* When using multiple editors, the script will automatically switch to the active editor.

When docked, the script will try to use theme colors. However, the user can also specify custom colors in script's USER AREA, for the GUI as well as the docked modes.

Last edited by juliansader; 02-17-2019 at 12:09 PM.
juliansader is offline   Reply With Quote
Old 08-11-2018, 07:58 PM   #40
ClassicMan
Human being with feelings
 
Join Date: Mar 2017
Posts: 98
Default

I've been using the "Insert linear or shaped ramps between selected CCs or pitches in lane under mouse" to draw straight gradual crescendos and decrescendos with absolute ease just as I want them.

Suddenly I had a message saying this has been updated and a new version was installed. Now I no longer have the small dialogue window and, instead, ramps appear that are not what I need and, no matter how much I move the mouse, I cannot get what I want.

Previously, I used to have a small dialogue window where I could specify exactly what I needed. Is it no longer possible to revert back to this window?



If this is no longer available, is it possible for me to download the previous version of the script? I have sent juliansader a PM with this rquest but would appreciate any help with this.

Thanks.
ClassicMan 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 12:36 AM.


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