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.
Christian Schüler <Christian_member pathlink.com> writes:
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
"Lynn Allan" <l_d_allan adelphia.net> writes:
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) "ChBenji Smith <dlanguage xxagg.com> writes: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 2005pragma <pragma_member pathlink.com> writes:In article <d41f9m$24c7$1 digitaldaemon.com>, Ch