Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
Safe HaskellNone

Solkattu.Korvai

Description

Tie together generic Solkattu and specific instruments into a single Korvai.

Synopsis

Documentation

mapSollu :: (a -> b) -> SequenceT a -> SequenceT b Source #

korvai

data Korvai Source #

Instances

Instances details
Eq Korvai # 
Instance details

Defined in Solkattu.Korvai

Methods

(==) :: Korvai -> Korvai -> Bool #

(/=) :: Korvai -> Korvai -> Bool #

Show Korvai # 
Instance details

Defined in Solkattu.Korvai

Generics.Generic Korvai # 
Instance details

Defined in Solkattu.Korvai

Associated Types

type Generics.Rep Korvai :: Type -> Type #

Pretty.Pretty Korvai # 
Instance details

Defined in Solkattu.Korvai

type Generics.Rep Korvai # 
Instance details

Defined in Solkattu.Korvai

data Realized Source #

Instances

Instances details
Eq Realized # 
Instance details

Defined in Solkattu.Korvai

Show Realized # 
Instance details

Defined in Solkattu.Korvai

Generics.Generic Realized # 
Instance details

Defined in Solkattu.Korvai

Associated Types

type Generics.Rep Realized :: Type -> Type #

Pretty.Pretty Realized # 
Instance details

Defined in Solkattu.Korvai

type Generics.Rep Realized # 
Instance details

Defined in Solkattu.Korvai

data RealizedSections stroke Source #

Instances

Instances details
Eq stroke => Eq (RealizedSections stroke) # 
Instance details

Defined in Solkattu.Korvai

Methods

(==) :: RealizedSections stroke -> RealizedSections stroke -> Bool #

(/=) :: RealizedSections stroke -> RealizedSections stroke -> Bool #

Show stroke => Show (RealizedSections stroke) # 
Instance details

Defined in Solkattu.Korvai

Methods

showsPrec :: Int -> RealizedSections stroke -> ShowS #

show :: RealizedSections stroke -> String #

showList :: [RealizedSections stroke] -> ShowS #

Pretty.Pretty (RealizedSections stroke) # 
Instance details

Defined in Solkattu.Korvai

data KorvaiType Source #

This is a hack so I can have both Solkattu.Sollu sequences and instrument specific ones. It induces a similar hack in Instrument, instFromMridangam.

This is really clumsy and doesn't scale, but I tried for weeks and came up with 4 or 5 different approaches and none of them worked.

Instances

Instances details
Eq KorvaiType # 
Instance details

Defined in Solkattu.Korvai

Show KorvaiType # 
Instance details

Defined in Solkattu.Korvai

Pretty.Pretty KorvaiType # 
Instance details

Defined in Solkattu.Korvai

Section

data Section a Source #

Constructors

Section 

Fields

Instances

Instances details
Functor Section # 
Instance details

Defined in Solkattu.Korvai

Methods

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

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

Eq a => Eq (Section a) # 
Instance details

Defined in Solkattu.Korvai

Methods

(==) :: Section a -> Section a -> Bool #

(/=) :: Section a -> Section a -> Bool #

Show a => Show (Section a) # 
Instance details

Defined in Solkattu.Korvai

Methods

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

show :: Section a -> String #

showList :: [Section a] -> ShowS #

Generics.Generic (Section a) # 
Instance details

Defined in Solkattu.Korvai

Associated Types

type Generics.Rep (Section a) :: Type -> Type #

Methods

from :: Section a -> Generics.Rep (Section a) x #

to :: Generics.Rep (Section a) x -> Section a #

Pretty.Pretty a => Pretty.Pretty (Section a) # 
Instance details

Defined in Solkattu.Korvai

type Generics.Rep (Section a) # 
Instance details

Defined in Solkattu.Korvai

Instrument

data Instrument stroke Source #

Tie together everything describing how to realize a single instrument.

Constructors

Instrument 

Fields

data GInstrument Source #

An existential type to capture the Notation instance.

Constructors

forall stroke.Solkattu.Notation stroke => GInstrument (Instrument stroke) 

realize

type Flat stroke = S.Flat (Realize.Group (Realize.Stroke stroke)) (Realize.Note stroke) Source #

Fully realized notes.

realize :: Solkattu.Notation stroke => Instrument stroke -> Korvai -> [Either.Either Error ([Flat stroke], [Realize.Warning])] Source #

Realize a Korvai on a particular instrument.

matchedSollus :: (Pretty.Pretty sollu, Ord sollu) => Realize.ToStrokes sollu stroke -> Tala.Tala -> Section (SequenceT sollu) -> Set (Realize.SolluMapKey sollu) Source #

inferNadai :: [Flat stroke] -> S.Nadai Source #

flatten :: [S.Note g (Solkattu.Note sollu)] -> [S.Flat g (Solkattu.Note sollu)] Source #

spaces :: S.Nadai -> S.Duration -> Either.Either Error [S.Flat g (Realize.Note sollu)] Source #

Generate enough Solkattu.Offset spaces to align the score to the given start Duration.

transform

lint

lint :: Pretty.Pretty stroke => Instrument stroke -> [Sequence] -> Korvai -> Text Source #

Show the shadowed strokes, except an ok set. It's ok to shadow the builtins.

Metadata

data Metadata Source #

Attach some metadata to a Korvai.

Instances

Instances details
Eq Metadata # 
Instance details

Defined in Solkattu.Korvai

Show Metadata # 
Instance details

Defined in Solkattu.Korvai

Generics.Generic Metadata # 
Instance details

Defined in Solkattu.Korvai

Associated Types

type Generics.Rep Metadata :: Type -> Type #

Semigroup Metadata # 
Instance details

Defined in Solkattu.Korvai

Monoid Metadata # 
Instance details

Defined in Solkattu.Korvai

Pretty.Pretty Metadata # 
Instance details

Defined in Solkattu.Korvai

type Generics.Rep Metadata # 
Instance details

Defined in Solkattu.Korvai

type Location = (Text, Int, Text) Source #

(module, lineNumber, variableName)

infer

inferMetadata :: Korvai -> Korvai Source #

This is called in Solkattu.All, thanks to Solkattu.ExtractKorvais.

It used to be called in the korvai and mridangamKorvai constructors, but it was confusing how it wouldn't see modifications done after construction.

types

type StrokeMap stroke = Either.Either Error (Realize.StrokeMap stroke) Source #

The Left is from Realize.strokeMap, e.g. if stroke lengths don't match.

data StrokeMaps Source #

Instances

Instances details
Eq StrokeMaps # 
Instance details

Defined in Solkattu.Korvai

Show StrokeMaps # 
Instance details

Defined in Solkattu.Korvai

Generics.Generic StrokeMaps # 
Instance details

Defined in Solkattu.Korvai

Associated Types

type Generics.Rep StrokeMaps :: Type -> Type #

Semigroup StrokeMaps # 
Instance details

Defined in Solkattu.Korvai

Monoid StrokeMaps # 
Instance details

Defined in Solkattu.Korvai

Pretty.Pretty StrokeMaps # 
Instance details

Defined in Solkattu.Korvai

type Generics.Rep StrokeMaps # 
Instance details

Defined in Solkattu.Korvai