Knyst - audio graph and synthesis library
Knyst is a real time audio synthesis framework focusing on flexibility and performance. It’s main target use case is desktop multi-threaded real time environments, but it can also do single threaded and/or non real time synthesis. Embedded platforms are currently not supported, but on the roadmap.
The main selling point of Knyst is that the graph can be modified while it’s running: nodes and connections between nodes can be added/removed. It also supports shared resources such as wavetables and buffers.
Knyst is in its early stages. Expect large breaking API changes between versions.
“Knyst” is a Swedish word meaning very faint sound.
The core of Knyst is the
Graph struct and the
can have nodes containing anything that implements
can also themselves be added as a node.
Nodes in a running
Graph can be freed or signal to the
that they or the entire
Graph should be freed.
Nodes and the inputs and outputs of a
Graph can also be changed
Graph is running. This way, Knyst acheives a similar
flexibility to SuperCollider.
It is easy to get things wrong when using a
Graph as a
so that functionality is encapsulated. For the highest level
your program you may want to use
RunGraph to get a node which
you can run in a real time thread or non real time to generate samples.
audio_backends this process is automated for you.
- Audio backends for getting up and running quickly. To use the backends in this module you need to enable either the jack or the cpal feature.
- Loading sound files and other data and reading from them. Module containing buffer functionality:
- API for interacting with a running top level
Graphfrom any number of threads without having to manually keep track of running
- A pretty barebones Envelope Gen
- Exports the most often used parts of Knyst
- This module contains things related to scheduling that are more generic than graph internals.
- Structs for dealing with time with determinism and high accuracy in seconds and beats.
- Wavetable synthesis
- Simple pseudorandom number generator
- Create an
InputBundleusing the syntax
- Common resources for all Nodes in a Graph and all its sub Graphs:
- Settings used to initialise
- A unique id for a Wavetable. Can be converted to a
- Used for holding either an Id (user facing identifier) or Key (internal identifier) for certain APIs.
- Combined error type for Knyst, containing any other error in the library.
- Command to modify the
Resourcesinstance while it is being used on the audio thread. Prefer the methods on [
KnystCommands] to making these directly.
- Error from changing a
- Response to a
ResourcesCommand. Usually used to send anything that deallocates away from the audio thread, but also reports any errors.
- Trait for
- Convert amplitude to db
- Convert db to amplitude
- The current sample type used throughout Knyst