|
|
|
05-23-2018, 05:01 AM
|
#1
|
Human being with feelings
Join Date: Jul 2017
Location: Russia
Posts: 75
|
Midi Editor: Auto zoom
Hi.
1. One track.
2. One midi Item.
3. 2x mouse click to Item.
4. This item opens in the midi editor.
5. NOW WE HAVE THIS ZOOM - https://i.imgur.com/L4ClNUG.png
6*. WILL BE GREAT TO HAVE THIS ZOOM - https://i.imgur.com/Wf7WNTt.png
* It is displayed in the center of the screen. Left and right two empty bars. The notes are vertically centered. Above and below the ground is 1 octave.
P.S. if I choose another item (one click), it also opens in the center.
Thank tou! :-)
Last edited by Zirrex; 05-23-2018 at 05:18 AM.
|
|
|
05-23-2018, 05:34 AM
|
#2
|
Human being with feelings
Join Date: Jun 2009
Location: Croatia
Posts: 24,798
|
Which MIDI editor timebase are you using?
Also, MIDI editor zoom/scroll improvements are coming in v5.90... any day now.
|
|
|
05-23-2018, 07:23 AM
|
#3
|
Human being with feelings
Join Date: Jul 2017
Location: Russia
Posts: 75
|
Quote:
Originally Posted by EvilDragon
Which MIDI editor timebase are you using?
Also, MIDI editor zoom/scroll improvements are coming in v5.90... any day now.
|
I tried different settings, but the result does not change.
https://i.imgur.com/WBMpeX9.png
p.s. now I have Reaper 5.90rc9
|
|
|
05-23-2018, 10:42 AM
|
#4
|
Human being with feelings
Join Date: Jun 2009
Location: Croatia
Posts: 24,798
|
Hm, it centers the item in MIDI editor over here when I double-click on it. I'm using one MIDI editor per project, project beats timebase, and MIDI editor docked on second display...
|
|
|
05-23-2018, 11:33 PM
|
#6
|
Human being with feelings
Join Date: Jun 2009
Location: Croatia
Posts: 24,798
|
That doesn't seem to happen over here...
|
|
|
11-25-2019, 10:49 AM
|
#7
|
Human being with feelings
Join Date: May 2017
Posts: 186
|
Bumping this. Any solutions?
|
|
|
03-07-2020, 04:18 PM
|
#8
|
Human being with feelings
Join Date: Jan 2011
Location: Tokyo
Posts: 319
|
Hi, I use the action "Zoom to Content" but if it was possible to do this automatically whenever the MIDI Editor window is opened, it would be awesome. Does anyone know a workaround?
|
|
|
03-07-2020, 05:42 PM
|
#9
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Quote:
Originally Posted by Denys
Hi, I use the action "Zoom to Content" but if it was possible to do this automatically whenever the MIDI Editor window is opened, it would be awesome. Does anyone know a workaround?
|
I double click midi items in arrangeview to open in ME so trick I use is to set the 'Media item bottom half' 'double-click' mouse modifier to a Lua script. There may be other modifiers you can use though I never tried.
I like the zoom to content idea, so made this lua script,..
Code:
-- Open midi editor and zoom to content
-- Usage: Set mouse modifier [Media item bottom half] [Double Click] > Default/keys > Action list > this script.
function Main()
local item = reaper.GetSelectedMediaItem(0,0)
if item == nil then return end
local take = reaper.GetActiveTake(item)
if take == nil then return end -- FIX
if not reaper.TakeIsMIDI(take) then
-- Optional: do something else here.
return -- exit
end
pass = pass -1 -- requires a delay between actions!
if pass < 0 then
pass = 2
action_index = action_index -1 -- counter/which action to run next
if action_index == 1 then -- run first action
reaper.Main_OnCommand(40153, 0) -- Item: Open in built-in MIDI editor
elseif action_index == 0 then -- run second action
reaper.MIDIEditor_OnCommand(reaper.MIDIEditor_GetActive(), 40466) -- View: Zoom to content
else -- We're done, exit!
return
end
end
reaper.defer(Main)
end
pass = 0
action_index = 2 -- # of actions to run
Main()
EDIT: FIX, would crash if you clicked an Empty item, Added, if take == nil then return end
Last edited by Edgemeal; 03-30-2020 at 04:50 PM.
Reason: FIX bug for Empty Items
|
|
|
03-08-2020, 05:48 PM
|
#10
|
Human being with feelings
Join Date: Jan 2011
Location: Tokyo
Posts: 319
|
Hey Edgemeal, that works flawlessly, thank you very much!
|
|
|
03-09-2020, 01:02 PM
|
#11
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
Glad it helps. You can also have the script do something else when the item is a non-MIDI item.
For example, toggle track zoom, just replace this part,
Code:
if take == nil then return end
if not reaper.TakeIsMIDI(take) then
-- Optional: do something else here.
return -- exit
end
with this,
Code:
if take == nil then return end
if not reaper.TakeIsMIDI(take) then
reaper.Main_OnCommand(40113, 0) -- View: Toggle track zoom to maximum height
return -- exit
end
2 birds 1 stone.
EDIT: Fix for Empty Items,.. if take == nil then return end
Last edited by Edgemeal; 03-30-2020 at 04:52 PM.
|
|
|
03-11-2020, 05:01 AM
|
#12
|
Human being with feelings
Join Date: Mar 2017
Location: Ukraine, Kyiv
Posts: 546
|
Wow! It's very nice, thank you. How can I add this type of action? _RSa31cc4069db13d6ff5851612db10e9ec2ef54e2f
|
|
|
03-11-2020, 10:56 AM
|
#13
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,921
|
For Custom, SWS, etc, actions you need to use NamedCommandLookup,..
Code:
reaper.Main_OnCommand(reaper.NamedCommandLookup('_RSa31cc4069db13d6ff5851612db10e9ec2ef54e2f'), 0) -- launch custom script:
|
|
|
03-11-2020, 12:03 PM
|
#14
|
Human being with feelings
Join Date: Oct 2018
Posts: 367
|
|
|
|
03-11-2020, 01:49 PM
|
#15
|
Human being with feelings
Join Date: Mar 2017
Location: Ukraine, Kyiv
Posts: 546
|
Quote:
Originally Posted by Edgemeal
For Custom, SWS, etc, actions you need to use NamedCommandLookup,..
Code:
reaper.Main_OnCommand(reaper.NamedCommandLookup('_RSa31cc4069db13d6ff5851612db10e9ec2ef54e2f'), 0) -- launch custom script:
|
Thank you!
Quote:
Originally Posted by pandabot
|
How to install it? I'm confused with this: local workingDirectory = reaper.GetResourcePath() .. "/Scripts/ReactivePanda/src"
|
|
|
03-17-2020, 09:27 AM
|
#16
|
Human being with feelings
Join Date: Oct 2018
Posts: 367
|
Those midi editor functions are used in the ReactivePanda action that runs whenever Reaper starts up (using the "SWS/S&M: Set global startup action")
|
|
|
06-01-2020, 02:04 AM
|
#17
|
Human being with feelings
Join Date: Apr 2008
Location: Philippines
Posts: 34
|
Quote:
Originally Posted by Edgemeal
I double click midi items in arrangeview to open in ME so trick I use is to set the 'Media item bottom half' 'double-click' mouse modifier to a Lua script. There may be other modifiers you can use though I never tried.
I like the zoom to content idea, so made this lua script,..
Code:
-- Open midi editor and zoom to content
-- Usage: Set mouse modifier [Media item bottom half] [Double Click] > Default/keys > Action list > this script.
function Main()
local item = reaper.GetSelectedMediaItem(0,0)
if item == nil then return end
local take = reaper.GetActiveTake(item)
if take == nil then return end -- FIX
if not reaper.TakeIsMIDI(take) then
-- Optional: do something else here.
return -- exit
end
pass = pass -1 -- requires a delay between actions!
if pass < 0 then
pass = 2
action_index = action_index -1 -- counter/which action to run next
if action_index == 1 then -- run first action
reaper.Main_OnCommand(40153, 0) -- Item: Open in built-in MIDI editor
elseif action_index == 0 then -- run second action
reaper.MIDIEditor_OnCommand(reaper.MIDIEditor_GetActive(), 40466) -- View: Zoom to content
else -- We're done, exit!
return
end
end
reaper.defer(Main)
end
pass = 0
action_index = 2 -- # of actions to run
Main()
EDIT: FIX, would crash if you clicked an Empty item, Added, if take == nil then return end
|
holy cow, this is soooo good, thanks a lot!
|
|
|
06-03-2020, 05:28 AM
|
#18
|
Human being with feelings
Join Date: Oct 2015
Posts: 55
|
good god, y'all. Why is this not yet part of the main code? This kind of misbehavior has been moaned about for like 8 years.
Can someone explain the rationale for why the problems in this thread and https://forum.cockos.com/showthread.php?t=91048
require workarounds?
|
|
|
06-03-2020, 10:08 AM
|
#19
|
Human being with feelings
Join Date: Oct 2018
Posts: 367
|
The devs probably don't use midi very much in their own music, if they did this would drive them crazy and it would be fixed
|
|
|
06-03-2020, 10:46 AM
|
#20
|
Human being with feelings
Join Date: Oct 2015
Posts: 55
|
I had to mess with Sonar a few weeks ago to migrate an old project to Reaper, and I was like dang! The MIDI is so smooth and intuitive. And that's about the only thing I miss about Sonar/Cakewalk.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 04:50 AM.
|