A toy for visualizing polyrhythms
Project description
Polybeat
https://github.com/chunribu/polybeat/assets/57521167/2c2e6025-2490-4b45-b54e-92f1c06b1c04
Installation
# first, install manim from conda-forge channel
conda install -c conda-forge manim
# then install polybeat from pypi
pip install polybeat
Usage
# step 1: import module
from polybeat import play
# step 2:
# primary usage
play([3,4,12])
# advanced usage
play(
rhythms=[3,4,6,12],
custom_order=[0,1,3,2],
# colors=[RED,YELLOW,BLUE,GREEN],
sounds=['kick_drum','open_conga','side_stick','low_bongo'],
volumes=[0,-2,-6,-4],
cycle_time=1.8,
dot_radius=0.16,
width_range=[2.5,3.5],
preview=True,
)
custom_order is None by default, which equals to [3,2,1,0] (reverse order) in this case.
colors should be a list of variables supported by manim or hex number strings, e.g. ['#3ec1d3', '#f6f7d7', '#ff9a00', '#ff165d'].
sounds can be paths to custom audio files, or just leave it default.
cycle_time has an effect on speed.
preview means you want the video to auto play or not after rendering.
It's safe to use default parameters when the number of beats is 4 or less
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file polybeat-1.1.0.tar.gz.
File metadata
- Download URL: polybeat-1.1.0.tar.gz
- Upload date:
- Size: 436.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
863886e285109d66e3f176c815a21128e815bb2ebd3cae94c215233477abab07
|
|
| MD5 |
274a6e77f4503b97344a551d374b071a
|
|
| BLAKE2b-256 |
155aef81e8d1d776b7241ed2df59fb38495baf8ff061df3482c4ab064c75ef61
|
File details
Details for the file polybeat-1.1.0-py3-none-any.whl.
File metadata
- Download URL: polybeat-1.1.0-py3-none-any.whl
- Upload date:
- Size: 431.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a704261d2e3adb06dd5f3122d8f44c9041b0931dcbee00087cd6e176a3ecff85
|
|
| MD5 |
d8a3f1d56143412f0b46bc265fbb8637
|
|
| BLAKE2b-256 |
cae606ce17a9f8e114f9fe8d17561e0101946015498f23f92a566360003436cb
|