Class: Aud::Tick
- Inherits:
-
Object
- Object
- Aud::Tick
- Defined in:
- lib/aud/tick.rb
Instance Attribute Summary collapse
-
#midi ⇒ Object
Returns the value of attribute midi.
-
#output ⇒ Object
Returns the value of attribute output.
-
#properties ⇒ Object
Returns the value of attribute properties.
Instance Method Summary collapse
-
#initialize(output, properties, _midi = nil) ⇒ Tick
constructor
A new instance of Tick.
- #process(line) ⇒ Object
Constructor Details
#initialize(output, properties, _midi = nil) ⇒ Tick
Returns a new instance of Tick.
10 11 12 13 |
# File 'lib/aud/tick.rb', line 10 def initialize(output, properties, _midi=nil) self.midi = _midi || MIDI::IO.new(output) self.properties = properties end |
Instance Attribute Details
#midi ⇒ Object
Returns the value of attribute midi.
6 7 8 |
# File 'lib/aud/tick.rb', line 6 def midi @midi end |
#output ⇒ Object
Returns the value of attribute output.
7 8 9 |
# File 'lib/aud/tick.rb', line 7 def output @output end |
#properties ⇒ Object
Returns the value of attribute properties.
8 9 10 |
# File 'lib/aud/tick.rb', line 8 def properties @properties end |
Instance Method Details
#process(line) ⇒ Object
15 16 17 18 19 |
# File 'lib/aud/tick.rb', line 15 def process(line) self.midi.octave(properties[:octave]) self.midi.note(properties[:note], :channel => properties[:channel]) self.midi.off end |