Coder Social home page Coder Social logo

w3ss / vst-rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rustaudio/vst-rs

0.0 1.0 0.0 5.5 MB

VST 2.4 API implementation in rust. Create plugins or hosts. Previously rust-vst on the RustDSP group.

License: MIT License

Shell 0.90% Rust 99.10%

vst-rs's Introduction

vst-rs

crates.io dependency status Discord Chat Discourse topics

vst-rs is a library for creating VST2 plugins in the Rust programming language.

This library is a work in progress, and as such it does not yet implement all functionality. It can create basic VST plugins without an editor interface.

Note: If you are upgrading from a version prior to 0.2.0, you will need to update your plugin code to be compatible with the new, thread-safe plugin API. See the transfer_and_smooth example for a guide on how to port your plugin.

Library Documentation

Documentation for released versions can be found here.

Development documentation (current master branch) can be found here.

Crate

This crate is available on crates.io. If you prefer the bleeding-edge, you can also include the crate directly from the official Github repository.

# get from crates.io.
vst = "0.3"
# get directly from Github.  This might be unstable!
vst = { git = "https://github.com/rustaudio/vst-rs" }

Usage

To create a plugin, simply create a type which implements the Plugin trait. Then call the plugin_main macro, 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

#[macro_use]
extern crate vst;

use vst::prelude::*;

struct BasicPlugin;

impl Plugin for BasicPlugin {
    fn new(_host: HostCallback) -> Self {
        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

[package]
name = "basic_vst"
version = "0.0.1"
authors = ["Author <[email protected]>"]

[dependencies]
vst = { git = "https://github.com/rustaudio/vst-rs" }

[lib]
name = "basicvst"
crate-type = ["cdylib"]

Packaging on OS X

On OS X VST plugins are packaged inside 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

Special Thanks

Marko Mijalkovic for initiating this project

vst-rs's People

Contributors

overdrivenpotato avatar piedoom avatar zyvitski avatar crsaracco avatar boscop avatar askeksa avatar monomadic avatar fredemus avatar m-hilgendorf avatar ms2ger avatar conundrumer avatar waywardmonkeys avatar klingtnet avatar faern avatar walther avatar y-fujii avatar vanderlokken avatar kykc avatar helgoboss avatar weirdconstructor avatar sebbert avatar earlz avatar cofinite avatar eyeplum avatar wrl avatar stijnfrishert avatar xmppwocky avatar nrgunby avatar zopu avatar jcfischer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.