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

Cmd.Load.Mod

Contents

Description

Convert a ModT.Module to Ui.State.

Synopsis

Documentation

data State Source #

Instances

Instances details
Show State Source # 
Instance details

Defined in Cmd.Load.Mod

Methods

showsPrec :: Int -> State -> ShowS #

show :: State -> String #

showList :: [State] -> ShowS #

Eq State Source # 
Instance details

Defined in Cmd.Load.Mod

Methods

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

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

convert :: Id.Namespace -> ModT.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 -> ModT.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

Instances details
Show Note Source # 
Instance details

Defined in Cmd.Load.Mod

Methods

showsPrec :: Int -> Note -> ShowS #

show :: Note -> String #

showList :: [Note] -> ShowS #

Eq Note Source # 
Instance details

Defined in Cmd.Load.Mod

Methods

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

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

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

  • Lookup instrument.

convert_note :: LineNum -> ModT.Tempo -> ModT.Instrument -> LineNum -> Pitch.NoteNumber -> [ModT.Command] -> [(LineNum, ModT.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

Instances details
Show Call Source # 
Instance details

Defined in Cmd.Load.Mod

Methods

showsPrec :: Int -> Call -> ShowS #

show :: Call -> String #

showList :: [Call] -> ShowS #

Eq Call Source # 
Instance details

Defined in Cmd.Load.Mod

Methods

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

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

Ord Call Source # 
Instance details

Defined in Cmd.Load.Mod

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 #

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 !Text

Take a group key since VolumeSlide can group df with d.

lines_per_t :: Int Source #

Lines per 1 TrackTime.