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

Safe HaskellNone

Cmd.Load.Mod

Contents

Description

Convert a M.Module to Ui.State.

Synopsis

Documentation

data State Source #

Constructors

State 

Instances

Eq State # 

Methods

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

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

Show State # 

Methods

showsPrec :: Int -> State -> ShowS #

show :: State -> String #

showList :: [State] -> ShowS #

convert :: Id.Namespace -> M.Module -> Either Ui.Error Ui.State Source #

Make IntMap Instrument map convert_block make @score block using _block_order

score_track :: IntMap (Id.BlockId, ScoreTime.TrackTime) -> [Int] -> Track.Track Source #

Make a score track with calls to the blocks.

convert_block :: State -> M.Block -> ([Track.Track], ScoreTime.TrackTime, Skeleton.Skeleton) Source #

Figure out block length from min (max lines) (first cut_block) map convert_track, merge Notes

nn_to_call :: Pitch.NoteNumber -> Text Source #

TODO surely this exists elsewhere?

convert

data Note Source #

Instances

Eq Note # 

Methods

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

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

Show Note # 

Methods

showsPrec :: Int -> Note -> ShowS #

show :: Note -> String #

showList :: [Note] -> ShowS #

convert_track :: State -> LineNum -> [M.Line] -> [Note] Source #

  • Lookup instrument.

convert_note :: LineNum -> M.Tempo -> M.Instrument -> LineNum -> Pitch.NoteNumber -> [M.Command] -> [(LineNum, M.Line)] -> Note Source #

Figure out note duration: min of time until next line with Pitch>0, or 0fff, or...? Convert Pitch. Collect cmds and convert to Command.

Convert 0d to linear, 01 02 to pitch u or d, 03 to pitch linear.

  • Interpret timing cmds like 1f.

data Call Source #

Constructors

Call !Text !Double 

Instances

Eq Call # 

Methods

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

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

Ord Call # 

Methods

compare :: Call -> Call -> Ordering #

(<) :: Call -> Call -> Bool #

(<=) :: Call -> Call -> Bool #

(>) :: Call -> Call -> Bool #

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

max :: Call -> Call -> Call #

min :: Call -> Call -> Call #

Show Call # 

Methods

showsPrec :: Int -> Call -> ShowS #

show :: Call -> String #

showList :: [Call] -> ShowS #

data CommandType Source #

Single cmds emit a single 0 dur event. Grouped cmds emit an event with the given duration as long as they stay the same.

Constructors

Single 
Grouped 

lines_per_t :: Int Source #

Lines per 1 TrackTime.