Module: HeadMusic::Notation::ABC
- Defined in:
- lib/head_music/notation/abc.rb,
lib/head_music/notation/abc/parser.rb,
lib/head_music/notation/abc/pitch_builder.rb,
lib/head_music/notation/abc/duration_resolver.rb
Overview
Parses ABC notation into HeadMusic::Content compositions
Defined Under Namespace
Classes: BodyLexer, BookParser, DurationResolver, Header, KeyMapper, ParseError, Parser, PitchBuilder, UnsupportedFeatureError
Class Method Summary collapse
-
.parse(abc_string) ⇒ Object
Parses exactly one tune.
-
.parse_book(abc_string) ⇒ Object
Parses a tune book — one or more blank-line-separated tunes.
Class Method Details
.parse(abc_string) ⇒ Object
Parses exactly one tune. Raises when the input holds more than one.
4 5 6 |
# File 'lib/head_music/notation/abc.rb', line 4 def self.parse(abc_string) Parser.new(abc_string).composition end |
.parse_book(abc_string) ⇒ Object
Parses a tune book — one or more blank-line-separated tunes.
9 10 11 |
# File 'lib/head_music/notation/abc.rb', line 9 def self.parse_book(abc_string) BookParser.new(abc_string).compositions end |