hmt-diagrams-0.15: Haskell Music Theory Diagrams

Safe HaskellSafe-Inferred
LanguageHaskell98

Music.Theory.Diagram.Sequencer

Contents

Description

Sequencer type diagram.

Synopsis

Documentation

type P2 = (R, R) Source

Point

type Grey = R Source

Greyscale colour.

type C_Rect = (P2, P2, Grey) Source

Coloured rectangle as (lower-left,upper-right,greyscale).

type K_Rect = (Int, C_Rect) Source

C_Rect with identifier.

k_rect_gnuplot :: K_Rect -> String Source

Gnuplot string for K_Rect.

type Seq_Plot_Opt = ((Int, Int), (R, R), (R, R)) Source

Sequencer plot options, (image-size,x-range,y-range). For standard midi data x-range is the time window and y-range is the gamut.

default_seq_plot_opt :: (R, R) -> Seq_Plot_Opt Source

Sane defaults for size and gamut.

to_k_rect :: [C_Rect] -> [K_Rect] Source

Add identifiers.

clean_name :: String -> String Source

Names for SVG terminal have character restrictions.

MIDI

amp_to_grey :: R -> R -> R Source

Linear amplitude to grey scale (0 = white, 1 = black).

map (floor . (* 255) . amp_to_grey (-60)) [0,0.25,0.5,0.75,1] == [255,51,25,10,0]

vel_to_amp :: Int -> R Source

Midi velocity number to linear amplitude.

vel_to_grey :: R -> Int -> R Source

Midi velocity number to grey scale.

type Sequencer_Midi n = Wseq R (n, n) Source

Midi sequence data.

sequencer_midi_to_rect :: Real n => ((R, R), (n, n)) -> C_Rect Source

Convert Sequencer_Midi node to C_Rect.