Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
Safe HaskellNone

Cmd.Load.ModT

Contents

Description

Types for modules. Theoretically tracker-independent.

Synopsis

Documentation

data Module Source #

Constructors

Module 

Fields

Instances

Instances details
Eq Module # 
Instance details

Defined in Cmd.Load.ModT

Methods

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

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

Show Module # 
Instance details

Defined in Cmd.Load.ModT

data Tempo Source #

Constructors

Tempo 

Fields

Instances

Instances details
Eq Tempo # 
Instance details

Defined in Cmd.Load.ModT

Methods

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

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

Show Tempo # 
Instance details

Defined in Cmd.Load.ModT

Methods

showsPrec :: Int -> Tempo -> ShowS #

show :: Tempo -> String #

showList :: [Tempo] -> ShowS #

data Instrument Source #

Instances

Instances details
Eq Instrument # 
Instance details

Defined in Cmd.Load.ModT

Show Instrument # 
Instance details

Defined in Cmd.Load.ModT

data Block Source #

Constructors

Block 

Fields

Instances

Instances details
Eq Block # 
Instance details

Defined in Cmd.Load.ModT

Methods

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

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

Show Block # 
Instance details

Defined in Cmd.Load.ModT

Methods

showsPrec :: Int -> Block -> ShowS #

show :: Block -> String #

showList :: [Block] -> ShowS #

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
Eq Line # 
Instance details

Defined in Cmd.Load.ModT

Methods

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

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

Show Line # 
Instance details

Defined in Cmd.Load.ModT

Methods

showsPrec :: Int -> Line -> ShowS #

show :: Line -> String #

showList :: [Line] -> ShowS #

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
Eq Command # 
Instance details

Defined in Cmd.Load.ModT

Methods

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

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

Show Command # 
Instance details

Defined in Cmd.Load.ModT

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