summaryrefslogtreecommitdiff
path: root/hr/stch/fertig/brevis_leavitt/sanctus/midi.lua
diff options
context:
space:
mode:
Diffstat (limited to 'hr/stch/fertig/brevis_leavitt/sanctus/midi.lua')
-rw-r--r--hr/stch/fertig/brevis_leavitt/sanctus/midi.lua51
1 files changed, 51 insertions, 0 deletions
diff --git a/hr/stch/fertig/brevis_leavitt/sanctus/midi.lua b/hr/stch/fertig/brevis_leavitt/sanctus/midi.lua
new file mode 100644
index 0000000..e22ba8e
--- /dev/null
+++ b/hr/stch/fertig/brevis_leavitt/sanctus/midi.lua
@@ -0,0 +1,51 @@
+ -- some settings -- vim: ai sw=2 lbr nu et
+
+pre=[[
+%some settings% vim: ai sw=2 lbr nu et
+
+\version "2.12"
+\include "stimmen.ly"
+
+ \score {
+ \unfoldRepeats
+]]
+
+post=[[
+ \midi {
+ \context{
+ \Score
+ tempoWholesPerMinute = #(ly:make-moment 120 4)
+ }
+ }
+ }
+]]
+
+voices={ "s", "a", "t", "b" }
+expand = { s="sopran", a="alt", t="tenor", b="bass" }
+map = { sopran="soprane", alt="alti", tenor="tenoere", bass="baesse" }
+
+function text(stimme)
+ return
+[[
+ \new Staff = ]]..stimme..[[ <<
+ %\new Voice = "meta" { s1*<+Anzahl der Takte+> \bar "|." }
+ \new Voice = "]]..map[stimme]..[[" { \global \]]..stimme..[[Melodie }
+ >>
+]]
+end
+
+function err() print("oops") os.exit() end
+
+which=which or "satb"
+if type(which)~="string" then err() end
+
+for _,v in pairs(voices) do
+ if string.find(which, v) then pre=pre..text(expand[v]) end
+end
+
+input=pre..post
+
+--os.execute(lilypond -...)
+io.stdout:write(input)
+os.exit()
+