Skip to main content

Rust library for music synthesis and processing, inspired by Essentia.

Project description

muslib

Rust library for music synthesis and processing, inspired by Essentia.

It provides a few simple algorithms and utilities:

  • (WIP) tonal analysis with harmonic pitch class profile -- HPCP
  • (WIP) inverse fast Fourier transform -- IFFT
  • (WIP) short-time Fourier transform -- STFT
  • simple mixer to create mono tracks
  • synthesizer for simple waveforms

Installation

You can download pre-built binaries from the releases page. Otherwise see build instructions for more details.

The Rust crate is available through crates.io. You can add it with a simple:

$ cargo add muslib

There is also a Python package available on pypi.org. You can install it with a simple:

$ pip install muslib

Usage

This project provides a Rust library that can be used in other Rust projects or from Python code with our PyO3 bindings.

See docs for a more detailed documentation and examples to learn how you could use this project in your own code.

Development

build

You can use a simple cargo command to compile a release binary. The output will be in the target/release directory.

$ cargo build --release

To compile a Python wheel use maturin.

$ maturin build

All project dependencies are listed in the Cargo.toml file.

docs

You can generate docs with a simple cargo command. The output will be in the target/doc directory.

$ cargo doc

The documentation should also be available through docs.rs.

tests

$ cargo test

TODO: create build CI and link it here

examples

You can run Rust examples from the examples directory with:

$ cargo run --example [name] [args]

You will also find Python examples there, including those comparing the usage of muslib and Essentia for simple tasks.

Some test scripts and helpers that were often run by hand during development are also there.

alternatives

Other interesting Rust projects for audio DSP:

license

In the same spirit as Essentia, this project is licensed under AGPL-3.0.

Copyright (C) 2023 wykwit

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

muslib-0.1.1.tar.gz (107.0 kB view details)

Uploaded Source

Built Distribution

muslib-0.1.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.11+ manylinux: glibc 2.17+ x86-64

File details

Details for the file muslib-0.1.1.tar.gz.

File metadata

  • Download URL: muslib-0.1.1.tar.gz
  • Upload date:
  • Size: 107.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.4.0

File hashes

Hashes for muslib-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8790f50d434cf611d0587616baec30f24eabdad4316e23c1fcbd57bf4bf0158a
MD5 b79543ee9ed3de0cc54ac387d1e15059
BLAKE2b-256 f4bf1a2790aa4e9de1ad82579e974708bff3a7babba533b455d5e7a67098397c

See more details on using hashes here.

File details

Details for the file muslib-0.1.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for muslib-0.1.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 44af5b675916f96410a27f3071f07c26b20fb4f7042f87844bc5c6418b91a464
MD5 ad6d8de0848f436d0b0715500f50c2f1
BLAKE2b-256 e13ba89b4092dbddbac4177ff6ec92caac9abefae20fe547974a04fa1d02f71b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page