https://github.com/overdrivenpotato/rust-vst2
VST 2.4 API implementation in rust. Create plugins or hosts.
https://github.com/overdrivenpotato/rust-vst2
Last synced: about 1 year ago
JSON representation
VST 2.4 API implementation in rust. Create plugins or hosts.
- Host: GitHub
- URL: https://github.com/overdrivenpotato/rust-vst2
- Owner: overdrivenpotato
- License: mit
- Created: 2015-04-24T01:30:56.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2018-05-21T06:10:24.000Z (about 8 years ago)
- Last Synced: 2025-03-29T15:05:27.341Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 3.74 MB
- Stars: 224
- Watchers: 17
- Forks: 22
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rust-vst2
[![Travis Build][trav-img]][trav-url]
[![Appveyor Build][appv-img]][appv-url]
[![crates.io][crates-img]][crates-url]
A library to help facilitate creating VST plugins in rust.
This library is a work in progress and as such does not yet implement all
opcodes. It is enough to create basic VST plugins without an editor interface.
*Please note: This api may be subject to rapid changes and the current state of
this library is not final.*
## Library Documentation
* http://overdrivenpotato.github.io/rust-vst2
## TODO
- Implement all opcodes
- Proper editor support (possibly [conrod] + [sdl2]?)
- Write more tests
- Provide better examples
## Usage
To create a plugin, simply create a type which implements `plugin::Plugin` and
`std::default::Default`. Then call the macro `plugin_main!`, which will export
the necessary functions and handle dealing with the rest of the API.
## Example Plugin
A simple plugin that bears no functionality. The provided Cargo.toml has a
crate-type directive which builds a dynamic library, usable by any VST host.
`src/lib.rs`
```rust
#[macro_use]
extern crate vst2;
use vst2::plugin::{Info, Plugin};
#[derive(Default)]
struct BasicPlugin;
impl Plugin for BasicPlugin {
fn get_info(&self) -> Info {
Info {
name: "Basic Plugin".to_string(),
unique_id: 1357, // Used by hosts to differentiate between plugins.
..Default::default()
}
}
}
plugin_main!(BasicPlugin); // Important!
```
`Cargo.toml`
```toml
[package]
name = "basic_vst"
version = "0.0.1"
authors = ["Author "]
[dependencies]
vst2 = "0.0.1"
[lib]
name = "basicvst"
crate-type = ["dylib"]
```
[trav-img]: https://travis-ci.org/overdrivenpotato/rust-vst2.svg?branch=master
[trav-url]: https://travis-ci.org/overdrivenpotato/rust-vst2
[appv-img]: https://ci.appveyor.com/api/projects/status/4kg8efxas08b72bp?svg=true
[appv-url]: https://ci.appveyor.com/project/overdrivenpotato/rust-vst2
[crates-img]: https://img.shields.io/crates/v/vst2.svg
[crates-url]: https://crates.io/crates/vst2
[sdl2]: https://github.com/AngryLawyer/rust-sdl2
[conrod]: https://github.com/PistonDevelopers/conrod
#### Packaging on OS X
On OS X VST plugins are packaged inside of loadable bundles.
To package your VST as a loadable bundle you may use the `osx_vst_bundler.sh` script this library provides.
Example:
```
./osx_vst_bundler.sh Plugin target/release/plugin.dylib
Creates a Plugin.vst bundle
```