Deutsches Lilypond Forum (Archiv)
Allgemein => Fragen zu Funktionen => Thema gestartet von: stefanhuglfing am Mittwoch, 5. März 2014, 16:15
-
Kann ich den Tabulator-Notenschlüssel auch an eine ganz normale Fünfliniennotenzeile stzen?
-
Ja, das geht. Aber warum willst du das tun? Es handelt sich dann doch gar nicht um eine Tabulatur …
\version "2.18.0"
\new Staff \with {
\override Clef.stencil = #ly:text-interface::print
\override Clef.text = \markup \raise #1 \musicglyph #"clefs.tab"
} {
c'
}Edit: und wenn die Noten nicht im Violinschlüssel stehen sollen, geht das auch:
\version "2.18.0"
\new Staff \with {
\override Clef.stencil = #ly:text-interface::print
\override Clef.text = \markup \raise #-1 \musicglyph #"clefs.tab"
} {
\clef bass
c'
}
-
Oder wolltest du womöglich ne ganz normale Tabulatur für ein fünfsaitiges Instrument?
\version "2.18.0"
\new TabStaff \with {
stringTunings = #bass-five-string-tuning
} {
c
}Weitere vordefinierte und selbst definierte Stimmungen findest du in der Dokumentation unter http://lilypond.org/doc/v2.18/Documentation/notation/common-notation-for-fretted-strings#custom-tablatures
-
Aber warum willst du das tun? Es handelt sich dann doch gar nicht um eine Tabulatur …
Ich möchte ein Stück in Griffschrift für Steirische Harmonika aufschreiben. Die sieht äußerlich fast wie normale Noten aus, also auf fünf Linien. Die Noten haben aber eine andere Bedeutung. Deshalb wäre ein Violinschlüssel irreführend.
Jedenfalls Danke für die schnelle Antwort.
-
Ist da ein TAB-Schlüssel üblich? Oder gibt es einen eigenen? Oder womöglich gar keinen? Im zweiten Fall reicht ein \new Staff \with { \override Clef.stencil = ##f } { … }, im ersten Fall kann man sich bestimmt was passendes bauen (LilyPond kann so gut wie alles ;) )
-
richtig üblich ist ein TAB-Schlüssel nicht, wird aber manchmal geschrieben (nur damit nicht gar nichts dasteht).
Was selber basteln wäre interessant. Glaubst du, das kann ich?
Gibt es dafür irgendwo eine Beschreibung?
-
richtig üblich ist ein TAB-Schlüssel nicht, wird aber manchmal geschrieben (nur damit nicht gar nichts dasteht).
Was selber basteln wäre interessant. Glaubst du, das kann ich?
Gibt es dafür irgendwo eine Beschreibung?
http://lilypond.org/doc/v2.18/Documentation/notation-big-page#modifying-stencils (http://lilypond.org/doc/v2.18/Documentation/notation-big-page#modifying-stencils)
führt zu:
\version "2.18.0"
newClef = {
\override Staff.Clef.stencil = #ly:text-interface::print
\override Staff.Clef.text = \markup {
\fontsize #-2.5
\raise #1.7
\override #'(baseline-skip . 1.3)
\center-column { T A B }
}
}
\score {
{ bes1 }
\layout { \newClef }
}
Ich habe vor einiger Zeit auch mal den code unten geschrieben, mit dem Vorteil, daß man den Schlüssel nicht überschreibt, sondern einen neuen Schlüssel kreiert und mit Namen verwendet.
\version "2.18.0"
%% An empty list to accumulate settings for custom tab-clefs
#(define clefs-settings-list '())
%% The procedure to fill 'clefs-settings-list' and to add the new clef to
%% 'supported-clefs' and 'c0-pitch-alist', to be found in /scm/parser-clef.scm
%% The 'text'-variable is optional. If not set, it will be valuated by
%% the markup-command 'custom-tab-clef', defined later.
#(define*-public (make-clef-settings name font-family font-name #:optional text)
(set! clefs-settings-list
(cons
`(,name
. (
("font-family" . ,font-family)
("font-name" . ,font-name)
("name-glyph" . ,(format "markup.~a" name))
("text" . ,text)))
clefs-settings-list))
(add-new-clef name (format "markup.~a" name) 1 0 0))
%% The default, "moderntab", is loaded
#(make-clef-settings "moderntab" 'sans 'default)
%% Define tab-Clefs as a markup:
#(define-markup-command
(custom-tab-clef layout props ls num-strings staff-space name)
(list? integer? number? string?)
#:category music
"Draw a customized tab clef."
(let* ((scale-factor (/ staff-space 1.5))
(font-size (- (* num-strings 1.5 scale-factor) 7))
(base-skip (* (expt (+ (* num-strings 0.195) 0.4) 2) scale-factor))
;; find the settings in 'ls'
(custom-name (assoc name ls))
(custom-font-family (assoc-get "font-family" (cdr custom-name)))
(custom-font-name (assoc-get "font-name" (cdr custom-name)))
;; "text" is optional in 'make-clef-settings'.
;; If not found, use fall-back
(custom-text
(or (assoc-get "text" (cdr custom-name))
(markup #:center-column ("T" "A" "B")))))
(interpret-markup layout props
(markup ;#:vcenter
#:bold
#:override (cons 'font-family custom-font-family)
#:override (cons 'font-name custom-font-name)
#:fontsize font-size
#:override (cons 'baseline-skip base-skip)
#:left-align custom-text))))
%% This function decides which clef to take.
#(define-public (clef::print-modern-tab-if-set grob)
;; If no corresponding entry is found in 'clefs-settings-list',
;; let 'custom-name' return <unspecified> and 'custom-name-glyph' #f.
;; Results in printing the default-stencil and the default warning about
;; unknown clef type.
(let* ((glyph (ly:grob-property grob 'glyph))
(clef-setting
(assoc (last (string-split glyph #\.)) clefs-settings-list))
(custom-name
(if clef-setting (car clef-setting)))
(custom-name-glyph
(if clef-setting (assoc-get "name-glyph" (cdr clef-setting)) #f)))
;; which clef is wanted?
(if custom-name-glyph
;; if it is 'custom-name', we'll draw it
(let* ((staff-symbol (ly:grob-object grob 'staff-symbol))
(line-count (if (ly:grob? staff-symbol)
(ly:grob-property staff-symbol 'line-count)
0))
(staff-space (ly:staff-symbol-staff-space grob)))
(grob-interpret-markup grob
(make-custom-tab-clef-markup
clefs-settings-list line-count staff-space custom-name)))
;; otherwise, we simply use the default printing routine
(ly:clef::print grob))))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% EXAMPLES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Defines a clef called "altTab"
% With:
% font-family 'roman
% font-name "Purisa"
% and a new text
mrkp-to-insert-one =
\markup \raise #0.3 \center-column { foo bar buzz }
#(make-clef-settings "altTab" 'roman "Purisa" mrkp-to-insert-one)
% Defines a clef called "alterTab"
% With:
% font-family 'roman
% font-name "ComicSans MS"
% and a new text
mrkp-to-insert-three =
\markup \raise #0.25 \center-column { T A B }
#(make-clef-settings "alterTab" 'roman "ComicSans MS" mrkp-to-insert-three)
% Define a clef called "harm"
% With a highly customized text to insert, quite excentric ;)
mrkp-to-insert-two =
\markup {
\raise #0.3 \center-column { "Here," "the" "default" }
\raise #-0.5 \musicglyph #"clefs.tab"
\raise #0.6 \center-column { "is replaced" "by the" "customized:" }
\bold
\raise #0.2
\fontsize #-1
\override #'(baseline-skip . 1.3)
\center-column { T A B }
}
#(make-clef-settings "harm" 'roman "URW Chancery L" mrkp-to-insert-two)
% If you want default settings for font-family/name
% write 'default or #f
#(make-clef-settings "harm-2" #f 'default (markup #:medium mrkp-to-insert-two))
\layout {
\context {
\Staff
\override Clef #'stencil = #clef::print-modern-tab-if-set
%% Every Clef-change at linebreak would print the new clef at line-end.
%% For now this default is disabled
explicitClefVisibility = ##(#f #t #t)
}
}
\new Staff {
% Because "\clef harm" is a little large:
\once \override Staff.Clef #'X-extent = #'(-1 . 20)
\clef harm
ais1
\break
\clef moderntab
b1
\break
\clef altTab
c1
\break
\clef alterTab
d1
\break
% \clef "harm-2" is a little large, too:
\once \override Staff.Clef #'X-extent = #'(-1 . 37)
\clef "harm-2"
e1
}
Ich möchte ein Stück in Griffschrift für Steirische Harmonika aufschreiben.
Kennst Du:
https://liarchiv.joonet.de/index.php?topic=1158.0 (https://liarchiv.joonet.de/index.php?topic=1158.0)
?
Gruß,
Harm
-
Kennst Du:
https://liarchiv.joonet.de/index.php?topic=1158.0 (https://liarchiv.joonet.de/index.php?topic=1158.0)
?
Ja, das Thema habe ich mir vor längerer Zeit mal angeschaut, auch den Film von David Kastrup. Aber das zielt in eine andere Richtung. Wenn ich mich richtig erinnere sollten dort durch Eingabe von Buchstaben die Akkorde als Notenbild erzeugt werden. Und ich brauche ja gerade nur Buchstaben für die Akkorde.