Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Prepare your plugin source files. Create a new folder under Source/Plugins with the name of your plugin. Copy the ExampleProcessor.cpp and ExampleProcessor.h files from Source/Plugins/ExampleProcessor to your folder and rename them with your processor name. If your processor is going to use a custom Editor for its controls do the same with the ExampleEditor files. If it's just going to use the simple default controls or no controls at all you can ignore these files. 

  2. Create the build files. If the plugin is going to be compiled under Linux, copy the Makefile.example under Source/Plugins/ExampleProcessor into your processor folder renaming it as just "Makefile". If the plugin is going to be compiled on Windows, you can use the ExampleProcessor project as base. You'd need to copy the ExampleProcessor project folder located in Builds/VisualStudio2013/Plugins to another folder with your plugin name, renaming the project files inside, open the project file (either standalone or adding it to the Plugins Solution), remove the ExampleProcessor files from it and add your own. Alternatively you could create your own project file from scratch. If the plugin is going to be compiled on Mac OS X, you need to create an Xcode project in Builds/MacOSX/Pluginsfor it. Detailed information on how these build files work can be found here.

  3. Change the processor name where appropriate. In both the .h and .cpp file, find all the instances of "ExampleProcessor" and replace them with the name of your file. In the class constructor, change the "Example Processor" string into the name you want to be visible to users. It doesn't have to match the name of your file, although it's more convenient if they're similar. If you're using the custom editor files, do the same with them.

  4. Specify the type of processor. If your processor is a filter, you don't have to do anything for this step. If it's a source or a sink, change the return value of the isSource() or isSink() method to `true` (but never both).

  5. Edit the OpenEphysLib file. This file allows the GUI to obtain information about the plugin. Replace the ExampleProcessor.h header with yours, all instances of ExampleProcessor with your processor name, and any other information that might be relevant. The OpenEphysLib.cpp  copied from the ExampleProcessor is extensively documented via comments, but more information can be found here.

  6. Try to build the plugin. At this point, the plugin should compile. If using the default build settings the build process should put your newly created plugin in the same place as all the other plugins, so just running the GUI should load it and let you drag it from the list to the signal chain. If it doesn't, go back and check steps 1-5. Looking at the GUI console output (running it with --console argument on Windows) might give you additional ideas of why it has failed, since it logs every plugin it tries to load at startup.

  7. Add functionality! This is the fun part. By updating your processor's "process" method, you'll determine how it manipulates incoming data, or introduces new data into the signal chain. Look at the code in existing processors for examples.

...