tidal-1.9.0: Pattern language for improvised music
Safe HaskellSafe-Inferred
LanguageHaskell2010

Sound.Tidal.ParseBP

Synopsis

Documentation

data TPat a where Source #

AST representation of patterns

Constructors

TPat_Atom :: Maybe ((Int, Int), (Int, Int)) -> a -> TPat a 
TPat_Fast :: TPat Time -> TPat a -> TPat a 
TPat_Slow :: TPat Time -> TPat a -> TPat a 
TPat_DegradeBy :: Int -> Double -> TPat a -> TPat a 
TPat_CycleChoose :: Int -> [TPat a] -> TPat a 
TPat_Euclid :: TPat Int -> TPat Int -> TPat Int -> TPat a -> TPat a 
TPat_Stack :: [TPat a] -> TPat a 
TPat_Polyrhythm :: Maybe (TPat Rational) -> [TPat a] -> TPat a 
TPat_Seq :: [TPat a] -> TPat a 
TPat_Silence :: TPat a 
TPat_Foot :: TPat a 
TPat_Elongate :: Rational -> TPat a -> TPat a 
TPat_Repeat :: Int -> TPat a -> TPat a 
TPat_EnumFromTo :: TPat a -> TPat a -> TPat a 
TPat_Var :: String -> TPat a 
TPat_Chord :: (Num b, Enum b, Parseable b, Enumerable b) => (b -> a) -> TPat b -> TPat String -> [TPat [Modifier]] -> TPat a 

Instances

Instances details
Functor TPat Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Methods

fmap :: (a -> b) -> TPat a -> TPat b #

(<$) :: a -> TPat b -> TPat a #

Show a => Show (TPat a) Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Methods

showsPrec :: Int -> TPat a -> ShowS #

show :: TPat a -> String #

showList :: [TPat a] -> ShowS #

tShowList :: Show a => [TPat a] -> String Source #

tShow :: Show a => TPat a -> String Source #

steps_size :: Show a => [TPat a] -> [(Rational, String)] Source #

class Parseable a where Source #

Minimal complete definition

tPatParser, doEuclid

Instances

Instances details
Parseable Rational Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Parseable ColourD Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Parseable Note Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Parseable String Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Parseable Integer Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Parseable Bool Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Parseable Char Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Parseable Double Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Parseable Int Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Parseable [Modifier] Source # 
Instance details

Defined in Sound.Tidal.ParseBP

class Enumerable a where Source #

Methods

fromTo :: a -> a -> Pattern a Source #

fromThenTo :: a -> a -> a -> Pattern a Source #

Instances

Instances details
Enumerable Rational Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Enumerable ColourD Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Enumerable Note Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Enumerable String Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Enumerable Integer Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Enumerable Bool Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Enumerable Char Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Enumerable Double Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Enumerable Int Source # 
Instance details

Defined in Sound.Tidal.ParseBP

Enumerable [Modifier] Source # 
Instance details

Defined in Sound.Tidal.ParseBP

enumFromTo' :: (Ord a, Enum a) => a -> a -> Pattern a Source #

enumFromThenTo' :: (Ord a, Enum a, Num a) => a -> a -> a -> Pattern a Source #

data Sign Source #

Constructors

Positive 
Negative 

applySign :: Num a => Sign -> a -> a Source #

parseChord :: (Enum a, Num a) => MyParser [a] Source #

pE :: TPat a -> MyParser (TPat a) Source #

isInt :: RealFrac a => a -> Bool Source #

pChord :: (Enum a, Num a, Parseable a, Enumerable a) => TPat a -> MyParser (TPat a) Source #

Orphan instances

(Enumerable a, Parseable a) => IsString (Pattern a) Source # 
Instance details

Methods

fromString :: String -> Pattern a #