Menu

#5377 improvisationOn doesn’t work in DrumStaff with altered drumStyleTable

Accepted
nobody
None
Defect
2018-07-10
2018-07-10
No

As reported by Robert Schmaus in this thread, after modifying drumStyleTable \improvisationOn won’t affect any pitches modified through the style table:

\version "2.19.82"

#(define mydrums '((snare default #f 1)))

\score {
  \new DrumStaff \with {
    drumStyleTable = #(alist->hash-table mydrums)
  } \new DrumVoice \drummode {
    sn4 sn4 sn4 sn4
    \improvisationOn
    sn4 sn4 sn4 sn4
  }
}

(output attached)

1 Attachments

Discussion

  • Torsten Hämmerle

    IMHO, this is no bug but expected behaviour:

    \improvisationOn will set NoteHead.style = #'slash.
    So far, so good.

    As soon the custom drumStyleTable contains an explicit NoteHead.style (such as #'default or #'cross), the #'slash preset by \improvisationOn will be overwritten again.

    The standard drumStyleTable definitions don't use #'default but () so that these instruments won't override the #'slash set by \improvisationOn. #f instead of () will also work:

    \version "2.19.82"
    
    #(define mydrums '((snare () #f 1)))
    
    \score {
      \new DrumStaff \with {
        drumStyleTable = #(alist->hash-table mydrums)
      } \new DrumVoice \drummode {
        sn4 sn4 sn4 sn4
        \improvisationOn
        sn4 sn4 sn4 sn4
      }
    }
    

    If the modified custom drumStyleTable uses () instead of default, just like in the standard defintions, even custom drumStyleTable definitions will work exactly like the standard.

    All the best,
    Torsten