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

Reply
 
Thread Tools Display Modes
Old 10-26-2016, 12:31 AM   #121
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
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   #122
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,359
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   #123
mikeroephonics
Human being with feelings
 
mikeroephonics's Avatar
 
Join Date: Nov 2006
Posts: 2,533
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   #124
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #125
mikeroephonics
Human being with feelings
 
mikeroephonics's Avatar
 
Join Date: Nov 2006
Posts: 2,533
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   #126
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #127
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #128
mikeroephonics
Human being with feelings
 
mikeroephonics's Avatar
 
Join Date: Nov 2006
Posts: 2,533
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   #129
mikeroephonics
Human being with feelings
 
mikeroephonics's Avatar
 
Join Date: Nov 2006
Posts: 2,533
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   #130
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #131
mikeroephonics
Human being with feelings
 
mikeroephonics's Avatar
 
Join Date: Nov 2006
Posts: 2,533
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   #132
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
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   #133
mikeroephonics
Human being with feelings
 
mikeroephonics's Avatar
 
Join Date: Nov 2006
Posts: 2,533
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   #134
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #135
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   #136
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #137
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #138
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
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   #139
X-Tech
Human being with feelings
 
Join Date: Apr 2015
Posts: 589
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   #140
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: South, UK
Posts: 14,214
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   #141
MikComposer
Human being with feelings
 
MikComposer's Avatar
 
Join Date: May 2012
Location: Brighton
Posts: 1,989
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   #142
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #143
MikComposer
Human being with feelings
 
MikComposer's Avatar
 
Join Date: May 2012
Location: Brighton
Posts: 1,989
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   #144
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #145
MikComposer
Human being with feelings
 
MikComposer's Avatar
 
Join Date: May 2012
Location: Brighton
Posts: 1,989
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   #146
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #147
AugerJ
Human being with feelings
 
Join Date: Dec 2015
Posts: 476
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 offline   Reply With Quote
Old 12-15-2016, 04:45 AM   #148
AugerJ
Human being with feelings
 
Join Date: Dec 2015
Posts: 476
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 offline   Reply With Quote
Old 12-15-2016, 10:49 PM   #149
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #150
AugerJ
Human being with feelings
 
Join Date: Dec 2015
Posts: 476
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 offline   Reply With Quote
Old 12-23-2016, 01:07 PM   #151
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   #152
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   #153
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 offline   Reply With Quote
Old 01-04-2017, 06:23 AM   #154
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
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   #155
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 24,790
Default

Thank you!


Yes, it's definitely useful in "last clicked" mode, I think!
EvilDragon is offline   Reply With Quote
Old 01-12-2017, 02:58 AM   #156
EvilDragon
Human being with feelings
 
EvilDragon's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 24,790
Default

Hey Julian... how's it progressing?
EvilDragon is offline   Reply With Quote
Old 01-12-2017, 08:07 AM   #157
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Quote:
Originally Posted by EvilDragon View Post
Hey Julian... how's it progressing?
v5.32 will soon be released so I need to hurry up.

I will upload the new versions of the Remove Redundant CCs scripts in a few minutes. To make them analyze all CCs, set the only_analyze_selected_events option to "false" in the user area of the script.

Last edited by juliansader; 01-12-2017 at 08:37 AM.
juliansader is offline   Reply With Quote
Old 01-12-2017, 09:45 AM   #158
srdmusic
Human being with feelings
 
Join Date: Dec 2016
Posts: 876
Default Stop all running scripts

I'm a big fan Julian. I'm having a bit of a problem with the compress and expand mouse wheel script. Once I get the values to where I want them I would like to halt or stop the script so that my last mouse movement (exiting the cc lane) doesn't affect my CC values.

I've assigned a key 'E' to that script and then which is suppose to terminate the script once I hit it but in the actions list the compress and expand state says 'on'.

Is there a clever way of halting or stopping all running scripts in the midi editor?
srdmusic is offline   Reply With Quote
Old 01-12-2017, 09:47 AM   #159
srdmusic
Human being with feelings
 
Join Date: Dec 2016
Posts: 876
Default Drawing Sine curve

I'm getting an error when approaching a value of zero in my cc lane or when crossing over to another lane. I'd like the script to write a value of zero when it crosses the lowest value and 127 when it crosses the highest value.

Is this possible to code into the script?
srdmusic is offline   Reply With Quote
Old 01-12-2017, 11:18 AM   #160
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

Quote:
Originally Posted by srdmusic View Post
I've assigned a key 'E' to that script and then which is suppose to terminate the script once I hit it but in the actions list the compress and expand state says 'on'.
The state in the actions list actually reflects the toolbar state, not whether a looping script is still running. So if you have linked the scripts to toolbar buttons, the compress script's button should be highlighted.

To check the scripts that are running, click on the Actions menu in the main window. If any scripts are running, they will be listed there.

Quote:
Originally Posted by srdmusic View Post
Is there a clever way of halting or stopping all running scripts in the midi editor?
To stop *all* running scripts, you can use the action ReaScript: Close all running ReaScripts, which is in the "Main" context of the Actions list.
juliansader 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 02:00 AM.


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