duncanmalashock / elm-music-theory / 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 =
Music.Internal.Pitch.Range

Constructor

range : Music.Internal.Pitch.Pitch -> Music.Internal.Pitch.Pitch -> Range

Construct a range:

range Pitch.c4 Pitch.c6

Helpers

isWithin : Range -> Music.Internal.Pitch.Pitch -> Basics.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 -> Music.Internal.Pitch.Pitch

Get the lower boundary of a range:

min sopranoVoice == Pitch.c4

max : Range -> Music.Internal.Pitch.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 : Music.Internal.Pitch.Range

altoVoice : Music.Internal.Pitch.Range

tenorVoice : Music.Internal.Pitch.Range

bassVoice : Music.Internal.Pitch.Range

Stringed instruments

violin : Music.Internal.Pitch.Range

viola : Music.Internal.Pitch.Range

cello : Music.Internal.Pitch.Range

contrabass : Music.Internal.Pitch.Range

Reed instruments

bassoon : Music.Internal.Pitch.Range

clarinet : Music.Internal.Pitch.Range

oboe : Music.Internal.Pitch.Range

Wind instruments

flute : Music.Internal.Pitch.Range

piccolo : Music.Internal.Pitch.Range

Brass instruments

tuba : Music.Internal.Pitch.Range

frenchHorn : Music.Internal.Pitch.Range

trombone : Music.Internal.Pitch.Range

trumpet : Music.Internal.Pitch.Range

Saxophones

altoSax : Music.Internal.Pitch.Range

baritoneSax : Music.Internal.Pitch.Range

tenorSax : Music.Internal.Pitch.Range

Pitched percussion

marimba : Music.Internal.Pitch.Range

vibraphone : Music.Internal.Pitch.Range

glockenspiel : Music.Internal.Pitch.Range

xylophone : Music.Internal.Pitch.Range