From 367f1b39644898ed605265c38d42063bbee1df71 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 1 Apr 2017 09:53:37 +0200 Subject: 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. --- 01-song1/01-song1.ly | 5 ++++ 01-song1/music/chords.ly | 62 ++++++++++++++++++++++++++++++++++++++++ 02-song2/02-song2.ly | 2 ++ 03-circus/03-circus.ly | 2 ++ 04-white-noise/04-white-noise.ly | 2 ++ Makefile | 2 +- README.org | 2 ++ layouts.ly | 2 +- 8 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 01-song1/music/chords.ly 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 } >> } -- cgit v1.2.3