class SMF::VirtualTrack
Public Class Methods
new()
click to toggle source
Calls superclass method
SMF::Track::new
# File lib/smf/toy/virtual.rb, line 88 def initialize() super() end
Public Instance Methods
to_real()
click to toggle source
# File lib/smf/toy/virtual.rb, line 92 def to_real r = Track.new each do |ev| case ev when VirtualNote r << NoteOn.new(ev.offset, ev.ch, ev.note, ev.vel) r << NoteOff.new(ev.offset + ev.length, ev.ch, ev.note, ev.offvel) else r << ev end end r end