#! /usr/bin/env ruby

# virtual-samp.rb: Written by Tadayoshi Funaba 2005
# $Id: virtual-samp.rb,v 1.1 2005-07-17 17:16:18+09 tadf Exp $

require 'smf'
require 'smf/toy/virtual'
include  SMF

sq = VirtualSequence.load('bwv772.mid')
sq.each do |tr|
  tr.each do |ev|
    case ev
    when VirtualNote
      ev.length /= 2
    end
  end
end
sq.save('virtual-samp.mid')
