Crate midi_fundsp

source ·
Expand description

This crate enables the construction of synthesizers with live MIDI input and sound synthesis using fundsp.

It is organized as follows:

  • The crate root contains functions and data structures useful for constucting fundsp sounds.
  • The io module contains functions and data types for obtaining messages from MIDI devices and playing
    fundsp audio graphs through the computer’s speakers.
  • The sound_builders module contains functions that wrap fundsp audio graphs into SynthFunc functions with a variety of properties.
  • The sounds module contains SynthFunc functions that produce a variety of live sounds.

The following example programs show how these components interact to produce a working synthesizer:

  • basic_demo.rs opens the first MIDI device it finds and plays a simple triangle waveform sound in response to MIDI events.
  • stereo_demo.rs also opens the first MIDI device it finds. It plays notes below middle C through the left speaker using a Moog Pulse sound, and notes at Middle C or higher through the right speaker using a Moog Triangle sound.
  • choice_demo.rs allows the user to choose one from among all connected MIDI devices. The user can then choose any sound from the sounds module for the program’s response to MIDI events.

Modules§

Macros§

  • Convenience macro to build a ProgramTable. Given a sequence of tuples of &str objects and SynthFunc objects, it returns a proper ProgramTable.

Structs§

Constants§

Functions§

Type Aliases§

  • SynthFunc objects translate SharedMidiState values into fundsp audio graphs.