Skip to content

Commit

Permalink
API manual: fixes and additions
Browse files Browse the repository at this point in the history
  • Loading branch information
igneus committed Nov 9, 2024
1 parent c5790e0 commit c8fd057
Showing 1 changed file with 25 additions and 6 deletions.
31 changes: 25 additions & 6 deletions doc/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,24 @@ and an optional [association list](https://lilypond.org/doc/v2.24/Documentation/
which can be used to pass options.

```lilypond
\include "lilygabc.ily"
\score { \gabc "(c4) A(ghg)men(fg)" }
% using the optional argument
\score {
\gabc #'((produce . voice)
(voice-id . "my_voice_1"))
"(c4) A(ghg)men(fg)"
\new Lyrics \lyricsto "my_voice_1" { La -- la }
<<
% using the optional argument
\gabc #'((produce . voice)
(voice-id . "my_voice_1"))
"(c4) A(ghg)men(fg)"
\new Lyrics \lyricsto "my_voice_1" { La -- la }
>>
}
```

Supported options (the key is always a symbol):
### Options

(The key is always a symbol.)

- `parse-as` - value `gly` (symbol) makes the input be handled
as [gly][gly] *music line(s)* rather than gabc.
Expand All @@ -50,6 +56,8 @@ Supported options (the key is always a symbol):
which is useful mainly for attaching additional lyrics
to the same voice in LilyPond code.

### Functions

The functions are a matrix combining
input format (gabc / gly),
notation style (modern / square notation, which is called Vaticana in the LilyPond world)
Expand All @@ -76,6 +84,17 @@ as separate functions, allowing parsed gabc data to be used repeatedly
to produce output of different kinds or
to be transformed before producing some sort of output.

```lilypond
\include "gregorian.ly"
\include "lilygabc.ily"
parsed = \lilygabc-parse-gabc "(c4) A(ghg)men(fg)"
\score { \lilygabc-vaticana-music \parsed }
\score { \lilygabc-modern-music \parsed }
\score { \lilygabc-modern-notes \parsed }
```

### Parsing input

Both functions accept input as string and return parsed
Expand Down

0 comments on commit c8fd057

Please sign in to comment.