Old 06-25-2020, 11:23 AM   #1
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Posts: 661
Default MIDI Editor Magic: Custom zoom & scroll scripts

There's not a lot of options when it comes to zooming & scrolling in the MIDI editor. The API is very limited in this regard, and we only have a handful of (sometimes quirky) built-in actions. In the last month I spent a lot of time building custom zoom & scroll functionality. Here's some scripts for you

MIDI Editor Magic Bundle:

Requires SWS extension.

This is a collection of over 50 zooming & scrolling scripts. These scripts are simple preconfigured versions of the more powerful MeMagic script. If you are looking for a specific zoom/scroll behavior, there's a high chance that you might find it in this bundle. Then again, there's also a high chance you might find something you didn't know you wanted

(In case you want a default zoom behavior when opening items: These scripts are optimized for usage as a mouse modifier for left click and double click on items)

Some Examples:

Vertically zooming to all notes in item:



Vertically scrolling to highest/lowest note in visible area.
Vertically scrolling to note row under mouse cursor, restrict to notes in item.
Horizontally scrolling to mouse cursor + Vertically scrolling to note row under mouse cursor




MIDI Editor Magic:

Requires SWS extension. Requires "One MIDI editor per project"
Recommended: Choose an action shortcut that is easily accessible and make it global!

This is a powerful script that contains a bunch of zooming and scrolling functionality. The script is contextual by default, it can zoom/scroll differently depending on where you have your mouse cursor. At its core, MeMagic was designed to be customizable, you can easily change the default behavior and create your own weird workflow. Horizontal and vertical behavior can be controlled separately by using a combination of the available modes (inside the script):

Horizontal modes
1: No change
2: Zoom to item
3: Zoom to number of measures at mouse or edit cursor
4: Zoom to number of measures at mouse or edit cursor, restrict to item
5: Smart zoom to number of notes at mouse or edit cursor
6: Smart zoom to number of notes at mouse or edit cursor, restrict to item
7: Scroll to mouse or edit cursor

Vertical modes
1: No change
2: Zoom to notes in visible area
3: Zoom to all notes in item
4: Scroll note row under mouse cursor
5: Scroll note row under mouse cursor, restrict to notes in visible area
6: Scroll note row under mouse cursor, restrict to notes in item
7: Scroll to center of notes in visible area
8: Scroll to center of notes in item
9: Scroll to lowest note in visible area
10: Scroll to lowest note in item
11: Scroll to highest note in visible area
12: Scroll to highest note in item

I initially created MeMagic because I had too scroll and zoom every time I opened a MIDI item. That's mostly because I like using a small MIDI editor docked to the bottom of the main window. If you can relate to this, I highly recommend trying MeMagic as the default mouse modifier for left and double click in Preferences > Editing > Mouse Modifiers > Media Item. This will make double clicks zoom to the whole item, and single clicks to a usable "smart" area at the edit cursor. (see GIF below)



Let's have a look at contextual usage inside the MIDI editor. With the mouse on the ruler the action scrolls to the highest note, with the mouse on the CC-lanes to the lowest note. On the piano area it zooms to content (only vertically). And in the note area itself you can scroll vertically and horizontally, bit by bit. And my favorite feature! Keep the assigned hotkey pressed to smoothly navigate through your items!



As some zooming behaviors work better in a specific MIDI editor timebase, you can optionally define modes per timebase. I use this to switch zooming behavior on the fly. There's more info inside the script.

Wait, what's this smart zoom thing?

Smart zoom is an algorithm that analyzes the MIDI content of a take and gives you a custom-tailored horizontal zoom level for each cursor position. The algorithm is based on some fancy math stuff called 'Inverse distance weighting'. You can think of it like horizontally zooming to approximately 10 notes. (The number of notes can obviously be adjusted)



Multi-Edit Zoom:

Requires SWS extension.

Opens all selected items in the MIDI editor and zooms to the content of all of them (vertically and horizontally).

This script temporarily changes the MIDI editor settings to make multi-editing possible. If your current settings do not support multi-editing behavior by default and you want to use the tracklist to change active takes, consider enabling the toggle setting inside the script. With toggling enabled the script will toggle between opening and closing the editor, while also toggling between the required multi-edit settings and your original MIDI editor settings.



You can find the scripts on my github or download them using ReaPack:

Copy and paste this link into: Extensions > ReaPack > Import a repository
Code:
https://raw.githubusercontent.com/iliaspoulakis/Reaper-Tools/master/index.xml
Donation Link

Last edited by FeedTheCat; 07-24-2020 at 01:36 AM.
FeedTheCat is offline   Reply With Quote
Old 06-25-2020, 12:39 PM   #2
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,395
Default

This looks GREAT!!

I've always struggled with MIDI notes being above or below the viewable area causing me to tediously manually zoom to view all.

Do you have a function that can be separated out that just centers the MIDI in the window making all MIDI viewable?
__________________
Cheers... Andrew K
Reaper v6.15 Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
Thonex is online now   Reply With Quote
Old 06-25-2020, 03:13 PM   #3
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Posts: 661
Default

hmm, something like zoom to content, but only vertically?
That should be possible. I'll see what I can do!
FeedTheCat is offline   Reply With Quote
Old 06-25-2020, 05:43 PM   #4
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 4,365
Default

Quote:
Originally Posted by Thonex View Post
This looks GREAT!!

I've always struggled with MIDI notes being above or below the viewable area causing me to tediously manually zoom to view all.

Do you have a function that can be separated out that just centers the MIDI in the window making all MIDI viewable?


Oh yessss, major gripe of mine as well!
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please consider donating to amagalma cfillion FeedTheCat Julian Sader lb0 nofish Sexan X-Raym
_Stevie_ is offline   Reply With Quote
Old 06-25-2020, 05:47 PM   #5
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,395
Default

Quote:
Originally Posted by FeedTheCat View Post
hmm, something like zoom to content, but only vertically?
That should be possible. I'll see what I can do!
Yes... vertical as well as horizontal. In Nuendo I did a Macro like this:

• Open Midi Item
• Select all MIDI notes
• Zoom to selection
• Deselect all MIDI notes
Something like that would be AWESOME
__________________
Cheers... Andrew K
Reaper v6.15 Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
Thonex is online now   Reply With Quote
Old 06-26-2020, 05:15 AM   #6
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Posts: 661
Default

Quote:
Originally Posted by _Stevie_ View Post
Oh yessss, major gripe of mine as well!
yeah me too, that's why I made this script in the first place

Quote:
Originally Posted by Thonex View Post
Yes... vertical as well as horizontal. In Nuendo I did a Macro like this:

• Open Midi Item
• Select all MIDI notes
• Zoom to selection
• Deselect all MIDI notes
Something like that would be AWESOME
What don't you like about the existing "zoom to content" action?


I liked the idea of zooming out vertically without adjusting the horizontal zoom level. I'll iron out some bugs and share it



I can also add zooming to all MIDI notes. Should be easy, there is an action for zooming to selected notes.
FeedTheCat is offline   Reply With Quote
Old 06-26-2020, 05:59 AM   #7
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 4,365
Default

I personally keep the vertical zoom of notes at a constant level, because anything else just distracts me. But often, when I open the ME, the top or bottom notes are out of view and I have to scroll up or down to see them all.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please consider donating to amagalma cfillion FeedTheCat Julian Sader lb0 nofish Sexan X-Raym
_Stevie_ is offline   Reply With Quote
Old 06-26-2020, 06:05 AM   #8
beingmf
Human being with feelings
 
beingmf's Avatar
 
Join Date: Jul 2007
Location: Jazz City
Posts: 4,609
Default

WTF - I need to try this! Thank you!!!
__________________
Windows 10x64 | AMD Ryzen 3700X | ATI FirePro 2100 | Marian Seraph AD2, 4.1.2.0 | Yamaha Steinberg MR816x
Experience the Blunzeworscht!
beingmf is online now   Reply With Quote
Old 06-27-2020, 02:25 AM   #9
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Posts: 661
Default

Alright guys, I updated the first post. There's 3 new custom "Zoom to content" scripts. The difference to the default "zoom to content" action is mainly that they never zoom out all the way. The vertical one is by far my favorite. Try them out!
FeedTheCat is offline   Reply With Quote
Old 06-27-2020, 04:16 PM   #10
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,395
Default

Quote:
Originally Posted by FeedTheCat View Post
Alright guys, I updated the first post. There's 3 new custom "Zoom to content" scripts. The difference to the default "zoom to content" action is mainly that they never zoom out all the way. The vertical one is by far my favorite. Try them out!
DUDE!!!!

Will try these right now!!!

Cheers,

Andrew K
__________________
Cheers... Andrew K
Reaper v6.15 Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
Thonex is online now   Reply With Quote
Old 06-27-2020, 04:53 PM   #11
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,395
Default

Quote:
Originally Posted by FeedTheCat View Post
Alright guys, I updated the first post. There's 3 new custom "Zoom to content" scripts. The difference to the default "zoom to content" action is mainly that they never zoom out all the way. The vertical one is by far my favorite. Try them out!
All working great!!!!

Really nice!

I just need to find a clever way to combine it with Muti Part MIDI from the Arrange window. Meaning, Open MIDI Editor -> select all in all open items -> zoom to notes -> unselect all... in 1 custom action. Easier said than done.
__________________
Cheers... Andrew K
Reaper v6.15 Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
Thonex is online now   Reply With Quote
Old 06-28-2020, 01:41 AM   #12
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,395
Default

Ok... so I think there is a bug if there is only 1 MIDI note in an item. The FTC zoom to MIDI notes doesn't seem to work.

That said, I was able to integrate your script into a script that will zoom to multiple the MIDI in multiple MIDI Items in a single key command in the arrange window. For this to work you have to set up a special custom action to get it to work correctly.

Here's the Custom Action:


Custom: Toggle Multi Midi Editing

Options: MIDI track list/media item lane selection is linked to editability
Options: Avoid automatically setting MIDI items from other tracks editable

Code:
-- open MIDI Editor and zoom to selected notes using FTC_Zoom_to_midi_notes



num_items =  reaper.CountSelectedMediaItems( 0 )


if num_items == 0 then return end

reaper.Main_OnCommand( 40153, 0 ) -- Item: Open in built-in MIDI editor (set default behavior in preferences)

for i = 0, num_items -1 do
	item =  reaper.GetSelectedMediaItem( 0, i )
	take =  reaper.GetActiveTake( item )
	reaper.MIDI_SelectAll( take, true )
end


FTC_Zoom_to_midi_notes = reaper.NamedCommandLookup( "_RS0154a10a7c6c88005f5948478d5ca6f3fb1399d0" )
reaper.Main_OnCommand( FTC_Zoom_to_midi_notes, 0 )


for i = 0, num_items -1 do
	item =  reaper.GetSelectedMediaItem( 0, i )
	take =  reaper.GetActiveTake( item )
	reaper.MIDI_SelectAll( take, false )
end
__________________
Cheers... Andrew K
Reaper v6.15 Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
Thonex is online now   Reply With Quote
Old 06-28-2020, 04:03 AM   #13
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Posts: 661
Default

Quote:
Originally Posted by Thonex View Post
Ok... so I think there is a bug if there is only 1 MIDI note in an item. The FTC zoom to MIDI notes doesn't seem to work.
What's not working? seems fine here.



Quote:
Originally Posted by Thonex View Post
That said, I was able to integrate your script into a script that will zoom to multiple the MIDI in multiple MIDI Items in a single key command in the arrange window. For this to work you have to set up a special custom action to get it to work correctly.
Not sure if I understand correctly what you are trying to achieve. Is it an action that you run when having multiple items selected, that opens them in the editor and zooms to the content of all of them?

I had a multi-edit behavior in the works for MeMagic. Something like this?



The issue I see with your script btw is that my action only zooms to the active take in the editor. So I'm not sure what selecting all notes in the other items is doing for you.
FeedTheCat is offline   Reply With Quote
Old 06-28-2020, 08:11 AM   #14
Klangfarben
Human being with feelings
 
Join Date: Jul 2016
Location: Los Angeles, CA
Posts: 1,367
Default

Quote:
Originally Posted by _Stevie_ View Post
I personally keep the vertical zoom of notes at a constant level, because anything else just distracts me. But often, when I open the ME, the top or bottom notes are out of view and I have to scroll up or down to see them all.
Yeah same here. I've never changed the note size in 20 some years.

Would love the option to scroll vertical content into view but not zoom vertical size, just horizontal.

Thanks so much for your work on these!
Klangfarben is offline   Reply With Quote
Old 06-28-2020, 08:26 AM   #15
zookthespook
Human being with feelings
 
Join Date: Mar 2015
Location: India Mumbai
Posts: 762
Default

oooh this looks intresting..test driving it right away
zookthespook is offline   Reply With Quote
Old 06-28-2020, 08:52 AM   #16
Coachz
Human being with feelings
 
Coachz's Avatar
 
Join Date: Oct 2010
Location: Charleston, SC USA
Posts: 10,418
Default

If you only have the midi editor visible how does this work?
Coachz is offline   Reply With Quote
Old 06-28-2020, 09:54 AM   #17
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Posts: 661
Default

Quote:
Originally Posted by Klangfarben View Post
Yeah same here. I've never changed the note size in 20 some years.

Would love the option to scroll vertical content into view but not zoom vertical size, just horizontal.

Thanks so much for your work on these!
Hmm, I think I did a bad job in presenting the MeMagic script. I will update the first post to fix that at some point.
You don't HAVE to zoom vertically to smart zoom. The vertical and horizontal zooming behavior can be controlled separately. You get three options for vertical zoom:
1. No vertical zoom
2. Zoom to content
3. Zoom to content in visible area
And there's 5 options for horizontal zoom, two of those are "smart" zoom.

That being said, maybe hold off from trying it for a few days since I just found a bug and there are improvements coming

And since I'm on a roll here, here's 2 scripts I just made. They are called, "Scroll up to content" and "Scroll down to content"
Links in the first post.
FeedTheCat is offline   Reply With Quote
Old 06-28-2020, 10:01 AM   #18
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Posts: 661
Default

Quote:
Originally Posted by Coachz View Post
If you only have the midi editor visible how does this work?
It doesn't at the moment. The MeMagic script is optimized for my current workflow. I am using the arrange view to navigate between items in the MIDI editor, which itself is mostly small and docked at the bottom (like in my gifs).

I will be releasing more standalone actions like "Smart zoom to 10 notes at cursor position" or something like that when I get to it.
Then everybody gets to use some magic
FeedTheCat is offline   Reply With Quote
Old 06-28-2020, 11:48 AM   #19
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,395
Default

Hey FTC,

First off... great scripts!! Zooming in the Midi Editor as always been an issue in Reaper and I dare say you may have solved it!!

Here is my video explaining why that custom action is so necessary. Also, at the end of the video I show the single-note zoom bug I encountered.

Apologies for my rambling... still waking up

Also, apologies for the distorted VO in places... I was doing the video from my laptop... not great mics

Here's the video:

https://www.dropbox.com/s/0b8yprcjv1...m%201.mp4?dl=0

Here's the Custom Action:


Custom: Toggle Multi Midi Editing

Options: MIDI track list/media item lane selection is linked to editability
Options: Avoid automatically setting MIDI items from other tracks editable

Thanks again FTC!
__________________
Cheers... Andrew K
Reaper v6.15 Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.

Last edited by Thonex; 06-28-2020 at 12:06 PM.
Thonex is online now   Reply With Quote
Old 06-28-2020, 12:32 PM   #20
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,395
Default

Ok... one last feature request for Zoom to notes...

Is it possible to have a user definable (a line in the script where the suer can set a value) maximum zoom limit? So that if you have a series of hi-hat notes... all the same midi note, that it won't be hugely vertical?

I hope I'm making sense.

Cheers,

Andrew K
__________________
Cheers... Andrew K
Reaper v6.15 Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
Thonex is online now   Reply With Quote
Old 06-28-2020, 12:54 PM   #21
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Posts: 661
Default

Quote:
Originally Posted by Thonex View Post
Hey FTC,

First off... great scripts!! Zooming in the Midi Editor as always been an issue in Reaper and I dare say you may have solved it!!
Well I wouldn't go that far, but I'm glad it's helping

I'm still trying to replicate what you're doing. I think that it's a bit of a coincidence that it's working this way, but I'm not sure. Can you try putting an item with just one note on top (above the other items)? I'm thinking that the script will always zoom to the first item.

Quote:
Originally Posted by Thonex View Post
Is it possible to have a user definable (a line in the script where the suer can set a value) maximum zoom limit? So that if you have a series of hi-hat notes... all the same midi note, that it won't be hugely vertical?

I hope I'm making sense.

Cheers,

Andrew K
You are making a lot of sense, that setting already exists (at the top of the script)

Last edited by FeedTheCat; 06-28-2020 at 01:01 PM.
FeedTheCat is offline   Reply With Quote
Old 06-28-2020, 01:06 PM   #22
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,395
Default

Quote:
Originally Posted by FeedTheCat View Post
Can you try putting an item with just one note on top (above the other items)? I'm thinking that the script will always zoom to the first item.
I moved the single note item track to the top (it's the top track) and I'm still getting that behavior. Remember, I'm using it in context of my script in my first post.

[EDIT] I will add that if a single note item is on the top track and I select a bunch of items below it... it breaks the zoom in the same way.


Quote:
You are making a lot of sense, that setting already exists (at the top of the script)
AWESOME!!! Will test it not now!!

Cheers,

Andrew K
__________________
Cheers... Andrew K
Reaper v6.15 Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
Thonex is online now   Reply With Quote
Old 06-28-2020, 01:18 PM   #23
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,395
Default

OK... I decided to make a video focusing on the single note items issue I'm having.

Let me know your thoughts.

https://www.dropbox.com/s/p19s86q9lm...0zoom.mp4?dl=0
__________________
Cheers... Andrew K
Reaper v6.15 Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
Thonex is online now   Reply With Quote
Old 06-28-2020, 01:31 PM   #24
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,395
Default

OK... one last quick video... I think I stumbled onto something...

https://www.dropbox.com/s/r52p1kov98...e%202.mp4?dl=0

Hope this helps.

Cheers,

Andrew K
__________________
Cheers... Andrew K
Reaper v6.15 Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.

Last edited by Thonex; 06-28-2020 at 01:43 PM.
Thonex is online now   Reply With Quote
Old 06-28-2020, 01:46 PM   #25
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,395
Default

It seems like min_pitch_range has a limit of 36?

I tried this and it didn't work... it stayed pretty much at 36:

Code:
-- The smallest number of vertical notes allowed (not exact)
local min_pitch_range = 60
__________________
Cheers... Andrew K
Reaper v6.15 Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
Thonex is online now   Reply With Quote
Old 06-28-2020, 01:58 PM   #26
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Posts: 661
Default

There shouldn't be a limit... (you could try the standalone script). I'm thinking that my script is sometimes zooming to the wrong item (It wasn't really meant for multiple items). I'll create something that should work for your usecase.
FeedTheCat is offline   Reply With Quote
Old 06-28-2020, 02:07 PM   #27
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,395
Default

Quote:
Originally Posted by FeedTheCat View Post
There shouldn't be a limit... (you could try the standalone script). I'm thinking that my script is sometimes zooming to the wrong item (It wasn't really meant for multiple items). I'll create something that should work for your usecase.
Thanks so much FTC.

If you need any help or if you think you might have a better approach for multi item selection... I'm happy to help in any way.

Cheers,

Andrew K
__________________
Cheers... Andrew K
Reaper v6.15 Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
Thonex is online now   Reply With Quote
Old 06-28-2020, 02:18 PM   #28
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,395
Default

Quote:
Originally Posted by FeedTheCat View Post
(you could try the standalone script). I'm thinking that my script is sometimes zooming to the wrong item (It wasn't really meant for multiple items). I'll create something that should work for your usecase.
I does indeed work in stand alone. So your hunch is probably right. Thanks again!
__________________
Cheers... Andrew K
Reaper v6.15 Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
Thonex is online now   Reply With Quote
Old 06-28-2020, 03:30 PM   #29
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Posts: 661
Default

Hi Thonex,

try this out:
https://stash.reaper.fm/v/39799/FTC_multi_edit_zoom.lua

It requires SWS since I'm also temporarily changing some editor settings to make multi-editing possible (Kind of what you are doing with that custom action). There is a problem with that though. These changes don't stick, which means that you can't for example switch the active take in the track list. So you probably still need that other custom action for now. Anyway, it's about bedtime for me, and I kind of have busy day tomorrow. So I thought I'll leave you with this so you can test it. I'll release a more polished and thought-through version of it though in the next couple of days.

P.S. I noticed you are seeing the debugging console. Seems like I forgot to set the debug variable to false in that script before uploading. oopsie
FeedTheCat is offline   Reply With Quote
Old 06-28-2020, 03:46 PM   #30
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,395
Default

Quote:
Originally Posted by FeedTheCat View Post
Hi Thonex,

try this out:
https://stash.reaper.fm/v/39799/FTC_multi_edit_zoom.lua

It requires SWS since I'm also temporarily changing some editor settings to make multi-editing possible (Kind of what you are doing with that custom action). There is a problem with that though. These changes don't stick, which means that you can't for example switch the active take in the track list. So you probably still need that other custom action for now. Anyway, it's about bedtime for me, and I kind of have busy day tomorrow. So I thought I'll leave you with this so you can test it. I'll release a more polished and thought-through version of it though in the next couple of days.

P.S. I noticed you are seeing the debugging console. Seems like I forgot to set the debug variable to false in that script before uploading. oopsie
I'll try it out tomorrow.

Regarding the de-bug console... I almost always have that thing open since a lot of my custom scripts show me extra info that wouldn't fit in the Undo History space.

Thanks again for all this!
__________________
Cheers... Andrew K
Reaper v6.15 Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
Thonex is online now   Reply With Quote
Old 06-29-2020, 02:10 PM   #31
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,395
Default

OK... Thanks FTC for doing that Multi Edit Zoom mode.

It's more reliable than using my script combined with your original Zoom to notes script. There are still some edge cases... but I need to spend more time. I'd rather give you a session with obvious cases.

That said, this is working better than any other zoom solution I've tried in Reaper.

Thanks again!!

Cheers,

Andrew K
__________________
Cheers... Andrew K
Reaper v6.15 Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
Thonex is online now   Reply With Quote
Old 06-29-2020, 03:30 PM   #32
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Posts: 661
Default

Sure mate Btw, is there a particular reason why you want to zoom to the notes in the item, rather to just the whole item? Or was that for using your Nuendo macro? I'm thinking that zooming to item "edges" would work a lot better in a lot of ways.
FeedTheCat is offline   Reply With Quote
Old 06-29-2020, 04:36 PM   #33
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,395
Default

Quote:
Originally Posted by FeedTheCat View Post
Sure mate Btw, is there a particular reason why you want to zoom to the notes in the item, rather to just the whole item? Or was that for using your Nuendo macro? I'm thinking that zooming to item "edges" would work a lot better in a lot of ways.
No particular reason. But my main issues with Reaper have always been the vertical missing notes. I'll try your suggestion... but I'm guessing it's not optimized for multi item use?

Great work!

Cheers,

Andrew K
__________________
Cheers... Andrew K
Reaper v6.15 Catalina • Mac Mini 2020 6 core i7 • 64GB RAM • OS: Catalina • 4K monitor • RME RayDAT card with Sync Card and extended Light Pipe.
Thonex is online now   Reply With Quote
Old 06-29-2020, 05:01 PM   #34
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 2,649
Default

SmartZoom looks really sexy. I wonder, if something like that could be done in a useful sense for the regular arrangeview as well?

Do you mind, if I browse through your scripts and maybe reuse some of your tricks in my Ultraschall-API to add some more MIDI-Editor related functions? It looks like, I could learn a lot from it...
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper
Bugreports&Docs notes please do here:https://github.com/Ultraschall/ultra...-reaper/issues - Donate, if you wish
Meo-Ada Mespotine is offline   Reply With Quote
Old 06-30-2020, 12:39 AM   #35
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Posts: 661
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
SmartZoom looks really sexy. I wonder, if something like that could be done in a useful sense for the regular arrangeview as well?
That's indeed an interesting idea. The smart zoom algorithm is based on the assumption that seeing a specific number of notes horizontally (regardless of their length) gives you a good zoom level. That obviously works well with really long midi items where notes basically become pixels when zoomed out, but also with smaller items like in the gif below:



I guess the question is the following: Is there a use in seeing a specific number of items horizontally(regardless of their content)? Hmm, there could be some merit in that. Think of the notes above as if they were items. I guess we can try it out and see. I'll check out how easy it is to port the horizontal part.

Quote:
Originally Posted by Meo-Ada Mespotine View Post
Do you mind, if I browse through your scripts and maybe reuse some of your tricks in my Ultraschall-API to add some more MIDI-Editor related functions? It looks like, I could learn a lot from it...
Keep your filthy eyes off my code! Haha, just kidding ofc You're more than welcome to do anything you want with it. That's why it's licensed under MIT.
FeedTheCat is offline   Reply With Quote
Old 06-30-2020, 12:10 PM   #36
sai'ke
Human being with feelings
 
sai'ke's Avatar
 
Join Date: Aug 2009
Location: NL
Posts: 1,228
Default

Cool! Thanks for this. It seems like quite a nice workflow improvement. I'll give it a shot on the weekend
__________________
[Tracker Plugin: Thread|Github|Reapack] | [Routing Plugin: Thread|Reapack] | [More JSFX: Thread|Descriptions|Reapack]
sai'ke is offline   Reply With Quote
Old 06-30-2020, 02:00 PM   #37
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Posts: 661
Default

Quote:
Originally Posted by sai'ke View Post
Cool! Thanks for this. It seems like quite a nice workflow improvement. I'll give it a shot on the weekend
Good to hear from you Sai'ke

Quote:
Originally Posted by Thonex View Post
No particular reason. But my main issues with Reaper have always been the vertical missing notes. I'll try your suggestion... but I'm guessing it's not optimized for multi item use?

Great work!

Cheers,

Andrew K
I updated the first post. There's now a link to the multi-edit-zoom script. Think it works fairly well. The toggling option might work just fine in your workflow!
I also updated all the others scripts, except the MeMagic script itself, which still has certain issues.
FeedTheCat is offline   Reply With Quote
Old 07-01-2020, 04:13 AM   #38
reapero
Human being with feelings
 
Join Date: Aug 2011
Posts: 396
Default

These look very nice! I am a bit confused though by the amount of scripts

so.,.if i just want something that allows me to open multiple MIDI items and zooms to view all of the notes, without changing my vertical zoom...then this is the multi-edit-zoom script right?

When selecting multiple MIDI items and running this script iget this:

FTC_multi_edit_zoom.lua:1: unexpected symbol near '<'
reapero is offline   Reply With Quote
Old 07-01-2020, 08:48 AM   #39
FeedTheCat
Human being with feelings
 
FeedTheCat's Avatar
 
Join Date: May 2019
Posts: 661
Default

Quote:
Originally Posted by reapero View Post
These look very nice! I am a bit confused though by the amount of scripts
Yeah, I need to cleanup the first post..

Quote:
Originally Posted by reapero View Post
so.,.if i just want something that allows me to open multiple MIDI items and zooms to view all of the notes, without changing my vertical zoom...then this is the multi-edit-zoom script right?
The multi-edit-zoom script zooms to all selected items horizontally and to all notes in all items vertically. I just added a new setting for you, which disables all vertical zooming.

Quote:
Originally Posted by reapero View Post
When selecting multiple MIDI items and running this script iget this:
FTC_multi_edit_zoom.lua:1: unexpected symbol near '<'
Did you maybe edit the script at some point? Looks like an accidental typo. Try out the latest version from the first post.
FeedTheCat is offline   Reply With Quote
Old 07-01-2020, 05:46 PM   #40
vsthem
Human being with feelings
 
Join Date: Nov 2018
Posts: 286
Default

These scripts are amazing! Thank you! Here are a couple of ways I’m using this script

Multi-Edit Zoom when double clicking an item

Shortcut for Zoom to Content. As soon as I select another Item, I just hit Z, and everything in the item is centered

Custom Action: Multi-Edit Zoom + Move cursor to start of items. I just select the items I want, hit the shortcut, all are opened and zoomed, and my cursor is right at the start

Custom Action: Select All items in track, multi edit zoom, move cursor to start of items.


These are really gonna make going between midi items so much less of a pain. Now when I switch from Piccolo to Contrabass, I just hit Z, and all the items are perfectly centered, rather than scrolling up several octaves every time.

Thank you!!!
vsthem 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 - 2021, vBulletin Solutions Inc.