Sha256: bb4e22fdf98245304ad4fe0345be32657dd7da8ce2342f36df8e295a0d740004

Contents?: true

Size: 579 Bytes

Versions: 13

Compression:

Stored size: 579 Bytes

Contents

module Music
module Transcription

# Defines a note accent (stacatto, tenuto, etc.)
#
# @author James Tunnell
#
class Accent
  def ==(other)
    self.class == other.class
  end
  
  def clone
    self.class.new
  end
  
  { :Staccato => ".",
    :Staccatissimo => "'",
    :Marcato => ">",
    :Martellato => "^",
    :Tenuto => "_",
    :Forte => "f",
    :Fortissimo => "ff",
    :Fortississimo => "fff"
  }.each do |name,print_str|
    klass = Class.new(Accent) do
      def to_s
        print_str
      end
    end
    Accent.const_set(name.to_sym, klass)
  end
end

end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
music-transcription-0.6.3 lib/music-transcription/accent.rb
music-transcription-0.6.2 lib/music-transcription/accent.rb
music-transcription-0.6.1 lib/music-transcription/accent.rb
music-transcription-0.6.0 lib/music-transcription/accent.rb
music-transcription-0.5.11 lib/music-transcription/accent.rb
music-transcription-0.5.10 lib/music-transcription/accent.rb
music-transcription-0.5.9 lib/music-transcription/accent.rb
music-transcription-0.5.8 lib/music-transcription/accent.rb
music-transcription-0.5.7 lib/music-transcription/accent.rb
music-transcription-0.5.6 lib/music-transcription/accent.rb
music-transcription-0.5.5 lib/music-transcription/accent.rb
music-transcription-0.5.3 lib/music-transcription/accent.rb
music-transcription-0.5.2 lib/music-transcription/accent.rb