Euterpea-1.1.1: Library for computer music research and education

Safe HaskellNone
LanguageHaskell98

Euterpea.Examples.LSystems

Documentation

data DetGrammar a Source

Constructors

DetGrammar a [(a, [a])] 

Instances

Show a => Show (DetGrammar a) 

detGenerate :: Eq a => DetGrammar a -> [[a]] Source

data Grammar a Source

Constructors

Grammar a (Rules a) 

Instances

Show a => Show (Grammar a) 

data Rules a Source

Constructors

Uni [Rule a] 
Sto [(Rule a, Prob)] 

Instances

Eq a => Eq (Rules a) 
Ord a => Ord (Rules a) 
Show a => Show (Rules a) 

data Rule a Source

Constructors

Rule 

Fields

lhs :: a
 
rhs :: a
 

Instances

Eq a => Eq (Rule a) 
Ord a => Ord (Rule a) 
Show a => Show (Rule a) 

type ReplFun a = [[(Rule a, Prob)]] -> (a, [Rand]) -> (a, [Rand]) Source

gen :: Ord a => ReplFun a -> Grammar a -> Int -> [a] Source

toStoRules :: (Ord a, Eq a) => Rules a -> Rules a Source

insertProb :: [a] -> [(a, Prob)] Source

checkProbs :: (Ord a, Eq a) => [(Rule a, Prob)] -> Bool Source

sameLHS :: Eq a => (Rule a, Prob) -> (Rule a, Prob) -> Bool Source

generate :: Eq a => ReplFun a -> [(Rule a, Prob)] -> (a, [Rand]) -> [a] Source

data LSys a Source

Constructors

N a 
(LSys a) :+ (LSys a) 
(LSys a) :. (LSys a) 
Id 

Instances

Eq a => Eq (LSys a) 
Ord a => Ord (LSys a) 
Show a => Show (LSys a) 

getNewRHS :: Eq a => [[(Rule a, Prob)]] -> a -> Rand -> a Source

type IR a b = [(a, Music b -> Music b)] Source

interpret :: Eq a => LSys a -> IR a b -> Music b -> Music b Source

data LFun Source

Constructors

Inc 
Dec 
Same 

Instances