Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

Reply
 
Thread Tools Display Modes
Old 10-05-2010, 07:45 PM   #1
Seventh
Human being with feelings
 
Seventh's Avatar
 
Join Date: Sep 2010
Location: Finland
Posts: 776
Default "Pass through key to main window" for inline editor

I'd like to request this action to be added to the MIDI inline editor action list, thus enabling one to use one key to zoom in to a selected item and open the editor, and to use the same key to close the editor and zoom back out (SWS: Toggle zoom to sel item(s)).
Seventh is offline   Reply With Quote
Old 10-05-2010, 10:56 PM   #2
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,539
Default

OK thought... in the meantime... see how this works for youL

Custom action: Inline editor zoom
Item: Open item in inline editor
SWS: Zoom to selected item(s), minimize others
[I put it on the F4 key]

then on the F3 key I have:

Custom action: ZOOM OUT BOTH
View: Zoom out horizontal
View: Zoom out vertical
View: Zoom out project

the F3 key, you can just hold down and go out as far as you like...

I have another custom zoom in on the F1
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 10-06-2010, 02:49 AM   #3
Seventh
Human being with feelings
 
Seventh's Avatar
 
Join Date: Sep 2010
Location: Finland
Posts: 776
Default

Yes, well, the idea is to have two custom actions bound to the same key:

In main view:
Code:
SWS: Toggle zoom to sel item(s)
Item: Open item in inline editor
and in inline view:
Code:
Misc: Pass through key to main window.
Close inline editor
this way, the same key would always execute the first action (either zooming in to the item or returning to previous zoom setting), and if the editor is active, it would also close it.
Seventh is offline   Reply With Quote
Old 10-06-2010, 03:45 AM   #4
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,273
Default

"Close inline editor" is in the inline editor section of the action list, so you don't need a pass-through for that.

Ah, wait.. I missed the zoom thing. Sorry, ignore. There's a way to get around by using ReaScript, if you have Python or Pearl installed on your system.

The Python script to trigger "SWS toggle zoom" and then "close inline editor" would be:
Code:
Nope, it doesn't work with the inline editor.

Sorry I took it down
You can import this script as ReaScript into the inline editor action list and assign it to your zoom/inline toggle key.

Didn't test this specific one, but I'd think it works.

EDIT, Nope, doesn't. I deleted the code.

Last edited by gofer; 10-07-2010 at 11:04 AM.
gofer is offline   Reply With Quote
Old 10-06-2010, 07:28 AM   #5
Sound asleep
Human being with feelings
 
Sound asleep's Avatar
 
Join Date: Nov 2009
Location: Montreal, Canada
Posts: 7,866
Default

Quote:
Originally Posted by gofer View Post
"Close inline editor" is in the inline editor section of the action list, so you don't need a pass-through for that.

Ah, wait.. I missed the zoom thing. Sorry, ignore. There's a way to get around by using ReaScript, if you have Python or Pearl installed on your system.

The Python script to trigger "SWS toggle zoom" and then "close inline editor" would be:
Code:
SWS_TOGGLEZOOM = RPR_NamedCommandLookup('_SWS_TOGZOOMIONLY')

RPR_Main_OnCommand(SWS_TOGGLEZOOM, 0)

CLOSE_INLINE = 2
RPR_Main_OnCommand(CLOSE_INLINE, 0)
You can import this script as ReaScript into the inline editor action list and assign it to your zoom/inline toggle key.

Didn't test this specific one, but I'd think it works.
what's python or pearl? we can make scripts for actions? does this allow 'if' conditions?

i'm not sure how much i'd want to get into building those cause it would take time away from music, but i think every once in a while it might be worth it.

it's like you're showing me a whole new dimension! .... sweeet.
Sound asleep is offline   Reply With Quote
Old 10-06-2010, 11:15 AM   #6
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,273
Default

Python and Pearl are scripting languages. Both of them can be used to write scripts that can be imported as actions in Reaper's action list.
Start investigating here: http://www.cockos.com/wiki/index.php...n_and_examples. Actually, the Reaper WIKI is quite comprehensive in terms of ReaScripts (although, it's tough to follow for a scripting noob like me - took some time until it clicked). If things get rough you get help in the developer's forum.

Yes you can have if-else conditions, while-loops and all that jazz. I am a total noob with coding, still even I can write some simple stuff. But the most exiting aspect for me is indeed that they can be imported to any section of the action list.
For example I have a floating toolbar tab dedicated to MIDI editor actions and I have some buttons in the ordinary MIDI editor toolbar triggering actions which actually belong to the main section.
The scripts to do that cross-section stuff are super easy as the example above shows (well, I still don't really know whether that thing works, I never use the inline editor, but I'd be surprised if not).


The latest cool thing done with ReaScripts and a whole other dimension far away from my humble lines is Adam Wathan's AutoPocket, which will hopefully soon see the light of the day. Read and marvel: http://forum.cockos.com/showthread.php?t=66434
gofer is offline   Reply With Quote
Old 10-07-2010, 09:48 AM   #7
Seventh
Human being with feelings
 
Seventh's Avatar
 
Join Date: Sep 2010
Location: Finland
Posts: 776
Default

Ok, after I finally managed to figure out how to import that script into the (inline) action menu, I got this wierd error:

Code:
Script execution error:

 line 52
    {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540
                                                     ^
SyntaxError: unexpected character after line continuation character
Anyway, as the same action (pass through key) is already in the midi editor actions, I think it wouldn't hurt to add it into the inline actions too.
Seventh is offline   Reply With Quote
Old 10-07-2010, 12:04 PM   #8
gofer
-blänk-
 
gofer's Avatar
 
Join Date: Jun 2008
Posts: 11,273
Default

Dang! I forgot to hit an enter at the end. For some reason Python (or maybe ReaScript, dunno) needs an empty new line at the end of scripts...

But the darn thing won't work anyway. The inline editor won't close. So I deleted it from my post.

RPR_Main_OnCommand doesn't trigger inline editor actions, so it can't do CLOSE_INLINE. Which should have been obvious even to me, sorry.
I found no functions like RPR_MIDIInline_OnCommand and MIDIInline_GetActive or some such which could possibly do the trick from within the script.

I tried to trigger just the SWS zoom alone as script plus "Close inline editor" as native action inside a custom action, but couldn't get it to work.

Awfully sorry, I think I promised too much .

No question I'd love "pass through" plus some other actions in the inline section.

Last edited by gofer; 10-07-2010 at 12:32 PM.
gofer is offline   Reply With Quote
Old 09-22-2021, 01:09 AM   #9
CAlexanderParra
Human being with feelings
 
CAlexanderParra's Avatar
 
Join Date: May 2010
Location: Atlanta, GA
Posts: 4
Default

"Pass through" for the Midi inline editor would be really useful for me. Need it for a custom midi paste action that involves "Navigate: Move edit cursor to start of selected events" but I need the edit cursor to be re-centered to the middle of the screen and the only way to do it is zooming horizontally in and out in the main window. Would be nice to combine into one action.
CAlexanderParra 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 09:38 PM.


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