Class: MIDIFX::Transpose
- Inherits:
-
Object
- Object
- MIDIFX::Transpose
- Defined in:
- lib/midi-fx/transpose.rb
Instance Attribute Summary collapse
-
#factor ⇒ Object
readonly
Returns the value of attribute factor.
-
#property ⇒ Object
readonly
Returns the value of attribute property.
Instance Method Summary collapse
-
#initialize(property, factor, options = {}) ⇒ Transpose
constructor
A new instance of Transpose.
- #process(message) ⇒ Object
Constructor Details
#initialize(property, factor, options = {}) ⇒ Transpose
Returns a new instance of Transpose.
7 8 9 10 11 |
# File 'lib/midi-fx/transpose.rb', line 7 def initialize(property, factor, = {}) @factor = factor @property = property @name = [:name] end |
Instance Attribute Details
#factor ⇒ Object (readonly)
Returns the value of attribute factor.
5 6 7 |
# File 'lib/midi-fx/transpose.rb', line 5 def factor @factor end |
#property ⇒ Object (readonly)
Returns the value of attribute property.
5 6 7 |
# File 'lib/midi-fx/transpose.rb', line 5 def property @property end |
Instance Method Details
#process(message) ⇒ Object
13 14 15 16 17 |
# File 'lib/midi-fx/transpose.rb', line 13 def process() val = .send(@property) .send("#{@property}=", val + @factor) end |