lilypond:orchestrallily
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| lilypond:orchestrallily [2013/03/13 10:42] – Externe Bearbeitung 127.0.0.1 | lilypond:orchestrallily [2013/09/09 23:37] (aktuell) – gelöscht reinhold | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== The OrchestralLily package for Lilypond ====== | ||
| - | **Description**: | ||
| - | **Author**: [[http:// | ||
| - | **Date**: February 2008\\ | ||
| - | **Download**: | ||
| - | **Development version**: | ||
| - | * Web-Frontend: | ||
| - | * read-only git URL: [[git:// | ||
| - | ===== Motivation ===== | ||
| - | |||
| - | Orchestral scores might have a quite complicated structure, which is cumbersome to construct manually, in particular since each movement will have the same structure. The OrchestralLily package for [[http:// | ||
| - | * generate appropriate staves and staff groups | ||
| - | * collate them in the proper (defined) order | ||
| - | * add correct instrument names (if defined by the user) | ||
| - | * add movement titles (if defined) | ||
| - | * add a header " | ||
| - | * add correct clefs/ | ||
| - | * etc. | ||
| - | This way, generating full scores, scores for individual instruments and for instrument groups are really simple and no additional manual work! | ||
| - | |||
| - | |||
| - | As you can imagine, if you have lots of parts and lots of instruments, | ||
| - | |||
| - | As they all look really similar, why not automate their creation instead of manually writing them? That is exactly where OrchestralLily comes in. | ||
| - | |||
| - | ===== A simple example: Soprano Solo and Violoncello ===== | ||
| - | |||
| - | Assume you have a piece called " | ||
| - | |||
| - | We will call the soprano staff '' | ||
| - | <box center|**Dada-defs.ly** file, contains all music definitions:> | ||
| - | |||
| - | < | ||
| - | \version " | ||
| - | \include " | ||
| - | \paper { ragged-bottom = ##t } | ||
| - | \header { title = "A nonsensical work" } | ||
| - | |||
| - | DadaPieceName = "Dada song" | ||
| - | DadaPieceNameTacet = "Dada song - Tacet" | ||
| - | |||
| - | VcInstrumentName = " | ||
| - | VcShortInstrumentName = " | ||
| - | SSoloInstrumentName = " | ||
| - | SSoloShortInstrumentName = " | ||
| - | |||
| - | VcClef = \clef " | ||
| - | DadaSettings = {\mark\markup{\bold " | ||
| - | |||
| - | DadaVcMusic = \relative c { c4 g' c, b' } | ||
| - | DadaSSoloMusic = \relative c'' | ||
| - | DadaSSoloLyrics = \lyricmode { Da, da -- da -- da -- da! } | ||
| - | |||
| - | |||
| - | \orchestralScoreStructure #'( | ||
| - | (" | ||
| - | (" | ||
| - | ) | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | Notice that all variables have a similar structure: First comes " | ||
| - | |||
| - | Finally, the call '' | ||
| - | |||
| - | The above definitions are all that is needed by OrchestralLily to generate all various kinds of scores! | ||
| - | |||
| - | <box center 750px|**dada.ly** file, generating some scores:> | ||
| - | < | ||
| - | < | ||
| - | \version " | ||
| - | \include " | ||
| - | |||
| - | % the soprano score: | ||
| - | \createScore #" | ||
| - | |||
| - | % the Vc score: | ||
| - | \createScore #" | ||
| - | |||
| - | % the percussion score, no notes defined -> Tacet | ||
| - | \createScore #" | ||
| - | |||
| - | % the full score: | ||
| - | \createScore #" | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | The actual score creation is done with a call to '' | ||
| - | |||
| - | |||
| - | ---- | ||
| - | |||
| - | Now, suppose we want to generate a score for Vc, including the soprano staff in smaller size. This is also really simple in OrchestralLily: | ||
| - | |||
| - | <box center 950px|**dada_vc_including_small_ssolo.ly**, | ||
| - | < | ||
| - | |||
| - | < | ||
| - | \version " | ||
| - | \include " | ||
| - | |||
| - | \header { instrument = \VcInstrumentName } | ||
| - | |||
| - | % For the SSolo staff, use a smaller staff size! | ||
| - | DadaSSoloSettings = { | ||
| - | \DadaSettings | ||
| - | \set fontSize = #-4 | ||
| - | \override Staff.StaffSymbol #' | ||
| - | } | ||
| - | |||
| - | \createScore #" | ||
| - | |||
| - | </ | ||
| - | </ | ||
| - | |||
| - | ---- | ||
| - | |||
| - | In full scores, the violoncello and contrabasso staff is typically shown with a bracket (StaffGroup) of their own, and the solo staves are shown without any bracket. To achieve this, all you have to do is to define the correct score structure (including a VcB staff group, consisting only of the Vc staff): | ||
| - | |||
| - | |||
| - | <box center 950px|**dada_vc_staff_group.ly**, | ||
| - | < | ||
| - | < | ||
| - | \version " | ||
| - | \include " | ||
| - | |||
| - | \orchestralScoreStructure #'( | ||
| - | (" | ||
| - | (" | ||
| - | ) | ||
| - | |||
| - | \createScore #" | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | Although it was not explicitly shown in this simple example, OrchestralLily of course supports also nested staff groups. | ||
| - | |||
| - | ===== An extended example: Multiple pieces and instruments in a larger work ===== | ||
| - | |||
| - | The whole power of OrchestralLily, | ||
| - | <box center|The **dadafull-defs.ly** file:> | ||
| - | < | ||
| - | \version " | ||
| - | \include " | ||
| - | \paper { ragged-bottom = ##t } | ||
| - | \header { title = "A useless opus" } | ||
| - | |||
| - | TimKey = \key c \major | ||
| - | TimClef = \clef " | ||
| - | TimInstrumentName = " | ||
| - | TimShortInstrumentName = " | ||
| - | VcClef = \clef " | ||
| - | VcInstrumentName = " | ||
| - | VcShortInstrumentName = " | ||
| - | SSoloInstrumentName = " | ||
| - | SSoloShortInstrumentName = " | ||
| - | |||
| - | DadaPieceName = "1) Dada song" | ||
| - | DadaPieceNameTacet = "1) Dada song - Tacet" | ||
| - | DadaSettings = {\mark\markup{\italic " | ||
| - | DadaVcMusic = \relative c { c4 g' c, b' } | ||
| - | DadaSSoloMusic = \relative c'' | ||
| - | DadaSSoloLyrics = \lyricmode { Da, da -- da -- da -- da! } | ||
| - | |||
| - | DidiPieceName = "2) Didi song" | ||
| - | DidiPieceNameTacet = "2) Didi song - Tacet" | ||
| - | DidiKey = \key fis \major | ||
| - | DidiTimMusic = \relative c { g1\startTrillSpan~ | g1\stopTrillSpan } | ||
| - | DidiSSoloMusic = \relative c' { fis8 cis'4. fis,8 cis'4. | fis8 cis'4. fis,8 cis' | ||
| - | DidiSSoloLyrics = \lyricmode { Di -- di, di -- di, di -- di, di -- di! } | ||
| - | |||
| - | DodoPieceName = "3) Dodo song" | ||
| - | DodoPieceNameTacet = "3) Dodo song - Tacet" | ||
| - | DodoTimMusic = \relative c' { c1\< | ||
| - | DodoVcMusic = \relative c { c1:16\< | c1:16\!\ff } | ||
| - | DodoSSoloMusic = \relative c' { c4 d8 e f g a b | c1\ff } | ||
| - | DodoSSoloLyrics = \lyricmode { Do, do, do, do, do, do, do, do... } | ||
| - | |||
| - | |||
| - | \orchestralScoreStructure #'( | ||
| - | (" | ||
| - | (" | ||
| - | ; a nested staff to highlight nested groups: | ||
| - | (" | ||
| - | (" | ||
| - | (" | ||
| - | ) | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | After these definitions, | ||
| - | <box center 950px|Timpani score:> | ||
| - | < | ||
| - | < | ||
| - | \version " | ||
| - | \include " | ||
| - | |||
| - | \header { instrument = \TimInstrumentName } | ||
| - | |||
| - | \createScore #" | ||
| - | \createScore #" | ||
| - | \createScore #" | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | <box center 950px|Soprano solo score:> | ||
| - | < | ||
| - | < | ||
| - | \version " | ||
| - | \include " | ||
| - | |||
| - | \header { instrument = \SSoloInstrumentName } | ||
| - | |||
| - | \createScore #" | ||
| - | \createScore #" | ||
| - | \createScore #" | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | <box center 950px|Violoncello score:> | ||
| - | < | ||
| - | < | ||
| - | \version " | ||
| - | \include " | ||
| - | |||
| - | \header { instrument = \VcInstrumentName } | ||
| - | |||
| - | \createScore #" | ||
| - | \createScore #" | ||
| - | \createScore #" | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | <box center 950px|Full score:> | ||
| - | < | ||
| - | < | ||
| - | \version " | ||
| - | \include " | ||
| - | |||
| - | \createScore #" | ||
| - | \createScore #" | ||
| - | \createScore #" | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | ===== Structure of a score, naming staves and groups ===== | ||
| - | |||
| - | <box 160px left> | ||
| - | {{lilypond: | ||
| - | </ | ||
| - | A full score typically consists of several levels of staves and staff groupings, which can also be understood as a hierarchy of staves. We will assign each level in this hierarchy an identifier (written in red in the example). For example, the score on the left has the tree: | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | * " | ||
| - | So, the " | ||
| - | Similarly, " | ||
| - | |||
| - | ==== How to define this hierarchy in OrchestralLily ==== | ||
| - | |||
| - | This structure can be easily defined in OrchestralLily by calling '' | ||
| - | < | ||
| - | \orchestral-score-structure #'( | ||
| - | (" | ||
| - | (" | ||
| - | (" | ||
| - | (" | ||
| - | (" | ||
| - | (" | ||
| - | (" | ||
| - | (" | ||
| - | (" | ||
| - | (" | ||
| - | ) | ||
| - | </ | ||
| - | Please note the apostrophe before the list! There are no apostrophes needed in front of the staff group types (because the whole is list is already quoted!). | ||
| - | |||
| - | Each entry of the list describes one grouping of staves or voices and has three possible forms: | ||
| - | < | ||
| - | (" | ||
| - | (" | ||
| - | (" | ||
| - | (" | ||
| - | </ | ||
| - | The first entry creates a staff group of type '' | ||
| - | The third and fourth forms are not really staff groups, but staves containing multiple voices. The third one with #f as staff type generates a staff with multiple voices ('' | ||
| - | |||
| - | If an identifier from the list of child identifiers is not defined in that hierarchy list, it is assumed to be a simple staff. | ||
| - | |||
| - | ==== The advantage of giving each level a name ==== | ||
| - | One of the advantages of assigning each group a name is that you can now tell OrchestralLily to generate e.g. a vocal score (containing only the " | ||
| - | |||
| - | |||
| - | ===== What OrchestralLily does ===== | ||
| - | Say you have the following structure of your score: | ||
| - | < | ||
| - | (" | ||
| - | (" | ||
| - | (" | ||
| - | )</ | ||
| - | in you score structure definition. This means you have two violins, one viola and a soprano solo. | ||
| - | |||
| - | ==== How a score is generated ==== | ||
| - | If you call | ||
| - | < | ||
| - | in your lilypond file, OrchestralLily will generate a score for you that is similar to the following hand-written score: | ||
| - | < | ||
| - | \score { | ||
| - | << | ||
| - | \PieceAStringsStaff | ||
| - | \PieceASSoloStaff | ||
| - | >> | ||
| - | \header { piece = \PieceA[FullScore]PieceName } | ||
| - | } | ||
| - | </ | ||
| - | If there exists e.g. a variable '' | ||
| - | |||
| - | If none of the sub-staves (and their sub-staves, etc.) contains any music, OrchestralLily will instead create a title to indicate no music is to be played: | ||
| - | < | ||
| - | \markup \piece-title \PieceA[FullScore]PieceNameTacet | ||
| - | </ | ||
| - | Here, piece-title is the function used by OrchestralLily to format piece headings. It simply returns the proper markup definition for the given string. | ||
| - | |||
| - | ==== How a staff group is generated ==== | ||
| - | |||
| - | If there is no definition for '' | ||
| - | < | ||
| - | \context StaffGroup = " | ||
| - | | ||
| - | | ||
| - | } << | ||
| - | \PieceAVStaff | ||
| - | \PieceAVaStaff | ||
| - | >> | ||
| - | </ | ||
| - | |||
| - | Again, if any of the '' | ||
| - | |||
| - | If the definition of the Strings group in the score structure were a '' | ||
| - | < | ||
| - | << | ||
| - | \PieceAVStaff | ||
| - | \PieceAVaStaff | ||
| - | >> | ||
| - | </ | ||
| - | without the possibility to have an instrument name attached. | ||
| - | |||
| - | ==== How a staff is generated ==== | ||
| - | |||
| - | If the staff for e.g. " | ||
| - | < | ||
| - | \context Staff = " | ||
| - | | ||
| - | | ||
| - | } << | ||
| - | \context Voice = " | ||
| - | \dynamicUp | ||
| - | \PieceA[SSolo]Settings | ||
| - | \PieceA[SSolo]Key | ||
| - | \[PieceA]SSoloClef | ||
| - | \PieceA[SSolo]TimeSignature | ||
| - | \PieceASSoloMusic | ||
| - | >> | ||
| - | \context Lyrics = " | ||
| - | >> | ||
| - | </ | ||
| - | |||
| - | If no lyrics are defined (i.e. the variable '' | ||
| - | |||
| - | |||
| - | ===== Suffixes in use ===== | ||
| - | |||
| - | ^ | ||
| - | ^ Suffix | ||
| - | | ...PieceName | ||
| - | | ...PieceNameTacet | Piece title if no music is found | - | - | - | | ||
| - | | ...Staff | ||
| - | ^ The following variables are only used if ...Staff is not defined (i.e. the staff is created by OrchestralLily): | ||
| - | | ...Music | ||
| - | | ...Lyrics | ||
| - | | ...Settings | ||
| - | | ...Clef | ||
| - | | ...Key | ||
| - | | ...TimeSignature | ||
| - | | ...InstrumentName | - | assigned as instr. name | - | assigned as instr. name | | ||
| - | | ...ShortInstrumentName | - | assigned as instr. name | - | assigned as instr. name | | ||
| - | | ...MidiInstrument | - | assigned as MIDI instr. | - | assigned as MIDI instr. | | ||
| - | |||
| - | The order in which these variables are looked up is also relevant. If you are printing the score for piece " | ||
| - | < | ||
| - | \PieceAInstrSuffix | ||
| - | \InstrSuffix | ||
| - | \PieceASuffix | ||
| - | </ | ||
| - | This particular order ensures that you can have a definition for each score-instrument combination, | ||
| - | |||
| - | In the following we will typically give the variable name in full form '' | ||
| - | |||
| - | One word or care, though: Be careful with variables of the form '' | ||
| - | |||
| - | FIXME Add ...Transposition | ||
| - | |||
| - | ===== Settings defined/ | ||
| - | |||
| - | * Proper rest combination | ||
| - | * modern-cautionary style for auto-accidentals | ||
| - | * FIXME lots of other things (not yet documented) in the context hierarchy. See the orchestrallily.ly file (at the end of the file) | ||
| - | |||
| - | ===== Available functions ===== | ||
| - | |||
| - | ===\createScore #" | ||
| - | * Typical call: < | ||
| - | * Description: | ||
| - | * Parameters: | ||
| - | * **PieceID** ... The identifier for the piece/ | ||
| - | * **Instrument list** ... The list of instruments/ | ||
| - | |||
| - | ===\createNoCuesScore #" | ||
| - | * Typical call: < | ||
| - | * Description: | ||
| - | |||
| - | ===\orchestralScoreStructure #'( (" | ||
| - | * Typical call: < | ||
| - | ; Part-combined staves (one staff with two voices) | ||
| - | (" | ||
| - | ; Grouped staves (multiple staves either in a StaffGroup, or parallel without a bracket) | ||
| - | (" | ||
| - | (" | ||
| - | (" | ||
| - | (" | ||
| - | ; full scores, again as grouped staves, no over-all bracket | ||
| - | (" | ||
| - | )</ | ||
| - | * Description: | ||
| - | * Parameters: **Score structure** ... A list of group descriptions. Each entry describes such a group and has three possible forms: | ||
| - | < | ||
| - | (" | ||
| - | (" | ||
| - | (" | ||
| - | (" | ||
| - | </ | ||
| - | The list can contain each identifier only once, but they do not have to form only one tree, you can define several different hierarchy trees in one list! | ||
| - | |||
| - | ===\setUseBook ##t=== | ||
| - | * Typical call: < | ||
| - | * Description: | ||
| - | * Explanation: | ||
| - | * Parameters: | ||
| - | * **inside book** ... ''## | ||
| - | setUseBook = # | ||
| - | |||
| - | ===\setCreateMIDI ##t=== | ||
| - | * Typical call: < | ||
| - | * Descriptions: | ||
| - | |||
| - | ===\setCreatePDF ##t=== | ||
| - | * Typical call: < | ||
| - | * Descriptions: | ||
| - | |||
| - | ===\namedCueDuring #" | ||
| - | * Typical call: < | ||
| - | * Description: | ||
| - | * Parameters: | ||
| - | * **quote name**, **direction**, | ||
| - | * **cue instrument**, | ||
| - | |||
| - | ===\namedTransposedCueDuring #" | ||
| - | * Typical call: < | ||
| - | * Description: | ||
| - | |||
| - | === \cleffedCueDuring NameOfQuote CueDirection CueInstrument CueClef OriginalInstrument OriginalClef music === | ||
| - | * Typical call: < | ||
| - | * Description: | ||
| - | % generate a cue music section with instrument names and clef changes | ||
| - | % Parameters: \cleffedCueDuring NameOfQuote CueDirection CueInstrument CueClef OriginalInstrument OriginalClef music | ||
| - | % -) NameOfQuote CueDirection music are the parameters for \cueDuring | ||
| - | % -) CueInstrument and OriginalInstrument are the displayed instrument names | ||
| - | % -) CueClef and OriginalClef are the clefs for the the cue notes and the clef of the containing voice | ||
| - | |||
| - | % This adds the notes from vIQuote (defined via \addQuote) to three measures, prints " | ||
| - | % the beginning of the cue notes and " | ||
| - | % beginning of the cue notes and reset to bass at the end | ||
| - | |||
| - | === \piece-title pieceTitleString === | ||
| - | FIXME | ||
| - | === Other functions, not yet documented === | ||
| - | FIXME | ||
| - | |||
| - | ===== But, I want to ... ===== | ||
| - | |||
| - | ==== I don't like the variable names, can I use a different order? ==== | ||
| - | If you don't like that the variables are generated as '' | ||
| - | < | ||
| - | #(define (namedPieceInstrObject piece instr name) | ||
| - | (let* ( | ||
| - | | ||
| - | | ||
| - | | ||
| - | ) | ||
| - | (cond | ||
| - | ((defined? fullname) (primitive-eval fullname)) | ||
| - | ((defined? instrname) (primitive-eval instrname)) | ||
| - | ((defined? piecename) (primitive-eval piecename)) | ||
| - | (else '()) | ||
| - | ) | ||
| - | ) | ||
| - | ) | ||
| - | </ | ||
| - | Now it's up to you to write a different implementation... (e.g. use varnames of the style '' | ||
| - | But be careful with the order of evaluation, since some large scores might depend on '' | ||
| - | |||
| - | ==== I don't like the structure of the score hierarchy list, can I change it? ==== | ||
| - | |||
| - | Sure, there is only one function that interprets the entries (factory pattern!): '' | ||
| - | |||
| - | If you redefine this function, you have complete control about the decision when to create each type of staff/ | ||
| - | |||
| - | ===== Version History ===== | ||
| - | |||
| - | * 0.01 (2008-03-02): | ||
| - | * 0.02 (2008-03-06): | ||
| - | |||
| - | ===== Known limitations and missing features ===== | ||
| - | |||
| - | * FIXME **Staves with multiple voices** (using \voiceOne, \voiceTwo), possibly with lyrics attached, are not yet implemented. Currently, you'll still have to define those staves manually. | ||
| - | * FIXME Support for **transposing instruments** is missing. You'd define the music in sounding pitch, but the displayed staff would be automatically transposed to the defined key (via a '' | ||
| - | * FIXME Support for other staff types (DrumStaff, RhythmicStaff, | ||
| - | * FIXME Add flag to generate MIDI | ||
lilypond/orchestrallily.1363171350.txt.gz · Zuletzt geändert: (Externe Bearbeitung)
