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

Safe HaskellNone

Cmd.Load.ModTypes

Description

Types for modules. Theoretically tracker-independent.

Synopsis

Documentation

data Module Source #

Constructors

Module 

Instances

Eq Module # 

Methods

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

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

Show Module # 

data Tempo Source #

Constructors

Tempo 

Fields

Instances

Eq Tempo # 

Methods

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

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

Show Tempo # 

Methods

showsPrec :: Int -> Tempo -> ShowS #

show :: Tempo -> String #

showList :: [Tempo] -> ShowS #

data Block Source #

Constructors

Block 

Fields

Instances

Eq Block # 

Methods

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

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

Show Block # 

Methods

showsPrec :: Int -> Block -> ShowS #

show :: Block -> String #

showList :: [Block] -> ShowS #

data Line Source #

Constructors

Line 

Instances

Eq Line # 

Methods

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

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

Show Line # 

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 !Word8 !Word8 
SetFrames !Int 
Volume !Double

0 to 1

VolumeSlide !Int

positive for up, negative for down

CutBlock 
CutNote 
DelayRepeat !Int !Int

delay frames, repeat each n frames

Instances

command :: Word8 -> Word8 -> Command Source #

Parse a Command.

   01 xx -- slide up, 0 uses previous value
   02 xx -- slide down, 0 uses previous value
   03 xx -- portamento, 0 uses previous value
   04 xy -- vibrato, x speed, y depth
   05 xx -- slide + fade, like 0d but continue slide
   06 xx -- vibrato + fade
   07 xx -- tremolo
   08 xx -- hold + decay
   09 xx -- set tempo.frames
   0b xx -- jump
   0c xx - volume
   0d xy - x crescendo, y decrescendo
   0f 00 - cut block, after this line
   0f 01-f0 - set tempo
   0f f1 - play twice
   0f f2 - delay 1/2
   0f f3 - play thrice
   0f fa - pedal down
   0f fb - pedal up
   0f fe - end song
   0f ff - cut note
   11 - fine slide up
   12 - fine slide down
   14 - fine vibrato
   15 - set fine tune
   16 - loop
   18 - cut note at given frame
   19 - sample start offset *256 bytes
   1a - volue up
   1b - volume down
   1d - jump to next block + line
   1e - retrigger command
   1f xy - delay x frames, repeat every y

   00 - mod wheel
   0e - pan

   1f xx - delay
   

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

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