1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3 ;;; ly:music-property with setter
4 ;;; (ly:music-property my-music 'elements)
5 ;;; ==> the 'elements property
6 ;;; (set! (ly:music-property my-music 'elements) value)
7 ;;; ==> set the 'elements property and return it
8 (define-public ly:music-property
9 (make-procedure-with-setter ly:music-property
10 ly:music-set-property!))
12 (define-public ly:grob-property
13 (make-procedure-with-setter ly:grob-property
14 ly:grob-set-property!))
16 (define-public (music-map function music)
17 "Apply @var{function} to @var{music} and all of the music it contains. "
18 (let ((es (ly:music-property music 'elements))
19 (e (ly:music-property music 'element)))
20 (set! (ly:music-property music 'elements)
21 (map (lambda (y) (music-map function y)) es))
23 (set! (ly:music-property music 'element)
24 (music-map function e)))
27 (define-public (music-filter pred? music)
28 "Filter out music expressions that do not satisfy PRED."
30 (define (inner-music-filter pred? music)
32 (let* ((es (ly:music-property music 'elements))
33 (e (ly:music-property music 'element))
34 (as (ly:music-property music 'articulations))
35 (filtered-as (filter ly:music? (map (lambda (y) (inner-music-filter pred? y)) as)))
36 (filtered-e (if (ly:music? e)
37 (inner-music-filter pred? e)
39 (filtered-es (filter ly:music? (map (lambda (y) (inner-music-filter pred? y)) es))))
40 (set! (ly:music-property music 'element) filtered-e)
41 (set! (ly:music-property music 'elements) filtered-es)
42 (set! (ly:music-property music 'articulations) filtered-as)
43 ;; if filtering emptied the expression, we remove it completely.
45 (and (eq? filtered-es '()) (not (ly:music? e))
46 (or (not (eq? es '()))
51 (set! music (inner-music-filter pred? music))
54 (make-music-by-name 'Music))) ;must return music.
56 (define-public (remove-tag tag)
60 (let* ((tags (ly:music-property m 'tags))
61 (res (memq tag tags)))
65 (define-public (display-music music)
66 "Display music, not done with music-map for clarity of presentation."
69 (let ((es (ly:music-property music 'elements))
70 (e (ly:music-property music 'element)))
71 (display (ly:get-mutable-properties music))
73 (begin (display "\nElements: {\n")
74 (map display-music es)
84 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
86 (define (shift-one-duration-log music shift dot)
87 " add SHIFT to ly:duration-log and optionally
88 a dot to any note encountered. This scales the music up by a factor
89 2^shift * (2 - (1/2)^dot)"
90 (let ((d (ly:music-property music 'duration)))
92 (let* ((cp (ly:duration-factor d))
93 (nd (ly:make-duration (+ shift (ly:duration-log d))
94 (+ dot (ly:duration-dot-count d))
97 (set! (ly:music-property music 'duration) nd)))
102 (define-public (shift-duration-log music shift dot)
103 (music-map (lambda (x) (shift-one-duration-log x shift dot))
107 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
110 (define-public (note-to-cluster music)
111 "Replace NoteEvents by ClusterNoteEvents."
112 (if (eq? (ly:music-property music 'name) 'NoteEvent)
113 (let ((cn (make-music-by-name 'ClusterNoteEvent)))
114 (set! (ly:music-property cn 'pitch)
115 (ly:music-property music 'pitch))
116 (set! (ly:music-property cn 'duration)
117 (ly:music-property music 'duration))
121 (define-public (notes-to-clusters music)
122 (music-map note-to-cluster music))
124 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
127 (define-public (unfold-repeats music)
129 This function replaces all repeats with unfold repeats. It was
130 written by Rune Zedeler. "
131 (let ((es (ly:music-property music 'elements))
132 (e (ly:music-property music 'element))
133 (n (ly:music-name music)))
134 (if (equal? n "Repeated_music")
136 (if (equal? (ly:music-property music 'iterator-ctor)
137 Chord_tremolo_iterator::constructor)
138 (shift-duration-log music (ly:intlog2 (ly:music-property music 'repeat-count)) 0))
139 (set! (ly:music-property music 'length)
140 Repeated_music::unfolded_music_length)
141 (set! (ly:music-property music 'start-moment-function)
142 Repeated_music::first_start)
143 (set! (ly:music-property music 'iterator-ctor)
144 Unfolded_repeat_iterator::constructor)))
146 (set! (ly:music-property music 'elements)
147 (map unfold-repeats es)))
149 (set! (ly:music-property music 'element)
154 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
155 ;; property setting music objs.
157 (define-public (make-grob-property-set grob gprop val)
158 "Make a Music expression that sets GPROP to VAL in GROB. Does a pop first,
159 i.e. this is not an override"
160 (let ((m (make-music-by-name 'OverrideProperty)))
161 (set! (ly:music-property m 'symbol) grob)
162 (set! (ly:music-property m 'grob-property) gprop)
163 (set! (ly:music-property m 'grob-value) val)
164 (set! (ly:music-property m 'pop-first) #t)
167 (define-public (make-grob-property-override grob gprop val)
168 "Make a Music expression that sets GPROP to VAL in GROB. Does a pop first,
169 i.e. this is not an override"
170 (let ((m (make-music-by-name 'OverrideProperty)))
171 (set! (ly:music-property m 'symbol) grob)
172 (set! (ly:music-property m 'grob-property) gprop)
173 (set! (ly:music-property m 'grob-value) val)
176 (define-public (make-grob-property-revert grob gprop)
177 "Revert the grob property GPROP for GROB."
178 (let* ((m (make-music-by-name 'OverrideProperty)))
179 (set! (ly:music-property m 'symbol) grob)
180 (set! (ly:music-property m 'grob-property) gprop)
183 (define direction-polyphonic-grobs
184 '(Tie Rest Slur Script TextScript Stem Dots DotColumn))
186 (define-public (make-voice-props-set n)
187 (make-sequential-music
189 (map (lambda (x) (make-grob-property-set x 'direction
191 direction-polyphonic-grobs)
192 (list (make-grob-property-set 'NoteColumn 'horizontal-shift (quotient n 2))
193 (make-grob-property-set 'MultiMeasureRest 'staff-position
194 (if (odd? n) -4 4))))))
196 (define-public (make-voice-props-revert)
197 (make-sequential-music
199 (map (lambda (x) (make-grob-property-revert x 'direction))
200 direction-polyphonic-grobs)
201 (list (make-grob-property-revert 'NoteColumn 'horizontal-shift)))))
204 (define-public (context-spec-music m context . rest)
205 "Add \\context CONTEXT = foo to M. "
206 (let ((cm (make-music-by-name 'ContextSpeccedMusic)))
207 (set! (ly:music-property cm 'element) m)
208 (set! (ly:music-property cm 'context-type) context)
209 (if (and (pair? rest) (string? (car rest)))
210 (set! (ly:music-property cm 'context-id) (car rest)))
213 (define-public (make-apply-context func)
214 (let ((m (make-music-by-name 'ApplyContext)))
215 (set! (ly:music-property m 'procedure) func)
218 (define-public (make-sequential-music elts)
219 (let ((m (make-music-by-name 'SequentialMusic)))
220 (set! (ly:music-property m 'elements) elts)
223 (define-public (make-simultaneous-music elts)
224 (let ((m (make-music-by-name 'SimultaneousMusic)))
225 (set! (ly:music-property m 'elements) elts)
228 (define-public (make-event-chord elts)
229 (let ((m (make-music-by-name 'EventChord)))
230 (set! (ly:music-property m 'elements) elts)
233 (define-public (make-skip-music dur)
234 (let ((m (make-music-by-name 'SkipMusic)))
235 (set! (ly:music-property m 'duration) dur)
241 (define-public (make-multi-measure-rest duration location)
242 (let ((start (make-music-by-name 'MultiMeasureRestEvent))
243 (ch (make-music-by-name 'BarCheck))
244 (ch2 (make-music-by-name 'BarCheck))
245 (seq (make-music-by-name 'MultiMeasureRestMusicGroup)))
246 (map (lambda (x) (set! (ly:music-property x 'origin) location))
247 (list start ch ch2 seq))
248 (set! (ly:music-property start 'duration) duration)
249 (set! (ly:music-property seq 'elements)
251 (make-event-chord (list start))
255 (define-public (glue-mm-rest-texts music)
256 "Check if we have R1*4-\\markup { .. }, and if applicable convert to
257 a property set for MultiMeasureRestNumber."
259 (define (script-to-mmrest-text script-music)
260 "Extract 'direction and 'text from SCRIPT-MUSIC, and transform into property sets."
261 (let ((text (ly:music-property script-music 'text))
262 (dir (ly:music-property script-music 'direction))
263 (p (make-music-by-name 'MultiMeasureTextEvent)))
265 (set! (ly:music-property p 'direction) dir))
266 (set! (ly:music-property p 'text) text)
269 (if (eq? (ly:music-property music 'name) 'MultiMeasureRestMusicGroup)
270 (let* ((text? (lambda (x) (memq 'script-event (ly:music-property x 'types))))
271 (es (ly:music-property music 'elements))
272 (texts (map script-to-mmrest-text (filter text? es)))
273 (others (remove text? es)))
275 (set! (ly:music-property music 'elements)
276 (cons (make-event-chord texts) others)))))
280 (define-public (make-property-set sym val)
281 (let ((m (make-music-by-name 'PropertySet)))
282 (set! (ly:music-property m 'symbol) sym)
283 (set! (ly:music-property m 'value) val)
286 (define-public (make-ottava-set octavation)
287 (let ((m (make-music-by-name 'ApplyContext)))
289 (define (ottava-modify context)
290 "Either reset centralCPosition to the stored original, or remember
291 old centralCPosition, add OCTAVATION to centralCPosition, and set
292 OTTAVATION to `8va', or whatever appropriate."
293 (if (number? (ly:context-property context 'centralCPosition))
295 (let ((where (ly:context-property-where-defined context 'centralCPosition))
296 (oc0 (ly:context-property context 'originalCentralCPosition)))
297 (ly:context-set-property! context 'centralCPosition oc0)
298 (ly:unset-context-property where 'originalCentralCPosition)
299 (ly:unset-context-property where 'ottavation))
300 (let* ((where (ly:context-property-where-defined context 'centralCPosition))
301 (c0 (ly:context-property context 'centralCPosition))
302 (new-c0 (+ c0 (* -7 octavation)))
303 (string (cdr (assoc octavation '((2 . "15ma")
307 (-2 . "15ma bassa"))))))
308 (ly:context-set-property! context 'centralCPosition new-c0)
309 (ly:context-set-property! context 'originalCentralCPosition c0)
310 (ly:context-set-property! context 'ottavation string)))))
311 (set! (ly:music-property m 'procedure) ottava-modify)
312 (context-spec-music m 'Staff)))
314 (define-public (set-octavation ottavation)
315 (ly:export (make-ottava-set ottavation)))
317 (define-public (make-time-signature-set num den . rest)
318 " Set properties for time signature NUM/DEN.
319 Rest can contain a list of beat groupings
322 (let* ((set1 (make-property-set 'timeSignatureFraction (cons num den)))
323 (beat (ly:make-moment 1 den))
324 (len (ly:make-moment num den))
325 (set2 (make-property-set 'beatLength beat))
326 (set3 (make-property-set 'measureLength len))
327 (set4 (make-property-set 'beatGrouping (if (pair? rest)
330 (basic (list set1 set2 set3 set4)))
332 (context-spec-music (make-sequential-music basic) 'Timing) 'Score)))
334 (define-public (make-mark-set label)
335 "make the music for the \\mark command."
336 (let* ((set (if (integer? label)
337 (context-spec-music (make-property-set 'rehearsalMark label)
340 (ev (make-music-by-name 'MarkEvent))
341 (ch (make-event-chord (list ev))))
343 (make-sequential-music (list set ch))
345 (set! (ly:music-property ev 'label) label)
348 (define-public (set-time-signature num den . rest)
349 (ly:export (apply make-time-signature-set `(,num ,den . ,rest))))
351 (define-public (make-penalty-music pen)
352 (let ((m (make-music-by-name 'BreakEvent)))
353 (set! (ly:music-property m 'penalty) pen)
356 (define-public (make-articulation name)
357 (let ((m (make-music-by-name 'ArticulationEvent)))
358 (set! (ly:music-property m 'articulation-type) name)
361 (define-public (make-lyric-event string duration)
362 (let ((m (make-music-by-name 'LyricEvent)))
363 (set! (ly:music-property m 'duration) duration)
364 (set! (ly:music-property m 'text) string)
367 (define-public (make-span-event type spandir)
368 (let ((m (make-music-by-name type)))
369 (set! (ly:music-property m 'span-direction) spandir)
372 (define-public (set-mus-properties! m alist)
373 "Set all of ALIST as properties of M."
376 (set! (ly:music-property m (caar alist)) (cdar alist))
377 (set-mus-properties! m (cdr alist)))))
379 (define-public (music-separator? m)
381 (let ((ts (ly:music-property m 'types)))
382 (memq 'separator ts)))
385 ;;; splitting chords into voices.
386 (define (voicify-list lst number)
387 "Make a list of Musics.
389 voicify-list :: [ [Music ] ] -> number -> [Music]
390 LST is a list music-lists.
392 NUMBER is 0-base, i.e. Voice=1 (upstems) has number 0.
396 (cons (context-spec-music
397 (make-sequential-music
398 (list (make-voice-props-set number)
399 (make-simultaneous-music (car lst))))
400 'Voice (number->string (1+ number)))
401 (voicify-list (cdr lst) (1+ number)))))
403 (define (voicify-chord ch)
404 "Split the parts of a chord into different Voices using separator"
405 (let ((es (ly:music-property ch 'elements)))
406 (set! (ly:music-property ch 'elements)
407 (voicify-list (split-list es music-separator?) 0))
410 (define-public (voicify-music m)
411 "Recursively split chords that are separated with \\ "
412 (if (not (ly:music? m))
414 (error "not music!")))
415 (let ((es (ly:music-property m 'elements))
416 (e (ly:music-property m 'element)))
418 (set! (ly:music-property m 'elements) (map voicify-music es)))
420 (set! (ly:music-property m 'element) (voicify-music e)))
421 (if (and (equal? (ly:music-name m) "Simultaneous_music")
422 (reduce (lambda (x y ) (or x y)) #f (map music-separator? es)))
423 (set! m (context-spec-music (voicify-chord m) 'Staff)))
426 (define-public (empty-music)
427 (ly:export (make-music-by-name 'Music)))
430 ; Make a function that checks score element for being of a specific type.
431 (define-public (make-type-checker symbol)
434 ;;(eq? #t (ly:grob-property elt symbol))
435 (not (eq? #f (memq symbol (ly:grob-property elt 'interfaces))))))
437 (define-public ((outputproperty-compatibility func sym val) grob g-context ao-context)
439 (set! (ly:grob-property grob sym) val)))
442 (define-public ((set-output-property grob-name symbol val) grob grob-c context)
445 \\applyoutput #(set-output-property 'Clef 'extra-offset '(0 . 1))
448 (let ((meta (ly:grob-property grob 'meta)))
449 (if (equal? (cdr (assoc 'name meta)) grob-name)
450 (set! (ly:grob-property grob symbol) val))))
454 (define-public (smart-bar-check n)
455 "Make a bar check that checks for a specific bar number.
457 (let ((m (make-music-by-name 'ApplyContext)))
459 (let* ((bn (ly:context-property tr 'currentBarNumber)))
463 (format "Bar check failed, we should have reached ~a, instead at ~a\n"
465 (set! (ly:music-property m 'procedure) checker)
468 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
469 ;; warn for bare chords at start.
471 (define (has-request-chord elts)
472 (reduce (lambda (x y) (or x y)) #f
474 (equal? (ly:music-name x) "Request_chord"))
477 (define (ly:music-message music msg)
478 (let ((ip (ly:music-property music 'origin)))
479 (if (ly:input-location? ip)
480 (ly:input-message ip msg)
483 (define (check-start-chords music)
484 "Check music expression for a Simultaneous_music containing notes\n(ie. Request_chords),
485 without context specification. Called from parser."
486 (let ((es (ly:music-property music 'elements))
487 (e (ly:music-property music 'element))
488 (name (ly:music-name music)))
489 (cond ((equal? name "Context_specced_music") #t)
490 ((equal? name "Simultaneous_music")
491 (if (has-request-chord es)
492 (ly:music-message music "Starting score with a chord.\nPlease insert an explicit \\context before chord")
493 (map check-start-chords es)))
494 ((equal? name "Sequential_music")
496 (check-start-chords (car es))))
497 (else (if (ly:music? e) (check-start-chords e)))))
502 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
504 ;; setting stuff for grace context.
507 (define (vector-extend v x)
508 "Make a new vector consisting of V, with X added to the end."
510 ((n (vector-length v))
511 gm(nv (make-vector (+ n 1) '())))
512 (vector-move-left! v 0 n nv 0)
516 (define (vector-map f v)
517 "Map F over V. This function returns nothing."
518 (do ((n (vector-length v))
521 (f (vector-ref v i))))
523 (define (vector-reverse-map f v)
524 "Map F over V, N to 0 order. This function returns nothing."
525 (do ((i (- (vector-length v) 1) (- i 1)))
527 (f (vector-ref v i))))
529 ;; TODO: make a remove-grace-property too.
530 (define-public (add-grace-property context-name grob sym val)
531 "Set SYM=VAL for GROB in CONTEXT-NAME. "
532 (define (set-prop context)
533 (let* ((where (ly:context-property-where-defined context 'graceSettings))
534 (current (ly:context-property where 'graceSettings))
535 (new-settings (vector-extend current (list context-name grob sym val))))
536 (ly:context-set-property! where 'graceSettings new-settings)))
537 (ly:export (context-spec-music (make-apply-context set-prop) 'Voice)))
540 (define-public (set-start-grace-properties context)
541 (define (execute-1 x)
542 (let ((tr (ly:translator-find context (car x))))
544 (ly:context-pushpop-property tr (cadr x) (caddr x) (cadddr x)))))
546 (let ((props (ly:context-property context 'graceSettings)))
548 (vector-map execute-1 props))))
550 (define-public (set-stop-grace-properties context)
551 (define (execute-1 x)
552 (let ((tr (ly:translator-find context (car x))))
554 (ly:context-pushpop-property tr (cadr x) (caddr x)))))
556 (let ((props (ly:context-property context 'graceSettings)))
558 (vector-reverse-map execute-1 props))))
560 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
561 ;; switch it on here, so parsing and init isn't checked (too slow!)
563 ;; automatic music transformations.
565 (define (switch-on-debugging m)
566 (set-debug-cell-accesses! 15000)
569 (define-public toplevel-music-functions
571 ;; check-start-chords ; ; no longer needed with chord syntax.
573 (lambda (x) (music-map glue-mm-rest-texts x))
574 ;; switch-on-debugging
580 (define (apply-durations lyric-music durations)
581 (define (apply-duration music)
582 (if (and (not (equal? (ly:music-length music) ZERO-MOMENT))
583 (ly:duration? (ly:music-property music 'duration)))
585 (set! (ly:music-property music 'duration) (car durations))
586 (set! durations (cdr durations)))))
588 (music-map apply-duration lyric-music))
591 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
594 (define-public ((add-balloon-text object-name text off) grob orig-context cur-context)
595 "Usage: see input/regression/balloon.ly "
596 (let* ((meta (ly:grob-property grob 'meta))
597 (nm (if (pair? meta) (cdr (assoc 'name meta)) "nonexistant"))
598 (cb (ly:grob-property grob 'print-function)))
599 (if (equal? nm object-name)
601 (set! (ly:grob-property grob 'print-function) Balloon_interface::print)
602 (set! (ly:grob-property grob 'balloon-original-callback) cb)
603 (set! (ly:grob-property grob 'balloon-text) text)
604 (set! (ly:grob-property grob 'balloon-text-offset) off)
605 (set! (ly:grob-property grob 'balloon-text-props) '((font-family . roman)))))))
607 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
610 (define-public (set-accidentals-properties extra-natural
614 (make-sequential-music
615 (append (if (boolean? extra-natural)
616 (list (make-property-set 'extraNatural extra-natural))
618 (list (make-property-set 'autoAccidentals auto-accs)
619 (make-property-set 'autoCautionaries auto-cauts))))
622 (define-public (set-accidental-style style . rest)
623 "Set accidental style to STYLE. Optionally takes a context argument,
624 eg. 'Staff or 'Voice. The context defaults to Voice, except for piano styles, which
625 use PianoStaff as a context. "
626 (let ((context (if (pair? rest)
628 (pcontext (if (pair? rest)
629 (car rest) 'PianoStaff)))
632 ;; accidentals as they were common in the 18th century.
633 ((equal? style 'default)
634 (set-accidentals-properties #t '(Staff (same-octave . 0))
636 ;; accidentals from one voice do NOT get cancelled in other voices
637 ((equal? style 'voice)
638 (set-accidentals-properties #t '(Voice (same-octave . 0))
640 ;; accidentals as suggested by Kurt Stone, Music Notation in the 20th century.
641 ;; This includes all the default accidentals, but accidentals also needs cancelling
642 ;; in other octaves and in the next measure.
643 ((equal? style 'modern)
644 (set-accidentals-properties #f '(Staff (same-octave . 0) (any-octave . 0) (same-octave . 1))
646 ;; the accidentals that Stone adds to the old standard as cautionaries
647 ((equal? style 'modern-cautionary)
648 (set-accidentals-properties #f '(Staff (same-octave . 0))
649 '(Staff (any-octave . 0) (same-octave . 1))
651 ;; Multivoice accidentals to be read both by musicians playing one voice
652 ;; and musicians playing all voices.
653 ;; Accidentals are typeset for each voice, but they ARE cancelled across voices.
654 ((equal? style 'modern-voice)
655 (set-accidentals-properties #f
656 '(Voice (same-octave . 0) (any-octave . 0) (same-octave . 1)
657 Staff (same-octave . 0) (any-octave . 0) (same-octave . 1))
660 ;; same as modernVoiceAccidental eccept that all special accidentals are typeset
662 ((equal? style 'modern-voice-cautionary)
663 (set-accidentals-properties #f
664 '(Voice (same-octave . 0) )
665 '(Voice (any-octave . 0) (same-octave . 1)
666 Staff (same-octave . 0) (any-octave . 0) (same-octave . 1))
668 ;; stone's suggestions for accidentals on grand staff.
669 ;; Accidentals are cancelled across the staves in the same grand staff as well
670 ((equal? style 'piano)
671 (set-accidentals-properties #f
672 '( Staff (same-octave . 0) (any-octave . 0) (same-octave . 1)
673 PianoStaff (any-octave . 0) (same-octave . 1))
676 ((equal? style 'piano-cautionary)
677 (set-accidentals-properties #f
678 '(Staff (same-octave . 0))
679 '(Staff (any-octave . 0) (same-octave . 1)
680 PianoStaff (any-octave . 0) (same-octave . 1))
682 ;; do not set localKeySignature when a note alterated differently from
683 ;; localKeySignature is found.
684 ;; Causes accidentals to be printed at every note instead of
685 ;; remembered for the duration of a measure.
686 ;; accidentals not being remembered, causing accidentals always to be typeset relative to the time signature
687 ((equal? style 'forget)
688 (set-accidentals-properties '()
689 '(Staff (same-octave . -1))
691 ;; Do not reset the key at the start of a measure. Accidentals will be
692 ;; printed only once and are in effect until overridden, possibly many
694 ((equal? style 'no-reset)
695 (set-accidentals-properties '()
696 '(Staff (same-octave . #t))
700 (ly:warn (string-append "Unknown accidental style: " (symbol->string style)))
701 (make-sequential-music '()))))))