• Stars
    star
    973
  • Rank 47,051 (Top 1.0 %)
  • Language
    Rust
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

vst-rs

crates.io dependency status Discord Chat Discourse topics

Notice: vst-rs is deprecated.

This crate is no longer actively developed or maintained. VST 2 has been officially discontinued and it is no longer possible to acquire a license to distribute VST 2 products. It is highly recommended that you make use of other libraries for developing audio plugins and plugin hosts in Rust.

If you're looking for a high-level, multi-format framework for developing plugins in Rust, consider using NIH-plug or baseplug. If you're looking for bindings to specific plugin APIs, consider using vst3-sys, clap-sys, lv2(-sys), or auv2-sys. If, despite the above warnings, you still have a need to use the VST 2 API from Rust, consider using vst2-sys or generating bindings from the original VST 2 SDK using bindgen.

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

More Repositories

1

cpal

Cross-platform audio I/O library in pure Rust
Rust
2,614
star
2

rodio

Rust audio playback library
Rust
1,690
star
3

dasp

The fundamentals for Digital Audio Signal Processing. Formerly `sample`.
Rust
720
star
4

rust-portaudio

PortAudio bindings and wrappers for Rust.
Rust
373
star
5

deepspeech-rs

Rust bindings for the deepspeech library
Rust
295
star
6

dsp-chain

A library for chaining together multiple audio dsp processors/generators, written in Rust!
Rust
287
star
7

lewton

Rust vorbis decoder
Rust
250
star
8

vst3-sys

Raw Bindings to the VST3 API
Rust
210
star
9

rust-jack

Decent jack bindings for rust
Rust
204
star
10

baseview

low-level window system interface for audio plugin UIs
Rust
184
star
11

synth

A polyphonic Synth type whose multiple oscillators generate sound via amplitude and frequency envelopes, implemented in Rust. DEPRECATED: This is a very old crate with very old design patterns and is no longer maintained. You might be interested in checking out `dasp` for composing your own synth instead.
Rust
172
star
12

coreaudio-rs

A friendly rust interface to Apple's Core Audio API.
Rust
169
star
13

rust-lv2

A safe, fast, and modular framework to create LV2 plugins, written in Rust
Rust
150
star
14

audrey

A crate to simplify reading, writing and converting between a variety of audio formats.
Rust
114
star
15

ogg

Ogg container decoder and encoder written in pure Rust
Rust
97
star
16

rimd

Library for handling Midi and Standard Midi Files in Rust
Rust
77
star
17

wmidi

Rust midi encoding and decoding library.
Rust
63
star
18

pitch_calc

A library for musical pitch conversions! Provides functions and methods for converting between frequency (hz), midi-step, letter-octave and mels.
Rust
60
star
19

coreaudio-sys

Raw bindings to the OSX CoreAudio framework generated by bindgen (see coreaudio-rs for a more rust-esque wrapper).
Rust
59
star
20

sound_stream

A Rust audio IO stream in the style of an "Event Iterator" driven by PortAudio.
Rust
57
star
21

time_calc

A library for music/DSP time conversions! Provides functions and methods for converting between ticks, ms, samples, bars, beats and measures.
Rust
49
star
22

musical_keyboard

A small lib for converting keyboard input into musical notes.
Rust
26
star
23

mp3

Rust MP3 decoder project
Rust
23
star
24

sampler

A polyphonic sampler instrument that supports unique sample mappings across both frequency and velocity ranges. DEPRECATED: This is a very old crate with very old design patterns and is no longer maintained. You might be interested in checking out `dasp` for composing your own sampler instead.
Rust
23
star
25

areweaudioyet

Are We Audio Yet?
CSS
18
star
26

simplemad

A Rust interface for the MPEG audio (MP1, MP2, MP3) decoding library libmad
Shell
17
star
27

caf

Rust decoder for Apple's Core Audio Format (CAF)
Rust
14
star
28

envelope

An interpolatable Envelope type along with a generic 2D Point, useful for controlling parameters over time.
Rust
13
star
29

website

Website for all things audio in the Rust programming language
HTML
10
star
30

vst2-sys

Bindings for the VST 2.4 API.
Rust
9
star
31

instrument

Converts discrete note events to a continuous signal of amplitude and frequency frames over N number of voices.
Rust
8
star
32

rnnoise-c

Rust bindings to Xiph's rnnoise denoising library
Rust
7
star
33

rms

A simple type for calculating and storing the RMS given some buffer of interleaved audio samples.
Rust
7
star
34

volume

A simple dsp-chain node for multiplying the amplitude of the output buffer by some volume.
Rust
6
star
35

panning

A variety of utilities related to audio panning in Rust.
Rust
5
star
36

lyra

Feature extraction POC
Rust
4
star