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

Reply
 
Thread Tools Display Modes
Old 09-02-2015, 07:17 AM   #41
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,583
Default

Can you explain the adj_sel_env parameter, please?
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 09-02-2015, 07:39 AM   #42
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by daxliniere View Post
Can you explain the adj_sel_env parameter, please?
"adj_sel_env" is set to "true":
  • Volume envelope has to be selected (by clicking on the envelope lane or an envelope point).
  • This works better for the envelopes that are drawn over the media lane

"adj_sel_env" is set to "false":
  • Volume envelope doesn't has to be selected.
  • (Someone might prefer this setting: f.ex. when envelopes are displayed in separate envelope lanes.)
spk77 is offline   Reply With Quote
Old 09-02-2015, 09:09 AM   #43
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,583
Default

Thanks for that info. I'll check it out tomorrow.

(Specifically, I will check behaviour of selected points and simply points that are under the mousewheel.)

Cheers for your hard work, spk77, this is a really wonderful way to interact with envelopes.
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 09-02-2015, 11:40 AM   #44
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

This is really something, but i wish it could be used on all envelopes, not just volume envelopes.
vanhaze is offline   Reply With Quote
Old 09-02-2015, 11:51 AM   #45
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by vanhaze View Post
This is really something, but i wish it could be used on all envelopes, not just volume envelopes.
Update:
  • 2-Sep-2015: added support for all track envelopes
  • Download from post#1 (second script there)

("local adj_sel_env" was set to "false" in this gif: Envelopes don't have to be selected - this works OK if envelopes are displayed in their own lanes)




Settings:

Code:
-------------------
-- User settings --
-------------------
-- Adjustment behavior
local adj_sel_env = false   -- true:  envelope has to be selected


-- Volume envelope step size
-- (User configurable "dB_steps": see "set_envelope_point" -function)

-- Pan envelope step size
local pan_env_step = 0.01 -- 200 steps (-1 to 1)

-- Width envelope step size
local width_env_step = 0.01 -- 200 steps (-1 to 1)

-- Mute envelope step size
local mute_env_step = 1 -- 2 steps (0 to 1)

----------------------------------------------------------------------
spk77 is offline   Reply With Quote
Old 09-02-2015, 12:16 PM   #46
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,689
Default

Will first script be updated with all envelopes?One more request (for first script if you wanna work on it) can it be mouse sensitive to envelope lane? so it only works (moves points) when mouse is in envelope lane (is that possible?)
.It would be cool if this could be incorporated into one mega script that does similar things (Envelopes/Item Volume/Track Volume)
Thank you very much for both scripts!

Last edited by Sexan; 09-02-2015 at 12:23 PM.
Sexan is offline   Reply With Quote
Old 09-02-2015, 12:30 PM   #47
Sumalc
Human being with feelings
 
Join Date: Oct 2009
Location: France
Posts: 745
Default

spk77 ""Update:
2-Sep-2015: added support for all track envelopes
Download from post#1 (second script there)""

Thank you so much it is very useful, I feel now very comfortable with lanes.
Sumalc is online now   Reply With Quote
Old 09-02-2015, 10:56 PM   #48
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,583
Default

Quote:
Originally Posted by spk77 View Post
2) Adjust volume envelope point at mouse cursor via mousewheel.lua
Can I also ask for Adjust volume envelope point at mouse cursor via mousewheel (obey point selection), please?

i.e. When the adjusted point is part of a selection of points, all points within the selection should be adjusted.
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 09-03-2015, 01:34 AM   #49
planetnine
Human being with feelings
 
planetnine's Avatar
 
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,942
Default

Hello spk.

Forgive me if this has been added/solved already (and I haven't looked at the script -not had time to gen up on Lua yet), but Dax's issue with chasing the envelope point should be quite easy to deal with.

When the mousewheel is moved and the object under the mouse cursor is checked and found to be an envelope point, the mouse x&y co-ords, the envelope point ID and an envelope_point_lock flag need to be set. When the next mousewheel cycle is instantiated, this is repeated until the object under the mouse cursor is no-longer the original envelope point. If at this time the mouse cursor has not moved (or has moved only eg 1pixel from the stored position), then the script continues moving the original point until the mouse is moved, when the envelope_point_lock flag is reset and the point "released".

For multi-envelope lanes, this might be adapted so that if moving an envelope point exposes another envelope point, the original point remains locked until the mouse cursor is moved. Can Lua and the API detect which is the top envelope point in this case?


The "moving all selected points if target is selected" idea sounds useful too, but it would be good if this is only activated by a modifier, or can be defeated by a modifier.


I've missed the scripting crowd, I'm hoping that I'll have time this winter to join in again, to re-read my Lua book and jump in -I'm sure I can make my EEL scripts much easier and tighter in Lua -some things were so difficult without better arrays.



>
__________________
Nathan, Lincoln, UK. | Item Marker Tool. (happily retired) | Source Time Position Tool. | CD Track Marker Tool. | Timer Recording Tool. | dB marks on MCP faders FR.
planetnine is offline   Reply With Quote
Old 09-04-2015, 01:37 AM   #50
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,583
Default

Quote:
Originally Posted by planetnine View Post
The "moving all selected points if target is selected" idea sounds useful too, but it would be good if this is only activated by a modifier, or can be defeated by a modifier.
Best done as two separate scripts, that way the script doesn't have to try to discern modifier keys. It's just more programming work.
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 09-04-2015, 02:05 AM   #51
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,583
Default

Quote:
Originally Posted by planetnine View Post
Forgive me if this has been added/solved already (and I haven't looked at the script -not had time to gen up on Lua yet), but Dax's issue with chasing the envelope point should be quite easy to deal with.
Hey PlanetNine, yes thanks, the current version works great.
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 09-04-2015, 03:25 AM   #52
planetnine
Human being with feelings
 
planetnine's Avatar
 
Join Date: Oct 2007
Location: Lincoln, UK
Posts: 7,942
Default

Quote:
Originally Posted by daxliniere View Post
Best done as two separate scripts, that way the script doesn't have to try to discern modifier keys. It's just more programming work.

That bit is easy Dax, done it a lot in EEL, uses same gfx function subset in Lua.


Quote:
Originally Posted by daxliniere View Post
Hey PlanetNine, yes thanks, the current version works great.

Ah, good, glad to hear it.



>
__________________
Nathan, Lincoln, UK. | Item Marker Tool. (happily retired) | Source Time Position Tool. | CD Track Marker Tool. | Timer Recording Tool. | dB marks on MCP faders FR.
planetnine is offline   Reply With Quote
Old 09-04-2015, 08:43 AM   #53
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by planetnine View Post
Hello spk.

Forgive me if this has been added/solved already (and I haven't looked at the script -not had time to gen up on Lua yet), but Dax's issue with chasing the envelope point should be quite easy to deal with.

When the mousewheel is moved and the object under the mouse cursor is checked and found to be an envelope point, the mouse x&y co-ords, the envelope point ID and an envelope_point_lock flag need to be set. When the next mousewheel cycle is instantiated, this is repeated until the object under the mouse cursor is no-longer the original envelope point. If at this time the mouse cursor has not moved (or has moved only eg 1pixel from the stored position), then the script continues moving the original point until the mouse is moved, when the envelope_point_lock flag is reset and the point "released".

For multi-envelope lanes, this might be adapted so that if moving an envelope point exposes another envelope point, the original point remains locked until the mouse cursor is moved. Can Lua and the API detect which is the top envelope point in this case?
Hello planetnine,
That would probably work, but these script don't run in background (see "get_action_context" -function in the reascript help file).

EDIT: Have to test if "get/setextstate" would work here.


Quote:
Originally Posted by planetnine View Post

I've missed the scripting crowd, I'm hoping that I'll have time this winter to join in again, to re-read my Lua book and jump in -I'm sure I can make my EEL scripts much easier and tighter in Lua -some things were so difficult without better arrays.

>
It's so much easier to handle strings, tables and arrays in Lua

Last edited by spk77; 09-04-2015 at 11:07 AM.
spk77 is offline   Reply With Quote
Old 09-10-2015, 06:55 AM   #54
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

I was trying this script this morning, on a selection of some adjacent envelope points , instead of just one envelope.

Maybe i miss(ed) something but this doesn't seem possible ?
If it's not possible, i would be my humble wish-for :0)


OSX 10.10.5 , Reaper 5.02pre3 - 64bit.
vanhaze is offline   Reply With Quote
Old 09-10-2015, 07:00 AM   #55
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,583
Default

Do you mean the line? That would be great.
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 09-10-2015, 07:34 AM   #56
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

Hi !

Let me try to explain myself better:

- Make a marquee selection with the mouse, marqueeing 1) : just an envelope segment without
envelope points or 2): marqueeing a bunch of (adjacent) envelope points.

Then mouse wheel scroll over such a selection.

In case 1, 4 envelope points are created, to create the (horizontal) envelope segment.
In case 2, the selected envelope points will be highered or lowered equally, vertically, and keeping exactly their horizontal positions.
vanhaze is offline   Reply With Quote
Old 09-10-2015, 01:45 PM   #57
mccrabney
Human being with feelings
 
mccrabney's Avatar
 
Join Date: Aug 2015
Posts: 3,672
Default

is there a hidden difficulty in making this apply to any selected envelope, rather than specifically track envelopes? i'd love to make this a default editing behavior for ALL envelopes, not just track envelopes. i'd even copy it into a 2nd instance and create a coarse and fine version, and alternate between them via shift+mousewheel / alt+shift+mousewheel.
mccrabney is offline   Reply With Quote
Old 09-11-2015, 06:10 PM   #58
David Perry
Human being with feelings
 
Join Date: Oct 2010
Posts: 272
Default

Edit: had a problem getting it to work the first time but tried deleting and reloading and it now works. Thanks!

Last edited by David Perry; 09-11-2015 at 06:16 PM.
David Perry is offline   Reply With Quote
Old 09-27-2015, 05:33 AM   #59
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,583
Default

Hey spk77,
Would it be possible for you to implement this behaviour, please?

When multiple points are selected, mousewheel over one of the selected points moves all selected points.
AND
Single (unselected) points can be mousewheeled too, even when a selection exists.
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 11-03-2015, 03:36 AM   #60
Sju
Human being with feelings
 
Join Date: Jun 2015
Posts: 685
Default

Quote:
Originally Posted by vanhaze View Post
This is really something, but i wish it could be used on all envelopes, not just volume envelopes.
Quote:
Originally Posted by spk77 View Post
Update:
  • 2-Sep-2015: added support for all track envelopes
  • Download from post#1 (second script there)
I think this went under the radar:
Quote:
Originally Posted by Sexan View Post
Will first script be updated with all envelopes?
I would also like the first one to affect all envelopes, but seems like it wasn't updated. I think it's the more useful one anyway, as you can adjust multiple points at once. I managed to hack it though, by removing the
Code:
or envelope.name ~= "Volume" and envelope.name ~= "Volume (Pre-FX)"
conditionals, but I still gotta find out how to make the scaling only apply to volume envelopes.
Sju is offline   Reply With Quote
Old 01-02-2016, 04:23 PM   #61
J Reverb
Human being with feelings
 
Join Date: Jul 2009
Posts: 1,071
Default

This works on any selected envelope up/down/left/right with multiple points but the steps are fixed values using SWS/FNG actions.

Set up 2 custom actions

Shift+Mousewheel up/down
Action: Skip next action if CC parameter <0/mid
SWS/FNG: Move selected envelope points up
Action: Skip next action if CC parameter >0/mid
SWS/FNG: Move selected envelope points down

Ctrl+Shift+Mousewheel left/right
Action: Skip next action if CC parameter <0/mid
Item edit: Move items/envelope points right
Action: Skip next action if CC parameter >0/mid
Item edit: Move items/envelope points left

SPK would it be possible to enhance your script to support all envelope types and include left/right with step settings?
J Reverb is offline   Reply With Quote
Old 01-03-2016, 10:34 AM   #62
Subz
Human being with feelings
 
Subz's Avatar
 
Join Date: Jun 2006
Location: UK
Posts: 3,221
Default

Quote:
Originally Posted by J Reverb View Post
SPK would it be possible to enhance your script to support all envelope types?
Same Question!

this is a cool script! (Thank You!)

it would be amazing if i could use it on any envelope point!


Subz
Subz is offline   Reply With Quote
Old 01-03-2016, 11:15 AM   #63
vanhaze
Human being with feelings
 
vanhaze's Avatar
 
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
Default

+1000...please !!
vanhaze is offline   Reply With Quote
Old 01-31-2016, 05:06 AM   #64
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,583
Default

Hey spk77,
Would it be possible for you to implement this behaviour, please?

When multiple points are selected, mousewheel over one of the selected points moves all selected points.
AND
Single (unselected) points can be mousewheeled too, even when a selection exists.


All the best,
Dax.
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 02-04-2016, 06:58 AM   #65
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by daxliniere View Post
Hey spk77,
Would it be possible for you to implement this behaviour, please?

When multiple points are selected, mousewheel over one of the selected points moves all selected points.
AND
Single (unselected) points can be mousewheeled too, even when a selection exists.


All the best,
Dax.
I don't know why I can't make this behaviour to work...

Every other point is going to opposite direction when multiple points are selected and the mouse wheel is rotated down (15s -> in the gif):
spk77 is offline   Reply With Quote
Old 02-04-2016, 07:59 PM   #66
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,583
Default

Quote:
Originally Posted by spk77 View Post
Every other point is going to opposite direction when multiple points are selected and the mouse wheel is rotated down (15s -> in the gif)
Haha, oh wow, there's definitely something bunk there!
Maybe you've found a bug in the way mousewheel data is passed from the host?

Maybe another scripter could take a quick look at it, then we can ask Team Cockos about it?


By the way, thanks for taking a look at this for me. I really appreciate it and think it will be a great improvement to the ergonomics of the original script.
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 02-04-2016, 08:17 PM   #67
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,583
Default

And just to clarify, in your video you show adjustment of selected and unselected points, but you don't show if selected points are left untouched when adjusting unselected envelope points.
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 02-10-2016, 08:38 AM   #68
lowellben
Human being with feelings
 
lowellben's Avatar
 
Join Date: Aug 2010
Location: They put me in a home.
Posts: 3,432
Default

Wish this was native Reaper, thank you for helping us with this script!
__________________
47.8% of statistics are made up.
lowellben is offline   Reply With Quote
Old 02-20-2016, 05:45 PM   #69
daxliniere
Human being with feelings
 
daxliniere's Avatar
 
Join Date: Nov 2008
Location: London, UK
Posts: 2,583
Default

Can another scripter please check out mpl's script and confirm there's nothing he's missed? Then I will report it to Cockos as a bug.


Cheers!
__________________
Puzzle Factory Sound Studios, London [Website] [Instagram]
[AMD 5800X, 32Gb RAM, Win10x64, NVidia GTX1080ti, UAD2-OCTO, FireFaceUCX, REAPER x64]
[Feature request: More details in Undo History]
daxliniere is offline   Reply With Quote
Old 12-17-2019, 11:35 AM   #70
Eraz
Human being with feelings
 
Join Date: Nov 2019
Posts: 225
Default

Could it be that it does not work anymore on reaper 6? when scrolling on the points it sets the value to -inf.
Eraz is offline   Reply With Quote
Old 12-20-2019, 12:12 PM   #71
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,668
Default

Quote:
Originally Posted by Eraz View Post
Could it be that it does not work anymore on reaper 6? when scrolling on the points it sets the value to -inf.
Seems to work for me...I guess it needs the latest SWS beta: http://www.sws-extension.org/download/pre-release/
spk77 is offline   Reply With Quote
Old 12-22-2019, 02:56 AM   #72
Eraz
Human being with feelings
 
Join Date: Nov 2019
Posts: 225
Default

Quote:
Originally Posted by spk77 View Post
Seems to work for me...I guess it needs the latest SWS beta: http://www.sws-extension.org/download/pre-release/
Yep, that solved it. Thanks!
Eraz is offline   Reply With Quote
Old 06-17-2020, 11:15 AM   #73
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,068
Default

Does this action still work?
I have latest Reaper 6.12c installed, and latest sws extensions.
I can't seem to make it work.
Thanks in advance,
Wyatt

Edit: Never mind. I got it working.
I forgot to assign a mod key + mouse wheel.
__________________
DDP To Cue Writer. | DDP Marker Editor.

Last edited by WyattRice; 06-17-2020 at 11:33 AM.
WyattRice is offline   Reply With Quote
Old 06-17-2020, 11:55 AM   #74
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,068
Default

Could something like this be used to control TCP faders too?
__________________
DDP To Cue Writer. | DDP Marker Editor.
WyattRice is offline   Reply With Quote
Old 08-07-2020, 04:57 AM   #75
Skorobagatko
Human being with feelings
 
Skorobagatko's Avatar
 
Join Date: Mar 2017
Location: Ukraine, Kyiv
Posts: 546
Default

How to edit a script to make horizontal mousewheel work in "reversed" direction?
Skorobagatko is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:40 AM.


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