lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A small step for guitar chord diagrams: syntax


From: Heikki Johannes Junes
Subject: A small step for guitar chord diagrams: syntax
Date: Sun, 01 Feb 2004 20:51:09 +0200 (EET)
User-agent: HUT webmail, IMP 2.2.6

I present here one possibility for the chord diagram syntax.

The syntax for guitar chord diagrams could be taken combined from the syntax of
tablatures and fingering:

\notes \context TabDiagram {
  <a,\5 d\4-2 a\3-3 cis'\2-4 e'\1>
}

Here, the order of string `\1´ and finger `-1´ does not matter. A missing
fingering is not printed, and a missing string (here `e,´) will have an `x´
fingering, which means that the string should not be played:
x o       o
===========
|_|_|_|_|_|
|_|_o_o_o_|
|_|_|_|_|_|
|_|_|_|_|_|
| | | | | |
    2 3 4

Here, `=´ is bold line, `|´ and `_´ are thin lines, and `o´ is a filled circle
on string and open circle (free string) above diagram, `x´ is a cross (not 
played).

The minimum fret (here 0) is chosen as the basis of the chord, and if it is
larger than 1, for example 2, it is printed on the right side of the top row:

\notes \context TabDiagram {
  <b,\5-1 e\4-2 b\3-3 dis'\2-4 fis'\1-1>
}
x
===========
=========== 2
|_|_|_|_|_|
|_|_o_o_o_|
|_|_|_|_|_|
|_|_|_|_|_|
| | | | | |
  1 2 3 4 1

Chord name should be printed above; here the syntax is just a guess:

\TabDiagramGroup {
  \context ChordNames {
    b4:7
  }
  \notes \context TabDiagram {
    <b,\5-1 e\4-2 a\3-1 dis'\2-4 fis'\1-1>4
  }
}

The durations above will not be printed at all:

      7
     B
x
===========
=========== 2
|_|_|_|_|_|
|_|_o_|_o_|
|_|_|_|_|_|
|_|_|_|_|_|
| | | | | |
  1 2 1 4 1

A more compact syntax could be, for example,

\notes \context TabDiagram {
  % a tabulated chord diagram with the corresponding name, B^7,
  b1:7

  % given fret positions,
  <b,\5-1 e\4-2 a\3-1 dis'\2-4 fis'\1-1>1 

  % given fret positions with diagram name attached to the base note B, B^7,
  <b,:7\5-1 e\4-2 a\3-1 dis'\2-4 fis'\1-1>1

  % as above, but with different base note: B^7/F#
  <fis,\6-1 b,:7\5-1 e\4-2 a\3-1 dis'\2-4 fis'\1-1>1
}

This is my best guess. The base note should be always present.

-- 
  Heikki Junes




reply via email to

[Prev in Thread] Current Thread [Next in Thread]