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)
d.rest(duration=1/2, part=d.kick)
d.rest(duration=1/2, part=d.hihat)
# add a roll of 5 notes for an eighth-note, increasing in volume
d.roll(duration=1/2, subdivisions=5, crescendo=[100, 127])
d.rest(duration=1/2, part=d.kick)
d.rest(duration=1/2, part=d.hihat)
# 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.5.tar.gz
(54.3 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.5.tar.gz.
File metadata
- Download URL: music_drummer-0.1.5.tar.gz
- Upload date:
- Size: 54.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35b195da243ade0fd861b7a75503deaf9e5faa31fa92de800a233ce083325785
|
|
| MD5 |
4cb45fde53fe9d3b40f78f26a3b04f06
|
|
| BLAKE2b-256 |
72b09f03c6e3ec28dd790a113abf021ca3053cb9b33bf559664f4ab2586cc7c2
|
File details
Details for the file music_drummer-0.1.5-py3-none-any.whl.
File metadata
- Download URL: music_drummer-0.1.5-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 |
cf57c06600fee734067475f2cd9f7be63a38e4fd90f2b2f5713e80c9985fd40c
|
|
| MD5 |
669750220d7aaf71a52745550345039b
|
|
| BLAKE2b-256 |
272f29874d4a20ee504ae60a974976e7a67416d8e238b648e6dea62ee698ed8e
|