MCPcopy Index your code
hub / github.com/BillyDM/Firewheel

github.com/BillyDM/Firewheel @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,460 symbols 3,191 edges 114 files 433 documented · 30%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Firewheel

Documentation Crates.io License

A mid-level open source audio graph engine for games and other applications, written in Rust.

This crate can be used as-is or as a base for other higher-level audio engines. (Think of it like wgpu but for audio).

Key Features

  • Modular design that can be run on any backend that provides an audio stream
    • Included backends supporting Windows, Mac, Linux, Android, iOS, and WebAssembly
  • Flexible audio graph engine (supports any directed, acyclic graph with support for both one-to-many and many-to-one connections)
  • A suite of essential built-in audio nodes
  • Custom audio node API allowing for a plethora of 3rd party generators and effects
  • An optional data-driven parameter API that is friendly to ECS's (entity component systems).
  • Silence optimizations (avoid processing if the audio buffer contains all zeros, useful when using "pools" of nodes where the majority of the time nodes are unused)
  • Support for loading a wide variety of audio files using Symphonium
  • Fault tolerance for audio streams (The game shouldn't stop or crash just because the player accidentally unplugged their headphones.)
  • Properly respects realtime constraints (no mutexes!)
  • no_std compatibility (some features require the standard library)
  • (TODO) Basic CLAP plugin hosting (non-WASM only), allowing for more open source and proprietary 3rd party effects and synths
  • (TODO) Bindings for C, and (possibly) C++ and C#

Non-features

While Firewheel is meant to cover nearly every use case for games and other applications, it is not meant to be a complete DAW (digital audio workstation) engine. Not only would this greatly increase complexity, but the needs of game audio engines and DAW audio engines are in conflict. (See the design document for more details on why).

Get Involved

Join the discussion in the Firewheel Discord Server or in the Bevy Discord Server under the working-groups -> Better Audio channel!

If you are interested in contributing code, first read the Design Document and then visit the Project Board.

License

Licensed under either of

  • Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0), or
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Extension points exported contracts — how you extend this code

AudioNode (Interface)
A trait representing a node in a Firewheel audio graph. # Notes about ECS In order to be friendlier to ECS's (entity c [24 …
crates/firewheel-core/src/node.rs
StreamedSample (Interface)
A resource of audio samples that are streamed from disk or over a network. This uses considerably less memory, but requ
crates/firewheel-nodes/src/sampler/resource.rs
AudioNodeProcessor (Interface)
The trait describing the realtime processor counterpart to an audio node. [25 implementers]
crates/firewheel-core/src/node.rs
Diff (Interface)
Fine-grained parameter diffing. This trait allows a type to perform diffing on itself, generating events that another i [13 …
crates/firewheel-core/src/diff/mod.rs
Patch (Interface)
Fine-grained parameter patching. This trait allows a type to perform patching on itself, applying changes generated fro [13 …
crates/firewheel-core/src/diff/mod.rs
SampleResourceInfo (Interface)
Trait returning information about a resource of audio samples [4 implementers]
crates/firewheel-core/src/sample_resource.rs

Core symbols most depended-on inside this repo

get
called by 121
crates/firewheel-core/src/node.rs
target_value
called by 77
crates/firewheel-core/src/param/smoother.rs
add
called by 64
crates/firewheel-core/src/clock.rs
min
called by 61
crates/firewheel-core/src/param/range.rs
push
called by 56
crates/firewheel-graph/src/context.rs
as_ref
called by 55
crates/firewheel-core/src/diff/notify.rs
reset_to_target
called by 42
crates/firewheel-core/src/dsp/mix.rs
as_mut
called by 41
crates/firewheel-core/src/diff/notify.rs

Shape

Method 1,050
Class 261
Function 93
Enum 43
Interface 13

Languages

Rust100%

Modules by API surface

crates/firewheel-core/src/node.rs72 symbols
crates/firewheel-nodes/src/sampler.rs68 symbols
crates/firewheel-graph/src/context.rs67 symbols
crates/firewheel-core/src/diff/notify.rs57 symbols
crates/firewheel-nodes/src/svf.rs38 symbols
crates/firewheel-core/src/clock.rs37 symbols
crates/firewheel-graph/src/graph.rs35 symbols
crates/firewheel-cpal/src/lib.rs33 symbols
examples/visual_node_graph/src/ui.rs30 symbols
crates/firewheel-graph/src/graph/compiler/schedule.rs30 symbols
crates/firewheel-nodes/src/triple_buffer.rs29 symbols
crates/firewheel-core/src/dsp/volume.rs29 symbols

For agents

$ claude mcp add Firewheel \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact