Deutsches Lilypond Forum (Archiv)
Allgemein => Fragen zu Funktionen => Thema gestartet von: alegria am Sonntag, 9. September 2012, 20:09
-
Hey,
ich möchte den halbverminderten Akkord, der hier (http://lilypond.org/doc/v2.14/Documentation/notation/chord-name-chart (http://lilypond.org/doc/v2.14/Documentation/notation/chord-name-chart)) als Alternative mit C7b3b5 vorgeschlagen wird, als typisch jazzigen Cm7/b5 notieren...
Wie mach ich das???
P.S. Hab lily 2.14.2...
-
Schau mal hier (https://liarchiv.joonet.de/index.php?topic=976.0) hin.
-Harm
-
Puh, das ist heftig... Aber danke!
(für mich macht es das hier super: http://lsr.dsi.unimi.it/LSR/Snippet?id=750 (http://lsr.dsi.unimi.it/LSR/Snippet?id=750))
-
Hab nun doch wieder ein Problem gefunden... Das beliebte deutsche: H-Akkord vs. B-Akkord
Include "deutsch.ly" liefert mir ein string Fehler bei "\super" (unexpected string), hab den Verweis daher rausgenommen und einfach B zu H in der Zeile mit den vector-ref geändert... Aber was wenn tatsächlich B gewünscht, also H Halbton tiefer!? Da müsste man dann ja nur m.E. - mal so prosaisch gesprochen - einfach an dieser Stelle hier sofern H eingegeben dann ersetze mit B...
;; Otherwise, handle adding the flat symbol
(make-line-markup
(list
...
Das gesamt Beispiel:
\version "2.14.2"
%\include "deutsch.ly"
chordFlat = \markup { \hspace #0.2 \fontsize #-1 \raise #0.3 "b" }
chordSharp = \markup { \hspace #0.1 \fontsize #-1 \raise #0.3 "#" }
myPopChordsMusic =
{
<c es ges bes>-\markup { "m" \super { "7/" \chordFlat "5" } }
<c e g bes dis'>-\markup { \super { "7/" \chordSharp "9" } }
}
myPopChordsAdd = #(append (sequential-music-to-chord-exceptions myPopChordsMusic #t) ignatzekExceptions)
#(define (conditional-string-downcase str condition)
(if condition
(string-downcase str)
str))
% fix accidentals with some Scheme (using the current font's symbols)
#(define (my-chord-name->pop-markup pitch lowercase?)
(let* ((alt (ly:pitch-alteration pitch)))
(make-line-markup
(list
(make-simple-markup
(conditional-string-downcase
(vector-ref #("C" "D" "E" "F" "G" "A" "H") (ly:pitch-notename pitch))
lowercase?))
;; If it's natural, do nothing
(if (= alt 0)
(make-line-markup (list empty-markup))
(if (= alt FLAT)
;; Otherwise, handle adding the flat symbol
(make-line-markup
(list
(make-hspace-markup 0.3)
(make-small-markup (make-raise-markup 0.7
(make-text-markup "b")))))
;; or handle adding the sharp symbol
(make-line-markup
(list
(make-hspace-markup 0.1)
(make-small-markup (make-raise-markup 0.7
(make-text-markup "#")))))))))))
\new Score
{
\new ChordNames
{
\set chordNameExceptions = #myPopChordsAdd
\set chordRootNamer = #my-chord-name->pop-markup
\chordmode {
d:m7.5-
b:m7.5-
bes:m7.5-
}
}
}
Hat mich jemand verstanden was ich meine und kann den Code hier abändern???
-
Puh, das ist heftig...
Nö, im Gegenteil, das LSR-snippet greift wesentlich tiefer in die Interna ein!
Hab nun doch wieder ein Problem gefunden... Das beliebte deutsche: H-Akkord vs. B-Akkord
Wenn Du \include "deutsch.ly" verwendest mußt Du natürlich auch die Töne in der Akkord-definition richtig schreiben also "b" statt "bes", eben überall.
Hier mein Vorschlag:
\version "2.14.2"
\include "deutsch.ly"
chExceptionMusic = {
<c es ges b>1-\markup {"m" \super { "7/" \hspace #0.2 \fontsize #-1 \raise #0.5 \flat "5"} }
}
chExceptions = #( append
(sequential-music-to-chord-exceptions chExceptionMusic #t)
ignatzekExceptions)
\layout {
ragged-right = ##f
\context {
\ChordNames
%\germanChords
chordNameExceptions = #chExceptions
majorSevenSymbol = \markup { maj7 }
chordNameSeparator = #(make-simple-markup "")
}
}
\chords {
d:m7.5-
b:m7.5-
h:m7.5-
}
Wenn Du auch die deutsche Akkordschreibweise haben willst, dann kommentier \germanChords ein.
Das LSR-snippet wurde eigentlich geschrieben, um einen anderen Darstellungsstil anzubieten (indem der Buchstabe "b" anstatt des Vorzeichens verwendet wird)
Falls Du diese Schreibweise vorziehst, so komme ich frühestens am Wochenende dazu mich damit zu befassen, aber vielleicht ist ja jemand schneller.
Gruß,
Harm
-
Danke. Klappt so... Endlich! :)