Glorified Metronome
Project description
python-music-drummer
Glorified Metronome
SYNOPSIS
from music_drummer import Drummer
d = Drummer()
d.instruments['kick']['num'] = 36 # change the kick patch
d.instruments['snare']['num'] = 40 # change the snare patch
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(d.instruments['snare']['num'], dur=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.2.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.2.tar.gz.
File metadata
- Download URL: music_drummer-0.1.2.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 |
47fd6a3e244adf2cc86656f0e2e1e71945831833c0d18a1b86dce7afd47c9884
|
|
| MD5 |
af6dee85c2ac0f6a1c42e4129fac2ee7
|
|
| BLAKE2b-256 |
ae056eabb4e4edeb976a5e610375a16aa63b9a573b5ab05188f64ece6ae34854
|
File details
Details for the file music_drummer-0.1.2-py3-none-any.whl.
File metadata
- Download URL: music_drummer-0.1.2-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 |
4c58d0a63260c16cdb1eb21eef5031f74b84346098caaf99c2300890fa3f8093
|
|
| MD5 |
2c4877af07c9cc5dd4c6613ca0e28177
|
|
| BLAKE2b-256 |
be471b28905106bcba2dde52736a3277b0d4f765b95038efdad6de93a24dd8c6
|