hmt-0.15: Haskell Music Theory

Safe Haskell | Safe
Language | Haskell98

Music.Theory.Time.Notation

Synopsis

- type FSEC = Double
- type MINSEC = (Int, Int)
- type MINCSEC = (Int, Int, Int)
- fsec_to_minsec :: FSEC -> MINSEC
- minsec_pp :: MINSEC -> String
- fsec_to_mincsec :: FSEC -> MINCSEC
- mincsec_pp :: MINCSEC -> String
- span_pp :: (t -> String) -> (t, t) -> String

# Documentation

type FSEC = Double Source #

Fractional seconds.

type MINSEC = (Int, Int) Source #

Minutes, seconds as `(min,sec)`

type MINCSEC = (Int, Int, Int) Source #

Minutes, seconds, centi-seconds as `(min,sec,csec)`

fsec_to_minsec :: FSEC -> MINSEC Source #

Fractional seconds to `(min,sec)`.

    map fsec_to_minsec [59.49,60,60.51] == [(0,59),(1,0),(1,1)]

minsec_pp :: MINSEC -> String Source #

`MINSEC` pretty printer.

    map (minsec_pp . fsec_to_minsec) [59,61] == ["00:59","01:01"]

fsec_to_mincsec :: FSEC -> MINCSEC Source #

Fractional seconds to `(min,sec,csec)`.

    map fsec_to_mincsec [1,1.5,4/3] == [(0,1,0),(0,1,50),(0,1,33)]

mincsec_pp :: MINCSEC -> String Source #

`MINCSEC` pretty printer.

    map (mincsec_pp . fsec_to_mincsec) [1,4/3] == ["00:01.00","00:01.33"]

span_pp :: (t -> String) -> (t, t) -> String Source #