Expand description
§Plugin System for mimium
In order to extend mimium’s capability to communicate between host system, mimium has its own FFI system. The FFI is done through some traits in this plugin module in order to decouple dependencies(modules may depends on external crates). There are 3 types of interfaces you need to define depending on what you need.
- IO Plugins Sets of instance-free external functions such as
printandprintln. They are mostly for glue functions for host system’s IO.mimium-coreis an example of this type of module. - External Unit Generator(UGen) Plugin. If you need to define native Unit Generator, use
UGenPlugininterface. In mimium code, you need to call higher-order function that returns instance of the UGen. You need to write small wrapper for this which simply calls object’s constructor (In the future, this wrapper will be automatically implemented through proc-macro). Multiple instances may exist at the same time.mimium-symphoniais a example of this type of module. - System Plugin. If your plugin needs to mutate states of system-wide instance (1 plugin instance per 1 vm), you need to implement
SystemPlugintraits. System plugin can have callbacks invoked at the important timings of the system likeon_init,before_on_sample& so on. Internal synchronous event scheduler is implemented through this plugins system.mimium-randis also an example of this type of module.
Structs§
- Common
Function - DynSystem
Plugin - A dynamically dispatched plugin wrapped in reference-counted storage.
- ExtCls
Info - ExtFun
Info - ExtFun
Type Info - Instant
Plugin - Macro
Info - SysPlugin
Signature - Metadata for a callback provided by a
SystemPlugin.
Traits§
- Machine
Function - Macro
Function - Plugin
- System
Plugin - Trait implemented by runtime plugins.
- System
Plugin Audio Worker - UGen
Plugin - Todo: Make wrapper macro for auto impl
Plugin