From 8c3b3bb8dc830f6e19e5aba8f6268e2a808e159b Mon Sep 17 00:00:00 2001 From: Karchnu Date: Wed, 6 Oct 2021 02:37:00 +0200 Subject: [PATCH] Supermario (no timing). --- .gitignore | 2 ++ Makefile | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.custom | 7 ++++++ supermario.ly | 45 +++++++++++++++++++++++++++++++++++++ 4 files changed, 114 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 Makefile.custom create mode 100644 supermario.ly diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b7177da --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.midi +*.pdf diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..37d766d --- /dev/null +++ b/Makefile @@ -0,0 +1,60 @@ +SRC = supermario +BIBLIOGRAPHY = bibliography +ALLSRC = $(shell find . -name "*.ms") + +# -P => move ponctuation after reference +# -S => label and bracket-label options +# -e => accumulate (use a reference section) +# -p bib => bibliography file +REFER_OPTS = -PS -e -p $(BIBLIOGRAPHY) +REFER = refer $(REFER_OPTS) + +# -k => iconv conversion (did it ever worked?) +# -ms => ms macro +# -Tpdf => output device is PDF +GROFF_OPTS = -t -Tpdf +GROFF = groff $(GROFF_OPTS) + +EQN_OPTS = +EQN = eqn $(EQN_OPTS) + +PRECONV_OPTS = +PRECONV = preconv $(PRECONV_OPTS) + +# ghighlight brings `source-highlight` to troff +GHIGHLIGHT_OPTS = +GHIGHLIGHT = ghighlight $(GHIGHLIGHT_OPTS) + +VIEWER_OPTS = - +VIEWER = zathura $(VIEWER_OPTS) + +SOELIM_OPTS = +SOELIM = soelim $(SOELIM_OPTS) + +PIC_OPTS = +PIC = pic $(PIC_OPTS) + +GRAP_OPTS = +GRAP = grap $(GRAP_OPTS) + +# GH_INTRO: instructions before each source code provided by source-highlight +# GH_OUTRO: ------------ after ---- ------ ---- -------- -- ---------------- +# GH_INTRO/GH_OUTRO: values are separated by ';' + +GH_INTRO := .b1;.nr DI 0;.DS I;.fam C +GH_OUTRO := .fam;.DE;.b2 + +export GH_INTRO +export GH_OUTRO + +# SHOPTS: cmd line parameter given to source-highlight +SHOPTS = --outlang-def=./.source-highlight_groff-output-definition +export SHOPTS + +#$(SRC).pdf: +# cat $(SRC).ms | $(SOELIM) | $(GHIGHLIGHT) | $(PRECONV) | $(GRAP) | $(EQN) | $(PIC) | $(REFER) | $(GROFF) > $@ + +$(SRC).pdf: + lilypond $(SRC).ly + +include Makefile.custom diff --git a/Makefile.custom b/Makefile.custom new file mode 100644 index 0000000..4e15cf7 --- /dev/null +++ b/Makefile.custom @@ -0,0 +1,7 @@ +upload: + scp $(SRC).pdf tacos:/var/www/htdocs/t.karchnu.fr/doc/ + +run: $(SRC).pdf + +serve: + find . -name "*.ly" | entr gmake -B run diff --git a/supermario.ly b/supermario.ly new file mode 100644 index 0000000..d95361c --- /dev/null +++ b/supermario.ly @@ -0,0 +1,45 @@ +\version "2.18.1" +\header { title = \markup "Super Mario ;)" } + +supermario = \relative { + + \repeat volta 2 { + b'8^"main" b b a b d g, % main + + % second + \repeat volta 2 { + c^"start second riff" a f a b a f + e' e d e c d b c a b a + } + + c-"third riff" f, g a g a b + c f, g a e' e e e + c f, g a g a b g f e + + f^"last riff" f f f g a g f e + f f f f g a f e + f f f f g a g f e^"And we"-"start again!" + } +} + +\score { + << + \new Staff { + \supermario + } + %\new TabStaff { + \new TabStaff \with { \override Glissando.style = #'none } { + \supermario + } + >> +} + +\bookpart { + \header { + title = "Super Mario" + } + \score { + \supermario + \midi { } + } +}