Class: JSound::Midi::Messages::PitchBend
- Inherits:
-
JSound::Midi::Message
- Object
- JSound::Midi::Message
- JSound::Midi::Messages::PitchBend
- Defined in:
- lib/jsound/midi/messages/pitch_bend.rb
Constant Summary
Constants inherited from JSound::Midi::Message
JSound::Midi::Message::CLASS_FOR_STATUS, JSound::Midi::Message::STATUS_FOR_CLASS, JSound::Midi::Message::STATUS_FOR_TYPE, JSound::Midi::Message::TYPE_FOR_STATUS
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from JSound::Midi::Message
#channel, #data, #source, #type
Class Method Summary collapse
Instance Method Summary collapse
- #clone ⇒ Object
- #data=(data) ⇒ Object
-
#initialize(value, channel = 0, options = {}) ⇒ PitchBend
constructor
A new instance of PitchBend.
Methods inherited from JSound::Midi::Message
#==, #data1, #data1=, #data2, #data2=, inherited, #status, #to_java, #to_s, #update_java_message
Methods included from TypeFromClassName
Constructor Details
#initialize(value, channel = 0, options = {}) ⇒ PitchBend
Returns a new instance of PitchBend.
9 10 11 12 |
# File 'lib/jsound/midi/messages/pitch_bend.rb', line 9 def initialize(value, channel=0, ={}) super(nil, channel, ) self.value = value # we set #data as a side-effect here end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
7 8 9 |
# File 'lib/jsound/midi/messages/pitch_bend.rb', line 7 def value @value end |
Class Method Details
.from_f(f, channel = 0, options = {}) ⇒ Object
26 27 28 |
# File 'lib/jsound/midi/messages/pitch_bend.rb', line 26 def self.from_f(f, channel=0, ={}) new Convert.normalized_float_to_14bit(f), channel=0, end |
Instance Method Details
#clone ⇒ Object
35 36 37 |
# File 'lib/jsound/midi/messages/pitch_bend.rb', line 35 def clone self.class.new(@value,@channel) end |