Deutschsprachiges LilyPond-Forum

Allgemeine Fragen und Probleme => Spezielle Projekte => Thema gestartet von: PietDip4 am Sonntag, 15. März 2020, 22:44

Titel: Mehrere Ausgabedateien aus einer Eingabedatei mit lalily
Beitrag von: PietDip4 am Sonntag, 15. März 2020, 22:44
Hallo,

aus einer Eingabedatei mehrere Ausgabedateien zu erzeugen ist einfach:


\book {
  %% Ausgabe vollständige Partitur als pdf
}

\book  {
  %% Ausgabe einer Stimme als pdf
}

\include "articulate.ly"

\book {
  %% Ausgabe midi
}


Aber wie erreiche ich das, wenn ich openlilylib.lalily-templates verwende?
Titel: Antw:Mehrere Ausgabedateien aus einer Eingabedatei mit lalily
Beitrag von: Malte am Montag, 16. März 2020, 09:26
Hallo PietDip4,

willkommen im Forum! Da fragst du ja was ... ich habe ehrlich gesagt OLL bisher kaum genutzt und lalily noch überhaupt nie. Könntest du uns ein kompilierbares Minimalbeispiel deiner Situation zeigen? Dann hätte ich zumindest etwas, wo ich anfangen kann ;)

Bitte gib bei Fragen auch immer deine LilyPond-Version an.

Viele Grüße
Malte
Titel: Antw:Mehrere Ausgabedateien aus einer Eingabedatei mit lalily
Beitrag von: PietDip4 am Montag, 16. März 2020, 22:27
Hallo Malte,

in der Tat: Da frage ich etwas! Dabei wird openLilyLib in der Gruppenbeschreibung explizit erwähnt!

Hier ist das auf wenige Takte gekürzte Stück:


%%% -*- coding: utf-8 -*-

\version "2.20"

\header {
  title = "Romanze."
  opus = "Opus 4"
  pdftitle = "Romanze -- Opus 4"
  tagline = ##f
}

\include "oll-core/package.ily"
\loadPackage "lalily-templates"

%% options for complete score
\optionsInit optsCompleteScore
\optionsAddL optsCompleteScore "_order" violin.piano
\optionsAddL optsCompleteScore violin."_template" lalily.instrument.violin
\optionsAdd  optsCompleteScore violin.instrument-name "Violino."
\optionsAdd  optsCompleteScore violin.staff-mods \with {
  \magnifyStaff #.75
  \accidentalStyle "modern-cautionary"
}
\optionsAddL optsCompleteScore piano."_template" lalily.piano
\optionsAdd  optsCompleteScore piano.right-clef "alto"
\optionsAdd  optsCompleteScore piano.context-mods \with {
  instrumentName = "Piano."
  \accidentalStyle "piano-cautionary"
}

\setDefaultTemplate "Leo_Portnoff"."opus_4" group #optsCompleteScore

\putMusic meta {
  \time 4/4
  \tempo "Nicht schnell, anmutig, erzählend." 4 = 108
  \key e \minor
}

\putMusic violin \relative d' {
  r2 r4 d-2\p\upbow | g\flageolet( d e d) | b8( d g-1 a b4. c8) |
  << d2. {s4\< s s\!} >> e8-- fis-- |
  << d2.( {s4\< s s\!} >> \tuplet 3/2 4 {e8--) fis-- g--} |
}

\putMusic piano.right \relative b {
  r8\p <b g d>4 <b g d>8
  \repeat unfold 2 {r8 <b g d>4 <b g d>8} r8 <c g e>4 <b g d>8 |
  r8 <b g d>4( <d a fis>8) r8 <g d b>4( <g c>8) |
  \repeat unfold 2 {r8 <fis d>} r8 <g d> r <a d,> |
  \repeat unfold 2 {r8 <fis d>} r8 <g d> r <g e> |
}

\putMusic piano.left \relative g, {
  g2 g | g g | g g'4.( a8) | \repeat percent 2 { b4( b, b' c->) } |
}


\lalilyCreate

\setMusicFolder "Leo_Portnoff"."opus_4".violin
\setTemplate lalily.instrument.violin

\lalilyCreate

%%% Local Variables:
%%% eval: (LilyPond-mode)
%%% End:


\lalilyCreate scheint \bookparts zu erstellen; ich hätte aber gerne \books: Ein \book für die Klavierbegleitung und ein weiteres \book für die Geigenstimme. Erst nachdem die PDFs erstellt sind, soll articulate.ly geladen werden, denn zumindest in der \version "2.18.2" hatte articulate.ly negative Auswirkungen auf die Darstellung in den PDFs. Danach MIDI-Ausgabe in einem eigenen \book mit \articulate und \unfoldRepeats. Wie lässt sich all das mit laLily umsetzen?