module MTK::Lang::PitchClasses
Defines a constant for each {Core::PitchClass} in the Western chromatic scale.
Because ‘#’ is not a valid identifier character in Ruby. All chromatic pitch classes are defined as the flat of a diatonic pitch class, for example Eb is a constant because D# is not a valid Ruby constant name.
To help automate the documentation, the constants are listed under “Instance Attribute Summary” on this page.
@see Core::PitchClass
Constants
- PITCH_CLASSES
All constants defined in this module
- PITCH_CLASS_NAMES
The names of all constants defined in this module @see MTK::Core::PitchClass::NAMES
Public Class Methods
define_pitch_class(name, value, more_info=nil)
click to toggle source
@private @!macro [attach] define_pitch_class
PitchClass $1 $3 @!attribute [r] @return [MTK::Core::PitchClass] PitchClass $1 (value $2)
# File lib/mtk/lang/pitch_classes.rb, line 20 def self.define_pitch_class name, value, more_info=nil const_set name, MTK::Core::PitchClass.from_name(name) end