Simple examples to demonstrate full-stack Rust audio plugin dev with baseplug and iced_audio

Overview

iced baseplug examples

Simple examples to demonstrate full-stack Rust audio plugin dev with baseplug and iced_audio

WIP (The GUI knobs do nothing currently. This will be solved once baseplug gets official functionality for syncing parameters between backend & GUI.)

To build and run:

  1. Install dependencies:
    • Ubuntu: sudo apt install libx11-xcb-dev libxcb-dri2-0-dev libgl1-mesa-dev libxcb-icccm4-dev libxcursor-dev
  2. Build example with nightly Rust toolchain:
    • cargo +nightly build --package gain --release
  3. Load the resulting libgain.so (libgain.dll on Windows) file into a VST2 Host.
You might also like...
A low-overhead and adaptable audio playback library for Rust

Awedio   A low-overhead and adaptable audio playback library for Rust. Examples Play a single sound file: let (mut manager, backend) = awedio::start()

Rust-crate with functions and helpers for working with music / audio, inspired by computer music languages.

music-math This crate contains common functions and helpers for working with music / audio in Rust. Most of these are inspired by similar functions fo

An open-source and fully-featured Digital Audio Workstation, made by musicians, for musicians
An open-source and fully-featured Digital Audio Workstation, made by musicians, for musicians

Meadowlark An open-source and fully-featured Digital Audio Workstation, made by musicians, for musicians. *Current design mockup, not a functioning pr

An experimental audio visualizer combining fractals and particle simulations.
An experimental audio visualizer combining fractals and particle simulations.

fractal_sugar About the project fractal_sugar is an experimental audio visualizer combining fractals and particle simulations. It is cross-platform, w

Cross-platform audio I/O library in pure Rust

CPAL - Cross-Platform Audio Library Low-level library for audio input and output in pure Rust. This library currently supports the following: Enumerat

Rust audio playback library

Audio playback library Rust playback library. Playback is handled by cpal. MP3 decoding is handled by minimp3. WAV decoding is handled by hound. Vorbi

Rust bindings for the soloud audio engine library

soloud-rs A crossplatform Rust bindings for the soloud audio engine library. Supported formats: wav, mp3, ogg, flac. The library also comes with a spe

Rust - Augmented Audio Libraries
Rust - Augmented Audio Libraries

Augmented Audio Libraries In this repository I'll push some experiments trying to use Rust for audio programming. Goals Goal 1: Learn & have fun This

CLI Rust Audio Visualizer
CLI Rust Audio Visualizer

crav Console-based Rust Audio Visualizer It can run in the terminal but also has a 3D accelerated backend implemented in wgpu. demo compatibility The

Comments
  • version compatibility

    version compatibility

    This PR resolves the following compile errors:

    $ cargo +nightly build --package gain
        Updating git repository `https://github.com/RustAudio/baseview.git`
       Compiling baseview v0.1.0 (https://github.com/RustAudio/baseview.git?rev=e7a6c661eff90000b5a62d28fb8e1eec3997d2aa#e7a6c661)
       Compiling gain v0.1.0 (/home/jp/proj/rust/iced-baseplug-examples/gain)
    error[E0050]: method `update` has 2 parameters but the declaration in trait `iced_baseview::Application::update` has 3
      --> gain/src/ui/mod.rs:59:15
       |
    59 |     fn update(&mut self, message: Self::Message) -> Command<Self::Message> {
       |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 3 parameters, found 2
       |
       = note: `update` from trait: `fn(&mut Self, &mut WindowQueue, <Self as Application>::Message) -> iced_baseview::Command<<Self as Application>::Message>`
    
    error[E0308]: mismatched types
      --> gain/src/lib.rs:83:21
       |
    83 |               window: WindowOpenOptions {
       |  _____________________^
    84 | |                 title: String::from("iced-baseplug-examples gain"),
    85 | |                 size: Size::new(Self::ui_size().0 as f64, Self::ui_size().1 as f64),
    86 | |                 scale: WindowScalePolicy::SystemScaleFactor,
    87 | |             },
       | |_____________^ expected struct `baseview::window_open_options::WindowOpenOptions`, found struct `WindowOpenOptions`
       |
       = note: perhaps two different versions of crate `baseview` are being used?
    
    error[E0599]: no method named `unwrap` found for unit type `()` in the current scope
       --> gain/src/lib.rs:105:31
        |
    105 |         handle.close_window().unwrap();
        |                               ^^^^^^ method not found in `()`
    
    Some errors have detailed explanations: E0050, E0308, E0599.
    For more information about an error, try `rustc --explain E0050`.
    error: could not compile `gain` due to 3 previous errors
    

    At time of writing, f6e99e9aa6f5aeb6b721cb05e4d882a51d995909 is the most recent commit on baseview's main branch

    opened by JoshuaPostel 1
  • Doesn't compile

    Doesn't compile

    I tried cargo +nightly build --package gain --release and got error:

    error[E0046]: not all trait items implemented, missing: `ui_param_notify`
      --> gain/src/lib.rs:74:1
       |
    74 | impl baseplug::PluginUI for Gain {
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `ui_param_notify` in implementation
       |
       = help: implement the missing item: `fn ui_param_notify(_: &<Self as PluginUI>::Handle, _: &'static baseplug::Param<Self, <<Self as Plugin>::Model as Model<Self>>::Smooth>, _: f32) { todo!() }`
    
    error[E0277]: the trait bound `RawWindowHandle: HasRawWindowHandle` is not satisfied
      --> gain/src/lib.rs:91:64
       |
    91 |         iced_baseview::IcedWindow::<ui::GainUI>::open_parented(&parent, settings);
       |                                                                ^^^^^^^ the trait `HasRawWindowHandle` is not implemented for `RawWindowHandle`
       |
       = note: required by `IcedWindow::<A>::open_parented`
    
    error: aborting due to 2 previous errors
    
    opened by Ploppz 1
  • SIGABRT on OS X

    SIGABRT on OS X

    On opening the plugin GUI a SIGABRT causes the plugin and plugin host to crash.

    Debugging this issue a little the crash happens when polling the run_instance within on_frame. It happens on the 2nd time it calls poll. Within this context the actual crash happens with the event loop in run_instance and specificly on handlgin the RuntimeEvent::OnFrame and more percisely the call in the term:

    let new_mouse_interaction = compositor.draw(
                            &mut renderer,
                            &mut swap_chain,
                            state.viewport(),
                            state.background_color(),
                            &primitive,
                            &debug.overlay(),
                        );
    
    opened by bgaster 0
Owner
Billy Messenger
Creator of the Meadowlark DAW | Programming | Design | Music | Rust
Billy Messenger
API-agnostic audio plugin framework written in Rust

Because everything is better when you do it yourself - Rust VST3 and CLAP framework and plugins

Robbert van der Helm 415 Dec 27, 2022
A low-level windowing system geared towards making audio plugin UIs.

baseview A low-level windowing system geared towards making audio plugin UIs. baseview abstracts the platform-specific windowing APIs (winapi, cocoa,

null 155 Dec 30, 2022
simple-eq is a crate that implements a simple audio equalizer in Rust.

simple-eq A Simple Audio Equalizer simple-eq is a crate that implements a simple audio equalizer in Rust. It supports a maximum of 32 filter bands. Us

Mike Hilgendorf 11 Sep 17, 2022
A simple GUI audio player written in Rust with egui. Inspired by foobar2000.

Music Player A simple GUI music player inspired by foobar2000 written in Rust using egui. The goal of this project is to learn about making gui/ nativ

Ryan Blecher 5 Sep 16, 2022
A simple CLI audio player with strange features.

legacylisten legacylisten is a simple CLI audio player I wrote because no existing one fulfilled my needs. The main feature is that you can change how

Matthias Kaak 3 Jun 8, 2022
A very simple audio synthesizer with a tuix gui

In this tutorial we'll create a very simple audio synthesiser application from scratch with a ui using tuix. The finished code for this tutorial can b

George Atkinson 24 Jan 6, 2023
Symphonia is a pure Rust audio decoding and media demuxing library supporting AAC, FLAC, MP3, MP4, OGG, Vorbis, and WAV.

Pure Rust multimedia format demuxing, tag reading, and audio decoding library

Philip Deljanov 1k Jan 2, 2023
A library and application for lossless, format-preserving, two-pass optimization and repair of Vorbis data, reducing its size without altering any audio information.

OptiVorbis A library and application for lossless, format-preserving, two-pass optimization and repair of Vorbis data, reducing its size without alter

OptiVorbis 27 Jan 3, 2023
Implements the free and open audio codec Opus in Rust.

opus-native Overview Implements the free and open audio codec Opus in Rust. Status This crate is under heavy development. Most functionality is not wo

Nils Hasenbanck 9 Nov 28, 2022
DSP real time audio synthesis, effect algorithms and utilities for Rust

synfx-dsp synfx-dsp DSP real time audio synthesis, effect algorithms and utilities for Rust Most of the algorithms and implementations in this library

Weird Constructor 8 Nov 23, 2022