Sha256: 044f09e86d30ab60a96a5aebf6a933354516fd9aeb9a8e97d610cd79636c7240
Contents?: true
Size: 1.11 KB
Versions: 4
Compression:
Stored size: 1.11 KB
Contents
require 'music-transcription' require 'yaml' include Music::Transcription include Pitches score = Score.new( Meter.new(4,"1/4".to_r), 120, :program => Program.new( :segments => [0...4.0, 0...4.0 ] ), :parts => { 1 => Part.new( Dynamics::MF, notes: [ Note::whole([C4]), Note::whole([Bb3]), Note::whole([Ab3]), Note::half([G3]), Note::half([Bb3]), ] ), 2 => Part.new( Dynamics::MF, notes: [ Note::dotted_quarter([E5]), Note::whole([D5]), Note::whole([C5]), Note::new("5/8".to_r, [C5]), Note::half([C5]), Note::half([D5]), ] ), 3 => Part.new( Dynamics::MF, notes: [ Note::eighth, Note::quarter([G5]), Note::half([F5]), Note::quarter, Note::quarter([F5]), Note::half([Eb5]), Note::quarter, Note::quarter([Eb5]), Note::half([Eb5]), Note::eighth, Note::half([Eb5]), Note::half([F5]), ] ) } ) File.open("song2.yml", "w") do |file| file.write score.to_yaml end
Version data entries
4 entries across 4 versions & 1 rubygems