#midi #recording #sampling #sampler

no-std autosam

A toolkit for automated multi-sampling of MIDI instruments

1 unstable release

0.1.0 Oct 14, 2023

#905 in Audio


Used in multirec

MIT/Apache

22KB
500 lines

autosam

A library for building auto-samplers.

The central bit of functionality is a way to specify a note distribution, which can then be converted into a "runtime" representation that lets you process those notes one by one.

Also included are some related types and utilities for generating MIDI messages.


lib.rs:

Utilities and infrastructure for building an auto-sampler

Example

let config = Config { notes: 48..=72, ..Default::default() };
let mut sequencer = Sequencer::new(config, 48_000).unwrap();

let AdvanceResult::Event { position, note } = sequencer.advance(1) else { panic!() };
assert_eq!(position, 0);
assert_eq!(note.state(), midi::NoteState::On);
assert_eq!(note.pitch().note_number(), 48);
assert_eq!(note.velocity(), 127);

No runtime deps

Features