{"id":13822275,"url":"https://github.com/robbert-vdh/nih-plug","last_synced_at":"2025-05-14T05:10:45.598Z","repository":{"id":37818761,"uuid":"451613476","full_name":"robbert-vdh/nih-plug","owner":"robbert-vdh","description":"Rust VST3 and CLAP plugin framework and plugins - because everything is better when you do it yourself","archived":false,"fork":false,"pushed_at":"2025-04-22T21:38:55.000Z","size":2832,"stargazers_count":2065,"open_issues_count":80,"forks_count":176,"subscribers_count":46,"default_branch":"master","last_synced_at":"2025-04-22T22:36:17.551Z","etag":null,"topics":["clap","framework","nih-plug","plugin","plugin-framework","rust","vst3"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robbert-vdh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":"robbert-vdh","issuehunt":null,"otechie":null,"custom":["https://paypal.me/robbertvdh"]}},"created_at":"2022-01-24T20:00:20.000Z","updated_at":"2025-04-22T21:38:59.000Z","dependencies_parsed_at":"2024-01-02T00:13:14.316Z","dependency_job_id":"5e023d05-dca6-497c-8423-f6248d82032f","html_url":"https://github.com/robbert-vdh/nih-plug","commit_stats":{"total_commits":2201,"total_committers":33,"mean_commits":66.6969696969697,"dds":"0.026805997273966375","last_synced_commit":"16c6c58f4d9f08c9c515c991c218bff235cff6e2"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbert-vdh%2Fnih-plug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbert-vdh%2Fnih-plug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbert-vdh%2Fnih-plug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robbert-vdh%2Fnih-plug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robbert-vdh","download_url":"https://codeload.github.com/robbert-vdh/nih-plug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076850,"owners_count":22010611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clap","framework","nih-plug","plugin","plugin-framework","rust","vst3"],"created_at":"2024-08-04T08:01:52.210Z","updated_at":"2025-05-14T05:10:45.565Z","avatar_url":"https://github.com/robbert-vdh.png","language":"Rust","readme":"# NIH-plug\n\n[![Automated builds](https://github.com/robbert-vdh/nih-plug/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/robbert-vdh/nih-plug/actions/workflows/build.yml?query=branch%3Amaster)\n[![Tests](https://github.com/robbert-vdh/nih-plug/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/robbert-vdh/nih-plug/actions/workflows/test.yml?query=branch%3Amaster)\n[![Docs](https://github.com/robbert-vdh/nih-plug/actions/workflows/docs.yml/badge.svg?branch=master)](https://nih-plug.robbertvanderhelm.nl/)\n\nNIH-plug is an API-agnostic audio plugin framework written in Rust, as well as a\nsmall collection of plugins. The idea is to have a stateful yet simple plugin\nAPI that gets rid of as much unnecessary ceremony wherever possible, while also\nkeeping the amount of magic to minimum and making it easy to experiment with\ndifferent approaches to things. See the [current features](#current-features)\nsection for more information on the project's current status.\n\nCheck out the [documentation](https://nih-plug.robbertvanderhelm.nl/), or use\nthe [cookiecutter template](https://github.com/robbert-vdh/nih-plug-template) to\nquickly get started with NIH-plug.\n\n### Table of contents\n\n- [Plugins](#plugins)\n- [Framework](#framework)\n  - [Current features](#current-features)\n  - [Building](#building)\n  - [Plugin formats](#plugin-formats)\n  - [Example plugins](#example-plugins)\n- [Licensing](#licensing)\n\n## Plugins\n\nCheck each plugin's readme file for more details on what the plugin actually\ndoes. You can download the development binaries for Linux, Windows and macOS\nfrom the [automated\nbuilds](https://github.com/robbert-vdh/nih-plug/actions/workflows/build.yml?query=branch%3Amaster)\npage. Or if you're not signed in on GitHub, then you can also find the latest\nnightly build\n[here](https://nightly.link/robbert-vdh/nih-plug/workflows/build/master). You\nmay need to [disable Gatekeeper](https://disable-gatekeeper.github.io/) on macOS to be able to use\nthe plugins.\n\nScroll down for more information on the underlying plugin framework.\n\n- [**Buffr Glitch**](plugins/buffr_glitch) is the plugin for you if you enjoy\n  the sound of a CD player skipping This plugin is essentially a MIDI triggered\n  buffer repeat plugin. When you play a note, the plugin will sample the period\n  corresponding to that note's frequency and use that as a single waveform\n  cycle. This can end up sounding like an in-tune glitch when used sparingly, or\n  like a weird synthesizer when used less subtly.\n- [**Crisp**](plugins/crisp) adds a bright crispy top end to any low bass sound.\n  Inspired by Polarity's [Fake Distortion](https://youtu.be/MKfFn4L1zeg) video.\n- [**Crossover**](plugins/crossover) is as boring as it sounds. It cleanly\n  splits the signal into two to five bands using a variety of algorithms. Those\n  bands are then sent to auxiliary outputs so they can be accessed and processed\n  individually. Meant as an alternative to Bitwig's Multiband FX devices but\n  with cleaner crossovers and a linear-phase option.\n- [**Diopser**](plugins/diopser) is a totally original phase rotation plugin.\n  Useful for oomphing up kickdrums and basses, transforming synths into their\n  evil phase-y cousin, and making everything sound like a cheap Sci-Fi laser\n  beam.\n- [**Loudness War Winner**](plugins/loudness_war_winner) does what it says on\n  the tin. Have you ever wanted to show off your dominance by winning the\n  loudness war? Neither have I. Dissatisfaction guaranteed.\n- [**Puberty Simulator**](plugins/puberty_simulator) is that patent pending One\n  Weird Plugin that simulates the male voice change during puberty! If it was\n  not already obvious from that sentence, this plugin is a joke, but it might\n  actually be useful (or at least interesting) in some situations. This plugin\n  pitches the signal down an octave, but it also has the side effect of causing\n  things to sound like a cracking voice or to make them sound slightly out of\n  tune.\n- [**Safety Limiter**](plugins/safety_limiter) is a simple tool to prevent ear\n  damage. As soon as there is a peak above 0 dBFS or the specified threshold,\n  the plugin will cut over to playing SOS in Morse code, gradually fading out\n  again when the input returns back to safe levels. Made for personal use during\n  plugin development and intense sound design sessions, but maybe you'll find it\n  useful too!\n- [**Soft Vacuum**](plugins/soft_vacuum) is a straightforward port of\n  Airwindows' [Hard Vacuum](https://www.airwindows.com/hard-vacuum-vst/) plugin\n  with parameter smoothing and up to 16x linear-phase oversampling, because I\n  liked the distortion and just wished it had oversampling. All credit goes to\n  Chris from Airwindows. I just wanted to share this in case anyone else finds\n  it useful.\n- [**Spectral Compressor**](plugins/spectral_compressor) can squash anything\n  into pink noise, apply simultaneous upwards and downwards compressor to\n  dynamically match the sidechain signal's spectrum and morph one sound into\n  another, and lots more. Have you ever wondered what a 16384 band OTT would\n  sound like? Neither have I.\n\n## Framework\n\n### Current features\n\n- Supports both VST3 and [CLAP](https://github.com/free-audio/clap) by simply\n  adding the corresponding `nih_export_\u003capi\u003e!(Foo)` macro to your plugin's\n  library.\n- Standalone binaries can be made by calling `nih_export_standalone(Foo)` from\n  your `main()` function. Standalones come with a CLI for configuration and full\n  JACK audio, MIDI, and transport support.\n- Rich declarative parameter system without any boilerplate.\n  - Define parameters for your plugin by adding `FloatParam`, `IntParam`,\n    `BoolParam`, and `EnumParam\u003cT\u003e` fields to your parameter struct, assign\n    stable IDs to them with the `#[id = \"foobar\"]`, and a `#[derive(Params)]`\n    does all of the boring work for you.\n  - Parameters can have complex value distributions and the parameter objects\n    come with built-in smoothers and callbacks.\n  - Use simple enums deriving the `Enum` trait with the `EnumParam\u003cT\u003e` parameter\n    type for parameters that allow the user to choose between multiple discrete\n    options. That way you can use regular Rust pattern matching when working\n    with these values without having to do any conversions yourself.\n  - Store additional non-parameter state for your plugin by adding any field\n    that can be serialized with [Serde](https://serde.rs/) to your plugin's\n    `Params` object and annotating them with `#[persist = \"key\"]`.\n  - Optional support for state migrations, for handling breaking changes in\n    plugin parameters.\n  - Group your parameters into logical groups by nesting `Params` objects using\n    the `#[nested(group = \"...\")]`attribute.\n  - The `#[nested]` attribute also enables you to use multiple copies of the\n    same parameter, either as regular object fields or through arrays.\n  - When needed, you can also provide your own implementation for the `Params`\n    trait to enable compile time generated parameters and other bespoke\n    functionality.\n- Stateful. Behaves mostly like JUCE, just without all of the boilerplate.\n- Comes with a simple yet powerful way to asynchronously run background tasks\n  from a plugin that's both type-safe and realtime-safe.\n- Does not make any assumptions on how you want to process audio, but does come\n  with utilities and adapters to help with common access patterns.\n  - Efficiently iterate over an audio buffer either per-sample per-channel,\n    per-block per-channel, or even per-block per-sample-per-channel with the\n    option to manually index the buffer or get access to a channel slice at any\n    time.\n  - Easily leverage per-channel SIMD using the SIMD adapters on the buffer and\n    block iterators.\n  - Comes with bring-your-own-FFT adapters for common (inverse) short-time\n    Fourier Transform operations. More to come.\n- Optional sample accurate automation support for VST3 and CLAP that can be\n  enabled by setting the `Plugin::SAMPLE_ACCURATE_AUTOMATION` constant to\n  `true`.\n- Optional support for compressing the human readable JSON state files using\n  [Zstandard](https://en.wikipedia.org/wiki/Zstd).\n- Comes with adapters for popular Rust GUI frameworks as well as some basic\n  widgets for them that integrate with NIH-plug's parameter system. Currently\n  there's support for [egui](nih_plug_egui), [iced](nih_plug_iced) and\n  [VIZIA](nih_plug_vizia).\n  - A simple and safe API for state saving and restoring from the editor is\n    provided by the framework if you want to do your own internal preset\n    management.\n- Full support for receiving and outputting both modern polyphonic note\n  expression events as well as MIDI CCs, channel pressure, and pitch bend for\n  CLAP and VST3.\n  - MIDI SysEx is also supported. Plugins can define their own structs or sum\n    types to wrap around those messages so they don't need to interact with raw\n    byte buffers in the process function.\n- Support for flexible dynamic buffer configurations, including variable numbers\n  of input and output ports.\n- First-class support several more exotic CLAP features:\n  - Both monophonic and polyphonic parameter modulation are supported.\n  - Plugins can declaratively define pages of remote controls that DAWs can bind\n    to hardware controllers.\n- A plugin bundler accessible through the\n  `cargo xtask bundle \u003cpackage\u003e \u003cbuild_arguments\u003e` command that automatically\n  detects which plugin targets your plugin exposes and creates the correct\n  plugin bundles for your target operating system and architecture, with\n  cross-compilation support. The cargo subcommand can easily be added to [your\n  own project](https://github.com/robbert-vdh/nih-plug/tree/master/nih_plug_xtask)\n  as an alias or [globally](https://github.com/robbert-vdh/nih-plug/tree/master/cargo_nih_plug)\n  as a regular cargo subcommand.\n- Tested on Linux and Windows, with limited testing on macOS. Windows support\n  has mostly been tested through Wine with\n  [yabridge](https://github.com/robbert-vdh/yabridge).\n- See the [`Plugin`](src/plugin.rs) trait's documentation for an incomplete list\n  of the functionality that has currently not yet been implemented.\n\n### Building\n\nNIH-plug works with the latest stable Rust compiler.\n\nAfter installing [Rust](https://rustup.rs/), you can compile any of the plugins\nin the `plugins` directory in the following way, replacing `gain` with the name\nof the plugin:\n\n```shell\ncargo xtask bundle gain --release\n```\n\n### Plugin formats\n\nNIH-plug can currently export VST3 and\n[CLAP](https://github.com/free-audio/clap) plugins. Exporting a specific plugin\nformat for a plugin is as simple as calling the `nih_export_\u003cformat\u003e!(Foo);`\nmacro. The `cargo xtask bundle` command will detect which plugin formats your\nplugin supports and create the appropriate bundles accordingly, even when cross\ncompiling.\n\n### Example plugins\n\nThe best way to get an idea for what the API looks like is to look at the\nexamples.\n\n- [**gain**](plugins/examples/gain) is a simple smoothed gain plugin that shows\n  off a couple other parts of the API, like support for storing arbitrary\n  serializable state.\n- **gain-gui** is the same plugin as gain, but with a GUI to control the\n  parameter and a digital peak meter. Comes in three exciting flavors:\n  [egui](plugins/examples/gain_gui_egui),\n  [iced](plugins/examples/gain_gui_iced), and\n  [VIZIA](plugins/examples/gain_gui_vizia).\n\n  There are also examples for making custom GUIs with\n  [OpenGL](plugins/examples/byo_gui_gl), [wgpu](plugins/examples/byo_gui_wgpu),\n  and [softbuffer](plugins/examples/byo_gui_softbuffer).\n\n- [**midi_inverter**](plugins/examples/midi_inverter) takes note/MIDI events and\n  flips around the note, channel, expression, pressure, and CC values. This\n  example demonstrates how to receive and output those events.\n- [**poly_mod_synth**](plugins/examples/poly_mod_synth) is a simple polyphonic\n  synthesizer with support for polyphonic modulation in supported CLAP hosts.\n  This demonstrates how polyphonic modulation can be used in NIH-plug.\n- [**sine**](plugins/examples/sine) is a simple test tone generator plugin with\n  frequency smoothing that can also make use of MIDI input instead of generating\n  a static signal based on the plugin's parameters.\n- [**stft**](plugins/examples/stft) shows off some of NIH-plug's other optional\n  higher level helper features, such as an adapter to process audio with a\n  short-term Fourier transform using the overlap-add method, all using the\n  compositional `Buffer` interfaces.\n- [**sysex**](plugins/examples/sysex) is a simple example of how to send and\n  receive SysEx messages by defining custom message types.\n\n## Licensing\n\nThe framework, its libraries, and the example plugins in `plugins/examples/` are\nall licensed under the [ISC license](https://www.isc.org/licenses/). However,\nthe [VST3 bindings](https://github.com/RustAudio/vst3-sys) used by\n`nih_export_vst3!()` are licensed under the GPLv3 license. This means that\nunless you replace these bindings with your own bindings made from scratch, any\nVST3 plugins built with NIH-plug need to be able to comply with the terms of the\nGPLv3 license.\n\nThe other plugins in the `plugins/` directory may be licensed under the GPLv3\nlicense. Check the plugin's `Cargo.toml` file for more information.\n","funding_links":["https://liberapay.com/robbert-vdh","https://paypal.me/robbertvdh"],"categories":["Rust","Integrations"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobbert-vdh%2Fnih-plug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobbert-vdh%2Fnih-plug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobbert-vdh%2Fnih-plug/lists"}