Old 04-04-2008, 07:07 PM   #1
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default CSurf additions requests.

Justin,

Could you allow access to the following please (or explain how, if they're already accessible, please)?

1&2. Goto Next/Previous Marker

3&4. Select Next/Previous Track

5&6. Select Next/Previous Item (Media Item - Audio/Midi) Edit: For Selected Track

7. Open Editor for Selected Item (Media Editor - Audio/Midi)

8. Open FX Chain window for Selected Track

9&10. Select Next/Previous FX in open FX Chain

11&12. Zoom In/Out Vertical

13&14. Zoom In/Out Horizontal

15. Enable editing of Selected Track Name field

16. Open I/O window for Selected Track

17. Open Preferences window

Additionally it would be really useful if the Keyboard Shortcuts enabled-Command types could be accessible via CSurf.

Thanks for reading.

Cheers,

Deric.
__________________
REAPER? Oh yes...

Last edited by Deric; 04-04-2008 at 07:16 PM. Reason: Clarified 5&6.
Deric is offline   Reply With Quote
Old 04-04-2008, 07:29 PM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,649
Default

Most or all of those should already be accessible by running the function :

void (*Main_OnCommand)(int command, int flag);

Where "command" is the command code internally used by Reaper. But no cause for despair yet, these codes can be got (although a bit laboriously) by looking at Reaper's keyboard shortcuts configuration file.
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 04-04-2008, 07:33 PM   #3
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

Xenakios,

I'm so glad you don't sleep either AND are always willing to help!

Thanks mate!

I'll go and look through the file you mention now, I've edited all the relevant bits that are currently in the csurf_mcu.cpp file and now (as you've guessed!) want to add some new ones.

Cheers Xenakios, thanks a lot!

Deric.
__________________
REAPER? Oh yes...
Deric is offline   Reply With Quote
Old 04-04-2008, 07:42 PM   #4
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,649
Default

Basically any action you can find for defining as a keyboard shortcut, you can run with Main_OnCommand. Of course you can put several calls in sequence etc...For other things, you might have to look deeply at the reaper_plugin.h-file, you might find that some neat stuff is already possible. Think smart, some stuff maybe possible even if it first doesn't look like it!
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 04-04-2008, 08:06 PM   #5
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

Xenakios,

Thank you - I really appreciate the generosity of your input and assistance.

I'd come back online to ask about the key-commands file (like "where is it?") as I'd had little luck looking at the key-commands file that opens in REAPER's Preferences (apart from seeing what could be possible).

Anyway... Then I saw your lates post - so now I have a different question!

I've looked at the .h and found, for example, this:

extern void (*CSurf_SetTrackTitle)(MediaTrack *trackid, const char *title);

Is this what I need? If so what do I need to do with it? If not, could you please give me some more pointers on what I need to be looking for?

Again, with your and SWS' help I've been able to get this far - I've no idea if how long it would've taken without your assistance!

Thanks again!

Edit: Sorry - I have pasted an example that is app.->surface... sorry! I'll repost another command that is surface->app.

Edit 2: What is this telling me? #define ID_MARKER_NEXT 40173
__________________
REAPER? Oh yes...

Last edited by Deric; 04-04-2008 at 08:13 PM. Reason: 1. Posted possibly poor example. 2. Added another question
Deric is offline   Reply With Quote
Old 04-04-2008, 08:12 PM   #6
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,649
Default

Quote:
Originally Posted by Deric View Post

I've looked at the .h and found, for example, this:

extern void (*CSurf_SetTrackTitle)(MediaTrack *trackid, const char *title);

Is this what I need? If so what do I need to do with it? If not, could you please give me some more pointers on what I need to be looking for?
Oh, there's SOOOO much stuff in the header files already, I haven't been able to keep up anymore! But I suppose CSurf_SetTrackTitle would send the Reaper track's name to the control surface...Not the other way around (naming the track visible in Reaper, I am not sure if there actually is an API for that yet.)
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 04-04-2008, 08:17 PM   #7
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

Quote:
Originally Posted by Xenakios View Post
Most or all of those should already be accessible by running the function :

void (*Main_OnCommand)(int command, int flag);

Where "command" is the command code internally used by Reaper... ...Reaper's keyboard shortcuts configuration file.
Could you give me a basic example of this please?

Quote:
Originally Posted by Xenakios View Post
Basically any action you can find for defining as a keyboard shortcut, you can run with Main_OnCommand. ...
And this please?
__________________
REAPER? Oh yes...
Deric is offline   Reply With Quote
Old 04-04-2008, 08:24 PM   #8
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

Quote:
Originally Posted by Xenakios View Post
...CSurf_SetTrackTitle would send the Reaper track's name to the control surface...Not the other way around (naming the track visible in Reaper, I am not sure if there actually is an API for that yet.)
Yes, sorry, my mistake - I hadn't read carefully enough (I edited my post but at the same time you were writing! You are quick! ).

I guess, really, I want to know how to find out what I can make work from a control surface - i.e. Where to look to find what can be done AND one example of how I need to then use that information in the .cpp

Is there a list of the currently-available functions? If so - could you tell me where to find it please??
__________________
REAPER? Oh yes...
Deric is offline   Reply With Quote
Old 04-04-2008, 08:29 PM   #9
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,649
Default

Main_OnCommand(40518, 0);

Runs one of these commands (can't remember/check now exactly which) "Item : Set pitch up/down one semitone" or "Item: Decrease/increase playrate by ~6% (1 semitone)".

I found out the code 40518 by looking at the file reaper-kb.ini on my hard disk.

The code will appear there when you define a new keyboard shortcut for an action in the preferences of Reaper. Preferably using a simple key like plain A which has the ASCII code of 65 and is thus easily found from the .ini-file...

Sorry, I am not really the best tutor for all this. I am pretty much a newbie with this Reaper Extension stuff myself. And I haven't especially well looked at the control surface stuff, which is a bit spesialized part of the APIs/SDK.
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 04-04-2008, 08:37 PM   #10
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 10,381
Default

Actually, CSurf_SetTrackTitle() shouldnt even be there, it's actually an internal function that isnt needed by plug-ins.

If you wish to set a track's title, however, you can use GetSetMediaTrackInfo() with "P_NAME"...

(be sure you have the latest, unofficial SDK from landoleet).
Justin is online now   Reply With Quote
Old 04-04-2008, 08:40 PM   #11
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

Xenakios,

Thank you, you've been great! Very generous and patient, thanks!

Quote:
Originally Posted by Xenakios View Post
Main_OnCommand(40518, 0); ...
I found out the code 40518 by looking at the file reaper-kb.ini on my hard disk...
That's a GREAT help!

Quote:
Originally Posted by Xenakios View Post
The code will appear there when you define a new keyboard shortcut for an action
Ahhh OK!!!

Also I didn't even think to look in reaper_plugin.h (I assumed it was 'VST' type stuff! - Yeah, I know, NEVER ASSUME ANYTHING!) but that file is FULL of great info and tips! Thanks for the pointer!

I think I need to go and have a good look through those files now (and 'make' a new keyboard shortcut file by editing all the params. I want to make visible!).

Xenakios... Thank you SO much - I really haven't a clue about the basics here - but with your guidance I now know where to look and have a basic idea of what to do with it once I've found it!

Great stuff!

Thanks!
__________________
REAPER? Oh yes...
Deric is offline   Reply With Quote
Old 04-04-2008, 08:43 PM   #12
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

Quote:
Originally Posted by Justin View Post
...If you wish to set a track's title, however, you can use GetSetMediaTrackInfo() with "P_NAME"...
Thanks Justin, I'll have a look and see if I can figure out what do with it once I've found it.

(I wanted to 'make the Selected Track Name field ready for text input' - which would then be typed via normal QWERTY keyboard).

Justin, thanks for coming in and clarifying!

Cheers!

Deric.

Edit: I hope "P_NAME" is obvious to find too!

Edit2: And thanks for the LOL-build tip!
__________________
REAPER? Oh yes...

Last edited by Deric; 04-04-2008 at 08:52 PM. Reason: P_NAME + LOL advice
Deric is offline   Reply With Quote
Old 04-05-2008, 05:55 PM   #13
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

Justin,

Where we have 'Show x' commands, can we (or how do we) close whatever window was opened by pressing the key again?

i.e. If I 'Show FX Chain for Selected track' it would be handy to be able to then close that window without having to reach for the mouse.

It would be great if the same key could close it.

Or maybe a 'Close last-opened window' command would suffice for much of time?

Thanks!
__________________
REAPER? Oh yes...
Deric is offline   Reply With Quote
Old 04-06-2008, 02:59 PM   #14
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

Justin/Christophe,

To rephrase the previous post:

Could you include commands to Close windows that can, currently, be Open?

i.e. Close Selected Track I/O window, Close Selected Track FX Chain, etc.

Currently we can open windows from the control surface but have to grab the mouse to close them.
__________________
REAPER? Oh yes...
Deric is offline   Reply With Quote
Old 04-06-2008, 04:56 PM   #15
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

Addition request:

Select Next/Previous Take.

Select Next/Previous Screen/Windowset.

Thanks.
__________________
REAPER? Oh yes...

Last edited by Deric; 04-06-2008 at 05:02 PM. Reason: Added item.
Deric is offline   Reply With Quote
Old 04-14-2008, 03:02 PM   #16
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

Quote:
Originally Posted by Justin View Post
...If you wish to set a track's title, however, you can use GetSetMediaTrackInfo() with "P_NAME"...
Hi Justin,

Could you explain how I do this in a bit more detail please? (i.e. what I do with "P_NAME"...)

If anyone else knows, please, reply!

Thanks

Deric.
__________________
REAPER? Oh yes...
Deric is offline   Reply With Quote
Old 04-14-2008, 04:03 PM   #17
sws
Code Monkey
 
sws's Avatar
 
Join Date: Sep 2007
Location: Madison, WI
Posts: 850
Default

Deric:
Code:
char cName = "Track Name";
MediaTrack* pMt; // gotta set this to your track
GetSetMediaTrackInfo(pMt, "P_NAME", cName); // name the track
Note there's a bug currently where the new name doesn't show up until after the TCP (or MCP) gets fully redrawn.
sws is offline   Reply With Quote
Old 04-14-2008, 04:15 PM   #18
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

SWS,

That's bl**dy great mate!

Thanks!

OK, now what if I want the input from the computer keyboard (as it currently is) instead of from the surface?

i.e. I want the command to 'enable the Selected Track Name field' for 'normal' editing? (don't want to name the track from this suface - at this stage anyway).

Cheers!

Deric.

Ps. BTW - I have seen yours and schwa's comments in the other two (my) question threads (and saw them shortly after each of you posted) but aren't 'ready' to reply to those yet - but thanks to you both in advance!
__________________
REAPER? Oh yes...
Deric is offline   Reply With Quote
Old 04-14-2008, 04:20 PM   #19
sws
Code Monkey
 
sws's Avatar
 
Join Date: Sep 2007
Location: Madison, WI
Posts: 850
Default

Deric, I don't think there's a way to emulate the user double-clicking on the track name field. You can make yourself a dialog box that pops up when you press the control surface button where you enter the name, though. You're staring at the door to tricky-land, enter at your own risk.
sws is offline   Reply With Quote
Old 04-14-2008, 04:32 PM   #20
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

Hmmm... I'm struggling to sit on the pot the right way 'round at the minute...

That would be IDEAL though...

Know how to do it?

__________________
REAPER? Oh yes...
Deric is offline   Reply With Quote
Old 04-14-2008, 04:33 PM   #21
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,649
Default

Quote:
Originally Posted by Deric View Post

OK, now what if I want the input from the computer keyboard (as it currently is) instead of from the surface?

i.e. I want the command to 'enable the Selected Track Name field' for 'normal' editing? (don't want to name the track from this suface - at this stage anyway).
Reaper doesn't necessarily support that. You have to create your own dialog box with an edit box for the name and then set the track's name based on that. Please don't ask how you would go about to do that, I've ranted about the difficulty of even such a simple thing with Windows programming enough already.
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 04-14-2008, 04:34 PM   #22
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

Thanks Xenakios mate, that's good to know!

So, how do we do it?

Anyone done it?

__________________
REAPER? Oh yes...
Deric is offline   Reply With Quote
Old 04-14-2008, 04:41 PM   #23
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,649
Default

Well I sort of HAD to learn how to do it. The whole thing is a mess. You're gonna face the difficulty that Visual Studio Express C++ 2008 doesn't support visual "resource editing"... How's that for some "visual", hahhah? You gotta love Microsoft...I ended up using MS VC++ 6 for that resource editing stuff and everything else. Good luck to you finding a (legal) copy of that.

The actual code to create and handle the dialog box controls isn't incredible complicated, just very boring and needs careful attention to avoid errors. I can paste that stuff with some explanations, if you find a way to create the necessary resource file first. (Note : "resources" in MS Visual Studio are where the dialog boxes and their controls, like edit boxes and buttons are defined.)
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 04-14-2008, 04:46 PM   #24
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

Xenakios,

That'd be great! Not so handy if that stuff (Libs?) doesn't exist in Express though... still it might give me food-for-thought (or not!).

TBH I've got my hands full with this right now so, unless it's an easy one, it'll have to wait for another day/night.

Ideally I'd like the option of 'typing in pop-up' and enabling editing in the track field directly.

Cheers!

Deric.
__________________
REAPER? Oh yes...
Deric is offline   Reply With Quote
Old 04-14-2008, 05:00 PM   #25
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,649
Default

By the way, you'll notice that VS Express 2008 DOES contain a visual editor for "forms" (basically windows and dialogs) and putting buttons and whatever on those. The problem is that none of that will work for "native" C++, it only works for "managed" C++. I have no idea how one would use all that to create Reaper extension plugins DLLs, and don't even want to learn, as it's based on Microsoft's .NET-frameworks and those suck in just too many ways for both the developer and the end-user...
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 04-14-2008, 05:02 PM   #26
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

Oh, that doesn't sound good!
__________________
REAPER? Oh yes...
Deric is offline   Reply With Quote
Old 04-14-2008, 05:06 PM   #27
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 6,649
Default

Well, I am just saying it would be TOTAL overkill to use .NET for setting up some simple dialogs boxes and then make the end-user download and install the bloated and slow .NET-stuff just for that, if they don't already have it installed. But that's how Microsoft would themselves prefer things to be now...So depressing... Maybe .NET could be justified for something more complex, though...
__________________
For info on SWS Reaper extension plugin (including Xenakios' previous extension/actions) :
http://www.sws-extension.org/
https://github.com/Jeff0S/sws
--
Xenakios blog (about HourGlass and λ) :
http://xenakios.wordpress.com/
Xenakios is online now   Reply With Quote
Old 04-14-2008, 05:26 PM   #28
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

No way... If it doesn't work 'out of the box' (no downloading) I don't want it.

Downloading to be 'able' to make it is one thing - to be able to use it is totally different.

No worries, I'll come back to this (particular) one next week.

Thanks for the advice!
__________________
REAPER? Oh yes...
Deric is offline   Reply With Quote
Old 04-15-2008, 05:29 AM   #29
Deric
Human being with feelings
 
Join Date: Mar 2007
Posts: 794
Default

Justin/Christophe,

Please allow Open->MIDI editor (for Item, etc), also Move note left/right/up/down(plus up/down one octave), shorten-lengthen note would be handy too, as would item velocity etc.

Select next/previous would be great too.

Deric.
__________________
REAPER? Oh yes...
Deric 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 11:58 AM.


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