o
odinpkg.dev
packages / library / odinworks

odinworks

fde4515library

Odin port of the brickworks C DSP library

No license · updated 4 months ago

Odinworks

DSP building blocks and audio modules written in Odin.

Documentation

Start here: Documentation Index

The full module reference is organized in the docs/ folder.

Build

Build the package:

odin build .

Usage

Import the library package:

import ow "odinworks"

Then call the module APIs documented in docs/README.md.

Quick Start

package example

import ow "odinworks"

main :: proc() {
	coeffs: ow.ow_ap1_coeffs
	state: ow.ow_ap1_state
	ow.ow_ap1_init(&coeffs)
	ow.ow_ap1_set_sample_rate(&coeffs, 48_000.0)
	ow.ow_ap1_set_cutoff(&coeffs, 1_000.0)
	_ = ow.ow_ap1_reset_state(&coeffs, &state, 0.0)

	x: f32 = 0.5
	y := ow.ow_ap1_process1(&coeffs, &state, x)
	_ = y
}