• Willkommen im Forum „Archiviertes Lilypond Forum (2017)“.
 

Dies ist das Archiv des alten Forums (bis März 2017). Das aktuelle Forum ist unter lilypondforum.de zu finden.
This is the archive of the old forum (until March 2017). You can find the current forum at lilypondforum.de.

Hauptmenü

Bassdrum & Snaredrum

Begonnen von donblech, Donnerstag, 22. März 2012, 12:54

Vorheriges Thema - Nächstes Thema

donblech

Hallo an alle,

ich würde gerne im drummode die Bassdrum vom ersten Zwischenraum unter das System bringen (also von F auf D im Violinschlüssel), und die Snaredrum auf die mittlere Notenlinie. Ich benutze Version 2.12.3.
Hat jemand eine idee?
Schönen Tag noch,

donblech

harm6

Hallo donblech,

folgendes funktioniert:

\version "2.14.2"

#(define mydrums '(
      (acousticbassdrum () #f -3)
      (bassdrum () #f -5)
      (sidestick cross #f 1)
      (acousticsnare () #f 1)
      (snare () #f 0)
      (handclap triangle #f 1)
      (electricsnare () #f 1)
      (lowfloortom () #f -4)
      (closedhihat cross "stopped" 3)
      (hihat cross #f 3)
      (highfloortom () #f -2)
      (pedalhihat cross #f -5)
      (lowtom () #f -1)
      (openhihat cross "open" 3)
      (halfopenhihat xcircle #f 3)
      (lowmidtom () #f 0)
      (himidtom () #f 2)
      (crashcymbala xcircle #f 5)
      (crashcymbal xcircle #f 5)
      (hightom () #f 4)
      (ridecymbala cross #f 5)
      (ridecymbal cross #f 5)
      (chinesecymbal mensural #f 5)
      (ridebell () #f 5)
      (splashcymbal diamond #f 5)
      (cowbell triangle #f 5)
      (crashcymbalb cross #f 5)
      (vibraslap diamond #f 4)
      (ridecymbalb cross #f 5)
      ))

\new DrumStaff \with { \consists "Parenthesis_engraver" }
  <<
    \set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
 
    \drummode {
            bd4  sn  bd toml8 toml
            bd ssh ss ssl  sna sn hh hhc
    }
  >>


Allerdings mußte ich die komplette Liste neu definieren, nur um zwei einzelne Werte zu ändern. Besonders elegant ist das nicht. Insofern habe ich versucht das ganze über eine Funktion zu regeln die nur die Werte benötigt die geändert werden, bislang aber ohne Erfolg.
Darüber hinaus wären solche Änderungen sehr leicht und wenig aufwendig, falls man drumpitch-init.ly anders strukturieren würde. Ich bin aber noch nicht so ganz im klaren hierüber (vielleicht später mehr).

Gruß,
  Harm

harm6

Hallo donblech,

ZitatInsofern habe ich versucht das ganze über eine Funktion zu regeln die nur die Werte benötigt die geändert werden, bislang aber ohne Erfolg.

Jetzt schon:


\version "2.14.2"

changeDrumStyleTable =
#(define-music-function (parser location)()
  (make-music 'ApplyContext
              'procedure
              (lambda (x)
  (let* ((ctx (ly:context-property-where-defined x 'drumStyleTable))
          (dr-st-tab (ly:context-property ctx 'drumStyleTable)))
  (hashq-set! dr-st-tab 'bassdrum '( () #f -5))
  (hashq-set! dr-st-tab 'snare '( () #f 0))
  ))))
 
%--- Test
 
mus = \drummode {
        bd4  sn  bd toml8 tri
        bd ssh ss ssl  sna sn hh hh
        hhc4 r sn tri
}

\new DrumStaff { \changeDrumStyleTable
        \mus
        <<
        \new DrumVoice { \voiceOne \mus }
       
        \new DrumVoice { \voiceTwo \mus }
        >>
}


HTH,
  Harm