hmt-0.20: Haskell Music Theory
Safe HaskellSafe-Inferred
LanguageHaskell2010

Music.Theory.Tuning.Load

Description

Functions to load a tuning definition and transform it into a sparse tuning function.

Synopsis

Documentation

load_cps_tbl :: FilePath -> IO [(Midi, Double)] Source #

Load possibly sparse and possibly one-to-many (midi-note-number,cps-frequency) table from Csv file.

load_cps_tbl "/home/rohan/dr.csv"

load_tuning_scl :: String -> IO Tuning Source #

Load scala scl file as Tuning.

type Load_Tuning_Opt = (String, Double, Midi) Source #

cps = (tuning-name,frequency-zero,midi-note-number-of-f0) d12 = (tuning-name,cents-deviation,midi-note-offset)

load_tuning_tbl :: Load_Tuning_Opt -> IO Sparse_Midi_Tuning_f Source #

Lookup first matching element in table.

type Choose_f st t = [t] -> st -> (t, st) Source #

default_choose_f :: RandomGen g => Choose_f g t Source #

Randomly choose from elements in table, equal weighting.

load_tuning_tbl_st :: Choose_f st (Midi, Double) -> Load_Tuning_Opt -> IO (Sparse_Midi_Tuning_St_f st) Source #

Load tuning table with stateful selection function for one-to-many entries.