LEFT | RIGHT |
1 % -*-Scheme-*- | 1 % -*-Scheme-*- |
2 | 2 |
3 \version "2.12.0" | 3 \version "2.12.0" |
4 | 4 |
5 | 5 |
6 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 6 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
7 %% this file is alphabetically sorted. | 7 %% this file is alphabetically sorted. |
8 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 8 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
9 | 9 |
10 %% need SRFI-1 filter | 10 %% need SRFI-1 filter |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 makeClusters = | 352 makeClusters = |
353 #(define-music-function | 353 #(define-music-function |
354 (parser location arg) (ly:music?) | 354 (parser location arg) (ly:music?) |
355 (_i "Display chords in @var{arg} as clusters") | 355 (_i "Display chords in @var{arg} as clusters") |
356 (music-map note-to-cluster arg)) | 356 (music-map note-to-cluster arg)) |
357 | 357 |
358 musicMap = | 358 musicMap = |
359 #(define-music-function (parser location proc mus) (procedure? ly:music?) | 359 #(define-music-function (parser location proc mus) (procedure? ly:music?) |
360 (music-map proc mus)) | 360 (music-map proc mus)) |
361 | 361 |
362 overrideBeamSettings = | 362 overrideBeamSettings = |
363 #(define-music-function | 363 #(define-music-function |
364 (parser location | 364 (parser location |
365 context time-signature rule-type grouping-rule) | 365 context time-signature rule-type grouping-rule) |
366 (symbol? pair? symbol? pair?) | 366 (symbol? pair? symbol? pair?) |
367 | 367 |
368 (_i "Override beamSettings in @var{context} | 368 (_i "Override beamSettings in @var{context} |
369 for time signatures of @var{time-signature} and rules of type | 369 for time signatures of @var{time-signature} and rules of type |
370 @var{rule-type} to have a grouping rule alist | 370 @var{rule-type} to have a grouping rule alist |
371 @var{grouping-rule}. | 371 @var{grouping-rule}. |
372 @var{rule-type} can be @code{end} or @code{subdivide}, | 372 @var{rule-type} can be @code{end} or @code{subdivide}, |
373 with a potential future value of @code{begin}. | 373 with a potential future value of @code{begin}. |
374 @var{grouping-rule} is an alist of @var{(beam-type . grouping)} | 374 @var{grouping-rule} is an alist of @var{(beam-type . grouping)} |
375 entries. @var{grouping} is in units of @var{beam-type}. If | 375 entries. @var{grouping} is in units of @var{beam-type}. If |
376 @var{beam-type} is @code{*}, grouping is in units of the denominator | 376 @var{beam-type} is @code{*}, grouping is in units of the denominator |
377 of @var{time-signature}.") | 377 of @var{time-signature}.") |
378 | 378 |
379 ;; TODO -- add warning if largest value of grouping is | 379 ;; TODO -- add warning if largest value of grouping is |
380 ;; greater than time-signature. | 380 ;; greater than time-signature. |
381 | 381 |
382 #{ | 382 #{ |
383 #(override-beam-setting | 383 #(override-beam-setting |
384 $time-signature $rule-type $grouping-rule $context) | 384 $time-signature $rule-type $grouping-rule $context) |
385 #}) | 385 #}) |
386 | 386 |
387 overrideProperty = | 387 overrideProperty = |
388 #(define-music-function (parser location name property value) | 388 #(define-music-function (parser location name property value) |
389 (string? symbol? scheme?) | 389 (string? symbol? scheme?) |
390 | 390 |
391 (_i "Set @var{property} to @var{value} in all grobs named @var{name}. | 391 (_i "Set @var{property} to @var{value} in all grobs named @var{name}. |
392 The @var{name} argument is a string of the form @code{\"Context.GrobName\"} | 392 The @var{name} argument is a string of the form @code{\"Context.GrobName\"} |
393 or @code{\"GrobName\"}") | 393 or @code{\"GrobName\"}") |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 (pitch (ly:music-property (car notes) 'pitch))) | 664 (pitch (ly:music-property (car notes) 'pitch))) |
665 | 665 |
666 (set! (ly:music-property reference-note 'elements) '()) | 666 (set! (ly:music-property reference-note 'elements) '()) |
667 (set! (ly:music-property reference-note | 667 (set! (ly:music-property reference-note |
668 'to-relative-callback) | 668 'to-relative-callback) |
669 (lambda (music last-pitch) | 669 (lambda (music last-pitch) |
670 pitch)) | 670 pitch)) |
671 | 671 |
672 reference-note)) | 672 reference-note)) |
673 | 673 |
674 revertBeamSettings = | 674 revertBeamSettings = |
675 #(define-music-function | 675 #(define-music-function |
676 (parser location | 676 (parser location |
677 context time-signature rule-type) | 677 context time-signature rule-type) |
678 (symbol? pair? symbol?) | 678 (symbol? pair? symbol?) |
679 | 679 |
680 (_i "Revert beam settings in @var{context} for time signatures of | 680 (_i "Revert beam settings in @var{context} for time signatures of |
681 @var{time-signature} and groups of type | 681 @var{time-signature} and groups of type |
682 @var{group-type}. @var{group-type} can be @code{end} | 682 @var{group-type}. @var{group-type} can be @code{end} |
683 or @code{subdivide}.") | 683 or @code{subdivide}.") |
684 #{ | 684 #{ |
685 #(revert-beam-setting $time-signature $rule-type $context) | 685 #(revert-beam-setting $time-signature $rule-type $context) |
686 #}) | 686 #}) |
687 | 687 |
688 scaleDurations = | 688 scaleDurations = |
689 #(define-music-function (parser location fraction music) (number-pair? ly:music?
) | 689 #(define-music-function (parser location fraction music) (number-pair? ly:music?
) |
690 (_i "Multiply the duration of events in @var{music} by @var{fraction}.") | 690 (_i "Multiply the duration of events in @var{music} by @var{fraction}.") |
691 (ly:music-compress music | 691 (ly:music-compress music |
692 (ly:make-moment (car fraction) (cdr fraction)))) | 692 (ly:make-moment (car fraction) (cdr fraction)))) |
693 | 693 |
694 setBeatGrouping = | 694 setBeatGrouping = |
695 #(define-music-function (parser location grouping) (pair?) | 695 #(define-music-function (parser location grouping) (pair?) |
696 (_i "Set the beat grouping in the current time signature to | 696 (_i "Set the beat grouping in the current time signature to |
697 @var{grouping}.") | 697 @var{grouping}.") |
698 ; NEED CODE HERE -- find time signature, set default (override or set? | 698 (define (default-group-setting c) |
699 (make-music 'SequentialMusic 'void #t)) | 699 (let* ((context-time-signature |
| 700 (ly:context-property c 'timeSignatureFraction)) |
| 701 (time-signature (if (null? context-time-signature) |
| 702 '(4 . 4) |
| 703 context-time-signature))) |
| 704 (override-property-setting |
| 705 c |
| 706 'beamSettings |
| 707 (list time-signature 'end) |
| 708 (list (cons '* grouping))))) |
| 709 |
| 710 (context-spec-music |
| 711 (make-apply-context default-group-setting) |
| 712 'Score)) |
700 | 713 |
701 | 714 |
702 shiftDurations = | 715 shiftDurations = |
703 #(define-music-function (parser location dur dots arg) (integer? integer? ly:mus
ic?) | 716 #(define-music-function (parser location dur dots arg) (integer? integer? ly:mus
ic?) |
704 (_i "Scale @var{arg} up by a factor of @var{2^dur*(2-(1/2)^dots)}.") | 717 (_i "Scale @var{arg} up by a factor of @var{2^dur*(2-(1/2)^dots)}.") |
705 | 718 |
706 (music-map | 719 (music-map |
707 (lambda (x) | 720 (lambda (x) |
708 (shift-one-duration-log x dur dots)) arg)) | 721 (shift-one-duration-log x dur dots)) arg)) |
709 | 722 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 (unfold-repeats music)) | 824 (unfold-repeats music)) |
812 | 825 |
813 | 826 |
814 | 827 |
815 withMusicProperty = | 828 withMusicProperty = |
816 #(define-music-function (parser location sym val music) (symbol? scheme? ly:musi
c?) | 829 #(define-music-function (parser location sym val music) (symbol? scheme? ly:musi
c?) |
817 (_i "Set @var{sym} to @var{val} in @var{music}.") | 830 (_i "Set @var{sym} to @var{val} in @var{music}.") |
818 | 831 |
819 (set! (ly:music-property music sym) val) | 832 (set! (ly:music-property music sym) val) |
820 music) | 833 music) |
LEFT | RIGHT |