Safe Haskell | None |
---|---|
Language | Haskell2010 |
Clefs and staff positions.
- data StaffLines
- data HalfSpaces
- type ClefLine = StaffLines
- data ClefSymbol
- = GClef
- | CClef
- | FClef
- | PercClef
- | NeutralClef
- type ClefOctave = Integer
- newtype Clef = Clef {
- getClef :: (ClefSymbol, ClefOctave, ClefLine)
- symbolName :: ClefSymbol -> String
- symbolPitch :: ClefSymbol -> Maybe Pitch
- positionPitch :: Clef -> StaffLines -> Maybe Pitch
- pitchPosition :: Clef -> Pitch -> Maybe StaffLines
- isModernClef :: Clef -> Bool
- isHistoricalClef :: Clef -> Bool
- isVoiceClef :: Clef -> Bool
- trebleClef :: Clef
- bassClef :: Clef
- sopranoClef :: Clef
- mezzoSopranoClef :: Clef
- altoClef :: Clef
- tenorClef :: Clef
- baritoneClef :: Clef
Staff lines
data StaffLines Source
Represents staff number relative middle. Staff zero is either the middle staff, or if using an even number of lines, the staff below the middle space.
data HalfSpaces Source
Represents the difference betwee staff positions (often corresponding to one diatonic step).
type ClefLine = StaffLines Source
Clef representation
data ClefSymbol Source
Common clef symbols
type ClefOctave = Integer Source
Clef | |
|
symbolName :: ClefSymbol -> String Source
Return the English name of the given clef.
symbolPitch :: ClefSymbol -> Maybe Pitch Source
Return the pitch implied by the given clef at the middle space or line.
positionPitch :: Clef -> StaffLines -> Maybe Pitch Source
pitchPosition :: Clef -> Pitch -> Maybe StaffLines Source
Properties
isModernClef :: Clef -> Bool Source
Is this a clef used in contemporary notation?
isHistoricalClef :: Clef -> Bool Source
Is this an historical clef?
isVoiceClef :: Clef -> Bool Source
Is this a traditional voice clef, i.e. a C clef on some staff.
Standard clefs
trebleClef :: Clef Source
Standard treble clef.
Standard soprano clef.
mezzoSopranoClef :: Clef Source
Standard mezzo soprano clef.
Standard baritone clef.