Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER General Discussion Forum

Reply
 
Thread Tools Display Modes
Old 07-10-2018, 02:51 AM   #1
Stroudy
Human being with feelings
 
Stroudy's Avatar
 
Join Date: Jul 2014
Location: London
Posts: 739
Default MIDI Editor equivalent of Move position of item to edit cursor?

The MIDI Editor version of this command (Edit: Move left edge of note to edit cursor) shifts ALL selected notes to the edit cursor position. See gif...



How do I do this but keep the relative note positions?
Stroudy is offline   Reply With Quote
Old 07-10-2018, 10:35 AM   #2
jnif
Human being with feelings
 
jnif's Avatar
 
Join Date: Dec 2008
Posts: 2,111
Default

Something like this might help:


jnif
jnif is offline   Reply With Quote
Old 07-10-2018, 10:45 AM   #3
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,721
Default

I'm fairly new to Reaper and use if for editing audio. I did a cursory search a MIDI command of something akin to "Move Pitches (or Items) to Cursor", but didn't find any.... for MIDI.

However, your video behavior is very similar to Cut/Paste. Where Reaper will paste at cursor anyway. So, why not simply Cut/Paste/Quantize?

Cheers,

Andrew K
Thonex is offline   Reply With Quote
Old 07-10-2018, 11:02 AM   #4
Tod
Human being with feelings
 
Tod's Avatar
 
Join Date: Jan 2010
Location: Kalispell
Posts: 14,759
Default

Quote:
Originally Posted by Thonex View Post
However, your video behavior is very similar to Cut/Paste. Where Reaper will paste at cursor anyway. So, why not simply Cut/Paste/Quantize?
Hey Andrew, I've never had a reason to do what your doing but your right, a cut and paste will do
this. So all you need is a custom action to 1st cut, then paste at the edit cursor. You could also
have it so that it includes all the CC controllers when it cuts and pastes.

I've got a few similar actions but they're for copy & paste. However I don't have it so that it copys,
then pastes at the edit cursor, all in one click, heh heh, I think I will do that.
Tod is offline   Reply With Quote
Old 07-12-2018, 09:23 AM   #5
jnif
Human being with feelings
 
jnif's Avatar
 
Join Date: Dec 2008
Posts: 2,111
Default

I thought Stroudy's intention was to align the top note (the yellow one that was grabbed in the video) to the cursor and keep relative positions of all the other selected notes.
Using just cut and paste the first selected note would be aligned to the cursor (the long green bottom note in the video).

jnif
jnif is offline   Reply With Quote
Old 07-12-2018, 10:39 AM   #6
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
Default

True, apparently he wants to align the notes based on the orange note.
I would use the copy/paste method and nudge the selected events by hand.
I coded some scripts to do that, either via mousewheel or shortcuts.
Just check my script thread in my signature.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 07-13-2018, 05:00 AM   #7
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
Default

I created a script, since it seemed "cleaner" to me, than using the copy/paste approach:

See below for updated gif

You can get it from my repo. It's called "Move notes to edit cursor (relative)"
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom

Last edited by _Stevie_; 07-17-2018 at 03:08 AM.
_Stevie_ is offline   Reply With Quote
Old 07-13-2018, 05:13 AM   #8
Reno.thestraws
Human being with feelings
 
Reno.thestraws's Avatar
 
Join Date: Nov 2009
Location: Belgium
Posts: 10,474
Default

CTRL+X
CTRL+v
__________________
http://www.residenceemilia.com
Reno.thestraws is offline   Reply With Quote
Old 07-13-2018, 06:06 AM   #9
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
Default

However, this will move the edit cursor to the end of the notes.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 07-13-2018, 02:48 PM   #10
jonboper
Human being with feelings
 
jonboper's Avatar
 
Join Date: Dec 2017
Location: Appleton, WI
Posts: 164
Default

I just had a question similar to this but in the inline editor. There was an answer that might satisfy all the issues with copy + paste:

https://forum.cockos.com/showpost.ph...24&postcount=7
jonboper is offline   Reply With Quote
Old 07-14-2018, 06:52 AM   #11
jnif
Human being with feelings
 
jnif's Avatar
 
Join Date: Dec 2008
Posts: 2,111
Default

Quote:
Originally Posted by _Stevie_ View Post
True, apparently he wants to align the notes based on the orange note.
I would use the copy/paste method and nudge the selected events by hand.
I coded some scripts to do that, either via mousewheel or shortcuts.
Just check my script thread in my signature.
I modified your script to use first note on pitch cursor as reference.
Here is an example:


The script:
https://stash.reaper.fm/33961/align_...cted_notes.lua
The script does not work properly if trying to move notes outside the bounds of MIDI item.

jnif
jnif is offline   Reply With Quote
Old 07-14-2018, 07:07 AM   #12
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
Default

@jnif

Pretty cool! Didn't think of that option, very well done.

Regarding moving the events out of the take... Yeah, we need to
extend the take (it's the last note-off in a take), when an event crosses the
item boundary. It's not the same as extending the item, since the take sits in the item. It's a layer below, so to say. I'm still trying to find a way. I think it's only possible with SetAllEvnts.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 07-14-2018, 09:09 AM   #13
jonboper
Human being with feelings
 
jonboper's Avatar
 
Join Date: Dec 2017
Location: Appleton, WI
Posts: 164
Default

very cool +1
jonboper is offline   Reply With Quote
Old 07-16-2018, 03:49 AM   #14
Stroudy
Human being with feelings
 
Stroudy's Avatar
 
Join Date: Jul 2014
Location: London
Posts: 739
Default

Quote:
Originally Posted by _Stevie_ View Post
I created a script, since it seemed "cleaner" to me, than using the copy/paste approach:



You can get it from my repo. It's called "Move notes to edit cursor (relative)"
I'm afraid I'm getting this error..

Code:
sr_Move notes to edit cursor (relative).lua:32: attempt to perform arithmetic on a nil value (global 'closestNoteOffset')
I've installed via ReaPack.

Looks awesome... would love to get it working

Last edited by Stroudy; 07-16-2018 at 04:04 AM.
Stroudy is offline   Reply With Quote
Old 07-16-2018, 03:52 AM   #15
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
Default

Glad you like it, you're welcome!
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 07-16-2018, 04:04 AM   #16
Stroudy
Human being with feelings
 
Stroudy's Avatar
 
Join Date: Jul 2014
Location: London
Posts: 739
Default

Quote:
Originally Posted by _Stevie_ View Post
Glad you like it, you're welcome!

Oops, sorry I spoke too soon. I just updated my previous post.
Stroudy is offline   Reply With Quote
Old 07-16-2018, 04:14 AM   #17
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
Default

Fixed it!

Additionally I added a new feature.
When you hover over a note, this note is used as offset.
It's similar to jnif's script but uses the mouse cursor instead.

__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom

Last edited by _Stevie_; 07-16-2018 at 11:01 AM.
_Stevie_ is offline   Reply With Quote
Old 07-16-2018, 01:13 PM   #18
AugerJ
Human being with feelings
 
Join Date: Dec 2015
Posts: 476
Default

Stevie, applying your script v1.2 to drawn notes results in something odd (as you can see on the screen shots).
I draw a line of notes and copied it to the left.


Mouse was over the right D2.


Mouse was over the left D2.


However,
applying the same script to "normally" played and recorded notes didn't lead to any issues.
AugerJ is offline   Reply With Quote
Old 07-16-2018, 01:15 PM   #19
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
Default

Oh geez, looks messy... :O
Will check!


EDIT: I see some strange vertical lines on some notes. Are there maybe overlapping notes?



EDIT2: okay I just checked it here. You must indeed have overlapping notes. Since Reaper closely follows the MIDI file implementation for MIDI notes, overlapping notes (on the same pitch!) lead to odd behaviour.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom

Last edited by _Stevie_; 07-16-2018 at 02:09 PM.
_Stevie_ is offline   Reply With Quote
Old 07-16-2018, 02:08 PM   #20
AugerJ
Human being with feelings
 
Join Date: Dec 2015
Posts: 476
Default

Quote:
Originally Posted by _Stevie_ View Post
... okay I just checked it here. You must indeed have onverlapping notes. Since Reaper closely follows the MIDI file implementation for MIDI notes, overlapping notes (on the same pitch!) lead to odd behaviour.
Thanks for clarifying. And for the script )
AugerJ is offline   Reply With Quote
Old 07-16-2018, 02:10 PM   #21
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
Default

You're welcome!
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 07-17-2018, 02:57 AM   #22
AugerJ
Human being with feelings
 
Join Date: Dec 2015
Posts: 476
Default

Hi, Stevie.
Maybe you'll find that thread entertaining:
https://forum.cockos.com/showthread.php?t=209041
AugerJ is offline   Reply With Quote
Old 07-17-2018, 03:34 AM   #23
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
Default

Hah, pretty cool! You might also find "Change position (mousewheel)" helpful in that case.
It's very useful to quickly "quantize manually" with the mousewheel.

__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 07-17-2018, 04:43 AM   #24
AugerJ
Human being with feelings
 
Join Date: Dec 2015
Posts: 476
Default

Quote:
Originally Posted by _Stevie_ View Post
Hah, pretty cool! You might also find "Change position (mousewheel)" helpful in that case.
It's very useful to quickly "quantize manually" with the mousewheel.

Thanks. I use "Edit: Move notes left/right one pixel" or Shift+Left_drag (Move note ignoring snap), but it's good to know of the alternative way.
Regarding these scripts ("Change note length/start/position/position by grid"),
I'd very much like actions "Change note start by grid" and "Change note length by grid" to be available in
Preferences - Editing Behavior - Mouse Modifiers - MIDI note edge - left drag.
(I imagine it would be called "Move note edge by grid".)
And there's no option "Action list..." there.
Getting used to workarounds, anyway.
AugerJ is offline   Reply With Quote
Old 07-17-2018, 05:49 AM   #25
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
Default

Yeah true, it's not possible to include actions for these mouse modifiers
The only solution I see here is activating "snap" when you want to change the start / end of a note via grid. That's why I have assigned snap to a mouse button, to quickly toggle it.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 12-07-2019, 05:17 AM   #26
triplex
Human being with feelings
 
Join Date: Dec 2010
Posts: 17
Default

Quote:
Originally Posted by _Stevie_ View Post
Fixed it!

Additionally I added a new feature.
When you hover over a note, this note is used as offset.
It's similar to jnif's script but uses the mouse cursor instead.

Hi Stevie,

Thanks for another useful script, using it every day.

Just curious, is it possible to get the same behavior, but related to the note's endings, so they snap/align to the cursor?

Thanks,
Andrei
triplex is offline   Reply With Quote
Old 12-17-2019, 04:25 PM   #27
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,067
Default

Yes, that would certainly be possible. I’ll try to look into it. But can’t promise anything. Holidays, busy times... 😬
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ 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 10:53 PM.


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