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

Cmd.Load.ModT

Contents

Description

Types for modules. Theoretically tracker-independent.

Synopsis

Documentation

data Module Source #

Constructors

Module 

Fields

Instances

Instances details
Show Module Source # 
Instance details

Defined in Cmd.Load.ModT

Eq Module Source # 
Instance details

Defined in Cmd.Load.ModT

Methods

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

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

data Tempo Source #

Constructors

Tempo 

Fields

Instances

Instances details
Show Tempo Source # 
Instance details

Defined in Cmd.Load.ModT

Methods

showsPrec :: Int -> Tempo -> ShowS #

show :: Tempo -> String #

showList :: [Tempo] -> ShowS #

Eq Tempo Source # 
Instance details

Defined in Cmd.Load.ModT

Methods

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

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

data Instrument Source #

Instances

Instances details
Show Instrument Source # 
Instance details

Defined in Cmd.Load.ModT

Eq Instrument Source # 
Instance details

Defined in Cmd.Load.ModT

data Block Source #

Constructors

Block 

Fields

Instances

Instances details
Show Block Source # 
Instance details

Defined in Cmd.Load.ModT

Methods

showsPrec :: Int -> Block -> ShowS #

show :: Block -> String #

showList :: [Block] -> ShowS #

Eq Block Source # 
Instance details

Defined in Cmd.Load.ModT

Methods

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

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

type Track = IntMap Line Source #

Empty lines are common, so this uses IntMap as a sparse array.

data Line Source #

Constructors

Line 

Instances

Instances details
Show Line Source # 
Instance details

Defined in Cmd.Load.ModT

Methods

showsPrec :: Int -> Line -> ShowS #

show :: Line -> String #

showList :: [Line] -> ShowS #

Eq Line Source # 
Instance details

Defined in Cmd.Load.ModT

Methods

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

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

pitch :: Int -> Maybe Pitch.NoteNumber Source #

0 = no note 1 = NN.c_1. This is right for MIDI instruments, but not for samples.

data Command Source #

Constructors

Command !Text !Word8 
SetFrames !Int 
Volume !Double

0 to 1

VolumeSlide !Double

positive for up, negative for down

CutBlock 
CutNote 
DelayRepeat !Int !Int

delay frames, repeat each n frames

Instances

Instances details
Show Command Source # 
Instance details

Defined in Cmd.Load.ModT

Eq Command Source # 
Instance details

Defined in Cmd.Load.ModT

Methods

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

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

med_command :: Word8 -> Word8 -> Command Source #

Parse a Command.

volume :: Integral a => a -> Double Source #

MED volume goes from 0 to 0x64 (aka 100) instead of 0 to 0x40.

carry_zeroes :: Track -> Track Source #

A Command arg of 0 is often a shorthand to carry forward the previous value. Eliminate this by doing the carry.

transform