struct Mystic::PitchClass

Overview

Represents a pitch class in Set Theory

To create a PitchClass:

# C
PitchClass.new(0)

Defined in:

mystic/pitch_class.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(value : Int32) #

[View source]

Instance Method Detail

def +(i : Int32) : PitchClass #

[View source]
def -(i : Int32) : PitchClass #

[View source]
def -(other : self) : Int32 #

Returns the numerical distance from the other pitch class


[View source]
def <=>(other : self) : Int32 #

[View source]
def ==(other : self) : Bool #

[View source]
def ic_distance(other : self) : Int32 #

Returns the Interval Class distance from the other pitch class


[View source]
def to_s(io : IO) : Nil #
Description copied from struct Struct

Same as #inspect(io).


[View source]
def value : Int32 #

[View source]