View Single Post
Old 02-12-2019, 12:16 PM   #400
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 7,925
Default

Quote:
Originally Posted by mespotine View Post
Is there some kind of documentation on how to develop C++-extension-plugins for Reaper somewhere, that I can use to learn that stuff?
Not really, the extremely outdated official SDK has some example projects and there have been examples floating around done for example by me. But those are always painful because the projects can get so easily outdated. Also it's quite tricky to do GUIs with C++. There is nothing like the gfx thing in ReaScript available from the C or C++ Reaper API.

The simplest possible extension plugin code, that does nothing, but makes all the C API functions available, is something like :
Code:
#define REAPERAPI_IMPLEMENT
#include "reaper_plugin_functions.h"

extern "C"
{
	REAPER_PLUGIN_DLL_EXPORT int REAPER_PLUGIN_ENTRYPOINT(REAPER_PLUGIN_HINSTANCE hInstance, reaper_plugin_info_t *rec) {
		if (rec != nullptr)
		{
		   if (REAPERAPI_LoadAPI(rec->GetFunc) > 0) return 0;
                   return 1;
		}
		return 0;
	}
}
You of course have to set up a Visual Studio or Xcode project properly to build a dll for Windows or dylib for macOs to make that work.
__________________
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/

Last edited by Xenakios; 02-12-2019 at 12:23 PM.
Xenakios is online now   Reply With Quote