X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=input%2Fregression%2Fbeam-quant-standard.ly;h=40cfd61fa499464c5c94e8c1c1519f1e61326987;hb=733828c4ac75972c4c470c7eb6780e0d658761f9;hp=4bf8cdfda79c6722e575a20333b1470fa443e3f5;hpb=a5871e0034d512b8f621e635e56bcf71690bfcbc;p=lilypond.git diff --git a/input/regression/beam-quant-standard.ly b/input/regression/beam-quant-standard.ly index 4bf8cdfda7..40cfd61fa4 100644 --- a/input/regression/beam-quant-standard.ly +++ b/input/regression/beam-quant-standard.ly @@ -1,66 +1,147 @@ \header { - texidoc = "This file tests a few standard beam quants." - + texidoc = "This file tests a few standard beam quants, taken from + Ted Ross' book. If LilyPond finds another quant, the correct quant + is printed over the beam." + } +%% FIXME: This file should actually NOT produce any warnings! +#(ly:set-option 'warning-as-error #f) +\version "2.17.6" +\layout { + ragged-right = ##t + #(define debug-beam-quanting #t) +} + +filler = \new Voice \relative c' { + \hideNotes + e4 e +} % -% todo: make the check-quant function throw an error for incorrect quants -% -\paper { raggedright = ##t } - - -% -% #(ly:set-option 'debug-beam #t) - -assertquant = -#(def-music-function (location l r) (pair? pair?) - (let* ((f (check-quant-callbacks l r))) - - #{ - \override Beam #'position-callbacks = $f - #} - -)) - - -\relative { - \assertquant #'(1 . 0) #'(1 . 0) - e8[ e] - e4 - e4 - \assertquant #'(2 . -1) #'(2 . -1) - f8[ f] - e4 - e4 - \assertquant #'(2 . 0) #'(2 . 0) - g8[ g] - e4 - e4 - \assertquant #'(2 . 1) #'(2 . 1) - a8[ a] - e4 e4 e4 - \once \override Beam #'inspect-quants = #'(2.2 . 2.2) - a8[ a] - e4 - e4 - - \assertquant #'(0 . 1) #'(1 . 0) - d8[ e] - e4 - e4 - \assertquant #'(1 . 0) #'(1 . 1) - e8[ f] - e4 - e4 - \assertquant #'(2 . -1) #'(2 . 0) - f8[ g] - e4 - e4 - \assertquant #'(2 . 0) #'(2 . 1) - g8[ a] - e4 - e4 - } +%% +%% Ross p108--112 +primes = \relative c' { + \time 3/4 + \assertBeamQuant #'(0 . 0) #'(0 . 0) + c8[ c] + \filler + \assertBeamQuant #'(1 . -1) #'(1 . -1) + d8[ d] + + \filler + + \assertBeamQuant #'(1 . 0) #'(1 . 0) + e8[ e] + \filler + + + \assertBeamQuant #'(2 . -1) #'(2 . -1) + f8[ f] + \filler + + + \assertBeamQuant #'(2 . 0) #'(2 . 0) + g8[ g] + \filler + + + \assertBeamQuant #'(2 . 1) #'(2 . 1) + a8[ a] + \filler + +%{ + \once \override Beam.inspect-quants = #'(2.2 . 2.2) + \assertBeamQuant + a8[ a] + \filler + +%} + +} + + +seconds = \relative c' { + + \assertBeamQuant #'(0 . 0) #'(0 . 1) + a8[ b] + \filler + + + \assertBeamQuant #'(0 . 0) #'(0 . 1) + b8[ c] + \filler + + + \assertBeamQuant #'(0 . 0) #'(0 . 1) + c8[ d] + \filler + + \assertBeamQuant #'(1 . -1) #'(1 . 0) + d8[ e] + \filler + + + \assertBeamQuant #'(1 . 0) #'(1 . 1) + e8[ f] + \filler + + + \assertBeamQuant #'(2 . -1) #'(2 . 0) + f8[ g] + \filler + + + \assertBeamQuant #'(2 . 0) #'(2 . 1) + g8[ a] + \filler + + \assertBeamQuant #'(3 . -1) #'(3 . 0) + a8[ b] + \filler +} + +filler = \new Voice \relative c' { + \hideNotes + e4 e4. +} + +% Ross, p122 +primeSixteenths = \relative c' { + \stemUp + \assertBeamQuant #'(0 . -1) #'(0 . -1) + g16[ g] + \filler + \assertBeamQuant #'(0 . -1) #'(0 . -1) + a16[ a] + \filler + \assertBeamQuant #'(0 . -1) #'(0 . -1) + b16[ b] + \filler + \assertBeamQuant #'(0 . 0) #'(0 . 0) + c16[ c] + \filler + \assertBeamQuant #'(1 . -1) #'(1 . -1) + d16[ d] + \filler + \assertBeamQuant #'(1 . 0) #'(1 . 0) + e16[ e] + \filler + \assertBeamQuant #'(2 . -1) #'(2 . -1) + f16[ f] + \filler + \assertBeamQuant #'(2 . 0) #'(2 . 0) + g16[ g] + \filler + \assertBeamQuant #'(3 . -1) #'(3 . -1) + a16[ a] + \filler + \assertBeamQuant #'(3 . 0) #'(3 . 0) + b16[ b] + \filler +} + +\new Voice { \primes \seconds \primeSixteenths } +