AlgoRhythm-0.1.0.0: Algorithmic music composition

Music.Transformations

Contents

Synopsis

# Documentation

class Transposable a where Source #

Operator precedence.

Anything that can be transposed with an Interval.

Minimal complete definition

Methods

trans, trans_, snart, snart_ :: Interval -> a -> a Source #

(~>), (<~), (~~>), (<~~) :: a -> Interval -> a infixl 5 ~>, <~, ~~>, <~~ Source #

Instances

 Source # Methodstrans :: Interval -> a -> a Source #trans_ :: Interval -> a -> a Source #snart :: Interval -> a -> a Source #snart_ :: Interval -> a -> a Source #(~>) :: a -> Interval -> a Source #(<~) :: a -> Interval -> a Source #(~~>) :: a -> Interval -> a Source #(<~~) :: a -> Interval -> a Source # Source # Methods Transposable a => Transposable [a] Source # Methodstrans :: Interval -> [a] -> [a] Source #trans_ :: Interval -> [a] -> [a] Source #snart :: Interval -> [a] -> [a] Source #snart_ :: Interval -> [a] -> [a] Source #(~>) :: [a] -> Interval -> [a] Source #(<~) :: [a] -> Interval -> [a] Source #(~~>) :: [a] -> Interval -> [a] Source #(<~~) :: [a] -> Interval -> [a] Source # Source # Methodstrans :: Interval -> Music a -> Music a Source #trans_ :: Interval -> Music a -> Music a Source #snart :: Interval -> Music a -> Music a Source #snart_ :: Interval -> Music a -> Music a Source #(~>) :: Music a -> Interval -> Music a Source #(<~) :: Music a -> Interval -> Music a Source #(~~>) :: Music a -> Interval -> Music a Source #(<~~) :: Music a -> Interval -> Music a Source #

class Invertible f a where Source #

Minimal complete definition

invert

Methods

invert :: f a -> f a Source #

invertN :: Int -> f a -> f a Source #

Instances

 Source # Methodsinvert :: [Interval] -> [Interval] Source #invertN :: Int -> [Interval] -> [Interval] Source # Source # Methodsinvert :: [AbsPitch] -> [AbsPitch] Source #invertN :: Int -> [AbsPitch] -> [AbsPitch] Source # Source # Methodsinvert :: [Pitch] -> [Pitch] Source #invertN :: Int -> [Pitch] -> [Pitch] Source # (Show a, Invertible [] a) => Invertible Music a Source # Methodsinvert :: Music a -> Music a Source #invertN :: Int -> Music a -> Music a Source # Invertible [] a => Invertible [] (Maybe a) Source # Methodsinvert :: [Maybe a] -> [Maybe a] Source #invertN :: Int -> [Maybe a] -> [Maybe a] Source # Invertible [] a => Invertible [] (a, b) Source # Methodsinvert :: [(a, b)] -> [(a, b)] Source #invertN :: Int -> [(a, b)] -> [(a, b)] Source #

class Retrogradable f a where Source #

Minimal complete definition

(><)

Methods

(><) :: f a -> f a Source #

Instances

 Retrogradable [] a Source # Methods(><) :: [a] -> [a] Source # Source # Methods(><) :: Music a -> Music a Source #

class Repeatable a where Source #

Anything that can be repeated a number of times.

Minimal complete definition

(##)

Methods

(##) :: Int -> a -> a infix 2 Source #

Instances

 Source # Methods(##) :: Int -> Music a -> Music a Source #

class Scalable a where Source #

Anything that can be scaled up/down.

Minimal complete definition

(*~)

Methods

(*~) :: Rational -> a -> a infix 3 Source #

Instances

 Source # Methods Scalable a => Scalable [a] Source # Methods(*~) :: Rational -> [a] -> [a] Source # Source # Methods(*~) :: Rational -> Music a -> Music a Source #

musicToList :: Music a -> [(Maybe a, Duration)] Source #

Conversion to/from List.

normalize :: Music a -> Music a Source #

Normalize nested application of sequential composition.

# Orphan instances

 (Enum a, BoundEnum a) => Num a Source # Methods(+) :: a -> a -> a #(-) :: a -> a -> a #(*) :: a -> a -> a #negate :: a -> a #abs :: a -> a #signum :: a -> a #fromInteger :: Integer -> a #