Class: Mext::PitchClassArray

Inherits:
EndlessArray show all
Defined in:
lib/mext/array/pitch_class_array.rb

Overview

Mext::PitchClassArray

a kind of Mext::EndlessArray which has a secondary Mext::EndlessArray of the interval relations among or the previous value in an endless fashion (i.e. mod’ding the current index)

Constant Summary

Constants inherited from Array

Array::DOT_OPERATIONS, Array::MINIMUM_STEP, Array::SCALAR_NEW_OPERATIONS, Array::SCALAR_OPERATIONS

Instance Attribute Summary collapse

Attributes inherited from EndlessArray

#cur, #restart_value

Instance Method Summary collapse

Methods inherited from EndlessArray

#current, from_yaml, #next, #peek_next, #previous, #reset

Methods included from Utilities

included

Methods inherited from Array

#choose, fill_float

Constructor Details

#initialize(me = [], rv = 0) ⇒ PitchClassArray

Mext::PitchClassArray.new(me = [], rv = 0)

create an endless array which is supposed to be filled up with pitch classes



22
23
24
25
26
# File 'lib/mext/array/pitch_class_array.rb', line 22

def initialize(me = [], rv = 0)
  super
  condition_pitches!
  @intervals = create_interval_array
end

Instance Attribute Details

#intervalsObject (readonly)

Returns the value of attribute intervals.



14
15
16
# File 'lib/mext/array/pitch_class_array.rb', line 14

def intervals
  @intervals
end