Old 12-03-2022, 01:57 PM   #1
ferropop
Human being with feelings
 
ferropop's Avatar
 
Join Date: Jan 2016
Location: Los Angeles, CA
Posts: 3,126
Default Fixing Reaper's square automation workflow

Maybe I'm alone, but I'm completely weirded out by how Reaper deals with square automation. Going on 14 years of daily Reaper and still it just feels...odd?

Situation : you have the thought "at this measure I'd like to create a square dip down to zero".

How it works : you'd think, "add a square point at mouse" right? No, you first have to set the point type to SQUARE of the previous point before the point you're about to add. This is insanely counterintuitive, no? Then the point type of your current point basically sets the behaviour of the NEXT point, and almost always incorrectly.

Like... i just want a single draw operation to Draw Square Automation Between Points.

I know you can use "create 4 points" actions to simulate a square point, but this is fundamentally different than square because when you want to shift the location of the square you now have to select 2 points, which need to be correctly set and can easily become detached in time, etc etc etc etc.


...is it feasible to script a more intuitive Add Square Point?

I'd imagine upon triggering it would :
-select closest point to the LEFT of the mouse cursor
-set that point to square
-get point type of closest point to RIGHT of mouse cursor
-create point at mouse, created as same point type of above step

Does this sound right?
__________________
FERRO
Songs I've Written/Produced : https://sptfy.com/7SIW
Instagram : http://www.instagram.com/ferropop
ferropop is offline   Reply With Quote
Old 12-03-2022, 02:57 PM   #2
ferropop
Human being with feelings
 
ferropop's Avatar
 
Join Date: Jan 2016
Location: Los Angeles, CA
Posts: 3,126
Default

Closest I've come, assigned this to a key because you can't assign custom actions to Envelope Point/Segment modifiers.



__________________
FERRO
Songs I've Written/Produced : https://sptfy.com/7SIW
Instagram : http://www.instagram.com/ferropop

Last edited by ferropop; 12-03-2022 at 03:03 PM.
ferropop is offline   Reply With Quote
Old 12-03-2022, 03:20 PM   #3
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,592
Default

I add the point then press control+2

Envelope: Set shape of selected points to square
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 12-03-2022, 03:32 PM   #4
ferropop
Human being with feelings
 
ferropop's Avatar
 
Join Date: Jan 2016
Location: Los Angeles, CA
Posts: 3,126
Default

Quote:
Originally Posted by EpicSounds View Post
I add the point then press control+2

Envelope: Set shape of selected points to square
This makes the point After the point you just created, act square.

Maybe I'm thick, but isn't the idea of a "square point" that it itself creates the step? Like, the square point you've just added functions as the step location? Because it doesn't work this way, it's based on the previous point being set to Square.
__________________
FERRO
Songs I've Written/Produced : https://sptfy.com/7SIW
Instagram : http://www.instagram.com/ferropop
ferropop is offline   Reply With Quote
Old 12-03-2022, 03:54 PM   #5
EpicSounds
Human being with feelings
 
EpicSounds's Avatar
 
Join Date: Jul 2009
Posts: 7,592
Default

maybe better to think of it as a 'flat' envelope until the next point.
__________________
REAPER Video Tutorials, Tips & Tricks and more at The REAPER Blog
EpicSounds is offline   Reply With Quote
Old 12-04-2022, 01:14 AM   #6
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,984
Default

you have to evaluate envelope at current value to break previous segment. For tech reasons that would work only for linear envelopes
mpl is offline   Reply With Quote
Old 12-04-2022, 02:04 AM   #7
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,984
Default

like this (add zero envelope point):
Code:
envelope =  reaper.GetSelectedEnvelope( 0 )
if envelope then
  pos = reaper.GetCursorPosition()
  retval, value, dVdS, ddVdS, dddVdS = reaper.Envelope_Evaluate( envelope, pos, tonumber(reaper.format_timestr_pos( 1-reaper.GetProjectTimeOffset( 0,false ), '', 4 )), 1 )
  reaper.InsertEnvelopePoint( envelope, pos-10^-13, value, 1, 0, false, false )
  reaper.InsertEnvelopePoint( envelope, pos+10^-13, 0, 0, 0, false, false )
end
BUT
you cant just make zero segment value longer when draggin this point (dragging zero point results you a last value latched at last evaluated value in squared envelope segment), it a result of rounding when dragging closer points by mouse, you have to add another point, like 0.1 seconds far:

Code:
envelope =  reaper.GetSelectedEnvelope( 0 )
if envelope then
  pos = reaper.GetCursorPosition()
  retval, value, dVdS, ddVdS, dddVdS = reaper.Envelope_Evaluate( envelope, pos, tonumber(reaper.format_timestr_pos( 1-reaper.GetProjectTimeOffset( 0,false ), '', 4 )), 1 )
  reaper.InsertEnvelopePoint( envelope, pos-10^-13, value, 1, 0, false, false )
  reaper.InsertEnvelopePoint( envelope, pos+10^-13, 0, 0, 0, false, false )
  reaper.InsertEnvelopePoint( envelope, pos+0.1, 0, 0, 0, false, false )
end
mpl is offline   Reply With Quote
Old 12-04-2022, 03:48 AM   #8
Judders
Human being with feelings
 
Join Date: Aug 2014
Posts: 11,052
Default

I have mouse modifiers and envelopes set up so I can swipe a time selection with a modifier key and pulling the envelope creates square points at either end of the time selection.

Is that what you're looking for?
Judders is offline   Reply With Quote
Old 12-10-2022, 06:11 PM   #9
ferropop
Human being with feelings
 
ferropop's Avatar
 
Join Date: Jan 2016
Location: Los Angeles, CA
Posts: 3,126
Default

Quote:
Originally Posted by Judders View Post
I have mouse modifiers and envelopes set up so I can swipe a time selection with a modifier key and pulling the envelope creates square points at either end of the time selection.

Is that what you're looking for?
Been doing this for years, and Razor Edits also allow this without having to create a time selection.

...it's not quite the same as what I'm trying to do.


I'll put it this way. What should be a pretty simple mapping of "I want to do this" to how to actually achieve it, is kinda weird. Maybe it's me.

You might think "I want the volume to SWELL UP" - so you draw in a "linear point". The point itself that you are adding, is what forms a line. Great.

You might think "I want the volume to suddenly SQUARELY DROP DOWN" - so you draw in a "square point" right? Nope - the point before the point you're creating needs to be set as square for it to behave as square, and keep consistent with the same mental flow as the previous example.

It's a two step process, when it feels like it should just be the point itself that you are creating, should behave as Square.
__________________
FERRO
Songs I've Written/Produced : https://sptfy.com/7SIW
Instagram : http://www.instagram.com/ferropop
ferropop 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 07:23 AM.


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