Class: AudioToolbox::ExtendedTempoEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/midiosx.rb,
ext/music_player/midiosx.c

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ ExtendedTempoEvent

Returns a new instance of ExtendedTempoEvent.



220
221
222
# File 'lib/midiosx.rb', line 220

def initialize(opts)
  @bpm = opts[:bpm]
end

Instance Attribute Details

#bpmObject (readonly)

Returns the value of attribute bpm.



214
215
216
# File 'lib/midiosx.rb', line 214

def bpm
  @bpm
end

Instance Method Details

#==(other) ⇒ Object



224
225
226
227
# File 'lib/midiosx.rb', line 224

def ==(other)
  self.class == other.class &&
  bpm        == other.bpm
end

#add(time, track) ⇒ Object



216
217
218
# File 'lib/midiosx.rb', line 216

def add(time, track)
  track.add_extended_tempo_event(time, @bpm)
end