Sha256: 5f5735ed3237ec1667efdf244e7d0e568318c023f7d06211a5d172920cd530bb

Contents?: true

Size: 951 Bytes

Versions: 5

Compression:

Stored size: 951 Bytes

Contents

module Music
module Transcription
module Parsing

grammar Articulation
  rule articulation
    slur / legato / tenuto / portato / staccato / staccatissimo
  end
  
  rule slur
    "=" {
      def to_articulation
        Music::Transcription::Articulations::SLUR
      end
    }
  end

  rule legato
    "-" {
      def to_articulation
        Music::Transcription::Articulations::LEGATO
      end
    }
  end
  
  rule tenuto
    "_" {
      def to_articulation
        Music::Transcription::Articulations::TENUTO
      end
    }
  end
  
  rule portato
    "%" {
      def to_articulation
        Music::Transcription::Articulations::PORTATO
      end
    }
  end

  rule staccato
    "." {
      def to_articulation
        Music::Transcription::Articulations::STACCATO
      end
    }
  end
  
  rule staccatissimo
    "'" {
      def to_articulation
        Music::Transcription::Articulations::STACCATISSIMO
      end
    }
  end
end

end
end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
music-transcription-0.15.0 lib/music-transcription/parsing/articulation_parsing.treetop
music-transcription-0.14.0 lib/music-transcription/parsing/articulation_parsing.treetop
music-transcription-0.13.0 lib/music-transcription/parsing/articulation_parsing.treetop
music-transcription-0.11.0 lib/music-transcription/parsing/articulation_parsing.treetop
music-transcription-0.10.0 lib/music-transcription/parsing/articulation_parsing.treetop