Standardbass - Punkteverteilung verändern (gelöst)

Begonnen von Manuela, Donnerstag, 25. Mai 2017, 11:27

« vorheriges - nächstes »

Manuela

Hi,

ich bräuchte eine andere Punkteverteilung als mit den diversen vordefinierten Bezeichnung möglich ist.

\version "2.19.56"
#(use-modules (scm accreg))
\stdBassV #"Tenor"


würde noch am nächsten kommen, den rechten Punkt in der oberen Reihe würde ich entfernen wollen.

Jetzt habe ich im Lilypond Programmverzeichnis gegraben und diese Definition in der Datei accreg.scm gefunden

(define-register-set stdBassV
'((glyph . "accordion.stdbass")
    (reedbank
     (Sopranos (dots (-0.5 . 3.5) (0.5 . 3.5)))
     (Soprano (dots (0 . 3.5)))
     (Alto (dots (0 . 2.5)))
     (Tenor (dots (0 . 1.5)))
     (Bass (dots (0 . 0.5))))
    (register
     ("Bass/Alto" (reedbanks Bass Alto Soprano))
     ("Soft Bass/Alto" (reedbanks Bass Alto))
     ("Alto" (reedbanks Alto Sopranos))
     ("Tenor" (reedbanks Tenor Sopranos))
     ("Master" (reedbanks Bass Tenor Alto Sopranos))
     ("Soft Bass" (reedbanks Bass Tenor Alto))
     ("Soft Tenor" (reedbanks Tenor Alto))
     ("Soprano" (reedbanks Soprano))
     ("Sopranos" (reedbanks Sopranos))
     ("Solo Bass" (reedbanks Bass)))))


Ich würde mir schon zutrauen, die Punkteverteilung abzuändern, schaffe es jedoch nicht, den veränderten Code in meine Lilypond Datei einzubinden. Direkt im Lilypond Programmverzeichnis will ich auch nicht herumpfuschen, weil die Änderung dann mit dem nächsten Update weg ist.

Wie muss der Scheme-Code beschaffen sein, damit ich eine eigene Bassregisterdefinition verwenden kann?
Danke für eure Hilfe
viele Grüße
-- Manuela

harm6

define-register-set ist ein nicht öffentliches macro, Du mußt es also ins ly-file holen, z.B.:


\version "2.19.56"

#(use-modules (scm accreg))

%% c/p from scm/accreg.scm
#(defmacro* define-register-set (set-symbol doc #:optional definition)
  "Defines markup command named with @var{set-symbol} for creating
accordion register markups as well as a music function of the same
name.

@var{doc} is the optional documentation string followed by the actual
@var{definition}.  See existing definitions in @file{scm/accreg.scm}
for examples."
  `(begin
     (define-markup-command (,set-symbol layout props name) (string?)
       #:properties (translate-scaled-markup)
       #:category accordion-registers
       ;; It would be nice to generate the documentation string
       ;; automatically containing all possible registrations but this
       ;; is a hen-and-egg problem.  When the macro is being executed,
       ;; the register definition has not yet been evaluated.  It
       ;; would be feasible to not ever evaluate it and consider it
       ;; final.  But that seems like a somewhat unfriendly interface.
       ,(if definition doc "Undocumented.")
       (let* ((instrument ,(or definition doc))
              (register
               (ly:assoc-get name (ly:assoc-get 'register instrument)))
              (reedbanks (ly:assoc-get 'reedbank instrument)))
         (interpret-markup
          layout props
          (make-general-align-markup
           Y DOWN
           (fold (lambda (d m)
                   (markup #:combine m
                           #:translate-scaled d
                           #:musicglyph "accordion.dot"))
                 (markup #:musicglyph
                         (ly:assoc-get 'glyph instrument))
                 (or (ly:assoc-get 'dots register)
                     (append-map (lambda (x)
                                   (ly:assoc-get 'dots
                                                 (ly:assoc-get x reedbanks)))
                                 (ly:assoc-get 'reedbanks register))))))))

     (define-public ,set-symbol
       (define-music-function (register)
         (string?)
         ,(format #f "Equivalent to @code{<>^\\markup \\~a@var{REGISTER}}."
                  set-symbol)
         (make-event-chord
          (list
           (make-music
            'TextScriptEvent
            'direction
            1
            'text
            (,(string->symbol (format #f "make-~a-markup" set-symbol)) register))))))))

%% changed, based upon stdBassV
#(define-register-set my-stdBassV
'((glyph . "accordion.stdbass")
    (reedbank
     (Sopranos
       (dots
         (-0.5 . 3.5)
         ;(0.5 . 3.5) ;; commented
         ))
     (Soprano (dots (0 . 3.5)))
     (Alto (dots (0 . 2.5)))
     (Tenor (dots (0 . 1.5)))
     (Bass (dots (0 . 0.5))))
    (register
     ("Bass/Alto" (reedbanks Bass Alto Soprano))
     ("Soft Bass/Alto" (reedbanks Bass Alto))
     ("Alto" (reedbanks Alto Sopranos))
     ("Tenor" (reedbanks Tenor Sopranos))
     ("Master" (reedbanks Bass Tenor Alto Sopranos))
     ("Soft Bass" (reedbanks Bass Tenor Alto))
     ("Soft Tenor" (reedbanks Tenor Alto))
     ("Soprano" (reedbanks Soprano))
     ("Sopranos" (reedbanks Sopranos))
     ("Solo Bass" (reedbanks Bass)))))
     
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% EXAMPLE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\markup \my-stdBassV #"Tenor"


HTH,
  Harm

Manuela

Danke für eure Hilfe
viele Grüße
-- Manuela