Karya, built on 2022-03-21T01:30:44 (patch 89d1651424c35e564138d93424a157ff87457245)
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)) 
-> Korvai.Korvai 
-> ([Text], Bool)

(lines, hadError)