digitalmars.D - How would I write a VST plugin in D?
- Christian Schüler (23/23) Apr 18 2005 Been recently thinking about writing a VST plugin in D.
- Lynn Allan (10/13) Apr 19 2005 Christian,
- Benji Smith (5/7) Apr 21 2005 Yeah, me too. I've been interested in tinkering with some DSP algorithms...
- pragma (31/52) Apr 19 2005 Personally I have no experience in writing plugins for VST, but I used t...
Been recently thinking about writing a VST plugin in D. A VST plugin is a .dll for use with Cubase or other music software. It has a specially named C function as entry point: AEffect *main( audioMasterCallback audioMaster ); where AEffect is a struct, and audioMasterCallback is a typedef for a function. 1) How do I get these definitions into D? The VST SDK comes with an "aeffect.h" that defines these types and some enums. 2) How do I build a dll with D? 3) I need to compile a "main" function with different parameters than just (argc, argv). VisualC accepts an arbitrary "main" when compiling a .dll, but GCC does not. Therefore, a common workaround with GCC is to call the entry point something different, like "main_plugin", and change the export name with a .def file into "main". Can D do one of these (compile an arbitrary main function or handle a .def file)? 4) While the VST API is a C-API, in C++ you can derive from the AEffect struct to add member functions, which helps in organising (instead of having a bunch of static callback functions floating somewhere). Is this possible in D? 5) A "serious" plugin would need SSE code. I read DMD has it as inline assembler, but this means writing a complete loop in assembler. SSE-intrinsics (that is, specially named functions that compile to SSE-instructions) would be more of a convenience. Thanks, Christian
Apr 18 2005
Christian, This won't help you with D, sorry ... But I would appreciate hearing about your experience with VST plugin development. I've been working on a "skin/personality" to the open source Audacity audio editor that is specialized for speech rather than music. I would like to learn how to create several plug-ins for Audacity, and hadn't found any examples or tutorials on how to do that (didn't look that hard, however)Lynn Allan wrote:But I would appreciate hearing about your experience with VST plugin developmentYeah, me too. I've been interested in tinkering with some DSP algorithms (purely as a learning exercise), and I'd love to read about your experience writing VST plugins. --BenjiSmithApr 21 2005