[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
flash cards
From: |
Hugh Myers |
Subject: |
flash cards |
Date: |
Fri, 18 Dec 2009 18:15:06 -0700 |
I have previously seen inquires about making flash cards with
Lilypond. Thinking that this would be a good way to learn more about
the world of musical typesetting I decided to re-invent this
particular wheel. With a fair amount of help from the list here is
cards.ly:
%%%%%%%%%%
%%
%% cards.ly -- Lilypond flash cards with tablature
%%
%%%%%%%%%%
\version "2.13.7"
\include "rhythm.ly"
\header {
tagline = ##f
}
\layout {
\context {
\Staff
\remove "Time_signature_engraver"
\override VerticalAxisGroup #'next-staff-spacing = #'(
(space . 15)(padding . 0)(stretchability . 0)(minimum-distance . 12))
}
}
\paper {
indent = 0\mm
paper-width = 3\in
line-width = 1.5\in
paper-height = 5\in
print-page-number = ##f
ragged-last-bottom = ##f
}
flashNote = #(define-music-function (parser location note)(ly:music?) #{
\makeRhythm $note "4" s2. \pageBreak
#}
)
flashcard = {
\flashNote e,
\flashNote f
\flashNote fis
\flashNote g
\flashNote gis
\flashNote a
\flashNote ais
\flashNote b
\flashNote c
\flashNote cis
\flashNote d
\flashNote dis
\flashNote e
\flashNote f
\flashNote fis
\flashNote g
\flashNote gis
\flashNote a
\flashNote ais
\flashNote b
\flashNote c
\flashNote cis
\flashNote d
\flashNote dis
\flashNote e
\flashNote f
\flashNote fis
\flashNote g
\flashNote gis
\flashNote a
\flashNote ais
\flashNote b
\flashNote c
\flashNote cis
\flashNote d
\flashNote dis
}
{
<<
\new StaffGroup <<
\set Score.barNumberVisibility = ##f
\new Staff \relative c' {
\flashcard
}
\new TabStaff \relative c {
\flashcard
}
>>
>>
}
Most of the 'picky' stuff is in \header, \layout and \paper. The
function \flashNote is there because I dislike typing when I don't
have to although I'm not fanatic about it ;-) It is also there because
I wanted an excuse to learn more about Lilypond functions(this one is
beginner level substitution at best). Modifying this for similar needs
should not be difficult.
--hsm
- flash cards,
Hugh Myers <=