hmt-0.16: Haskell Music Theory

Safe HaskellSafe
LanguageHaskell98

Music.Theory.Gamelan

Contents

Synopsis

Documentation

fromJust_err :: String -> Maybe a -> a Source #

fromJust with error message.

Gamelan

data Instrument_Family Source #

Enumeration of gamelan instrument families.

Constructors

Bonang 
Gender 
Gong 
Saron 

Instances

Bounded Instrument_Family Source # 
Enum Instrument_Family Source # 
Eq Instrument_Family Source # 
Ord Instrument_Family Source # 
Read Instrument_Family Source # 
Show Instrument_Family Source # 

data Instrument_Name Source #

Enumeration of Gamelan instruments.

Constructors

Bonang_Barung

Bonang Barung (horizontal gong, middle)

Bonang_Panerus

Bonang Panerus (horizontal gong, high)

Gender_Barung

Gender Barung (key&resonator, middle)

Gender_Panerus

Gender Panembung (key&resonator, high)

Gender_Panembung

Gender Panembung, Slenthem (key&resonator, low)

Gong_Ageng

Gong Ageng (hanging gong, low)

Gong_Suwukan

Gong Suwukan (hanging gong, middle)

Kempul

Kempul (hanging gong, middle)

Kempyang

Kempyang (horizontal gong, high)

Kenong

Kenong (horizontal gong, low)

Ketuk

Ketuk (horizontal gong, middle)

Saron_Barung

Saron Barung, Saron (key, middle)

Saron_Demung

Saron Demung, Demung (key, low)

Saron_Panerus

Saron Panerus, Peking (key, high)

Instances

Bounded Instrument_Name Source # 
Enum Instrument_Name Source # 
Eq Instrument_Name Source # 
Ord Instrument_Name Source # 
Read Instrument_Name Source # 
Show Instrument_Name Source # 

data Scale Source #

Enumeration of Gamelan scales.

Constructors

Pelog 
Slendro 

data Pitch Source #

Constructors

Pitch 

Instances

Eq Pitch Source # 

Methods

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

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

Ord Pitch Source # 

Methods

compare :: Pitch -> Pitch -> Ordering #

(<) :: Pitch -> Pitch -> Bool #

(<=) :: Pitch -> Pitch -> Bool #

(>) :: Pitch -> Pitch -> Bool #

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

max :: Pitch -> Pitch -> Pitch #

min :: Pitch -> Pitch -> Pitch #

Show Pitch Source # 

Methods

showsPrec :: Int -> Pitch -> ShowS #

show :: Pitch -> String #

showList :: [Pitch] -> ShowS #

data Note Source #

Constructors

Note 

Instances

Eq Note Source # 

Methods

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

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

Ord Note Source # 

Methods

compare :: Note -> Note -> Ordering #

(<) :: Note -> Note -> Bool #

(<=) :: Note -> Note -> Bool #

(>) :: Note -> Note -> Bool #

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

max :: Note -> Note -> Note #

min :: Note -> Note -> Note #

Show Note Source # 

Methods

showsPrec :: Int -> Note -> ShowS #

show :: Note -> String #

showList :: [Note] -> ShowS #

data Tone Source #

Instances

Eq Tone Source # 

Methods

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

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

Ord Tone Source #

Orderable if frequency is given.

Methods

compare :: Tone -> Tone -> Ordering #

(<) :: Tone -> Tone -> Bool #

(<=) :: Tone -> Tone -> Bool #

(>) :: Tone -> Tone -> Bool #

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

max :: Tone -> Tone -> Tone #

min :: Tone -> Tone -> Tone #

Show Tone Source # 

Methods

showsPrec :: Int -> Tone -> ShowS #

show :: Tone -> String #

showList :: [Tone] -> ShowS #

plain_tone :: Instrument_Name -> Scale -> Octave -> Degree -> Tone Source #

Constructor for Tone without frequency or annotation.

tone_equivalent :: Tone -> Tone -> Bool Source #

Tones are considered equivalent if they have the same Instrument_Name and Note.

tone_24et_fmidi :: Tone -> Rational Source #

Fractional (rational) 24-et midi note number of Tone.

tone_12et_fmidi :: Tone -> Rational Source #

Fractional (rational) 24-et midi note number of Tone.

type Tone_Subset = ([Instrument_Family], [Scale]) Source #

Specify subset as list of families and scales.

tone_set_near_frequency :: Tone_Set -> Cents -> Frequency -> Tone_Set Source #

Given a Tone_Set, find those Tones that are within Cents of Frequency.

tone_compare_frequency :: Tone -> Tone -> Ordering Source #

Compare Tones by frequency. Tones without frequency compare as if at frequency 0.

map_maybe_uniform :: (a -> Maybe b) -> [a] -> Maybe [b] Source #

If all f of a are Just b, then Just [b], else Nothing.

Tone set