examples/missed_connection.rb in music-transcription-0.20.0 vs examples/missed_connection.rb in music-transcription-0.21.0
- old
+ new
@@ -3,13 +3,12 @@
include Music::Transcription
include Pitches
include Articulations
include Meters
-include Parsing
-score = Score.new(FOUR_FOUR, 120) do |s|
+score = MeasureScore.new(FOUR_FOUR, Tempo::BPM.new(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
@@ -21,7 +20,7 @@
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
+ file.write pack_score(score).to_yaml
end