Skip to main content

A toy for visualizing polyrhythms

Project description

Polybeat

https://github.com/chunribu/polybeat/assets/57521167/1bad0cd3-3feb-4222-8fea-8398ac4c3689

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=None,
    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 [0,1,2,3] 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


Download files

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

Source Distribution

polybeat-1.0.0.tar.gz (436.2 kB view details)

Uploaded Source

Built Distribution

polybeat-1.0.0-py3-none-any.whl (431.5 kB view details)

Uploaded Python 3

File details

Details for the file polybeat-1.0.0.tar.gz.

File metadata

  • Download URL: polybeat-1.0.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

Hashes for polybeat-1.0.0.tar.gz
Algorithm Hash digest
SHA256 17fc46568071985446294b703696697778954f2a8ee62577563e46a6dc3e9a68
MD5 b377e0d528c428df44f39042aac57727
BLAKE2b-256 f9d86564cc3bafd4e8646410715035c0fec161f9ddbcf5cb0c68405b63f2f6c3

See more details on using hashes here.

File details

Details for the file polybeat-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: polybeat-1.0.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

Hashes for polybeat-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 496a22cae72235b80549df68f67eab2ac7af51da9541346132f0ac53ceffc03d
MD5 be86b06800d3868842bdf0753ae45070
BLAKE2b-256 ef0d0d725b4c45866555c513055125d48ea475fa5817c932540998b4a6ff45cf

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