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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 (_i "Include only elements of @var{music} that are tagged with @var{tag}.") | 462 (_i "Include only elements of @var{music} that are tagged with @var{tag}.") |
463 (music-filter | 463 (music-filter |
464 (lambda (m) | 464 (lambda (m) |
465 (let* ((tags (ly:music-property m 'tags)) | 465 (let* ((tags (ly:music-property m 'tags)) |
466 (res (memq tag tags))) | 466 (res (memq tag tags))) |
467 (or | 467 (or |
468 (eq? tags '()) | 468 (eq? tags '()) |
469 res))) | 469 res))) |
470 music)) | 470 music)) |
471 | 471 |
| 472 key = |
| 473 #(define-music-function (parser location tonic pitch-alist) |
| 474 ((ly:pitch? '()) (list? '())) |
| 475 (_i "Set key to @var{tonic} and scale @var{pitch-alist}. |
| 476 If both are null, just generate @code{KeyChangeEvent}.") |
| 477 (cond ((null? tonic) (make-music 'KeyChangeEvent)) |
| 478 ((null? pitch-alist) |
| 479 (ly:parser-error parser (_ "second argument must be pitch list") |
| 480 location) |
| 481 (make-music 'SequentialMusic 'void #t)) |
| 482 (else |
| 483 (ly:music-transpose |
| 484 (make-music 'KeyChangeEvent |
| 485 'tonic (ly:make-pitch 0 0 0) |
| 486 'pitch-alist pitch-alist) |
| 487 tonic)))) |
| 488 |
472 killCues = | 489 killCues = |
473 #(define-music-function (parser location music) (ly:music?) | 490 #(define-music-function (parser location music) (ly:music?) |
474 (_i "Remove cue notes from @var{music}.") | 491 (_i "Remove cue notes from @var{music}.") |
475 (music-map | 492 (music-map |
476 (lambda (mus) | 493 (lambda (mus) |
477 (if (and (string? (ly:music-property mus 'quoted-music-name)) | 494 (if (and (string? (ly:music-property mus 'quoted-music-name)) |
478 (string=? (ly:music-property mus 'quoted-context-id "") "cue")) | 495 (string=? (ly:music-property mus 'quoted-context-id "") "cue")) |
479 (ly:music-property mus 'element) | 496 (ly:music-property mus 'element) |
480 mus)) | 497 mus)) |
481 music)) | 498 music)) |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 (let ((transposer (make-modal-transposer from to scale))) | 552 (let ((transposer (make-modal-transposer from to scale))) |
536 (change-pitches music transposer) | 553 (change-pitches music transposer) |
537 music)) | 554 music)) |
538 | 555 |
539 inversion = | 556 inversion = |
540 #(define-music-function | 557 #(define-music-function |
541 (parser location around to music) (ly:pitch? ly:pitch? ly:music?) | 558 (parser location around to music) (ly:pitch? ly:pitch? ly:music?) |
542 (_i "Invert @var{music} about @var{around} and | 559 (_i "Invert @var{music} about @var{around} and |
543 transpose from @var{around} to @var{to}.") | 560 transpose from @var{around} to @var{to}.") |
544 (music-invert around to music)) | 561 (music-invert around to music)) |
| 562 |
| 563 mark = |
| 564 #(define-music-function |
| 565 (parser location label) ((scheme? '())) |
| 566 "Make the music for the \\mark command." |
| 567 (let* ((set (and (integer? label) |
| 568 (context-spec-music (make-property-set 'rehearsalMark label) |
| 569 'Score))) |
| 570 (ev (make-music 'MarkEvent |
| 571 'origin location))) |
| 572 |
| 573 (if set |
| 574 (make-sequential-music (list set ev)) |
| 575 (begin |
| 576 (set! (ly:music-property ev 'label) label) |
| 577 ev)))) |
545 | 578 |
546 musicMap = | 579 musicMap = |
547 #(define-music-function (parser location proc mus) (procedure? ly:music?) | 580 #(define-music-function (parser location proc mus) (procedure? ly:music?) |
548 (_i "Apply @var{proc} to @var{mus} and all of the music it contains.") | 581 (_i "Apply @var{proc} to @var{mus} and all of the music it contains.") |
549 (music-map proc mus)) | 582 (music-map proc mus)) |
550 | 583 |
551 %% noPageBreak and noPageTurn are music functions (not music indentifiers), | 584 %% noPageBreak and noPageTurn are music functions (not music indentifiers), |
552 %% because music identifiers are not allowed at top-level. | 585 %% because music identifiers are not allowed at top-level. |
553 noPageBreak = | 586 noPageBreak = |
554 #(define-music-function (location parser) () | 587 #(define-music-function (location parser) () |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 (_i "Apply @var{finger} as a fingering indication.") | 962 (_i "Apply @var{finger} as a fingering indication.") |
930 | 963 |
931 (make-music | 964 (make-music |
932 'StrokeFingerEvent | 965 'StrokeFingerEvent |
933 'origin location | 966 'origin location |
934 (if (string? finger) 'text 'digit) | 967 (if (string? finger) 'text 'digit) |
935 finger)) | 968 finger)) |
936 | 969 |
937 scaleDurations = | 970 scaleDurations = |
938 #(define-music-function (parser location fraction music) | 971 #(define-music-function (parser location fraction music) |
939 (number-pair? ly:music?) | 972 (fraction? ly:music?) |
940 (_i "Multiply the duration of events in @var{music} by @var{fraction}.") | 973 (_i "Multiply the duration of events in @var{music} by @var{fraction}.") |
941 (ly:music-compress music | 974 (ly:music-compress music |
942 (ly:make-moment (car fraction) (cdr fraction)))) | 975 (ly:make-moment (car fraction) (cdr fraction)))) |
943 | 976 |
944 shiftDurations = | 977 shiftDurations = |
945 #(define-music-function (parser location dur dots arg) | 978 #(define-music-function (parser location dur dots arg) |
946 (integer? integer? ly:music?) | 979 (integer? integer? ly:music?) |
947 (_i "Scale @var{arg} up by a factor of 2^@var{dur}*(2-(1/2)^@var{dots}).") | 980 (_i "Scale @var{arg} up by a factor of 2^@var{dur}*(2-(1/2)^@var{dots}).") |
948 | 981 |
949 (music-map | 982 (music-map |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
991 #(define-music-function (parser location tag arg) (symbol? ly:music?) | 1024 #(define-music-function (parser location tag arg) (symbol? ly:music?) |
992 | 1025 |
993 (_i "Add @var{tag} to the @code{tags} property of @var{arg}.") | 1026 (_i "Add @var{tag} to the @code{tags} property of @var{arg}.") |
994 | 1027 |
995 (set! | 1028 (set! |
996 (ly:music-property arg 'tags) | 1029 (ly:music-property arg 'tags) |
997 (cons tag | 1030 (cons tag |
998 (ly:music-property arg 'tags))) | 1031 (ly:music-property arg 'tags))) |
999 arg) | 1032 arg) |
1000 | 1033 |
| 1034 time = |
| 1035 #(define-music-function (parser location fraction) (fraction?) |
| 1036 (_i "Set @var{fraction} as time signature.") |
| 1037 (make-time-signature-set (car fraction) (cdr fraction))) |
| 1038 |
| 1039 times = |
| 1040 #(define-music-function (parser location fraction music) |
| 1041 (fraction? ly:music?) |
| 1042 (_i "Scale @var{music} in time by @var{fraction}.") |
| 1043 (make-music 'TimeScaledMusic |
| 1044 'element (ly:music-compress music (ly:make-moment (car fraction) (
cdr fraction))) |
| 1045 'numerator (car fraction) |
| 1046 'denominator (cdr fraction))) |
| 1047 |
1001 transpose = | 1048 transpose = |
1002 #(define-music-function | 1049 #(define-music-function |
1003 (parser location from to music) | 1050 (parser location from to music) |
1004 (ly:pitch? ly:pitch? ly:music?) | 1051 (ly:pitch? ly:pitch? ly:music?) |
1005 | 1052 |
1006 (_i "Transpose @var{music} from pitch @var{from} to pitch @var{to}.") | 1053 (_i "Transpose @var{music} from pitch @var{from} to pitch @var{to}.") |
1007 (make-music 'TransposedMusic | 1054 (make-music 'TransposedMusic |
1008 'element (ly:music-transpose music (ly:pitch-diff to from)))) | 1055 'element (ly:music-transpose music (ly:pitch-diff to from)))) |
1009 | 1056 |
1010 transposedCueDuring = | 1057 transposedCueDuring = |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 because of its side-effects, but its value ignored.")) | 1113 because of its side-effects, but its value ignored.")) |
1067 | 1114 |
1068 | 1115 |
1069 withMusicProperty = | 1116 withMusicProperty = |
1070 #(define-music-function (parser location sym val music) | 1117 #(define-music-function (parser location sym val music) |
1071 (symbol? scheme? ly:music?) | 1118 (symbol? scheme? ly:music?) |
1072 (_i "Set @var{sym} to @var{val} in @var{music}.") | 1119 (_i "Set @var{sym} to @var{val} in @var{music}.") |
1073 | 1120 |
1074 (set! (ly:music-property music sym) val) | 1121 (set! (ly:music-property music sym) val) |
1075 music) | 1122 music) |
LEFT | RIGHT |