OLD | NEW |
1 ;;;; This file is part of LilyPond, the GNU music typesetter. | 1 ;;;; This file is part of LilyPond, the GNU music typesetter. |
2 ;;;; | 2 ;;;; |
3 ;;;; Copyright (C) 1998--2015 Jan Nieuwenhuizen <janneke@gnu.org> | 3 ;;;; Copyright (C) 1998--2015 Jan Nieuwenhuizen <janneke@gnu.org> |
4 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 ;;;; | 5 ;;;; |
6 ;;;; LilyPond is free software: you can redistribute it and/or modify | 6 ;;;; LilyPond is free software: you can redistribute it and/or modify |
7 ;;;; it under the terms of the GNU General Public License as published by | 7 ;;;; it under the terms of the GNU General Public License as published by |
8 ;;;; the Free Software Foundation, either version 3 of the License, or | 8 ;;;; the Free Software Foundation, either version 3 of the License, or |
9 ;;;; (at your option) any later version. | 9 ;;;; (at your option) any later version. |
10 ;;;; | 10 ;;;; |
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 (set! (ly:music-property music 'tweaks) | 777 (set! (ly:music-property music 'tweaks) |
778 (acons 'style style (ly:music-property music 'tweaks))) | 778 (acons 'style style (ly:music-property music 'tweaks))) |
779 music) | 779 music) |
780 ;; not in <...>, so use overrides | 780 ;; not in <...>, so use overrides |
781 (make-sequential-music | 781 (make-sequential-music |
782 (list | 782 (list |
783 (override-head-style heads style) | 783 (override-head-style heads style) |
784 music | 784 music |
785 (revert-head-style heads))))) | 785 (revert-head-style heads))))) |
786 | 786 |
| 787 (define-public (get-tweakable-music mus) |
| 788 "When tweaking music, returns a list of music expressions where the |
| 789 tweaks should be applied. Relevant for music wrappers and event |
| 790 chords." |
| 791 (cond ((music-is-of-type? mus 'music-wrapper-music) |
| 792 (get-tweakable-music (ly:music-property mus 'element))) |
| 793 ((music-is-of-type? mus 'event-chord) |
| 794 (filter (music-type-predicate 'rhythmic-event) |
| 795 (ly:music-property mus 'elements))) |
| 796 (else (list mus)))) |
| 797 |
787 (define-public (set-mus-properties! m alist) | 798 (define-public (set-mus-properties! m alist) |
788 "Set all of @var{alist} as properties of @var{m}." | 799 "Set all of @var{alist} as properties of @var{m}." |
789 (if (pair? alist) | 800 (if (pair? alist) |
790 (begin | 801 (begin |
791 (set! (ly:music-property m (caar alist)) (cdar alist)) | 802 (set! (ly:music-property m (caar alist)) (cdar alist)) |
792 (set-mus-properties! m (cdr alist))))) | 803 (set-mus-properties! m (cdr alist))))) |
793 | 804 |
794 (define-public (music-separator? m) | 805 (define-public (music-separator? m) |
795 "Is @var{m} a separator?" | 806 "Is @var{m} a separator?" |
796 (let ((ts (ly:music-property m 'types))) | 807 (let ((ts (ly:music-property m 'types))) |
(...skipping 1950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2747 (memq tags music-tags) | 2758 (memq tags music-tags) |
2748 (not (any (lambda (t) (eq? (tag-group-get t) group)) music-tags))))
)) | 2759 (not (any (lambda (t) (eq? (tag-group-get t) group)) music-tags))))
)) |
2749 (let ((groups (delete-duplicates (map tag-group-get tags) eq?))) | 2760 (let ((groups (delete-duplicates (map tag-group-get tags) eq?))) |
2750 (lambda (m) | 2761 (lambda (m) |
2751 (let ((music-tags (ly:music-property m 'tags))) | 2762 (let ((music-tags (ly:music-property m 'tags))) |
2752 (or | 2763 (or |
2753 (null? music-tags) ; redundant but very frequent | 2764 (null? music-tags) ; redundant but very frequent |
2754 (any (lambda (t) (memq t tags)) music-tags) | 2765 (any (lambda (t) (memq t tags)) music-tags) |
2755 ;; if no tag matches, no tag group should match either | 2766 ;; if no tag matches, no tag group should match either |
2756 (not (any (lambda (t) (memq (tag-group-get t) groups)) music-tags))
)))))) | 2767 (not (any (lambda (t) (memq (tag-group-get t) groups)) music-tags))
)))))) |
OLD | NEW |