Sha256: d89f6a877459eaa7a0919022347c3520d5077d43acf3c1999ee0a302d718e2d8

Contents?: true

Size: 749 Bytes

Versions: 5

Compression:

Stored size: 749 Bytes

Contents

require 'music-transcription'
require 'yaml'

include Music::Transcription
include Pitches
include Meters
include Parsing

score = Score.new(FOUR_FOUR, 120) do |s|
  s.program = Program.new([0...4.0, 0...4.0 ])
  
  s.parts[1] = Part.new(Dynamics::MF) do |p|
    p.notes = notes("1C4 1Bb3 1Ab3 /2G3 /2Bb3")
  end
  
  s.parts[2] = Part.new(Dynamics::MF) do |p|
    p.notes = notes("3/8E5 1D5 1C5 5/8C5 /2C5 /2D5")
  end
  
  s.parts[3] = Part.new(Dynamics::MF) do |p|
    notes = notes("/8 /4G5 /2F5 /4 /4F5 /2Eb5 /4 /4Eb5 /2Eb5 /8 /2Eb5 /2F5")
  end
end

name = File.basename(__FILE__,".rb")

File.open("#{name}.yml", "w") do |file|
  file.write score.to_yaml
end

File.open("#{name}_packed.yml", "w") do |file|
  file.write score.pack.to_yaml
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
music-transcription-0.17.0 examples/song2.rb
music-transcription-0.16.0 examples/song2.rb
music-transcription-0.15.0 examples/song2.rb
music-transcription-0.14.0 examples/song2.rb
music-transcription-0.13.0 examples/song2.rb