Glorified Metronome
Project description
python-music-drummer
Glorified Metronome
SYNOPSIS
from music_drummer import Drummer
d = Drummer()
d.set_instrument('kick', 36) # change the kick patch from 35
d.set_instrument('snare', 40) # change the snare patch from 38
d.set_bpm(99) # change the beats per minute from 120
d.set_ts('5/8') # change the time signature from 4/4
d.count_in(2) # count-in on the hi-hats for 2 measures
# add a 64th-note flam to the score
d.note('snare', duration=1/2, flam=1/16, part=d.snare)
# add a roll of 5 notes for an eighth-note, increasing in volume
d.roll(duration=1/2, subdivisions=5, crescendo=[100, 127])
# add an eighth-note phrase of 3 parts, to the score
for _ in range(4):
d.pattern(
patterns={ 'kick': '1000000010', 'snare': '0000001000', 'hihat': '1111111111' },
duration=1/2
)
d.sync_parts() # make the parts play simultaneously
d.score.show() # or text, midi, etc. see music21 docs
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
music_drummer-0.1.4.tar.gz
(54.2 kB
view details)
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 music_drummer-0.1.4.tar.gz.
File metadata
- Download URL: music_drummer-0.1.4.tar.gz
- Upload date:
- Size: 54.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f1369a040a5ffe0680d4899cdf641157b5f3bb1562a8b098984612bec6dfbd9
|
|
| MD5 |
49896023782a46713291a43ec954ebcf
|
|
| BLAKE2b-256 |
98d531b40f62f7a9da970b4d77e8f4d621d5a8873ac68013be7567974e70de8f
|
File details
Details for the file music_drummer-0.1.4-py3-none-any.whl.
File metadata
- Download URL: music_drummer-0.1.4-py3-none-any.whl
- Upload date:
- Size: 45.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78c599e45fecfbe2a9442e4888265f596d17f57b7e2a817e19905cda9ea43e58
|
|
| MD5 |
e10959a283b86e504eef6b495c506d6a
|
|
| BLAKE2b-256 |
5395e971086ab7ec7300b1486e62217461f3aa01ba15ca147a58272acb441d3d
|