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

Solkattu.Format.Terminal

Description

Convert realized S.Flat output to text for the terminal.

Synopsis

Documentation

writeAll :: FilePath -> Format.Abstraction -> Korvai.Korvai -> IO () Source #

Write all instrument realizations.

data Config Source #

Constructors

Config 

Fields

  • _rulerEach :: !Int

    Show the ruler on multiples of this line as a reminder. The ruler is always shown if it changes. It should be a multiple of 2 to avoid getting the second half of a talam in case it's split in half.

  • _terminalWidth :: !Int
     
  • _overrideStrokeWidth :: !(Maybe Int)

    Normally format tries to figure out a with for each stroke according to what will fit on the screen. But it assumes notation is always at most one character per time unit. This hardcodes the width for e.g. konnakol, where a sollu like thom can be 4 characters wide.

  • _abstraction :: !Format.Abstraction
     

Instances

Instances details
Eq Config # 
Instance details

Defined in Solkattu.Format.Terminal

Methods

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

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

Show Config # 
Instance details

Defined in Solkattu.Format.Terminal

formatInstrument Source #

Arguments

:: (Solkattu.Notation stroke1, Solkattu.Notation stroke2) 
=> Config 
-> Korvai.Instrument stroke1 
-> (Realize.Stroke stroke1 -> Maybe (Realize.Stroke stroke2)) 
-> Korvai.Korvai 
-> ([Text], Bool)

(lines, hadError)