https://github.com/nimaudio/offbeat
clap based plugin framework in nim
https://github.com/nimaudio/offbeat
audio audio-plugin clap clap-plugin clap-plugins nim nim-lang plugin plugin-framework
Last synced: 10 months ago
JSON representation
clap based plugin framework in nim
- Host: GitHub
- URL: https://github.com/nimaudio/offbeat
- Owner: NimAudio
- License: mit
- Created: 2024-03-06T18:52:17.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-20T05:57:57.000Z (over 1 year ago)
- Last Synced: 2024-08-20T08:09:21.671Z (over 1 year ago)
- Topics: audio, audio-plugin, clap, clap-plugin, clap-plugins, nim, nim-lang, plugin, plugin-framework
- Language: Nim
- Homepage:
- Size: 344 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# offbeat 🎶
###### clap based plugin framework in nim
offbeat is mainly built around it managing parameters for you. simply define them initially, and it handles describing them to clap, events, saving, loading, etc. parameters can be float, int, or bool, with floats being the most fully featured, with built in smoothing.
there are numerous optional callbacks to shim in additional code, if needed, in many places. many are more theoretical, while others have a clear imagined use, like the calculate callback on smoothed float parameters, which has been added in large part to enable smooth but optimized filter coefficient calculation.
depends on [nim-clap](https://github.com/NimAudio/nim-clap). `nimble install clap`
---
### features
- effect plugins
- parameters
- saving
- loading
- automation
- parameter smoothing
### planned features (no specific order, in progress marked with 🧪)
- synth plugins and other uses of midi input or output
- possibly with a synth framework which handles voices and calls various callbacks when needed
- 🧪 custom ui
- i intend to simply provide a sokol context for the user to supply mesh, shader, etc for
- however i would like to create shaders that use SDFs to create uniform based tweaking of looks and mesh based value, size, etc, for something a bit easier to place controls for, along with a library to handle mapping events to callbacks
- save/load error correction
- preset system
- optional json format for presets (no error correction)
- global settings system
- improve ergonomics of using parameter values
- maybe using generated macros?
- i think i have a functional name to index mapping table set up, but i have not tried it out. it would at least be less error prone than raw indices
- non-destructive modulation
- set up tests
### plugins made with offbeat
- example2.nim (needs better name)
- gain, channel flip, channel rotate. a slightly weird take on a utility/tool/whatever your daw calls this plugin
- example3.nim
- bass exciter/enhancer. demos userdata pointer and calculate callback.
i would like to make more example plugins going forward, especially after i add synth support. the goal is to make plugins that are good enough to use and weird enough to stand out, rather than being the most boringest plugins you can think of. i think larger weird plugins will test the framework in unexpected ways and ensure it is working as expected.
### building
to build, run the following command
```
nim compile --out:"example2" --app:lib --threads:on ".../offbeat/example2.nim"
```
or for debugging
```
nim compile --verbosity:1 --hints:off --out:"example2" --app:lib --forceBuild
--threads:on --lineDir:on --lineTrace:on --debuginfo:on ".../offbeat/example2.nim"
```
#### mac
then copy the binary (and .dSYM if debugging) into the provided example2.clap bundle for macos. if you change the filename, you will need to change the bundle plist to have the updated name.
#### other platforms
i am not sure what is needed for windows or linux, but reaper at least doesn't care if it is bundled or not. i simply copied and modified the surge bundle.