duncanmalashock/elm-music-theory/1.0.0

Music.Range

A range, like a range of numbers, represents an upper and lower boundary and all the pitches in between. E.g. "C4–C6."

type alias Range =
Range

Constructor

range : Pitch -> Pitch -> Range

Construct a range:

range Pitch.c4 Pitch.c6

Helpers

isWithin : Range -> Pitch -> Bool

Find out whether a pitch lies within a range, inclusive of its boundaries.

isWithin (range Pitch.c4 Pitch.c6) Pitch.c5 == True
min : Range -> Pitch

Get the lower boundary of a range:

min sopranoVoice == Pitch.c4
max : Range -> Pitch

Get the upper boundary of a range:

max sopranoVoice == Pitch.c6

Common instrument ranges

All instrument ranges here are defined in concert pitch.

Vocal ranges

sopranoVoice : Range
altoVoice : Range
tenorVoice : Range
bassVoice : Range

Stringed instruments

violin : Range
viola : Range
cello : Range
contrabass : Range

Reed instruments

bassoon : Range
clarinet : Range
oboe : Range

Wind instruments

flute : Range
piccolo : Range

Brass instruments

tuba : Range
frenchHorn : Range
trombone : Range
trumpet : Range

Saxophones

altoSax : Range
baritoneSax : Range
tenorSax : Range

Pitched percussion

marimba : Range
vibraphone : Range
glockenspiel : Range
xylophone : Range