GIS-0.0.7.6: An implementation of David Lewin's Generalized Interval Systems
Copyright(c) Eric Bailey 2021-2025
LicenseMIT
Maintainereric@ericb.me
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Pitch

Description

A pitch consists of a pitch class and an octave.

Synopsis

Documentation

newtype Pitch a Source #

A pitch consists of a pitch class and an octave.

Constructors

Pitch 

Fields

Instances

Instances details
PitchSpace space => GIS (Pitch space) Source #

For a pitch space \(S\) (Pitch space), where intervals are representable as integers, there exists a GIS (S, (ℤ, +), int), where pitches are labeled via labelPitch and ref = 0.

Instance details

Defined in Data.GIS

Associated Types

type Interval space 
Instance details

Defined in Data.GIS

type Interval space = IntervalOf space
type Interval (Pitch space) 
Instance details

Defined in Data.GIS

type Interval (Pitch space) = IntervalOf (Pitch space)

Methods

ref :: Pitch space Source #

int :: Pitch space -> Pitch space -> Interval (Pitch space) Source #

label :: Pitch space -> Interval (Pitch space) Source #

Bounded a => Bounded (Pitch a) Source # 
Instance details

Defined in Data.Pitch

Methods

minBound :: Pitch a #

maxBound :: Pitch a #

(Finitary a, Show a) => Show (Pitch a) Source # 
Instance details

Defined in Data.Pitch

Methods

showsPrec :: Int -> Pitch a -> ShowS #

show :: Pitch a -> String #

showList :: [Pitch a] -> ShowS #

Eq a => Eq (Pitch a) Source # 
Instance details

Defined in Data.Pitch

Methods

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

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

type Interval (Pitch space) Source # 
Instance details

Defined in Data.GIS

type Interval (Pitch space) = IntervalOf (Pitch space)
type IntervalOf (Pitch PitchClass) Source #

In chromatic p-space, pitches can be labeled by the elements of the group of integers under addition, \((\mathbb{Z}, +)\).

Instance details

Defined in Data.PitchClass.Chromatic

type IntervalOf (Pitch PitchClass) Source #

In diatonic p-space, pitches can be labeled by the elements of the group of integers under addition, \((\mathbb{Z}, +)\).

Instance details

Defined in Data.PitchClass.Diatonic

type Octave = Int Source #

An octave is an integer.

labelPitch :: Finitary a => Pitch a -> Sum Int Source #

Label a pitch with an element of the group of integers under addition.