Sha256: f5b7192f8523d76c9cb09e1671b4a209dfe65e15086490465cf69060322b7a44

Contents?: true

Size: 680 Bytes

Versions: 2

Compression:

Stored size: 680 Bytes

Contents

require 'music-transcription'
require 'yaml'

include Music::Transcription
include Pitches
include Articulations
include Meters
include Parsing

score = Score.new(FOUR_FOUR, 120) do |s|
  s.program = Program.new([0...2,0...6])
  s.parts["bass"] = Part.new(Dynamics::MF) do |p|
    p.notes =  "/4Eb2 /4 /4Bb2 /4 /4Eb2 /8 /8B2 /4Bb2 /4Ab2".to_notes
    p.notes += "/4Bb2 /8 /8F3= /2F3 /4Bb2 /8 /8F3= /2F3".to_notes
    p.notes += "/4B2 /8 /8Gb3= /2Gb3 /8 /8Gb3= /2Gb3".to_notes
  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

2 entries across 2 versions & 1 rubygems

Version Path
music-transcription-0.20.0 examples/missed_connection.rb
music-transcription-0.19.0 examples/missed_connection.rb