Creating keyboard diagrams with chords or scales: Difference between revisions
m New category |
mNo edit summary |
||
| Line 1: | Line 1: | ||
For use in education a scheme function to display chords on a keyboard have been created. | For use in education a scheme function to display chords on a keyboard have been created. | ||
The function is called | The function is called <code>\keys</code> and it takes a list of note names as its argument. For example, | ||
\keys #'(c e g bes) | \keys #'(c e g bes) | ||
creates a C7 chord. | |||
The following note names are accepted: c, cis, des, d, ..., ais, bes, b, c', cis', des', ..., bes', b', c''. | |||
The function can be wrapped up in a markup command like this: | |||
cnine=\markup\keys #'(c e g bes d') | |||
cnine=\markup\keys #'(c e g bes d') | |||
and be used like this | and be used like this | ||
\relative c' { | \relative c' { <c e g bes d'>^\cnine } | ||
<lilypond version="2.24"> | <lilypond version="2.24"> | ||
#(define KEY-POS-LIST '( | #(define KEY-POS-LIST '( | ||
(c . 1) (cis . 1.5) (des . 1.5) (d . 2) (dis . 2.5) (ees . 2.5) (e . 3) | (c . 1) (cis . 1.5) (des . 1.5) (d . 2) (dis . 2.5) (ees . 2.5) (e . 3) | ||