Safe Haskell | Safe-Inferred |
---|
Types for modules. Theoretically tracker-independent.
Synopsis
- data Module = Module {
- _instruments :: IntMap Instrument
- _default_tempo :: !Tempo
- _blocks :: [Block]
- _block_order :: Map Text [Int]
- data Tempo = Tempo {}
- data Instrument = Instrument {
- _instrument_name :: !ScoreT.Instrument
- _volume :: !(Maybe Double)
- data Block = Block {
- _block_length :: !Int
- _tracks :: [Track]
- type Track = IntMap Line
- make_track :: [(Int, Line)] -> Track
- data Line = Line {
- _pitch :: !(Maybe Pitch.NoteNumber)
- _instrument :: !Int
- _commands :: ![Command]
- pitch :: Int -> Maybe Pitch.NoteNumber
- data Command
- commands :: [(Int, Int)] -> [Command]
- med_command :: Word8 -> Word8 -> Command
- med_command_names :: Map Word8 Text
- volume :: Integral a => a -> Double
- split4 :: Word8 -> (Int, Int)
- carry_zeroes :: Track -> Track
- map_instruments :: Map Text Text -> Module -> Module
- transpose_instruments :: Map ScoreT.Instrument Pitch.NoteNumber -> Module -> Module
- modify_lines :: (Line -> Line) -> Module -> Module
- modify_tracks :: (Track -> Track) -> Module -> Module
Documentation
Module | |
|
data Instrument Source #
Instances
Show Instrument Source # | |
Defined in Cmd.Load.ModT showsPrec :: Int -> Instrument -> ShowS # show :: Instrument -> String # showList :: [Instrument] -> ShowS # | |
Eq Instrument Source # | |
Defined in Cmd.Load.ModT (==) :: Instrument -> Instrument -> Bool # (/=) :: Instrument -> Instrument -> Bool # |
Block | |
|
Line | |
|
pitch :: Int -> Maybe Pitch.NoteNumber Source #
0 = no note 1 = NN.c_1. This is right for MIDI instruments, but not for samples.
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.