LEFT | RIGHT |
1 %%%% -*- Mode: Scheme -*- | 1 %%%% -*- Mode: Scheme -*- |
2 | 2 |
3 %%%% This file is part of LilyPond, the GNU music typesetter. | 3 %%%% This file is part of LilyPond, the GNU music typesetter. |
4 %%%% | 4 %%%% |
5 %%%% Copyright (C) 2003--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> | 5 %%%% Copyright (C) 2003--2011 Han-Wen Nienhuys <hanwen@xs4all.nl> |
6 %%%% Jan Nieuwenhuizen <janneke@gnu.org> | 6 %%%% Jan Nieuwenhuizen <janneke@gnu.org> |
7 %%%% | 7 %%%% |
8 %%%% LilyPond is free software: you can redistribute it and/or modify | 8 %%%% LilyPond is free software: you can redistribute it and/or modify |
9 %%%% it under the terms of the GNU General Public License as published by | 9 %%%% it under the terms of the GNU General Public License as published by |
10 %%%% the Free Software Foundation, either version 3 of the License, or | 10 %%%% the Free Software Foundation, either version 3 of the License, or |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 %% so this is a music-function instead. | 77 %% so this is a music-function instead. |
78 allowPageTurn = | 78 allowPageTurn = |
79 #(define-music-function (location parser) () | 79 #(define-music-function (location parser) () |
80 (_i "Allow a page turn. May be used at toplevel (ie between scores or | 80 (_i "Allow a page turn. May be used at toplevel (ie between scores or |
81 markups), or inside a score.") | 81 markups), or inside a score.") |
82 (make-music 'EventChord | 82 (make-music 'EventChord |
83 'page-marker #t | 83 'page-marker #t |
84 'page-turn-permission 'allow | 84 'page-turn-permission 'allow |
85 'elements (list (make-music 'PageTurnEvent | 85 'elements (list (make-music 'PageTurnEvent |
86 'break-permission 'allow)))) | 86 'break-permission 'allow)))) |
| 87 |
| 88 appendToTag = |
| 89 #(define-music-function (parser location tag more music) |
| 90 (symbol? ly:music? ly:music?) |
| 91 (_i "Append @var{more} to the @code{elements} of all music |
| 92 expressions in @var{music} that are tagged with @var{tag}.") |
| 93 (music-map (lambda (m) |
| 94 (if (memq tag (ly:music-property m 'tags)) |
| 95 (set! (ly:music-property m 'elements) |
| 96 (append (ly:music-property m 'elements) |
| 97 (list more)))) |
| 98 m) |
| 99 music)) |
87 | 100 |
88 applyContext = | 101 applyContext = |
89 #(define-music-function (parser location proc) (procedure?) | 102 #(define-music-function (parser location proc) (procedure?) |
90 (_i "Modify context properties with Scheme procedure @var{proc}.") | 103 (_i "Modify context properties with Scheme procedure @var{proc}.") |
91 (make-music 'ApplyContext | 104 (make-music 'ApplyContext |
92 'procedure proc)) | 105 'procedure proc)) |
93 | 106 |
94 applyMusic = | 107 applyMusic = |
95 #(define-music-function (parser location func music) (procedure? ly:music?) | 108 #(define-music-function (parser location func music) (procedure? ly:music?) |
96 (_i"Apply procedure @var{func} to @var{music}.") | 109 (_i"Apply procedure @var{func} to @var{music}.") |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 (ly:music-property arg 'elements)) | 759 (ly:music-property arg 'elements)) |
747 ;; No chord, simply set property for this expression: | 760 ;; No chord, simply set property for this expression: |
748 (set! (ly:music-property arg 'parenthesize) #t)) | 761 (set! (ly:music-property arg 'parenthesize) #t)) |
749 arg) | 762 arg) |
750 | 763 |
751 partcombine = | 764 partcombine = |
752 #(define-music-function (parser location part1 part2) (ly:music? ly:music?) | 765 #(define-music-function (parser location part1 part2) (ly:music? ly:music?) |
753 (_i "Take the music in @var{part1} and @var{part2} and typeset so | 766 (_i "Take the music in @var{part1} and @var{part2} and typeset so |
754 that they share a staff.") | 767 that they share a staff.") |
755 (make-part-combine-music parser | 768 (make-part-combine-music parser |
756 (list part1 part2))) | 769 (list part1 part2) #f)) |
| 770 |
| 771 partcombineUp = |
| 772 #(define-music-function (parser location part1 part2) (ly:music? ly:music?) |
| 773 (_i "Take the music in @var{part1} and @var{part2} and typeset so |
| 774 that they share a staff with stems directed upward.") |
| 775 (make-part-combine-music parser |
| 776 (list part1 part2) UP)) |
| 777 |
| 778 partcombineDown = |
| 779 #(define-music-function (parser location part1 part2) (ly:music? ly:music?) |
| 780 (_i "Take the music in @var{part1} and @var{part2} and typeset so |
| 781 that they share a staff with stems directed downward.") |
| 782 (make-part-combine-music parser |
| 783 (list part1 part2) DOWN)) |
757 | 784 |
758 partcombineForce = | 785 partcombineForce = |
759 #(define-music-function (location parser type once) (symbol-or-boolean? boolean?
) | 786 #(define-music-function (location parser type once) (symbol-or-boolean? boolean?
) |
760 (_i "Override the part-combiner.") | 787 (_i "Override the part-combiner.") |
761 (make-music 'EventChord | 788 (make-music 'EventChord |
762 'elements (list (make-music 'PartCombineForceEvent | 789 'elements (list (make-music 'PartCombineForceEvent |
763 'forced-type type | 790 'forced-type type |
764 'once once)))) | 791 'once once)))) |
765 partcombineApart = \partcombineForce #'apart ##f | 792 partcombineApart = \partcombineForce #'apart ##f |
766 partcombineApartOnce = \partcombineForce #'apart ##t | 793 partcombineApartOnce = \partcombineForce #'apart ##t |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 (begin | 840 (begin |
814 (ly:input-warning location (_ "Second argument of \\pitchedTr
ill should be single note: ")) | 841 (ly:input-warning location (_ "Second argument of \\pitchedTr
ill should be single note: ")) |
815 (display sec-note-events))) | 842 (display sec-note-events))) |
816 | 843 |
817 (if (eq? forced #t) | 844 (if (eq? forced #t) |
818 (for-each (lambda (m) | 845 (for-each (lambda (m) |
819 (ly:music-set-property! m 'force-accidental forced)
) | 846 (ly:music-set-property! m 'force-accidental forced)
) |
820 trill-events))))) | 847 trill-events))))) |
821 main-note)) | 848 main-note)) |
822 | 849 |
| 850 pushToTag = |
| 851 #(define-music-function (parser location tag more music) |
| 852 (symbol? ly:music? ly:music?) |
| 853 (_i "Add @var{more} to the front of @code{elements} of all music |
| 854 expressions in @var{music} that are tagged with @var{tag}.") |
| 855 (music-map (lambda (m) |
| 856 (if (memq tag (ly:music-property m 'tags)) |
| 857 (set! (ly:music-property m 'elements) |
| 858 (cons more (ly:music-property m 'elements)))) |
| 859 m) |
| 860 music)) |
| 861 |
823 quoteDuring = | 862 quoteDuring = |
824 #(define-music-function (parser location what main-music) (string? ly:music?) | 863 #(define-music-function (parser location what main-music) (string? ly:music?) |
825 (_i "Indicate a section of music to be quoted. @var{what} indicates the name | 864 (_i "Indicate a section of music to be quoted. @var{what} indicates the name |
826 of the quoted voice, as specified in an @code{\\addQuote} command. | 865 of the quoted voice, as specified in an @code{\\addQuote} command. |
827 @var{main-music} is used to indicate the length of music to be quoted; | 866 @var{main-music} is used to indicate the length of music to be quoted; |
828 usually contains spacers or multi-measure rests.") | 867 usually contains spacers or multi-measure rests.") |
829 (make-music 'QuoteMusic | 868 (make-music 'QuoteMusic |
830 'element main-music | 869 'element main-music |
831 'quoted-music-name what)) | 870 'quoted-music-name what)) |
| 871 |
| 872 relative = |
| 873 #(define-music-function (parser location pitch music) |
| 874 ((ly:pitch? (ly:make-pitch 0 0 0)) ly:music?) |
| 875 (_i "Make @var{music} relative to @var{pitch} (default @code{c'}).") |
| 876 (ly:make-music-relative! music pitch) |
| 877 (make-music 'RelativeOctaveMusic |
| 878 'element music)) |
832 | 879 |
833 removeWithTag = | 880 removeWithTag = |
834 #(define-music-function (parser location tag music) (symbol? ly:music?) | 881 #(define-music-function (parser location tag music) (symbol? ly:music?) |
835 (_i "Remove elements of @var{music} that are tagged with @var{tag}.") | 882 (_i "Remove elements of @var{music} that are tagged with @var{tag}.") |
836 (music-filter | 883 (music-filter |
837 (lambda (m) | 884 (lambda (m) |
838 (let* ((tags (ly:music-property m 'tags)) | 885 (let* ((tags (ly:music-property m 'tags)) |
839 (res (memq tag tags))) | 886 (res (memq tag tags))) |
840 (not res))) | 887 (not res))) |
841 music)) | 888 music)) |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1000 | 1047 |
1001 | 1048 |
1002 | 1049 |
1003 withMusicProperty = | 1050 withMusicProperty = |
1004 #(define-music-function (parser location sym val music) | 1051 #(define-music-function (parser location sym val music) |
1005 (symbol? scheme? ly:music?) | 1052 (symbol? scheme? ly:music?) |
1006 (_i "Set @var{sym} to @var{val} in @var{music}.") | 1053 (_i "Set @var{sym} to @var{val} in @var{music}.") |
1007 | 1054 |
1008 (set! (ly:music-property music sym) val) | 1055 (set! (ly:music-property music sym) val) |
1009 music) | 1056 music) |
LEFT | RIGHT |