Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

Solkattu.Format.Terminal

Description

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

Synopsis

Documentation

renderAll :: Format.Abstraction -> Korvai.Score -> [Text] Source #

Render 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
Show Config Source # 
Instance details

Defined in Solkattu.Format.Terminal

Eq Config Source # 
Instance details

Defined in Solkattu.Format.Terminal

Methods

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

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

formatInstrument Source #

Arguments

:: (Solkattu.Notation stroke1, Solkattu.Notation stroke2, Ord stroke1) 
=> Config 
-> Korvai.Instrument stroke1 
-> (Realize.Stroke stroke1 -> Maybe (Realize.Stroke stroke2))

postproc used to split wadon/lanang

-> Korvai.Korvai 
-> ([Text], Bool)

(lines, hadError)