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

Music.Theory.Tuning.Graph.Iset

Contents

Description

Tuning graph with edges determined by interval set.

Synopsis

R

type R = Rational Source #

R = Rational

r_flip :: R -> R Source #

Flip a ratio in (1,2) and multiply by 2.

import Data.Ratio {- base -}
map r_flip [5%4,3%2,7%4] == [8%5,4%3,8%7]
map r_flip [3/2,5/4,7/4] == [4/3,8/5,8/7]

r_nrm :: R -> R Source #

r = ratio, nrm = normalise

r_rel :: (R, R) -> R Source #

The folded interval from p to q.

r_rel (1,3/2) == 4/3

iset_sym :: [R] -> [R] Source #

The interval set i and it's r_flip.

rem_oct :: [R] -> [R] Source #

Require r to have a perfect octave as last element, and remove it.

r_pcset :: [R] -> [Int] Source #

r_is_pcset :: [Int] -> [R] -> Bool Source #

Does [R] construct indicated pcset.

G

type G = Gr R Source #

Edges are (v1,v2) where v1 < v2

edj_r :: (R, R) -> R Source #

mk_graph :: [R] -> [R] -> G Source #

The graph with vertices scl_r and all edges where the interval (i,j) is in iset.

gen_graph :: Ord v => [Dot_Meta_Attr] -> Graph_Pp v e -> [Edge_Lbl v e] -> [String] Source #

g_to_dot :: Int -> [(String, String)] -> (R -> [(String, String)]) -> G -> [String] Source #

SCALA

scl_to_dot :: ([R], Int, [(String, String)], R -> [(String, String)]) -> String -> IO [String] Source #

Fgl

mk_graph_fgl :: [R] -> [R] -> Gr R R Source #