Old 07-03-2010, 01:49 AM   #161
Jeffos
Mortal
 
Jeffos's Avatar
 
Join Date: Dec 2008
Location: France
Posts: 1,969
Default

bruce, I don't see "odd" things nor "flaws", I think there's a misunderstanding that can be sumed-up with:
Quote:
Originally Posted by bruce View Post
I would think that if I DID declare a control range of 0..4 that it would not work so well in other plug-in hosts, since the VST standard is 0..1
Other hosts? Cockos VST extensions only make sense with REAPER (or other DAWs -if- they support them). Also, you can do some "shoping" among the VST extensions, e.g.:
- if you want your plug to manage normalized values but renders discrete ones in REAPER, just implement effVendorSpecific/effGetParamDisplay. This will be transparent for others DAWs, no need to define min/max in that case
- if you indeed want your plug to internally use discrete values in REAPER, you'll have to implement effVendorSpecific/0xdeadbef0 but your implementation must of course take care of other hosts.

Quote:
Originally Posted by bruce View Post
How about a new version of the discrete extension that let's you specify a number of steps? That would address the flaws in today's API, but plug-ins that use today's API would still work.
using a min/max approach rather than a "number of steps" sounds cleverer to me: with top most number one Cockos VST extensions, you can declare things like [-34;-30] not just [0;4]..
Jeffos is offline   Reply With Quote
Old 07-03-2010, 10:06 AM   #162
bruce
Human being with feelings
 
Join Date: Jul 2010
Posts: 66
Default

Yes, other hosts.

I would like to write VST plug-ins that will work with any VST host. I would then like to add your enhancements so that they will work better in Reaper.

You could have easily added the "discrete steps" API in a way that would have made this trivial. Instead, as you admit, you did it in a way that makes this impossible (or at best difficult/risky).

Your implementation may, in fact, be superior to the approach everyone else took. Personally, I would have thought twice, then three times, then four about going down this road, which as a mentioned is different from what every standard plug-in API does.

Anyway, I will not be using this API. It attempts to solve a very real problem, and add value, but for me it's not worth it if it means my plug-ins will not run in Sonar or Cubase.

I would be a little surprised of there are plug-in authors who don't work for Cockos who feel otherwise.

Obviously one can work around this - declare a range of 0..1 if the host is not reaper, and 0-..n-1 if it is. But that is clearly less elegant than doing it the way everyone else does, and involves an extra testing step that is burdensome.
bruce is offline   Reply With Quote
Old 07-03-2010, 02:51 PM   #163
Jeffos
Mortal
 
Jeffos's Avatar
 
Join Date: Dec 2008
Location: France
Posts: 1,969
Default

Quote:
Originally Posted by bruce View Post
You could have easily added the "discrete steps" API in a way that would have made this trivial.
the trivial way is effVendorSpecific/effGetParamDisplay as I said above.
Quote:
Originally Posted by bruce View Post
Instead, as you admit, you did it in a way that makes this impossible (or at best difficult/risky).
hu!?? super easy to do!! (and even straight forward with IPlug, thanks to its IParam class)
Quote:
Originally Posted by bruce View Post
Your implementation may, in fact, be superior to the approach everyone else took. Personally, I would have thought twice, then three times, then four about going down this road, which as a mentioned is different from what every standard plug-in API does.
The only "standard" we can talk about here is VST 2.4 and the whole point of Cockos VST extensions is to fix its "holes" and to spread the word.
Quote:
Originally Posted by bruce View Post
Anyway, I will not be using this API. It attempts to solve a very real problem, and add value, but for me it's not worth it if it means my plug-ins will not run in Sonar or Cubase.
rather than giving-up, I would advice you to code/try Implement effVendorSpecific/effGetParamDisplay and see what happens in other hosts..
Quote:
Originally Posted by bruce View Post
I would be a little surprised of there are plug-in authors who don't work for Cockos who feel otherwise.
Voxengo.

Last edited by Jeffos; 07-03-2010 at 03:53 PM.
Jeffos is offline   Reply With Quote
Old 07-03-2010, 03:24 PM   #164
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,137
Default

Quote:
Originally Posted by bruce View Post
Anyway, I will not be using this API. It attempts to solve a very real problem, and add value, but for me it's not worth it if it means my plug-ins will not run in Sonar or Cubase.
If you have a knob with 4 discrete steps, if your plugin gets effCanDo "hasCockosExtensions" and return yes, you can communicate with the host in de-normalized parameter values, an communicate that the values are discrete. If you don't get the call, you communicate with smooth normalized parameter values according to the VST 2.4 standard. Either way, the plugin will work fine in any host. The point of the extensions is to extend the spec, not change it. It would be silly for us to ask plugin developers to add a feature that breaks compatibility with other hosts. There are a number of plugin developers who have implemented these extensions, and we're always open to suggestions for other ways to solve the known issues with VST.
schwa is offline   Reply With Quote
Old 07-03-2010, 04:09 PM   #165
Jeffos
Mortal
 
Jeffos's Avatar
 
Join Date: Dec 2008
Location: France
Posts: 1,969
Default

since we're discussing about that:
- when you just "render" (ie effVendorSpecific/effGetParamDisplay) discrete values, kVstParameterUsesIntStep is used but the user can switch to bézier curves for ex., is it normal ?
- when you really comunicate with discrete values with the host, effVendorSpecific/kVstParameterUsesIntStep isn't used (edit) for TCP knobs, steps only in lanes(/edit). is it normal ?

Last edited by Jeffos; 07-03-2010 at 04:27 PM. Reason: english + TCP knobs..
Jeffos is offline   Reply With Quote
Old 07-03-2010, 04:51 PM   #166
bruce
Human being with feelings
 
Join Date: Jul 2010
Posts: 66
Default

Quote:
Originally Posted by schwa View Post
If you have a knob with 4 discrete steps, if your plugin gets effCanDo "hasCockosExtensions" and return yes, you can communicate with the host in de-normalized parameter values, an communicate that the values are discrete. If you don't get the call, you communicate with smooth normalized parameter values according to the VST 2.4 standard.
Sure, that works, but it means adding and testing the two different flavors of normalization. It's not a huge deal.

I think you would agree, however, that doing what everyone else does is easier for plug-in developers. Then there is only one flavor of normalization, no extra code, no extra testing, no extra way to add bugs to your plug-ins.
bruce is offline   Reply With Quote
Old 07-03-2010, 05:05 PM   #167
bruce
Human being with feelings
 
Join Date: Jul 2010
Posts: 66
Default

Quote:
Originally Posted by Jeffos View Post
The only "standard" we can talk about here is VST 2.4 and the whole point of Cockos VST extensions is to fix its "holes" and to spread the word.
Do you mean we aren't allowed to talk about VST3 and RTAS on this board?

I understand the reasons that VST3 is not popular with most plug-in developer. But I would think that if you wanted to extend VST2 to fill a hole, and VST3 had already filled this hole, then the obvious choice for an extension to VST2 would the one that has been in VST3 for years, unless there is something wrong with what's in VST3.

I don't think you can claim that anything is "wrong" with the VST3 API for discrete parameters. It may be less "clever" than the Cockos extension, but it is logically equivalent, and unambiguously specified. And backwards compatible with no additional code, unlike the Cockos version.

Look at if from the point of view a a plug-in developer that is already supporting VST2, RTAS, AU, and possibly even VST3. They are already supporting discrete parameters the 0..1 way. When they see the Cockos extension many will have the same reaction I did.

OK, enough venting. Maybe I will implement this funny hack - it's not that big a deal. And maybe one of you will even admit that it's just almost possible that you could have made a sub-optimal decision about this API. Wouldn't that be a happy world ;-)
bruce is offline   Reply With Quote
Old 07-03-2010, 05:26 PM   #168
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 10,137
Default

Of course there are a lot of API decisions that could be made differently. At the time we added the int step extension, I don't think VST3 was public yet, Reaper didn't yet support AU, and of course we're not allowed to even see the RTAS API. If you have suggestions for ways to improve the Cockos VST extensions, please continue to make them. This is meant to be a conversation, not a competition.
schwa is offline   Reply With Quote
Old 07-03-2010, 05:56 PM   #169
bruce
Human being with feelings
 
Join Date: Jul 2010
Posts: 66
Default

Quote:
Originally Posted by schwa View Post
This is meant to be a conversation, not a competition.
For sure! thanks.

I don't think it would surprise you that if I were king of the world, the setDisrete API would be sort of like setDiscrete(int paramNum, boolean isDiscrete, int numSteps), and would be independent of the setRange API. But it may be a little late to worry about this.

Thanks again,
Bruce
bruce is offline   Reply With Quote
Old 07-03-2010, 07:15 PM   #170
bruce
Human being with feelings
 
Join Date: Jul 2010
Posts: 66
Default

btw: since receiving your friendly reply, I have purchase a copy of Reaper ;-)
bruce is offline   Reply With Quote
Old 08-18-2010, 01:34 AM   #171
Subz
Human being with feelings
 
Subz's Avatar
 
Join Date: Jun 2006
Location: UK
Posts: 2,961
Default

any plans to open the midi swing grid to the API world?

then Fingers may be able to implement it in to his Amazing groove extension!

look at what it can do already

Quote:
Originally Posted by fingers View Post
Just got this working...


Subz
Subz is offline   Reply With Quote
Old 09-19-2010, 04:43 AM   #172
qIz
Human being with feelings
 
Join Date: Sep 2010
Location: Sweden
Posts: 2
Default Render question

Hi all!
This is my first post in here and I just started playing around with the reaper SDK.

My question:
How do I render a track "as is" from within the API?
One part of the plugin I'm working on is going to include a "bounce track to folder" option.

One way to solve this could be just to use the render track stem and then delete the new track, unmute (resotre) the rendered track and so on.
But that just seems as a ugly hack.

\qIz
qIz is offline   Reply With Quote
Old 01-08-2011, 10:21 PM   #173
shane
Human being with feelings
 
shane's Avatar
 
Join Date: Jan 2006
Location: 61.215 -149.8925
Posts: 366
Default

I'm a total noob with this c++ stuff. It took me two hours to figure out that you can't compile 64 bit dlls with Visual Studio Express 2010 (at least not easily).

IDE questions:
Visual Studio 2010 Express should work fine, yeah? Any other free recommendations? I kind of hate it. Anyone use Eclipse for this stuff?

How does the Attach to Process debugging work? I've only been able to get results by building the dll, shutting down Reaper, copying the dll into the plugins directory, and restarting Reaper. Complete PITA.

API questions:
I need to loop through regions in a project and get various info about them (start time, end time, name). Possible? I see EnumProjectMarkers with in isrgn argument, but no functions to retrieve the information based on the resulting index and no way to get the total number of markers/regions.
__________________
Autorender - Now part of the SWS Extension family
Batch render and tag regions while you watch cat videos
shane is offline   Reply With Quote
Old 01-09-2011, 03:59 AM   #174
Klinke
Human being with feelings
 
Klinke's Avatar
 
Join Date: Jul 2008
Location: Berlin / Germany
Posts: 758
Default

Quote:
Originally Posted by shane View Post
IDE questions:
Visual Studio 2010 Express should work fine, yeah? Any other free recommendations? I kind of hate it. Anyone use Eclipse for this stuff?

I'm not sure if it's use to possible Eclipse at all (AFAIK you need to use the Microsoft Compiler and can't use gcc, maybe that can be configured in Eclipse). As a noob i would stay with VS Express.

Quote:
Originally Posted by shane View Post
How does the Attach to Process debugging work? I've only been able to get results by building the dll, shutting down Reaper, copying the dll into the plugins directory, and restarting Reaper. Complete PITA.
You should find something like "Attach to Process..." in the Debug Menue. Afterwards you must select the Reaper-Process. For me it's easier and faster to shut down and restart Reaper, this can be done with a single keypress. Copying the .dll can be done from VS automatically (when you start VS with Admin-rights or Reaper is installed in a dir where you don't need Admin-rights to copy files in), open the Project Property Pages (Alt F7) and go to Build Events/Post-Build Step. Here you can enter something like (in my case): copy .\Debug\reaper_csurf_mcu_klinke.dll "C:\Program Files (x86)\REAPER\Plugins\reaper_csurf_mcu_klinke.dll"


Quote:
Originally Posted by shane View Post
API questions:
I need to loop through regions in a project and get various info about them (start time, end time, name). Possible? I see EnumProjectMarkers with in isrgn argument, but no functions to retrieve the information based on the resulting index and no way to get the total number of markers/regions.
I can send you my Region class that has methods like FindRegion(int index), NextRegion() ... But no total number of regions. Just drop me a PN with your email-Adress.

Best,
Klinke
Klinke is offline   Reply With Quote
Old 01-09-2011, 12:18 PM   #175
bruce
Human being with feelings
 
Join Date: Jul 2010
Posts: 66
Default debugging

While you can do that whole attach process thing, I wonder if you are skipping the obvious thing (the "normal" way to debug plugins).

Normally in the project properties you just set the debug target to reaper. Then when you select "debug" or "run" in visual studio it just runs reaper.

Since reaper boots so fast, it is not at all a PITA to quit and re-run it.

Another thing I do is before I start debugging in Reaper I debug with steinberg's test application that comes with the VST SDK. Unfortunately the VST 2 test app is quite crude and simplistic (also unfortunate that reaper does not support VST 2).

I just add my own test code the the test app. It's quite helpful.

lastly I would be surprised if you could not use GCC / Eclipse to make VST plug-ins. I've used GCC to make windows Active-X controls, so I can't see why this wouldn't work. The problem is that you will be on your own in terms of figuring out all the magic incantation (i.e. you might not find a tutorial that tells you exactly how to set up a project for a VST plugin with Eclipse.
bruce is offline   Reply With Quote
Old 01-09-2011, 12:30 PM   #176
Klinke
Human being with feelings
 
Klinke's Avatar
 
Join Date: Jul 2008
Location: Berlin / Germany
Posts: 758
Default

Quote:
Originally Posted by bruce View Post
lastly I would be surprised if you could not use GCC / Eclipse to make VST plug-ins.
I think shane want to create a Reaper extension, not a VST plugin. And the Reaper SDK says: "Extensions for REAPER/win32 should be written in C++ and compiled using MSVC (pure virtual interface classes are used and as such the C++ ABI must be compatible -- sorry, mingw users)."
Klinke is offline   Reply With Quote
Old 01-09-2011, 01:17 PM   #177
bruce
Human being with feelings
 
Join Date: Jul 2010
Posts: 66
Default

Oh, OK. But as far as gcc, I'm 99.999% certain that it is (or can be) 100% ABI compatibly. Otherwise it would be impossible to do COM/ActiveX.

I know that older version of gcc would add a virtual destructor to your vtable even if you didn't declare it, which did break compatibility. But that was years ago.
bruce is offline   Reply With Quote
Old 01-09-2011, 02:32 PM   #178
shane
Human being with feelings
 
shane's Avatar
 
Join Date: Jan 2006
Location: 61.215 -149.8925
Posts: 366
Default

Thanks for the help so far, guys. After following your advice I have the IDE set up to post-deploy the dll to the plug-ins dir and use reaper.exe for debugging. Much better.

It looks like EnumProjectMarkers is what I want, but again I am King Noob and don't know what I'm doing.

Here's EnumProjectMarkers:
Code:
REAPERAPI_DECL int (*EnumProjectMarkers)(int idx, bool* isrgn, double* pos, double* rgnend, char** name, int* markrgnindexnumber);
And I'm doing this:

Code:
int marker_index = 0;
int test = NULL;
bool* isrgn = NULL;
double* pos = NULL;
double* rgnend = NULL;
char** name = NULL;
int* idx = NULL;

while( EnumProjectMarkers(marker_index, isrgn, pos, rgnend, name, idx) > 0 ){
  marker_index++;
}
The code loops the correct number of times for the markers in a project, but when breaking on the marker_index increment none of the pointers ever change value. Please tell me why I'm dumb. Thanks.
__________________
Autorender - Now part of the SWS Extension family
Batch render and tag regions while you watch cat videos
shane is offline   Reply With Quote
Old 01-09-2011, 03:01 PM   #179
Klinke
Human being with feelings
 
Klinke's Avatar
 
Join Date: Jul 2008
Location: Berlin / Germany
Posts: 758
Default

When idea of using pointers as arguments is that you tell the method, at which memory position it should write the results. In your case, you give the method the position NULL, which is interpreted by EnumProjectMarkers as "the caller isn't interessted about this result".

Check the code i did send to you, it should show you how to use methods like this.
Klinke is offline   Reply With Quote
Old 01-09-2011, 04:15 PM   #180
shane
Human being with feelings
 
shane's Avatar
 
Join Date: Jan 2006
Location: 61.215 -149.8925
Posts: 366
Default

Ah, thanks. Think I got it.
Code:
void DoIt()
{	
  int marker_index = 0, idx;
  bool isrgn;
  double pos, rgnend;
  char* name;

  while( EnumProjectMarkers(marker_index++, &isrgn, &pos, &rgnend, &name, &idx) > 0 ){
	Sleep(10); //for breakpoint
  }
}
__________________
Autorender - Now part of the SWS Extension family
Batch render and tag regions while you watch cat videos
shane is offline   Reply With Quote
Old 01-09-2011, 04:43 PM   #181
shane
Human being with feelings
 
shane's Avatar
 
Join Date: Jan 2006
Location: 61.215 -149.8925
Posts: 366
Default

Ok, so I don't see any way to set up renders via the API. Is this a possibility, or are there way too many variables? If the only way to do it is to hack around with the windows that would kind of defeat the purpose...

Also, access to the project notes?
__________________
Autorender - Now part of the SWS Extension family
Batch render and tag regions while you watch cat videos
shane is offline   Reply With Quote
Old 01-09-2011, 11:33 PM   #182
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 7,713
Default

Quote:
Originally Posted by shane View Post
Ok, so I don't see any way to set up renders via the API. Is this a possibility, or are there way too many variables? If the only way to do it is to hack around with the windows that would kind of defeat the purpose...

Also, access to the project notes?
APIs for rendering directly from extensions were sadly never added, I did request that myself too.
__________________
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, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is offline   Reply With Quote
Old 01-10-2011, 12:26 PM   #183
shane
Human being with feelings
 
shane's Avatar
 
Join Date: Jan 2006
Location: 61.215 -149.8925
Posts: 366
Default

Quote:
Originally Posted by Xenakios View Post
APIs for rendering directly from extensions were sadly never added, I did request that myself too.
Reaper devs, any possibility of getting this added?
__________________
Autorender - Now part of the SWS Extension family
Batch render and tag regions while you watch cat videos
shane is offline   Reply With Quote
Old 01-10-2011, 12:53 PM   #184
sws
Code Monkey
 
sws's Avatar
 
Join Date: Sep 2007
Location: Madison, WI
Posts: 851
Default

Quote:
Originally Posted by shane View Post
Reaper devs, any possibility of getting [rendering from the API] added?
Hey Shane,

Yeah, I've asked for this too. The workaround that I am using is:
1- Write out RPP file copies to the Render Queue directory
2- Directly edit the .RPP files to set the render parameters (in the header) as necessary, also can get the proj notes
3- Run the action "Render all queued renders"

(Also, I assume you're "porting" the AutoRender stuff to extensions. Just so you know, it's already on my (really long) list of things to do here. Maybe we can collab on this? I would say start another thread or reply on my site.)

Tim
sws is offline   Reply With Quote
Old 01-10-2011, 01:38 PM   #185
shane
Human being with feelings
 
shane's Avatar
 
Join Date: Jan 2006
Location: 61.215 -149.8925
Posts: 366
Default

Quote:
Originally Posted by sws View Post
(Also, I assume you're "porting" the AutoRender stuff to extensions. Maybe we can collab on this?
Yeah, I'd be happy to collaborate. I was planning on working something up and then contacting you to see about inclusion with SWS anyway. I'll PM you my email...
__________________
Autorender - Now part of the SWS Extension family
Batch render and tag regions while you watch cat videos
shane is offline   Reply With Quote
Old 01-11-2011, 02:03 AM   #186
shane
Human being with feelings
 
shane's Avatar
 
Join Date: Jan 2006
Location: 61.215 -149.8925
Posts: 366
Default

Getting an access violation when I do this:

Code:
void* (*EnumProjects)(int idx, char* projfn, int projfnlen);
...
later on, in function
...

char cPath[256];
EnumProjects(-1, cPath, 256);
??
__________________
Autorender - Now part of the SWS Extension family
Batch render and tag regions while you watch cat videos
shane is offline   Reply With Quote
Old 01-11-2011, 02:29 AM   #187
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,677
Default

Quote:
Originally Posted by Xenakios View Post
APIs for rendering directly from extensions were sadly never added, I did request that myself too.
I would love to see this ability added as it would allow the sws team to fill in some feature gaps
musicbynumbers is offline   Reply With Quote
Old 01-11-2011, 06:24 AM   #188
sws
Code Monkey
 
sws's Avatar
 
Join Date: Sep 2007
Location: Madison, WI
Posts: 851
Default

Quote:
Originally Posted by shane View Post
Getting an access violation when I do this...
You probably need to init the EnumProjects function pointer. In the ext init code (entry point) somewhere you have one line for each Reaper API function that sets up the pointer. Add EnumProjects to that list.
sws is offline   Reply With Quote
Old 01-14-2011, 11:46 AM   #189
shane
Human being with feelings
 
shane's Avatar
 
Join Date: Jan 2006
Location: 61.215 -149.8925
Posts: 366
Default

Quote:
Originally Posted by sws View Post
You probably need to init the EnumProjects function pointer. In the ext init code (entry point) somewhere you have one line for each Reaper API function that sets up the pointer. Add EnumProjects to that list.
Yep, that was it. Thanks.

Anyone know if there's a way to enum the RENDER_FMT codes?

Edit: Nevermind, I think what I'm after is actually encoded in RENDER_CFG. Dammit.
__________________
Autorender - Now part of the SWS Extension family
Batch render and tag regions while you watch cat videos
shane is offline   Reply With Quote
Old 02-11-2011, 10:27 AM   #190
Bingo Bongo
Human being with feelings
 
Join Date: Feb 2011
Posts: 12
Default How do I write a “project export” plug-in extension?

How do I write a “project export” plug-in extension?

The REAPER Extensions SDK adds support for importing other project formats, but apparently it does not support exporting to other project formats.

So what is the best / recommended way to do this?

Any ideas?
Bingo Bongo is offline   Reply With Quote
Old 02-11-2011, 10:41 AM   #191
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 7,713
Default

Quote:
Originally Posted by Bingo Bongo View Post
How do I write a “project export” plug-in extension?

The REAPER Extensions SDK adds support for importing other project formats, but apparently it does not support exporting to other project formats.

So what is the best / recommended way to do this?

Any ideas?
You can enumerate the the states (volume, mute, pan etc) and contents (the media items) of the project tracks, and get lots of other information about the state of the project, too. So a project exporter is actually quite trivial to do for relatively simple cases. Naturally the Reaper extension APIs offer no help with spesifics of the target format. You need to know exactly how the target project format needs to be formed from the data you can get out of the Reaper project.

Also if some thing in the Reaper project simply isn't available via the Reaper extension API calls, you could parse the .rpp file itself. This might be a good way to do such a project exporter anyway, depending on how confident you feel with parsing plain text based documents.
__________________
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, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is offline   Reply With Quote
Old 02-11-2011, 10:58 AM   #192
Bingo Bongo
Human being with feelings
 
Join Date: Feb 2011
Posts: 12
Default

Quote:
Originally Posted by Xenakios View Post
You can enumerate the the states (volume, mute, pan etc) and contents (the media items) of the project tracks, and get lots of other information about the state of the project, too. So a project exporter is actually quite trivial to do for relatively simple cases. Naturally the Reaper extension APIs offer no help with spesifics of the target format. You need to know exactly how the target project format needs to be formed from the data you can get out of the Reaper project.

Also if some thing in the Reaper project simply isn't available via the Reaper extension API calls, you could parse the .rpp file itself. This might be a good way to do such a project exporter anyway, depending on how confident you feel with parsing plain text based documents.
Wow - that was quick. Thanks.

But what I really want to know is – what is the best way to integrate my GUI with Reaper’s GUI?

Fyi my exporter has a Wizard front end. Should I add an item to the File Menu? If so, then what is the best way to do that?

It would be really cool if I could add my project type to the list under “Save as type” in the File Dialog. That way its behaviour would be consist with the way projects are imported.

See what I mean?
Bingo Bongo is offline   Reply With Quote
Old 02-11-2011, 11:16 AM   #193
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 7,713
Default

Quote:
Originally Posted by Bingo Bongo View Post

It would be really cool if I could add my project type to the list under “Save as type” in the File Dialog. That way its behaviour would be consist with the way projects are imported.

See what I mean?
I see. If I remember right, this spesific case is not covered with the Reaper extension APIs. You can add a new standalone items to the File menu, yes, but I don't think there's the ability to add a new entry to the "save as type" list for the "save project" dialog, unfortunately.
__________________
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, Paul(X)Stretch and λ) :
http://xenakios.wordpress.com/
Xenakios is offline   Reply With Quote
Old 02-11-2011, 12:32 PM   #194
musicbynumbers
Human being with feelings
 
musicbynumbers's Avatar
 
Join Date: Jun 2009
Location: brighton, uk
Posts: 12,677
Default

Hi Bingo Bingo, I don't know what you were thinking of exporting as but if it's say OMF or something along those lines check out this crazily cheap program

http://www.aatranslator.com.au/

It even supports reaper directly and the developer communicates on here a lot.

Might not be what you want but just in case

I love hearing about potential new extensions though so looking forward to what ever you make!
musicbynumbers is offline   Reply With Quote
Old 02-11-2011, 08:21 PM   #195
Bingo Bongo
Human being with feelings
 
Join Date: Feb 2011
Posts: 12
Default

Quote:
Originally Posted by Xenakios View Post
I see. If I remember right, this spesific case is not covered with the Reaper extension APIs. You can add a new standalone items to the File menu, yes, but I don't think there's the ability to add a new entry to the "save as type" list for the "save project" dialog, unfortunately.
Right. Well that’s what I thought but I wanted to do a reality check.

So we have …
rec->Register("projectimport", &myRegStruct);
But what we need is …
rec->Register("projectexport", &myRegStruct);
So lets abandon that idea and consider modifying the File menu. I’d like to insert a submenu below “Batch file converter” and above “Quit”. I’d also like to add a separator line to make it look nice.

My submenu will be named “Bingo Bongo” and it will have two options named “Import from BBP” and “Export to BBP”.

How can I do that?
Bingo Bongo is offline   Reply With Quote
Old 02-11-2011, 11:20 PM   #196
sws
Code Monkey
 
sws's Avatar
 
Join Date: Sep 2007
Location: Madison, WI
Posts: 851
Default

Bingo Bongo:

To add items to the menu you need to register "hookcustommenu". There's plenty of examples in the SWS source code, for eg see ProjectMgr.cpp line 425 for the register call and line 366+ for the menu function, or search for hookcustommenu.

The official documentation for the menuhook is in reaper_plugin.h.

FYI it's not recommended to add menu items by manipulating the main HWND menu because it breaks menu customization.

Good luck,
Tim
sws is offline   Reply With Quote
Old 02-12-2011, 03:48 PM   #197
ajaym
Human being with feelings
 
Join Date: Aug 2009
Posts: 157
Default Metering information back to control surface

Hi folks

I'm now the proud owner of an Archos 101 tablet (half the price of an iPad,10 inch screen, it's quite a gadget....). Its destiny in life is to become The Ultimate Reaper Control Surface. Since I already have nice solid working code from my previous foray with the BCR2000, this should be quite straightforward - and with 10 glorious inches of (widescreen format) touchscreen, this will be an incredible way of interacting with Reaper.

But I had one question for you folks. In Sonar,there's a control surface API through which you can retrieve metering information for each track - i.e, the track level as would be reported on the meters. Obviously putting a meter bridge up on the surface would be very desirable, but I can't see an API to do that in Reaper. Communication will likely be by using UDP over WiFi, so with judicious use of efficient data packing into packets, quantising levels to 8 bits, and keeping the refresh rates reasonable, I think transmitting metering information for somewhere around 16 tracks max is feasible without too much strain on the sending process (which will of course be a thread inside the control surface DLL).

PS: It looks like somewhere between 14 - 16 tracks could be managed on screen at once - based on the width of my fingers!. The Archos supports two simultaneous touches, so it will be possible to drag two faders at once, but unfortunately that's it (the iPad definitely has the advantage here, with 11 simultaneous touches able to be handled at any time).

Apart from console view, obviously having extra views to control effect parameters etc. will be essential, but that's much more straightforward, I already know how to do all that. Metering is the thing I'm stuck on, so any advice much appreciated.
ajaym is offline   Reply With Quote
Old 02-13-2011, 09:09 AM   #198
Bingo Bongo
Human being with feelings
 
Join Date: Feb 2011
Posts: 12
Default

Quote:
Originally Posted by sws View Post
Bingo Bongo:

To add items to the menu you need to register "hookcustommenu". There's plenty of examples in the SWS source code, for eg see ProjectMgr.cpp line 425 for the register call and line 366+ for the menu function, or search for hookcustommenu.

The official documentation for the menuhook is in reaper_plugin.h.

FYI it's not recommended to add menu items by manipulating the main HWND menu because it breaks menu customization.

Good luck,
Tim
Thanks a lot. That was very helpful.

I’ve given this issue a little more thought – and the way I feel about it right now is that I’ll probably code my import/export wizard as a standalone app. It’s too bad Reaper can’t do this:
rec->Register("projectexport", &myRegStruct);
Does anyone know if there are plans to add this feature in 4.0?
Bingo Bongo is offline   Reply With Quote
Old 03-18-2011, 02:29 PM   #199
bro
Human being with feelings
 
Join Date: Mar 2011
Posts: 2
Default Save project, Save project as API

Is there such a functions to save the project in reapersdk?
I have not found

Thanks.
bro is offline   Reply With Quote
Old 03-18-2011, 02:31 PM   #200
shane
Human being with feelings
 
shane's Avatar
 
Join Date: Jan 2006
Location: 61.215 -149.8925
Posts: 366
Default

Quote:
Originally Posted by bro View Post
Is there such a functions to save the project in reapersdk?
I have not found

Thanks.
Just execute the action:

Main_OnCommand( 40026, 0 ); //Save current project
__________________
Autorender - Now part of the SWS Extension family
Batch render and tag regions while you watch cat videos
shane 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:52 AM.


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