blip_buf 0.1.4

Blip_buf is a small waveform synthesis library meant for use in classic video game sound chip emulation. Bindings to blip_buf (https://code.google.com/p/blip-buf/)

Crate blip_buf [] [src]

blip_buf is a small waveform synthesis library meant for use in classic video game sound chip emulation. It greatly simplifies sound chip emulation code by handling all the details of resampling. The emulator merely sets the input clock rate and output sample rate, adds waveforms by specifying the clock times where their amplitude changes, then reads the resulting output samples.

Features

  • Several code examples, including simple sound chip emulator.
  • Uses fast, high-quality band-limited resampling algorithm (BLEP).
  • Output is low-pass and high-pass filtered and clamped to 16-bit range.
  • Supports mono, stereo, and multi-channel synthesis.

Based upon

This library is a very thin wrapper on the original C library, found here: https://code.google.com/p/blip-buf/

Structs

BlipBuf

Sample buffer that resamples from input clock rate to output sample rate

Constants

MAX_FRAME

Maximum number of samples that can be generated from one time frame.

MAX_RATIO

Maximum clock_rate / sample_rate ratio. For a given sample_rate, clock_rate must not be greater than sample_rate * MAX_RATIO.