Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 05-14-2016, 11:40 PM   #1
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default MIDI editor tools: multi-channel editing, pattern selection, MIDI Inspector, etc

A variety of scripts for useful MIDI editor 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.

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.



Multi Tool for MIDI and automation
The Multi Tool script has its own thread:




LFO Tool for MIDI and automation
And the LFO Tool has its own thread too:




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.

The following tools are 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


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
* Insert CC at mouse position, leaving others selected
* 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


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. Here are two more scripts to make inline MIDI editing easier:
* Select channel for new events for inline MIDI editor under mouse[/url]
* Select CC lanes to show in MIDI item under mouse
* Select CC lanes to show in selected MIDI items (very useful for changing CC display of multiple items in the arrange view, without having to open the MIDI editor)




... 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, 25897 views)

Last edited by juliansader; 05-19-2021 at 09:25 AM.
juliansader is offline   Reply With Quote
Old 05-14-2016, 11:43 PM   #2
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default 2-sided warp (and stretch) selected events in lane under mouse:

REPLACED BY MULTI TOOL

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; 01-06-2021 at 02:14 PM.
juliansader is offline   Reply With Quote
Old 05-14-2016, 11:46 PM   #3
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #4
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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 05-15-2016, 03:16 AM   #5
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Impressive set of scripts ! well done !
X-Raym is offline   Reply With Quote
Old 05-15-2016, 03:39 AM   #6
Sju
Human being with feelings
 
Join Date: Jun 2015
Posts: 685
Default

Cool stuff, thank you! One question though: how do you bind these scripts to the mouse modifiers?

EDIT: Looks like the instructions are in the script file, nevermind I wish we could run the scripts using the mouse modifiers though...

Last edited by Sju; 05-15-2016 at 03:55 AM.
Sju 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 12-23-2016, 10:05 PM   #8
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Quote:
Originally Posted by bbjz View Post
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.
I am aware of this, but I didn't think it mattered, since there is no special trick to running the script. Once the script is installed in the Action list (preferably using ReaPack), it can be triggered like any other action: it can be linked to a keyboard shortcut, a toolbar button, or even a menu or a mouse modifier.

BTW, I am updating my scripts one by one, and a new, much faster version of Deselect all events outside time selection should be available today or tomorrow via ReaPack. The following scripts have already been updated:
* js_MIDI Inspector
* js_Remove redundant CCs
* js_Deselect all MIDI except in active channel of active take
* js_Option - Selecting single note or CC in active take sets channel for new events
* js_Draw sine curve
* js_Draw linear or curved ramps
* js_Notation - Select all notes that have customized display lengths or positions
* js_Stretch selected events in lane under mouse
* js_1-sided warp (accelerate) selected events in lane under mouse
juliansader is offline   Reply With Quote
Old 01-03-2017, 11:50 AM   #9
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 24,790
Default

In the latest (v3) version of Remove redundant CCs script, I can't see a way to make it NOT require CCs to be selected? Looking back at the original post (#54), it mentions being able to do that.

Am I missing something? I'd like this to be a set-and-forget kind of thing, without requiring CCs to be selected.
EvilDragon is online now   Reply With Quote
Old 11-27-2022, 03:45 PM   #10
daeavelwyn
Human being with feelings
 
daeavelwyn's Avatar
 
Join Date: Dec 2014
Posts: 597
Default

Hi guys,

I just installed the multi tool but can't figure out how to find and use "Split or trim notes by drawing a line with the mouse"... Where am I supposed to find documentation about this particular feature ?
daeavelwyn is offline   Reply With Quote
Old 11-28-2022, 09:14 AM   #11
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

That script is named "js_Mouse editing - Slice notes". It comes with some instructions inside the script file itself, which can be read in ReaPack's browser, or in REAPER's own script editor.

(Warning: that script is two generations out of date, and I've unfortunately not had time to do any scripting lately.)
juliansader is offline   Reply With Quote
Old 11-28-2022, 05:35 PM   #12
daeavelwyn
Human being with feelings
 
daeavelwyn's Avatar
 
Join Date: Dec 2014
Posts: 597
Default

Hi Julian,

Ok, I gonna have a look at it and try to figure out how it works and if it's relevant to use it.

BTW thanks a lot for your huge work on reaper !
daeavelwyn is offline   Reply With Quote
Old 05-27-2016, 08:32 PM   #13
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #14
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
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   #15
pcartwright
Human being with feelings
 
Join Date: Jan 2009
Posts: 1,030
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   #16
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #17
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #18
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #19
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
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   #20
Jae.Thomas
Human being with feelings
 
Join Date: Jun 2006
Posts: 22,567
Default

These are all excellent, thank you!~
Jae.Thomas is offline   Reply With Quote
Old 07-04-2016, 02:34 PM   #21
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #22
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
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   #23
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
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   #24
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   #25
ceanganb
Human being with feelings
 
Join Date: May 2009
Location: Brazil
Posts: 323
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   #26
lowellben
Human being with feelings
 
lowellben's Avatar
 
Join Date: Aug 2010
Location: They put me in a home.
Posts: 3,432
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   #27
srdmusic
Human being with feelings
 
Join Date: Dec 2016
Posts: 876
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   #28
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #29
ClassicMan
Human being with feelings
 
Join Date: Mar 2017
Posts: 133
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   #30
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #31
ClassicMan
Human being with feelings
 
Join Date: Mar 2017
Posts: 133
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   #32
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #33
ClassicMan
Human being with feelings
 
Join Date: Mar 2017
Posts: 133
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   #34
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 24,790
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   #35
ClassicMan
Human being with feelings
 
Join Date: Mar 2017
Posts: 133
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   #36
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #37
ClassicMan
Human being with feelings
 
Join Date: Mar 2017
Posts: 133
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   #38
JoostJanssensDS
Human being with feelings
 
Join Date: Feb 2017
Posts: 34
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   #39
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #40
JoostJanssensDS
Human being with feelings
 
Join Date: Feb 2017
Posts: 34
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
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 04:28 AM.


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