coltrane v0.0.1 Coltrane.Theory.PitchClass

Pitch classes are all the classes of pitches (frequencies) that are in a whole number of octaves apart.

For example, C1, C2, C3 are all pitches from the C pitch class.

Link to this section Summary

Functions

iex> “C#” |> Note.from_notation |> PitchClass.from_note

1

Returns the fundamental frequency of this pitch class

Gets the name of this pitch class in a note format

Gets the basic note representation of this pitch class

Link to this section Functions

Link to this function from_note(note)
iex> "C#" |> Note.from_notation |> PitchClass.from_note
1

iex> "Eb" |> Note.from_notation |> PitchClass.from_note
3
Link to this function fundamental_frequency(pitch_class)

Returns the fundamental frequency of this pitch class

Examples:

iex> PitchClass.fundamental_frequency(0)
16.351597831287414

iex> Coltrane.Theory.PitchClass.fundamental_frequency(1)
17.323914436054505
Link to this function name(pitch_class)

Gets the name of this pitch class in a note format

Examples

iex> PitchClass.name(1)
"C#"
Link to this function note(pitch_class)

Gets the basic note representation of this pitch class

Examples

iex> PitchClass.note(1)
%Note{base_pitch_class: 1}