Build Status PyPI Version Documentation Status

The Beat Machine is a library for remixing songs by procedurally editing their beats, inspired by the creations on /r/BeatEdits. It works both as a library and as a command-line utility.


The beatmachine library is available on PyPI:

$ pip install beatmachine

Quick Reference


A simple CLI is available that reads effects from JSON files. See the docs for more info on how to define these.

The basic usage is:

$ python -m beatmachine -i in.mp3 -e <JSON string or file describing effects> -o out.mp3

Python API

A new Beats class is available that wraps most basic functionality. If you want to get started quickly, this may be for you!

Here’s a sample:

import beatmachine as bm

beats = bm.Beats.from_song('in.mp3')

If you want to get more advanced, you can also convert to an ndarray at any point:

import beatmachine as bm
import numpy as np

beats = bm.Beats.from_song('in.mp3')
y = np.flip(beats.to_ndarray())

Indices and tables