summaryrefslogtreecommitdiff
path: root/input/regression/tablature-micro-tone.ly
blob: a7f891c048ff65f8a97384c80b8f2caf15c24269 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
\version "2.19.31"

\header {
  texidoc = "The @code{TabStaff} will print micro-tones as mixed numbers of
fret-number and a fraction.
The context-property @code{supportNonIntegerFret} needs to be set @code{#t}
in @code{Score}-context.
@code{FretBoards} will print those micro-tones only if they can be found in the
chosen settings for @code{stringTunings}, otherwise a warning (surpressed here)
will be printed and an empty @code{FretBoard} returned.  Which should be the
case for the last four of the examples pitches.
Micro-tones assigned to strings work nicely."
}

#(ly:set-option 'warning-as-error #f)
#(for-each
  (lambda (pitch)
    (ly:expect-warning (_ "No string for pitch "))
    (ly:expect-warning (_ "Requested string for pitch requires negative fret"))
    (ly:expect-warning (_ "Ignoring string request and recalculating.")))
  (iota 4))

\layout {
  \context {
    \Score
    supportNonIntegerFret = ##t
  }
}

custom-tuning = \stringTuning <e, a, d ges beh eeh'>

mus = \relative {
  eeses'4
  eeseh
  ees
  eeh
  e
  eih
  eis
  eisih
  eisis
  geseh,,\6
  geh\6
  gih\6
  gisih\6
}

<<
  \new Staff << \clef "G_8" \mus >>
  \new FretBoards \with { stringTunings = \custom-tuning } \mus
  \new TabStaff \with { stringTunings = \custom-tuning } \mus
>>