@mudah-cli/audio
v0.9.4
Published
Play PCM through the OS mixer from a Mudah app (streaming output and one-shot WAV). Optional: apps that never import it never load an audio backend.
Maintainers
Readme
@mudah-cli/audio
Play PCM through the OS mixer from a Mudah app (streaming output and one-shot WAV/MP3).
Optional. The @mudah-cli/mudah umbrella does not depend on this package, and apps that
never import it never load an audio backend. Kitty cannot carry audio — this never writes to the
terminal.
Install
npm install @mudah-cli/audioBackends are auto-detected: audify (optional peer) for native output, otherwise
pw-play / paplay / aplay, otherwise silent. Set MUDAH_AUDIO=silent to force silence.
Usage
import { AudioOut } from '@mudah-cli/audio';
const out = await AudioOut.open();
out.write(new Int16Array(/* interleaved PCM */));
out.dispose();Also ships decodeWav / decodeMp3, a tone-sequence DSL (parseTune), a BpmClock, channel
mixing + ducking, a beat-grid quantizer, and a microphone source with FFT band extraction
(createMicrophone, FftBands) plus an audio-reactive bridge for @mudah-cli/vgpu.
