Popularity
4.4
Declining
Activity
0.0
Stable
3
2
3

Monthly Downloads: 16
Programming language: Haskell
License: MIT License
Tags: Sound     Multimedia    

djembe alternatives and similar packages

Based on the "Sound" category.
Alternatively, view djembe alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of djembe or a related project?

Add another 'Sound' Package

README

Djembe

Djembe is a Haskell embedded domain-specific language for composing drum beats.

Install

Clone the project and run stack install Djembe. Next run stack setup then stack build.

OSX Setup

Open Audio MIDI Setup (Applications -> Utilities) and press ⌘2 (or go Window -> Show MIDI Window). Double click it IAC Driver, then check the box labeled "Device is online." Audio from Djembe should play through Garageband.

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. In ghci (stack ghci):

> 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.."

Inspiration