summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2017-04-01 09:53:37 +0200
committerRicardo Wurmus <rekado@elephly.net>2017-04-01 14:10:50 +0200
commit367f1b39644898ed605265c38d42063bbee1df71 (patch)
tree3444086d64d46f6b0346439de760aadac1cd0927
parent48db0fc4b6ad9162c183457a4971b270bc83fa44 (diff)
Add chord track (enable with LILYPOND_USE_CHORDS).
This is used for the drum guide track where too much detail would distract from the click.
-rw-r--r--01-song1/01-song1.ly5
-rw-r--r--01-song1/music/chords.ly62
-rw-r--r--02-song2/02-song2.ly2
-rw-r--r--03-circus/03-circus.ly2
-rw-r--r--04-white-noise/04-white-noise.ly2
-rw-r--r--Makefile2
-rw-r--r--README.org2
-rw-r--r--layouts.ly2
8 files changed, 77 insertions, 2 deletions
diff --git a/01-song1/01-song1.ly b/01-song1/01-song1.ly
index 6ace047..c115733 100644
--- a/01-song1/01-song1.ly
+++ b/01-song1/01-song1.ly
@@ -11,6 +11,7 @@
\include "music/keys.ly"
\include "music/stick.ly"
\include "music/click.ly"
+\include "music/chords.ly"
\layout {
ragged-last = ##t
@@ -46,4 +47,8 @@ AllMusic = <<
} { \stick }
>>
+AllMusicMIDI = #(if (string-null? (getenv "LILYPOND_USE_CHORDS"))
+ #{ \AllMusic #}
+ #{ \chordTrack #})
+
\include "../layouts.ly"
diff --git a/01-song1/music/chords.ly b/01-song1/music/chords.ly
new file mode 100644
index 0000000..7e5289a
--- /dev/null
+++ b/01-song1/music/chords.ly
@@ -0,0 +1,62 @@
+chordsA = \relative b {
+ \time 2/4
+ cis8 r cis r | r2 | r2 |
+ cis8 r cis r | r2 | \time 6/8 r2. |
+
+ \time 2/4
+ cis8 r cis r | r2 | r2 |
+ \time 4/4
+ \chordmode { cis4.:m c:m5- cis4:m ~ | q1 | }
+}
+
+chordsAextended = \chordmode {
+ cis4.:m fis:m5- cis4:m7 ~ | q1 |
+ cis4.:m c:m5- cis4:m ~ | q1 |
+ cis4.:m fis:m5- cis4:m7 ~ | q1 |
+}
+
+chordsVerse = \chordmode {
+ cis1:m ~ | q1 |
+ e2. b,4 ~ | q1 |
+ cis1:m ~ | q1 |
+ e2. b,4 ~ | q1 |
+ a,1:maj7 ~ | q1 |
+ a,2. b,4 ~ | q1 |
+}
+
+chordTrack = \relative b {
+ \set PianoStaff.midiInstrument = #"electric piano 1"
+ \chordmode {
+ %% intro
+ \repeat volta 4 {
+ \repeat volta 3 {
+ b,4 r8 cis2:m r8 |
+ }
+ e2 b,2
+ }
+ }
+
+ %% A
+ \repeat volta 2 \chordsA
+
+ \chordsAextended
+ \chordmode { e2. a4 ~ | a1 ~ | q1 | }
+
+ %% verses
+ \repeat volta 3 \chordsVerse
+ \transpose cis bes \chordsVerse
+ \chordsVerse
+
+ \repeat volta 2 \chordsA
+ \chordsAextended
+ \keysATransitionVariant
+
+ \nastyPause
+ \keysNasty
+ \keysWaltz
+ \repeat volta 2 \chordsA
+ \chordsAextended
+ \keysATransitionPreOutro
+ \repeat volta 2 \keysOutro
+ \keysEnd
+}
diff --git a/02-song2/02-song2.ly b/02-song2/02-song2.ly
index b90fb30..160aa2d 100644
--- a/02-song2/02-song2.ly
+++ b/02-song2/02-song2.ly
@@ -54,4 +54,6 @@ AllMusic = <<
} { \tabChordRepeats \guitar }
>>
+AllMusicMIDI = AllMusic
+
\include "../layouts.ly"
diff --git a/03-circus/03-circus.ly b/03-circus/03-circus.ly
index 0f9d5de..9dc3e19 100644
--- a/03-circus/03-circus.ly
+++ b/03-circus/03-circus.ly
@@ -49,4 +49,6 @@ AllMusic = <<
} { \stick }
>>
+AllMusicMIDI = AllMusic
+
\include "../layouts.ly"
diff --git a/04-white-noise/04-white-noise.ly b/04-white-noise/04-white-noise.ly
index 2073b1f..27aba8f 100644
--- a/04-white-noise/04-white-noise.ly
+++ b/04-white-noise/04-white-noise.ly
@@ -47,4 +47,6 @@ AllMusic = <<
} { \stick }
>>
+AllMusicMIDI = AllMusic
+
\include "../layouts.ly"
diff --git a/Makefile b/Makefile
index 7d3199b..c9db328 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ SOUNDFONT = $(HOME)/soundfonts/FluidR3GM.sf2
# Determine how many processors are present
CPU_CORES=`grep -m1 "cpu cores" /proc/cpuinfo | tr -cd '[:digit:]'`
# The command to run lilypond
-LILY_CMD = lilypond -dinclude-settings=settings.ly -ddelete-intermediate-files -drelative-includes -djob-count=$(CPU_CORES)
+LILY_CMD = LILYPOND_USE_CHORDS=$(LILYPOND_USE_CHORDS) lilypond -dinclude-settings=settings.ly -ddelete-intermediate-files -drelative-includes -djob-count=$(CPU_CORES)
SUBDIRS := 01-song1 02-song2 03-circus 04-white-noise
diff --git a/README.org b/README.org
index 5551ee2..8447221 100644
--- a/README.org
+++ b/README.org
@@ -23,3 +23,5 @@ To build a drum guide track with click:
#+BEGIN_SRC sh
make guide
#+END_SRC
+
+When the environment variable =LILYPOND_USE_CHORDS= is set a simplified chord track is rendered for use as a drum guide.
diff --git a/layouts.ly b/layouts.ly
index b382da2..708d0e0 100644
--- a/layouts.ly
+++ b/layouts.ly
@@ -3,7 +3,7 @@
\score {
\unfoldRepeats {
<<
- \AllMusic
+ \AllMusicMIDI
\new DrumStaff { \click }
>>
}