Bang-0.1.0.6: A Drum Machine DSL for Haskell

Copyright(c) Benjamin Kovach, 2014
LicenseMIT
Maintainerbkovach13@gmail.com
Stabilityexperimental
PortabilityMac OSX
Safe HaskellSafe-Inferred
LanguageHaskell2010

Bang.Music.Transform

Description

This module exports a number of functions to manipulate compositions in various ways.

Synopsis

Documentation

reverseMusic :: Music Dur b -> Music Dur b Source

Reverses a composition

mirror :: Music Dur b -> Music Dur b Source

Play a composition forwards, then backwards.

mirrorR :: Music Dur b -> Music Dur b Source

Play a composition backwards, then forwards.

cross :: Music Dur b -> Music Dur b Source

Play a composition forwards and backwards concurrently.

takeDur :: Dur -> Music Dur b -> Music Dur b Source

Take the first d duration units of a composition.

dropDur :: Dur -> Music Dur b -> Music Dur b Source

Drop the first d duration units of a composition.

partitionDur :: Dur -> Music Dur b -> (Music Dur b, Music Dur b) Source

Split a composition at a specific duration and return the composition before said duration along with the rest of it.

hushFor :: Dur -> Music Dur b -> Music Dur b Source

Turn the first d duration units of a composition into silence.

hushFrom :: Dur -> Music Dur b -> Music Dur b Source

Turn the rest of a composition into silence after d duration units.

hushAt :: Dur -> Dur -> Music Dur b -> Music Dur b Source

Turn the section of a composition between pos and d into silence.

poly :: (Dur, Music Dur b) -> (Dur, Music Dur b) -> Music Dur b Source

Play a polyrhythm with m having units of length 1/x and n with units of length 1/y

Example:

poly (3, 3 #> bd) (4, 4 #> sn)

withDuration :: Dur -> Music Dur b -> Music Dur b Source

Set the duration of a composition

repl :: Num a => Int -> Music a b -> Music a b Source

Replicate a composition n times.

rep :: Num a => Music a b -> Music a b Source

Infinitely repeat a composition.

fitL :: Music Dur b -> Music Dur b -> Music Dur b Source

Fit the duration of b to the duration of a

fitR :: Music Dur b -> Music Dur b -> Music Dur b Source

Fit the duration of a into the duration of b

normalize :: Dur -> [Music Dur b] -> Music Dur b Source

Normalize the durations of each value in a list of Compositions to d and compose them sequentially.

normalizeC :: Dur -> [Music Dur b] -> Music Dur b Source

Normalize the durations of each value in a list of Compositions to d and compose them concurrently.

normalize1 :: [Music Dur b] -> Music Dur b Source

Normalize each composition's duration to the duration of the first element in the list and compose sequentially.

normalizeC1 :: [Music Dur b] -> Music Dur b Source

Normalize each composition's duration to the duration of the first element in the list and compose concurrently.