Module: HeadMusic::Notation::LilyPond
- Defined in:
- lib/head_music/notation/lily_pond.rb,
lib/head_music/notation/lily_pond/lexer.rb,
lib/head_music/notation/lily_pond/token.rb,
lib/head_music/notation/lily_pond/parser.rb,
lib/head_music/notation/lily_pond/writer.rb,
lib/head_music/notation/lily_pond/document.rb,
lib/head_music/notation/lily_pond/preflight.rb,
lib/head_music/notation/lily_pond/key_mapper.rb,
lib/head_music/notation/lily_pond/key_reader.rb,
lib/head_music/notation/lily_pond/book_writer.rb,
lib/head_music/notation/lily_pond/render_plan.rb,
lib/head_music/notation/lily_pond/string_text.rb,
lib/head_music/notation/lily_pond/flow_builder.rb,
lib/head_music/notation/lily_pond/meter_reader.rb,
lib/head_music/notation/lily_pond/music_reader.rb,
lib/head_music/notation/lily_pond/pitch_reader.rb,
lib/head_music/notation/lily_pond/pitch_writer.rb,
lib/head_music/notation/lily_pond/token_cursor.rb,
lib/head_music/notation/lily_pond/voice_stream.rb,
lib/head_music/notation/lily_pond/voice_writer.rb,
lib/head_music/notation/lily_pond/voice_context.rb,
lib/head_music/notation/lily_pond/context_reader.rb,
lib/head_music/notation/lily_pond/source_scanner.rb,
lib/head_music/notation/lily_pond/document_reader.rb,
lib/head_music/notation/lily_pond/duration_reader.rb,
lib/head_music/notation/lily_pond/duration_writer.rb,
lib/head_music/notation/lily_pond/parse_preflight.rb,
lib/head_music/notation/lily_pond/assignment_reader.rb,
lib/head_music/notation/lily_pond/music_item_reader.rb,
lib/head_music/notation/lily_pond/pitch_reader_stack.rb
Overview
A namespace for LilyPond-notation parsing helpers
Defined Under Namespace
Modules: StringText Classes: AssignmentReader, BookWriter, ContextReader, Document, DocumentReader, DurationReader, DurationWriter, FlowBuilder, KeyMapper, KeyReader, Lexer, MeterReader, MusicItemReader, MusicReader, ParseError, ParsePreflight, Parser, PitchReader, PitchReaderStack, PitchWriter, Preflight, RenderError, RenderPlan, SourceScanner, Token, TokenCursor, UnsupportedFeatureError, VoiceContext, VoiceStream, VoiceWriter, Writer
Constant Summary collapse
- ENVELOPE_COMMANDS =
The commands that wrap a document rather than appear in its music. The DocumentReader dispatches on them; the MusicReader rejects them.
%w[version header score layout midi].freeze
Class Method Summary collapse
-
.parse(lily_pond_string) ⇒ Object
Interprets a LilyPond document, or a bare music expression, as a flow.
-
.render(flow, **options) ⇒ Object
transposed:says the flow's pitches are already the written ones, so that each part prints its own key and a \transposition naming what it sounds.
Class Method Details
.parse(lily_pond_string) ⇒ Object
Interprets a LilyPond document, or a bare music expression, as a flow. Raises before building on anything outside the supported subset, so callers never receive a partial flow.
10 11 12 |
# File 'lib/head_music/notation/lily_pond.rb', line 10 def self.parse(lily_pond_string) Parser.new(lily_pond_string).flow end |
.render(flow, **options) ⇒ Object
transposed: says the flow's pitches are already the written ones, so that
each part prints its own key and a \transposition naming what it sounds.
16 17 18 |
# File 'lib/head_music/notation/lily_pond.rb', line 16 def self.render(flow, **) Writer.new(flow, **).to_s end |