Old 09-23-2016, 03:21 PM   #121
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by ceanganb View Post
Hey, Julian, the MIDI Inspector does not stay on top when i click on the piano roll. Is there a way of setting it ´always on top´?

Thanks.
Unfortunately, REAPER's "pin" feature ignores script GUIs. There is an open Feature Request thread for this: add 'always on top' pin for EEL script GUI's. Please vote in the thread!

So to keep script GUIs on top, you need to use your OS's own features or 3rd party software:

* In Linux WINE KDE, you can easily set up a Window Rule to automatically detect any "MIDI Inspector" child windows and then 1) position the GUI in the MIDI editor, 2) remove the window borders, and 3) keep the GUI on top. The MIDI Inspector GUI therefore looks exactly like an integrated part of the MIDI editor!

* In Windows, you can use 3rd party software such as TurboTop or FileBox eXtender. I personally use FileBox eXtender on my Windows DAW.

(EDIT: I forgot to mention that you can also dock the Inspector! The docker should have REAPER's own pin-on-top function, or you can place the docker in the main window. This is in fact why I included the "Dock" checkbox.)

Last edited by juliansader; 09-23-2016 at 11:36 PM.
juliansader is offline   Reply With Quote
Old 09-24-2016, 03:07 AM   #122
pinksoir
Human being with feelings
 
pinksoir's Avatar
 
Join Date: Aug 2012
Posts: 214
Default

These are really fantastic and bring Reaper's MIDI capability to a whole new level. They should be part of the program as standard.
__________________
Bear Worship on Bandcamp
pinksoir is offline   Reply With Quote
Old 09-24-2016, 04:18 AM   #123
ceanganb
Human being with feelings
 
Join Date: May 2009
Location: Brazil
Posts: 278
Default

Quote:
Originally Posted by juliansader View Post
* In Windows, you can use 3rd party software such as TurboTop or FileBox eXtender. I personally use FileBox eXtender on my Windows DAW.
Voted! And thanks for the hints!
__________________
Ceanganb
ceanganb is offline   Reply With Quote
Old 10-25-2016, 10:12 AM   #124
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,132
Default

I am very late to the party, but I guess it's never too late to say WOW I knew from screencaps around the forum that these are some awesome scripts, but man, these ARE awesome scripts!

As of the function of the compress/expand script, it is very versatile, way cool. But much more often I need something a lot simpler. Something a bit like your "stretch selected events", but vertically. Lowest values would be anchored and stay fixed while the mouse position would define the highest value.
The same results can be had with your compress/expand by having the mouse cursor exactly at the bottom of the lane and mouse-wheeling, but I believe it would be much nicer and faster to handle. It's a task that comes up so often.
For pitch and pan it would keep the center values fixed while mouse position defines the furthest (farthest??) derivation, maybe it could even swap polarity if the mouse is in the lower half of the lane

Another wish that came up is a mirrored "stretch selected events", which does the same as the existing one, but anchors the right side and moves the left side.
[I]EDIT: Oh, this one was maybe easier than I thought, at least I think I got it (by tweaking the newPPQpos math line and the exception for notes)
Code:
 -- Except if stretching notes, in which case note-on and note-off cannot be switched around:
    if destPPQpos >= lastPPQpos+#events and (mouseLane == 0x200 or mouseLane == 0x207) then
        destPPQpos = firstPPQpos
    end

...and...

newPPQpos = math.floor(lastPPQpos - (events.PPQ - lastPPQpos)*stretchFactor + 0.5)


seems to have done the trick. Thanks to your superclean code and the fine comments.
It really complements the existing one nicely, maybe you want to add it to your repository.
/edit


Not begging, but thought maybe you'd find the ideas useful, too. I'd go in myself, if I had that much brain. But even with your very detailed comments in the scripts, that task is way over my head

Anyway, mucho respect and thanks for all these cool toys!

Last edited by gofer; 10-25-2016 at 12:05 PM.
gofer is offline   Reply With Quote
Old 10-25-2016, 04:16 PM   #125
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by gofer View Post
I am very late to the party, but I guess it's never too late to say WOW I knew from screencaps around the forum that these are some awesome scripts, but man, these ARE awesome scripts!
Thanks!


Quote:
Originally Posted by gofer View Post
Another wish that came up is a mirrored "stretch selected events", which does the same as the existing one, but anchors the right side and moves the left side.
Any suggestions for useful MIDI scripts are always welcome! I have uploaded a new version 2.10 of the stretching script that can stretch in both directions. If the mouse is placed to the left of the midpoint of the events' time range when the script starts, it will move the left side and use the rightmost event as anchor. And vice versa. (I have also removed the restriction on notes.) Please let me know if it works OK.
juliansader is offline   Reply With Quote
Old 10-26-2016, 12:31 AM   #126
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,132
Default

Ha, I was also thinking about making the stretch depend on the initial mouse position, so that's perfect! Nice that notes can now be reverted, too. It seems to work brillantly, no glitches during my experiments so far .

As of the "stretch vertical idea, I managed to hack a verion of it out of the compress/expand script - (only the 7bit CC part and without a special case for pan, as of now), just to demonstrate the concept.


Actually, I'd probably prefer if it wouldn't use the absolute mouse position, but the relative movement, but haven't yet tried it (EDIT: oh yeah, that's much better, I updated the licecap). It's for those cases where you recorded a controller movement but find you've gone too far up, or not far enough, as a whole. I have this situation very often.
I think it would be cool if the now free mousewheel could do something similar to your warp 1-sided (but on the vertical axis), so you could dial to "weigh" the stretch more on the lower or upper values.

Another thought I had: Maybe it would be good if the scripts which run with your "run the js..." could optionally show a small "there is a script running at the moment" window for those who are like me and keep forgetting to hit the shortcut to exit .

Last edited by gofer; 10-26-2016 at 04:04 AM.
gofer is offline   Reply With Quote
Old 10-30-2016, 04:53 AM   #127
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,132
Default

Quote:
Originally Posted by TonE View Post
Is there an action which can do this? Convert file referenced midi item to in project midi item**?
File to in-project:
Item context menu -> Item processing: "Convert active take MIDI to in-project source data".
Has the same name in the action list.

In-project to file:
Item context menu -> Item processing: "Convert active take MIDI to .mid file reference".
Also has the same name in the action list.

Both are only available in the arrange view menu / main section of the action list. Could probably be imported to the MIDI editor section via script.
gofer is offline   Reply With Quote
Old 10-30-2016, 09:15 AM   #128
mikeroephonics
Human being with feelings
 
mikeroephonics's Avatar
 
Join Date: Nov 2006
Posts: 2,479
Default

EDIT: I figured out how to install the scripts, but for anyone having trouble:

Here's how to get the Actions to show up in REAPER's Actions List. From the main window menu at the top:
Extensions >
ReaPack >
Browse packages >
[Select all] >
[Actions...] >
Install/update selection (for partial installations, select the ones you want from the list)

I just discovered this project/thread. Thank you so much for making these tools! This makes CC editing much, much easier and enjoyable!

Unfortunately, I can't get these tools to show up in REAPER's Actions list. I'm sure it's user error. I have ReaPack installed (64-bit). All packages are synchronized and enabled.

Thanks again for your amazing work!
__________________
Please check out these MIDI requests: http://forum.cockos.com/showthread.php?t=103192
Thanks.

Last edited by mikeroephonics; 10-30-2016 at 10:09 AM.
mikeroephonics is offline   Reply With Quote
Old 10-30-2016, 10:07 AM   #129
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by TonE View Post
Then another variant: Insert CCs on notes longer than dur and lower notes per segment.

For short notes adding CCs very often makes no sense, so we can simply ignore such notes. What remains are longer notes. Now the question is do we want to do a further separation between, for example high pitched long notes and low pitched long notes? Often such a differentiation can be useful. You could have two types of curves.
1. High pitched long notes curve
2. Low pitched long notes curve
My favourite way to insert CCs below notes is to use the LFO Tool: js_LFO Tool (MIDI editor version, insert CCs under selected notes in last clicked lane).lua.

Using REAPER's built-in Event Filter, you can select notes with lengths above or below a certain threshold, and once the notes are selected, you can use the LFO Tool to insert high or low pitchbends - or any other LFO curve - below the selected notes.

Would this solution suit your workflow?

EDIT: v5.28 will feature a new action that may also be useful for the situation that you described: Edit: Select all CCs under selected notes. Once the long notes are selected, the new action can be run, and the CCs underneath - which are now selected - can then be edited separately from the other CCs.

Last edited by juliansader; 10-30-2016 at 10:16 AM.
juliansader is offline   Reply With Quote
Old 10-30-2016, 10:13 AM   #130
mikeroephonics
Human being with feelings
 
mikeroephonics's Avatar
 
Join Date: Nov 2006
Posts: 2,479
Default

I keep getting this error with any of your MIDI Editor CC lane scripts:

"...pand selected CC or velocity events using mousewheel.lua:826: 'reaper.BR_GetMouseCursorContext' is unknown"

I have your Action "Compress or expand CCs or velocity using mousewheel" set to mousewheel.

I'd upload an image but the wifi here won't let me for some weird reason.
__________________
Please check out these MIDI requests: http://forum.cockos.com/showthread.php?t=103192
Thanks.
mikeroephonics is offline   Reply With Quote
Old 10-30-2016, 10:19 AM   #131
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by TonE View Post
*the problem is that his scripts need exactly stable sws version 2.8.3.*

newer betas 2.8.6 or 2.8.7 and also lower versions others then stable SWS 2.8.3 do not work...
for this scripts
My scripts should work fine with either SWS v2.8.3 or v2.8.7. If you run into any problems, please let me know!
juliansader is offline   Reply With Quote
Old 10-30-2016, 10:22 AM   #132
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by mikeroephonics View Post
"...pand selected CC or velocity events using mousewheel.lua:826: 'reaper.BR_GetMouseCursorContext' is unknown"
Could you please check if you have the SWS extension installed yet? If not, you can download it from http://www.sws-extension.org/. (v2.8.3 or any of the later versions.)

Last edited by juliansader; 10-30-2016 at 11:10 AM.
juliansader is offline   Reply With Quote
Old 10-30-2016, 11:28 AM   #133
mikeroephonics
Human being with feelings
 
mikeroephonics's Avatar
 
Join Date: Nov 2006
Posts: 2,479
Default

Quote:
Originally Posted by juliansader View Post
Could you please check if you have the SWS extension installed

yet? If not, you can download it from http://www.sws-extension.org/.
Thanks for the reply! I read another thread saying SWS Ext. wasn't needed (maybe I got that discussion mixed up with something else.)

I'm just testing this on a laptop installation of REAPER but I've had SWS installed on my
DAW for many years. It's very good (especially the Xenakios stuff!)

I didn't have SWS Ext. installed on this laptop before but I just installed the newest build
(v2.8.3 - January 08, 2016 - 64-bit). I no longer get the floating error window. It works fine so far!

Thanks again for your help!
__________________
Please check out these MIDI requests: http://forum.cockos.com/showthread.php?t=103192
Thanks.

Last edited by mikeroephonics; 10-30-2016 at 12:11 PM.
mikeroephonics is offline   Reply With Quote
Old 10-30-2016, 03:36 PM   #134
mikeroephonics
Human being with feelings
 
mikeroephonics's Avatar
 
Join Date: Nov 2006
Posts: 2,479
Default

Does installation require an Internet connection? I copied what I thought were all files to my non-Internet DAW and the Package Browser tries to download the scripts when I select "Install/update selection".

I have all the .xml files and the .db file in \Roaming\REAPER\ReaPack

and all .lua script files in \Roaming\REAPER\Scripts\...

What am I missing and/or what did I misplace?

Thanks.
__________________
Please check out these MIDI requests: http://forum.cockos.com/showthread.php?t=103192
Thanks.
mikeroephonics is offline   Reply With Quote
Old 10-30-2016, 03:53 PM   #135
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by mikeroephonics View Post
Does installation require an Internet connection? I copied what I thought were all files to my non-Internet DAW and the Package Browser tries to download the scripts when I select "Install/update selection".
I also work on an offline DAW, and I use REAPER's configuration export feature to copy all the ReaPack scripts en masse between the computers. This seems to work well.

Unfortunately I am not familiar with other methods of installing ReaPack offline. Perhaps it will be best to ask the developer of ReaPack (cfillion) over at the ReaPack thread?
juliansader is offline   Reply With Quote
Old 10-30-2016, 04:04 PM   #136
mikeroephonics
Human being with feelings
 
mikeroephonics's Avatar
 
Join Date: Nov 2006
Posts: 2,479
Default

Thanks. I'll ask in there how to do it. I also had initially tried exporting my ReaScripts and JS FX as a .ReaConfigZip, then imported them to the DAW. When that didn't work, I tried to copy the directories which I thought held everything.
__________________
Please check out these MIDI requests: http://forum.cockos.com/showthread.php?t=103192
Thanks.
mikeroephonics is offline   Reply With Quote
Old 10-30-2016, 04:11 PM   #137
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 2,668
Default

@mikeroephonics
Select "Actions and key bindings" (reaper-kb.ini) in the configuration export options as well (https://i.imgur.com/1dfCNtj.png). (Or manually add the script files to the Action List on the offline computer.)

Quote:
Originally Posted by mikeroephonics View Post
Select all > Install/update selection
To get all available packages I suggest enabling "Install new packages automatically" in Extensions > ReaPack > Manage repositories > Options.
With that enabled, any package not yet installed is installed when running Synchronize packages.

Last edited by cfillion; 10-30-2016 at 04:36 PM.
cfillion is offline   Reply With Quote
Old 10-30-2016, 06:21 PM   #138
mikeroephonics
Human being with feelings
 
mikeroephonics's Avatar
 
Join Date: Nov 2006
Posts: 2,479
Default

Quote:
Originally Posted by cfillion View Post
@mikeroephonics
Select "Actions and key bindings" (reaper-kb.ini) in the configuration export options as well (https://i.imgur.com/1dfCNtj.png). (Or manually add the script files to the Action List on the offline computer.)
Thanks! I got them to import via the Actions List.
__________________
Please check out these MIDI requests: http://forum.cockos.com/showthread.php?t=103192
Thanks.
mikeroephonics is offline   Reply With Quote
Old 11-18-2016, 08:43 PM   #139
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Good news! I have figured out a way to make Lua MIDI scripts almost as fast as REAPER's native functions!

I will slowly but surely update the existing scripts. For starters, the following scripts will now work very nicely even in MIDI items with hundreds of thousands of events:

* js_Draw linear or curved ramps in real time.lua
* js_Draw linear or curved ramps in real time, chasing start values.lua

(These now also have the option to automatically skip redundant CCs while drawing.)

* js_Remove redundant CCs (from selected events in lane under mouse).lua
* js_Remove redundant CCs (from selected events in last clicked lane).lua
* js_Remove redundant CCs.lua

(Some discussion about the slowness of previous scripts for removing redundant CCs can be read here: Fast, native action to remove redundant CCs.)

I have also added a new script to complement REAPER v5.28's fantastic new multi-channel features:
* js_Deselect all MIDI except in active channel of active take.lua

BTW, Lua scripts are not alone in having troubles dealing with large numbers of MIDI event: even SWS actions such as SWS/BR: Copy selected CC events in active item to last clicked lane will hang for minutes. I hope these SWS actions can also be re-coded.
juliansader is offline   Reply With Quote
Old 11-24-2016, 02:32 AM   #140
johnnieoperator
Human being with feelings
 
Join Date: Jul 2012
Posts: 2
Default

This is exactly what I've been looking for! In some respects this may even work out better for me than envelopes (which I was adamant I needed).

Anyway, I saw a giff somewhere of these scripts setup with toolbar buttons and keyboard shortcuts that work in a very intuitive manor and I would really like to mimic that setup (or something similar)

Has anyone got any instructions of how to set this up? I've got as far as importing the scripts and trying to set up the Menu toolbar. Not sure how and when I'm supposed to run these scripts and what to assign them to.

Thanks!!
johnnieoperator is offline   Reply With Quote
Old 11-24-2016, 09:42 AM   #141
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by johnnieoperator View Post
This is exactly what I've been looking for! In some respects this may even work out better for me than envelopes (which I was adamant I needed).

Anyway, I saw a giff somewhere of these scripts setup with toolbar buttons and keyboard shortcuts that work in a very intuitive manor and I would really like to mimic that setup (or something similar)

Has anyone got any instructions of how to set this up? I've got as far as importing the scripts and trying to set up the Menu toolbar. Not sure how and when I'm supposed to run these scripts and what to assign them to.

Thanks!!
Hi johnnieoperator, I am glad that you discovered these scripts!

The gif can be seen in this earlier post, and some discussion on installation of the toolbar buttons in this post.

Most of the scripts also contain instructions inside the script itself. (These can be read in REAPER's built-in script editor.)

Please let me know if you encounter any difficulties, so that we can quickly sort them out.
juliansader is offline   Reply With Quote
Old 12-04-2016, 05:58 PM   #142
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

REAPER v5.30 will feature new API functions for faster MIDI editing. While I am updating my scripts to take advantage of these new functions, I am also incorporating gofer's suggestions for warping and stretching up and down:


Stretch 3.00: Stretch left, right, top or bottom, depending on initial mouse position:




Warp 3.00: Warp left/right or up/down, depending on initial mouse movement (similar to REAPER's "in one direction only" mouse modifiers):

juliansader is offline   Reply With Quote
Old 12-04-2016, 07:01 PM   #143
lowellben
Human being with feelings
 
lowellben's Avatar
 
Join Date: Aug 2010
Location: They put me in a home.
Posts: 2,930
Default

Quote:
Originally Posted by juliansader View Post
REAPER v5.30 will feature new API functions for faster MIDI editing. While I am updating my scripts to take advantage of these new functions, I am also incorporating gofer's suggestions for warping and stretching up and down:


Stretch 3.00: Stretch left, right, top or bottom, depending on initial mouse position:




Warp 3.00: Warp left/right or up/down, depending on initial mouse movement (similar to REAPER's "in one direction only" mouse modifiers):

This looks amazing I can't wait for this update 3 Thank you so much for making this!!!
__________________
47.8% of statistics are made up.
lowellben is offline   Reply With Quote
Old 12-05-2016, 07:59 PM   #144
X-Tech
Human being with feelings
 
Join Date: Apr 2015
Posts: 490
Default

Is possible to make script which store cc values in midi notes like in RENOISE ?
__________________
nonononononono
X-Tech is offline   Reply With Quote
Old 12-06-2016, 02:42 AM   #145
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,644
Default

Awesome as usual!
__________________
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 12-10-2016, 06:02 AM   #146
MikComposer
Human being with feelings
 
MikComposer's Avatar
 
Join Date: May 2012
Location: Brighton
Posts: 1,987
Default

Hello,

I was using X-Raym script to make ramps, but it's broken and this is what he wrote:

"Ok, thanks, now I can see the issue,

I don't see quick ways to fix this, I don't spot the place where it fails, it seems ot works until a certainvalue and the breaks,

As JulianSader script works better and have more advanced functions that you may enjoy, maybe it would be simpler to ask him to make the script works but not only for CC lane under mouse, maybe something like "if there is no lane under mouse, then check selected CC. Just bump the thread I sent to you .

I'll probably remove my script from my pack if he accepts your request."


So If you could modified the following "js_Insert linear or shaped ramps between selected CCs or pitches in lane under mouse.lua" so that it creates ramp from two selected cc's in last click lane and from first and last selected note velocity, when left clicked on the icon on toolbar, as well as has it's other functions when icon on toolbar would be right clicked, that would be ace.
__________________
My Royalty Free Music library
MikComposer is offline   Reply With Quote
Old 12-10-2016, 08:19 AM   #147
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by X-Tech View Post
Is possible to make script which store cc values in midi notes like in RENOISE ?
Could you please explain a bit more? Are you referring to polyphonic aftertouch, like in this picture:




Quote:
Originally Posted by MikComposer View Post
So If you could modified the following "js_Insert linear or shaped ramps between selected CCs or pitches in lane under mouse.lua" so that it creates ramp from two selected cc's in last click lane and from first and last selected note velocity, when left clicked on the icon on toolbar, as well as has it's other functions when icon on toolbar would be right clicked, that would be ace.
Modifying the script to work with the last clicked lane would be easy: Simply replace the following part (lines 618-647), which finds the lane under mouse:
Code:
window, segment, details = reaper.BR_GetMouseCursorContext()

[...]

if SWS283 == true then
    _, _, mouseLane, _, _ = reaper.BR_GetMouseCursorContext_MIDI()
else 
    _, _, _, mouseLane, _, _ = reaper.BR_GetMouseCursorContext_MIDI()
end]]
with:
Code:
take = reaper.MIDIEditor_GetTake(editor)
if not reaper.ValidatePtr2(0, take, "MediaItem_Take*") then return(0) end
mouseLane = reaper.MIDIEditor_GetSetting_int(editor, "last_clicked_cc_lane")

With regard to notes and velocity lane: do I understand correctly that you would like the script to change the velocities of existing notes, instead of *inserting* new events like it does in the CC lanes?

Last edited by juliansader; 12-10-2016 at 08:27 AM.
juliansader is offline   Reply With Quote
Old 12-10-2016, 08:31 AM   #148
MikComposer
Human being with feelings
 
MikComposer's Avatar
 
Join Date: May 2012
Location: Brighton
Posts: 1,987
Default

Quote:
Originally Posted by juliansader View Post
Could you please explain a bit more? Are you referring to polyphonic aftertouch, like in this picture:






Modifying the script to work with the last clicked lane would be easy: Simply replace the following part (lines 618-647), which finds the lane under mouse:
Code:
window, segment, details = reaper.BR_GetMouseCursorContext()

[...]

if SWS283 == true then
    _, _, mouseLane, _, _ = reaper.BR_GetMouseCursorContext_MIDI()
else 
    _, _, _, mouseLane, _, _ = reaper.BR_GetMouseCursorContext_MIDI()
end]]
with:
Code:
take = reaper.MIDIEditor_GetTake(editor)
if not reaper.ValidatePtr2(0, take, "MediaItem_Take*") then return(0) end
mouseLane = reaper.MIDIEditor_GetSetting_int(editor, "last_clicked_cc_lane")

With regard to notes and velocity lane: do I understand correctly that you would like the script to change the velocities of existing notes, instead of *inserting* new events like it does in the CC lanes?
Hi, thanks, but I can't seam to get it to work. I selected everything from line 618 to and including line 647 and pasted the replacement code, but it doesn't work. I don't know what I'm doing.


"With regard to notes and velocity lane: do I understand correctly that you would like the script to change the velocities of existing notes, instead of *inserting* new events like it does in the CC lanes?" Yes

Also would like to suggest couple more things. Goal is to remove pop up completely:
- automatic creation of cc bars according to midi editor grid, so ie. x number of bars per beat, that could be set within script itself
- Mini scripts that would call this script with specific shape already selected.
__________________
My Royalty Free Music library

Last edited by MikComposer; 12-10-2016 at 10:53 PM.
MikComposer is offline   Reply With Quote
Old 12-11-2016, 04:18 PM   #149
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by MikComposer View Post
Hi, thanks, but I can't seam to get it to work. I selected everything from line 618 to and including line 647 and pasted the replacement code, but it doesn't work. I don't know what I'm doing.
What happens when you try to run the edited script? If there is no active MIDI editor with an active take, the script will simply quit. Otherwise, it should at least show the dialog box, or give an error message if the last clicked lane is not usable.


Quote:
Originally Posted by MikComposer View Post
Also would like to suggest couple more things. Goal is to remove pop up completely:
- automatic creation of cc bars according to midi editor grid, so ie. x number of bars per beat, that could be set within script itself
- Mini scripts that would call this script with specific shape already selected.
Many of my scripts have a "User Area" near the top of the script where the user can customize settings. The customized versions can replace the original version, or be saved as separate scripts. For this "Insert ramp" script, you can define a default shape, and choose whether the dialog box should pop up or not:
Code:
-- USER AREA
-- (Settings that the user can customize)

showDialogBox = true -- Should the dialog box be skipped and default values used?  true or false.

verbose = true -- Should error messages be shown in REAPER's console?  true or false.

-- Default values for ramp shape:
shape = "sine" -- Shape of the ramp.  Either "sine", or a number>0 for a power curve (1 implies linear).
skipRedundantCCs = true -- Should redundant CCs be skipped?  true or false.
newCCsAreSelected = true -- Should the newly inserted CCs be selected?  true or false.

-- NOTE: The script uses the default CC density set in REAPER's Preferences -> MIDI editor -> Events per quarter note when drawing in CC lanes 

-- End of USER AREA
Using the MIDI editor grid instead of Preferences -> CC density is a good suggestion, and I will try to incorporate that as an optional setting in an upcoming version.
juliansader is offline   Reply With Quote
Old 12-13-2016, 10:17 AM   #150
MikComposer
Human being with feelings
 
MikComposer's Avatar
 
Join Date: May 2012
Location: Brighton
Posts: 1,987
Default

Quote:
Originally Posted by juliansader View Post
What happens when you try to run the edited script? If there is no active MIDI editor with an active take, the script will simply quit. Otherwise, it should at least show the dialog box, or give an error message if the last clicked lane is not usable.




Many of my scripts have a "User Area" near the top of the script where the user can customize settings. The customized versions can replace the original version, or be saved as separate scripts. For this "Insert ramp" script, you can define a default shape, and choose whether the dialog box should pop up or not:
Code:
-- USER AREA
-- (Settings that the user can customize)

showDialogBox = true -- Should the dialog box be skipped and default values used?  true or false.

verbose = true -- Should error messages be shown in REAPER's console?  true or false.

-- Default values for ramp shape:
shape = "sine" -- Shape of the ramp.  Either "sine", or a number>0 for a power curve (1 implies linear).
skipRedundantCCs = true -- Should redundant CCs be skipped?  true or false.
newCCsAreSelected = true -- Should the newly inserted CCs be selected?  true or false.

-- NOTE: The script uses the default CC density set in REAPER's Preferences -> MIDI editor -> Events per quarter note when drawing in CC lanes 

-- End of USER AREA
Using the MIDI editor grid instead of Preferences -> CC density is a good suggestion, and I will try to incorporate that as an optional setting in an upcoming version.
Hi,

Thanks

"...shaped ramps between selected CCs or pitches in lane.lua:640: attempt to concatenate a nil value (global 'laneString')"

That's the error messege.

Thanks for some tips aout script, but i don't know how to use reaper script, and I am not really keen to learn it, because I have so much other things to learn re music and my work. But thanks for your work.

And thirdly: I suppose you guys make scripts for fun, but if you'd ever consider making smart tools, I would be happy to help with outlining how they would work and only with mouse, so us as the user wouldn't have to run multiple number of scripts to get single functions.

All right, thanks.
__________________
My Royalty Free Music library
MikComposer is offline   Reply With Quote
Old 12-14-2016, 12:23 AM   #151
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by MikComposer View Post
"...shaped ramps between selected CCs or pitches in lane.lua:640: attempt to concatenate a nil value (global 'laneString')"

That's the error messege.
Ah, if 'laneString' is not defined in line 640, it means that about 15 lines too many were replaced when the new code was pasted into the script. Please check that the new code only replaces the lines starting with
window, segment, details = reaper.BR_GetMouseCursorContext()
and ending with
_, _, _, mouseLane, _, _ = reaper.BR_GetMouseCursorContext_MIDI()
end



Quote:
Originally Posted by MikComposer View Post
And thirdly: I suppose you guys make scripts for fun, but if you'd ever consider making smart tools, I would be happy to help with outlining how they would work and only with mouse, so us as the user wouldn't have to run multiple number of scripts to get single functions.
Any ideas on how to make scripts slicker and smarter would be much appreciated!

I have recently submitted a FR ReaScript: Allow scripts to change mouse cursor that would hopefully help to make scripts appear more elegant.
juliansader is offline   Reply With Quote
Old 12-14-2016, 03:57 AM   #152
AugerJ
Human being with feelings
 
Join Date: Dec 2015
Posts: 385
Default Groove quantize: tempo curves

Hello, Julian.
Parabolic and other shaped curves might be very useful in groove quantization.
What is groove, if not some minor tempo deviations, right?
Simply put, a little acceleration in one part of measure — and a little deceleration in another one, so the overall tempo remains constant.
But the algorithms of groove quantization seem to have a flaw.
When you quantize e.g. 16th notes to the groove that has only 8ths, the weak 16ths move, so they become 8th notes.
If you like that particular groove, you can edit it — you can put some weak 16th notes into it to achieve better results. But how would you do that? By grid? At random? Either way you can kill the groove, because those little tempo changes won't be so smooth anymore.
But if you could extract the tempo curve from the groove and apply it to an item or to some part of an item...
Or should those tempo deviations be applied to the whole project?
So everything visually stays on grid (100%-quantized), but actually submits to the groove (thanks to applied tempo changes)...
And no need to apply groove quantization to each and every item or track.
Just once and for all.
Some... 'Groove Easy'
What do you think about that?
AugerJ is online now   Reply With Quote
Old 12-15-2016, 04:45 AM   #153
AugerJ
Human being with feelings
 
Join Date: Dec 2015
Posts: 385
Default

I will rephrase it.
Can you write a script that would detect the tempo curve within the groove
and make a copy of this MIDI item and fill it with *th notes placed according to that tempo curve?
(* is to be replaced by 8 or 16 etc. — user's choice)
This way we wouldn't have to change the groove by adding notes to it — or rather we wouldn't affect it's tempo curve.

Last edited by AugerJ; 12-15-2016 at 04:51 AM.
AugerJ is online now   Reply With Quote
Old 12-15-2016, 10:49 PM   #154
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by AugerJ View Post
I will rephrase it.
Can you write a script that would detect the tempo curve within the groove
and make a copy of this MIDI item and fill it with *th notes placed according to that tempo curve?
(* is to be replaced by 8 or 16 etc. — user's choice)
This way we wouldn't have to change the groove by adding notes to it — or rather we wouldn't affect it's tempo curve.
Detecting and applying grooves are indeed very useful features.

The SWS extension includes the 'Fingers' Groove Tool, and mpl has coded a nifty Quantize Tool script.

Would these provide the functionality that you need?
juliansader is offline   Reply With Quote
Old 12-16-2016, 01:03 PM   #155
AugerJ
Human being with feelings
 
Join Date: Dec 2015
Posts: 385
Default

Quote:
Originally Posted by juliansader View Post
Detecting and applying grooves are indeed very useful features.

The SWS extension includes the 'Fingers' Groove Tool, and mpl has coded a nifty Quantize Tool script.

Would these provide the functionality that you need?
Thanks.
First one is for regular (or advanced) groove quantization, and I even have it installed and assigned to a button )
And the second one is in development (v.2), so I'll wait.
BTW, this one looks interesting:
http://forum.cockos.com/showthread.php?t=179544
AugerJ is online now   Reply With Quote
Old 12-23-2016, 01:07 PM   #156
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   #157
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
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   #158
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 22,944
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 01-04-2017, 06:23 AM   #159
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,576
Default

Quote:
Originally Posted by EvilDragon View Post
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.
Oops, I removed that option since I didn't know that anyone was actually using it.

I have to update the scripts again soon (since REAPER v5.32 has an important MIDI sorting bug fix as well as changes in notation specifications), so I will add the option back in the new version.
juliansader is offline   Reply With Quote
Old 01-04-2017, 07:14 AM   #160
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 22,944
Default

Thank you!


Yes, it's definitely useful in "last clicked" mode, I think!
EvilDragon is online now   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 11:56 PM.


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