Skip to content
The Beat Machine is a library for playing with beats of songs, inspired by the creations on /r/BeatEdits.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
beatmachine
docs
test
.gitignore
.pre-commit-config.yaml Remove dephell dependency and create module docs with apidoc Nov 27, 2019
LICENSE
README.rst
poetry.lock
pyproject.toml

README.rst

beatmachine

GitHub Actions CI PyPI 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.

Installation

The beatmachine library is available on PyPI:

$ pip install beatmachine

Quick Reference

CLI

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

# This takes a while with the defaults!
beats = bm.Beats.from_song('in.mp3')

# The consolidate() method returns a PyDub AudioSegment, which we can use
# however we want.
beats.apply(bm.effects.RemoveEveryNth(2)).consolidate().export('out.mp3')

# The Beats class is immutable, so we're free to use it again.
beats.apply_all(bm.effects.RemoveEveryNth(2), bm.effects.CutEveryNth()).consolidate().export('out_2.mp3')
You can’t perform that action at this time.