Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Derive.Solkattu.Notation

Contents

Description

Generic combinators for solkattu patterns. Because these are expected to be called as part of the dsl, error calls are allowed.

This is meant to have just Sequence manipulation, without instrument-specific functions.

Synopsis

Documentation

type Sequence stroke = [S.Note (Solkattu.Note stroke)] Source #

rests

class Rest a where Source #

Methods

__ :: a Source #

Instances

Rest (Realize.SNote stroke) # 

Methods

__ :: Realize.SNote stroke Source #

Rest (Sequence stroke) # 

Methods

__ :: Sequence stroke Source #

__2 :: Sequence stroke Source #

These are meant to suffix a sollu. Since the sollu is considered part of the duration, the number is one higher than the number of rests. E.g. din.__3 is a 3 count, and equivalent to din...

__3 :: Sequence stroke Source #

These are meant to suffix a sollu. Since the sollu is considered part of the duration, the number is one higher than the number of rests. E.g. din.__3 is a 3 count, and equivalent to din...

__4 :: Sequence stroke Source #

These are meant to suffix a sollu. Since the sollu is considered part of the duration, the number is one higher than the number of rests. E.g. din.__3 is a 3 count, and equivalent to din...

__5 :: Sequence stroke Source #

These are meant to suffix a sollu. Since the sollu is considered part of the duration, the number is one higher than the number of rests. E.g. din.__3 is a 3 count, and equivalent to din...

__6 :: Sequence stroke Source #

These are meant to suffix a sollu. Since the sollu is considered part of the duration, the number is one higher than the number of rests. E.g. din.__3 is a 3 count, and equivalent to din...

__7 :: Sequence stroke Source #

These are meant to suffix a sollu. Since the sollu is considered part of the duration, the number is one higher than the number of rests. E.g. din.__3 is a 3 count, and equivalent to din...

__8 :: Sequence stroke Source #

These are meant to suffix a sollu. Since the sollu is considered part of the duration, the number is one higher than the number of rests. E.g. din.__3 is a 3 count, and equivalent to din...

__9 :: Sequence stroke Source #

These are meant to suffix a sollu. Since the sollu is considered part of the duration, the number is one higher than the number of rests. E.g. din.__3 is a 3 count, and equivalent to din...

__n :: S.Matra -> Sequence stroke Source #

by Duration

splitD :: CallStack.Stack => S.Duration -> Sequence stroke -> (Sequence stroke, Sequence stroke) Source #

rdropD :: S.Duration -> Sequence stroke -> Sequence stroke Source #

rtakeD :: S.Duration -> Sequence stroke -> Sequence stroke Source #

decompose :: CallStack.Stack => S.Duration -> [S.Speed] Source #

Given a duration, return the speeds needed to add up to that duration. Crash if the speed went past 4, which means the duration probably isn't binary.

reverse :: [S.Note a] -> [S.Note a] Source #

by Matra

dropM :: S.Matra -> Sequence stroke -> Sequence stroke Source #

Drop a number of matras from the Sequence.

rdropM :: S.Matra -> Sequence stroke -> Sequence stroke Source #

takeM :: S.Matra -> Sequence stroke -> Sequence stroke Source #

rtakeM :: S.Matra -> Sequence stroke -> Sequence stroke Source #

matrasOfE :: Sequence a -> Either Text S.Matra Source #

Get the number of sollu-matras. Whether or not this corresponds to tala matras depends on the speed.

structures

tri :: Sequence stroke -> Sequence stroke Source #

Repeat thrice, with no karvai.

tri_ :: Sequence stroke -> Sequence stroke -> Sequence stroke Source #

Repeat thrice, with the given separator.

trin :: Sequence stroke -> Sequence stroke -> Sequence stroke -> Sequence stroke -> Sequence stroke Source #

Three different patterns with the same separator.

tri2 :: Sequence stroke -> Sequence stroke -> Sequence stroke -> Sequence stroke Source #

Tirmanams with a variant final repeat.

sequences

repeat :: Monoid a => Int -> a -> a Source #

replicate + mconcat.

join :: Sequence stroke -> [Sequence stroke] -> Sequence stroke Source #

inter :: Sequence stroke -> Sequence stroke -> Sequence stroke Source #

Intersperse between each stroke.

spread :: S.Matra -> Sequence stroke -> Sequence stroke Source #

cmap :: Monoid b => (a -> b) -> [a] -> b Source #

for :: [a] -> (a -> b) -> [b] Source #

cfor :: Monoid b => [a] -> (a -> b) -> b Source #

prefixes :: Monoid a => [a] -> a -> a Source #

Multiple prefixes on a single suffix.

suffixes :: Monoid a => a -> [a] -> a Source #

circum :: Monoid a => a -> [a] -> a -> a Source #

suffix :: Monoid a => [a] -> a -> a Source #

prefix :: Monoid a => a -> [a] -> a Source #

accumulate :: Monoid a => [a] -> [a] Source #

Succesively accumulate suffixes.

combinators

reduce3 :: S.Matra -> Sequence stroke -> Sequence stroke -> Sequence stroke Source #

Reduce three times, with a separator.

reduceTo :: (CallStack.Stack, Pretty stroke) => S.Matra -> S.Matra -> Sequence stroke -> Sequence stroke Source #

reduceToL, except mconcat the result.

reduceToL :: (CallStack.Stack, Pretty stroke) => S.Matra -> S.Matra -> Sequence stroke -> [Sequence stroke] Source #

Reduce by a duration until a final duration.

reduceR :: S.Matra -> Sequence stroke -> [Sequence stroke] Source #

Reduce by dropping the end.

reduceR3 :: S.Matra -> Sequence stroke -> Sequence stroke -> Sequence stroke Source #

expand :: Int -> S.Matra -> Sequence stroke -> [Sequence stroke] Source #

Start fully reduced, and expand n times by the given duration.

replaceEnd :: CallStack.Stack => Sequence stroke -> Sequence stroke -> Sequence stroke Source #

replaceStart :: CallStack.Stack => Sequence stroke -> Sequence stroke -> Sequence stroke Source #

speed :: S.Speed -> [S.Note stroke] -> [S.Note stroke] Source #

Set relative speed.

su :: [S.Note stroke] -> [S.Note stroke] Source #

Mnemonic: speed up, slow down.

sd :: [S.Note stroke] -> [S.Note stroke] Source #

Mnemonic: speed up, slow down.

nadai :: S.Matra -> [S.Note stroke] -> [S.Note stroke] Source #

matra_duration :: S.Duration Source #

I think default_tempo is ok because these functions are used on fragments.

align

__sam :: CallStack.Stack => Tala.Tala -> Sequence stroke -> Sequence stroke Source #

Align to the end of the avartanam, with rests.

This should only be used at the top level, since it gets the timing wrong under a tempo change.

__a :: CallStack.Stack => S.Duration -> Sequence stroke -> Sequence stroke Source #

Align to the end of the given number of aksharams.