| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Sat, 17 Jan 2026 14:28:51 GMT
X-Served-By: cache-dfw-kdfw8210117-DFW, cache-bom-vanm7210071-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768660132.546075,VS0,VE283
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
djembe: Hit drums with haskell
[Skip to Readme]
djembe: Hit drums with haskell
A simple DSL for composing drum beats in haskell. Djembe uses the system MIDI device to play these beats.
[Skip to Readme]
Downloads
- djembe-0.1.1.2.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0.0, 0.1.1.0, 0.1.1.1, 0.1.1.2 |
|---|---|
| Dependencies | base (>=4.6 && <4.9), hmidi (>=0.2.1 && <3.0), hspec (>=2.1 && <2.3), lens (>=4.7 && <4.14), mtl, QuickCheck (>=2.7 && <2.9), random (>=1.0 && <1.2) [details] |
| License | MIT |
| Copyright | 2015 Reed Rosenbluth |
| Author | Reed Rosenbluth & Jonathan Dubin |
| Maintainer | Reed.Rosenbluth@gmail.com |
| Uploaded | by ReedRosenbluth at 2016-01-20T17:11:37Z |
| Category | Sound |
| Home page | https://github.com/reedrosenbluth/Djembe |
| Distributions | |
| Reverse Dependencies | 1 direct, 0 indirect [details] |
| Downloads | 2589 total (11 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2016-01-20 [all 1 reports] |
Readme for djembe-0.1.1.2
[back to package description]Djembe
Djembe is a Haskell embedded domain-specific language for composing drum beats.
Example
Let's define a few quarter note length drum hits
bass = n4 $ hsong (Hit BassDrum1 0 100)
snare = n4 $ hsong (Hit SnareDrum2 0 100)
hihat = n4 $ hsong (Hit ClosedHihat 0 100)
Now let's create a simple composition
beat = bass <> snare <> bass <> hihat
Finally we can play it at a specific tempo
> play beat 200
We can also compose beats using dseq notation
funky = dseq OpenHihat 8 ".... ...7 .... .7.."
<> dseq ClosedHihat 8 "7777 777. 7777 7.77"
<> dseq SnareDrum1 8 ".... 7..7 .7.7 7..7"
<> dseq BassDrum1 8 "7.7. ..7. ..7. .7.."