A modular command line digital signal processor built in rust

Overview

earwig

A modular command line digital signal processor built in rust. Ever wanted to pipe raw audio samples around in the terminal to impress your friends at a party? Well then, you've come to the right place. earwig is a collection of CLI audio processors which harness the power of stdin and stdout to send samples down the signal chain.

For example: ./choppy sample.wav | ./out

This would cut random chunks from sample.wav and pipe the samples to stdout for ./out to scoop up and output on the default audio device.

Why

Mainly because once I had the idea, I couldn't unthink it... Also I wanted to become more familiar with digital signal processing, especially in rust. And actually I think it might be a really fun music making tool.

Try it

  1. cargo build

  2. ./target/debug/choppy | ./target/debug/out

Modules

  • choppy [sample_path] [sample_size_ms] Chop up some audio semi-randomly. Takes an audio file as input and continually chops it up in a semi-random way, pipes samples to stdout. Optionally takes a second arg setting the starting sample size.
  • out Audio output module. Slurps up samples from stdin and streams them as audible audio to the nearest output device.

Contribute

Yes please!! I don't know if two modules cam be considered a chain, so please contribute more. When doing so, bare in mind:

  • one module per file in src/
  • add a [[bin]] entry to Cargo.toml for your new module
  • modules should be fun.. This includes: pointless, "really??", plain noisy, "is it working?" and funky
  • lots of code comments please
  • keep on the simple side of the tracks where possible, fewer dependencies and transparent logic is prefered
You might also like...
Rust audio playback library

Audio playback library Rust playback library. Playback is handled by cpal. MP3 decoding is handled by minimp3. WAV decoding is handled by hound. Vorbi

PortAudio bindings and wrappers for Rust.

rust-portaudio PortAudio bindings and wrappers for Rust. PortAudio is a free, cross-platform, open-source, audio I/O library. rust-portaudio is still

A music theory guide written in Rust.

Rust Music Theory A library and executable that provides programmatic implementation of the basis of the music theory. Table of Contents Overview Usag

Rust bindings for the soloud audio engine library

soloud-rs A crossplatform Rust bindings for the soloud audio engine library. Supported formats: wav, mp3, ogg, flac. The library also comes with a spe

A Rust environment for sound synthesis and algorithmic composition.

Sorceress A Rust environment for sound synthesis and algorithmic composition, powered by SuperCollider. Overview Sorceress is a Rust crate that provid

Implements the free and open audio codec Opus in Rust.

opus-native Overview Implements the free and open audio codec Opus in Rust. Status This crate is under heavy development. Most functionality is not wo

Gtk/Rust native Spotify client for the GNOME desktop.
Gtk/Rust native Spotify client for the GNOME desktop.

Gtk/Rust native Spotify client for the GNOME desktop.

mpc, but implemented in Rust.

rsmpc mpc, but implemented in Rust. Note: This is not meant to be a direct implementation, there will be some differences. For example: I moved the op

Symphonia is a pure Rust audio decoding and media demuxing library supporting AAC, FLAC, MP3, MP4, OGG, Vorbis, and WAV.

Pure Rust multimedia format demuxing, tag reading, and audio decoding library

Comments
  • Meet smoothy

    Meet smoothy

    I have no idea what I am doing. It felt appropriate not to change anything about that until after submitting the PR.

    How do you feel about adding dependencies? Using a VecDeque rather than a fixed-size ringbuffer hurts a bit.

    opened by AljoschaMeyer 4
  • Slightly improve some modules

    Slightly improve some modules

    randomly sounds a lot better now, albeit still too white-noisy for my taste. Time to implement a module that adds small random values to samples rather than interpolating toward them soon.

    opened by AljoschaMeyer 1
  • Explore using clap

    Explore using clap

    This is what clap-based modules would look like. How do you feel about giving these more verbose usage instructions in the list of modules?

    I will refactor everything to use clap before merging this after we settle on a style (for the readme in particular). Right now I've taken the output of extremely --help, removed the windows-specific bits, and removed the --help option.

    Compilation time hasn't been noticeably affected by deriving Parser for just a single module.

    For reference, here is the output of extremely --help on my machine:

    $ ../target/debug/extremely --help
    Linearly interpolate each sample toward +/-1
    
    Usage: extremely.exe [T]
    
    Arguments:
      [T]  How strongly to interpolate samples toward +/- 1 [default: 1]
    
    Options:
      -h, --help  Print help information
    
    opened by AljoschaMeyer 1
  • Readme Format With Clap

    Readme Format With Clap

    Do you want to keep the short and informal list of modules, or should we switch to listing modules together with their module --help output after switching everything to using clap?

    opened by AljoschaMeyer 2
Owner
Sam Andreae
Sam Andreae
The open source musician's digital music stand

DiNoScore* A digital music stand written with GTK in Rust using WoAB. Includes an editor to import your sheet. Touch-friendly thanks to Libhandy. Ever

null 13 Dec 5, 2022
A small program to feed the audio from your QRP-Labs QDX digital transceiver through to your computer's speakers

A small program to feed the audio from your QRP-Labs QDX digital transceiver through to your computer's speakers. Also gives you a small user interface in which you can see a signal-strength meter, control the output volume coming from your speakers, and to tune the QDX to a particular frequency (receive SSB and other signals!).

Matt Gumbley 3 Jul 24, 2023
envelope - a command line utility and tool to help you manage your .env files

envelope envelope is a command line utility and tool to help you manage your .env files. How it works envelope is basically a command line utility tha

Mattia Righetti 6 Oct 14, 2023
A library for constructing Groth-Sahai proofs using pre-built wrappers

Groth-Sahai Wrappers A Rust library containing wrappers that facilitate the construction of non-interactive witness-indistinguishable and zero-knowled

Jacob White 1 Mar 7, 2022
Spotify for the terminal written in Rust 🚀

Spotify TUI A Spotify client for the terminal written in Rust. The terminal in the demo above is using the Rigel theme. Spotify TUI Installation Homeb

Alexander Keliris 14.1k Jan 1, 2023
A rust binding for the FMOD library

rust-fmod This is a rust binding for FMOD, the library developped by FIRELIGHT TECHNOLOGIES. FMOD website : www.fmod.org You can also find it on crate

Guillaume Gomez 55 Nov 2, 2022
Easy Api in Rust to play Sounds

ears ears is a simple library to play sounds and music in Rust. Provides an access to the OpenAL spatialization functionality in a simple way. Accepts

Jan Niklas Hasse 82 Jan 1, 2023
Idiomatic Rust bindings for OpenAL 1.1 and extensions (including EFX).

alto alto provides idiomatic Rust bindings for OpenAL 1.1 and extensions (including EFX). WARNING Because Alto interacts with global C state via dynam

null 80 Aug 7, 2022
High-level PortMidi bindings and wrappers for Rust

portmidi-rs High-level PortMidi bindings for Rust. PortMidi website: http://portmedia.sourceforge.net/portmidi/ Installation Add this to your Cargo.to

Philippe Delrieu 69 Dec 1, 2022
Cross-platform audio I/O library in pure Rust

CPAL - Cross-Platform Audio Library Low-level library for audio input and output in pure Rust. This library currently supports the following: Enumerat

null 1.8k Jan 8, 2023