;;;; source file of the GNU LilyPond music typesetter
;;;;
;;;; (c) 1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-;;;; Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; Jan Nieuwenhuizen <janneke@gnu.org>
(define-public music-descriptions
`(
))
(ArpeggioEvent
. (
- (description . "Make an arpeggio on this note. Syntax:
+ (description . "Make an arpeggio on this note. Syntax:
@var{note}-@code{\\arpeggio}")
- (internal-class-name . "Event")
+ (internal-class-name . "Event")
(types . (general-music arpeggio-event event))
))
))
(AutoChangeMusic
. (
- (description . "Used for making voices that switch between piano staves automatically.")
+ (description . "Used for making voices that switch between piano staves automatically.")
(internal-class-name . "Music_wrapper")
(iterator-ctor . ,Auto_change_iterator::constructor)
))
(BassFigureEvent
. (
- (description . "Print a bass-figure text")
+ (description . "Print a bass-figure text")
(internal-class-name . "Event")
(types . (general-music event rhythmic-event bass-figure-event))
))
(BreathingSignEvent
. (
- (description . "Creates a `breath mark' or `comma'. Syntax:
+ (description . "Creates a `breath mark' or `comma'. Syntax:
@var{note}\\breathe.")
(internal-class-name . "Event")
))
(BusyPlayingEvent
. (
- (description . "Used internally to signal beginning and ending of notes.")
+ (description . "Used internally to signal beginning and ending of notes.")
(internal-class-name . "Event")
(types . (general-music event busy-playing-event))
))
(StartPlayingEvent
. (
- (description . "Used internally to signal beginning of notes.")
+ (description . "Used internally to signal beginning of notes.")
(internal-class-name . "Event")
(types . (general-music event start-playing-event))
(ClusterNoteEvent
. (
- (description . "A note that is part of a cluster.")
+ (description . "A note that is part of a cluster.")
(internal-class-name . "Event")
; not a note-event, to ensure that Note_engraver doesn't eat it.
(ContextSpeccedMusic
. (
- (description . "Interpret the argument music within a specific context.")
+ (description . "Interpret the argument music within a specific context.")
(iterator-ctor . ,Context_specced_music_iterator::constructor)
(internal-class-name . "Music_wrapper")
(types . (context-specification general-music music-wrapper-music))
(CrescendoEvent
. (
- (description . "Begins or ends a crescendo. Syntax: @var{note}\\cr
+ (description . "Begins or ends a crescendo. Syntax: @var{note}\\cr
... @var{note}\\rc (you can also use \\<, \\!, \\cresc, and
\\endcresc. See the user manual for details.).")
))
(DecrescendoEvent
. (
- (description . "See @ref{CrescendoEvent}.")
+ (description . "See @ref{CrescendoEvent}.")
(internal-class-name . "Event")
(types . (general-music dynamic-event decrescendo-event event))
(ExtenderEvent
. (
- (description . "Extend lyrics.")
+ (description . "Extend lyrics.")
(internal-class-name . "Event")
(types . (general-music extender-event event))
))
(GlissandoEvent
. (
- (description . "Start a glissando on this note.")
+ (description . "Start a glissando on this note.")
(internal-class-name . "Event")
(types . (general-music glissando-event event))
))
(GraceMusic
. (
- (description . "Interpret the argument as grace notes. ")
+ (description . "Interpret the argument as grace notes. ")
(internal-class-name . "Grace_music")
(iterator-ctor . ,Grace_iterator::constructor)
))
(HyphenEvent
. (
- (description . "A hyphen between lyric syllables.")
+ (description . "A hyphen between lyric syllables.")
(internal-class-name . "Event")
(types . (general-music hyphen-event event))
(KeyChangeEvent
. (
- (description . "Change the key signature. Syntax: @code{\\key } @var{name} @var{scale}.")
+ (description . "Change the key signature. Syntax: @code{\\key } @var{name} @var{scale}.")
(internal-class-name . "Key_change_ev")
(types . (general-music key-change-event event))
(LigatureEvent
. (
- (description . "(docme).")
+ (description . "(docme).")
(internal-class-name . "Event")
(span-type . ligature)
(LyricCombineMusic
. (
- (description . "Align lyrics to the start of notes.
+ (description . "Align lyrics to the start of notes.
Syntax @var{\\addlyrics }@var{music} @var{lyrics}.")
(internal-class-name . "Lyric_combine_music")
(NewLyricCombineMusic
. (
- (description . "Align lyrics to the start of notes.
+ (description . "Align lyrics to the start of notes.
Syntax @var{\\addlyrics }@var{music} @var{lyrics}.")
(internal-class-name . "Music")
(length . ,(ly:make-moment 0 1))
(LyricEvent
. (
- (description . "A lyric syllable. Must be entered in lyrics mode, i.e.
+ (description . "A lyric syllable. Must be entered in lyrics mode, i.e.
@code{\\lyrics @{ twinkle4 twinkle4 @} } .")
(internal-class-name . "Event")
))
(MarkEvent
. (
- (description . "Insert a rehearsal mark. Syntax: @code{\\mark} @var{marker},
+ (description . "Insert a rehearsal mark. Syntax: @code{\\mark} @var{marker},
e.g. @code{\\mark \"A\"}.")
(internal-class-name . "Event")
))
(MelismaPlayingEvent
. (
- (description . "Used internally to signal melismas.")
+ (description . "Used internally to signal melismas.")
(internal-class-name . "Event")
(types . (general-music melisma-playing-event event))
))
(ManualMelismaEvent
. (
- (description . "Start or stop a melisma.
+ (description . "Start or stop a melisma.
Syntax:@code{c4\\melisma d\\melismaEnd}.")
(internal-class-name . "Event")
(Music
. (
- (description . "Generic type for music expressions.")
+ (description . "Generic type for music expressions.")
(internal-class-name . "Music")
(types . (general-music))
))
(NoteEvent
. (
- (description . "A note.")
+ (description . "A note.")
(internal-class-name . "Event")
(types . (general-music event note-event rhythmic-event melodic-event))
(OverrideProperty
. (
- (description . "Extend the definition of a graphical object.
+ (description . "Extend the definition of a graphical object.
SYNTAX
))
(PartCombineMusic
. (
- (description . "Combine two parts on a staff, either merged or
+ (description . "Combine two parts on a staff, either merged or
as separate voices.")
(internal-class-name . "Simultaneous_music")
(PropertySet
. (
- (description . "Set a context property.
+ (description . "Set a context property.
Syntax: @code{\\property @var{context}.@var{prop} = @var{scheme-val}}.")
(internal-class-name . "Music")
(PropertyUnset
. (
- (description . "Remove the definition of a context @code{\\property}.")
+ (description . "Remove the definition of a context @code{\\property}.")
(internal-class-name . "Music")
(types . (layout-instruction general-music))
(PesOrFlexaEvent
. (
- (description . "Within a ligature, mark the previous and the
+ (description . "Within a ligature, mark the previous and the
following note to form a pes (if melody goes up) or a flexa (if melody
goes down).")
(RepeatedMusic
. (
- (description . "Repeat music in different ways")
+ (description . "Repeat music in different ways")
- (type . repeated-music)
+ (type . repeated-music)
(types . (general-music repeated-music))
))
(Event
. (
- (description . "Atomic music event.")
+ (description . "Atomic music event.")
(internal-class-name . "Event")
(types . (general-music event))
(RestEvent
. (
- (description . "A Rest. Syntax @code{r4} for a quarter rest. ")
+ (description . "A Rest. Syntax @code{r4} for a quarter rest. ")
(internal-class-name . "Event")
(types . (general-music event rhythmic-event rest-event))
))
(SequentialMusic
. (
- (description . "Music expressions concatenated. Syntax \\sequential @{..@} or simply @{..@} .")
+ (description . "Music expressions concatenated. Syntax \\sequential @{..@} or simply @{..@} .")
(internal-class-name . "Sequential_music")
(iterator-ctor . ,Sequential_music_iterator::constructor)
(MultiMeasureRestMusicGroup
. (
- (description . "Like sequential-music, but specifically intended
+ (description . "Like sequential-music, but specifically intended
to group start-mmrest, skip, stop-mmrest sequence. Syntax @code{R2.*5} for 5 measures in 3/4 time.")
(internal-class-name . "Sequential_music")
(iterator-ctor . ,Sequential_music_iterator::constructor)
))
(UnisonoEvent
. ((description . "Print a2")
- (internal-class-name . "Event")
+ (internal-class-name . "Event")
(part-combine-status . unisono)
(types . (general-music event part-combine-event))))
(SimultaneousMusic
. (
- (description . "Music playing together.
+ (description . "Music playing together.
SYNTAX
(SlurEvent
. (
- (description . "Start or end slur. Syntax NOTE( and )NOTE")
+ (description . "Start or end slur. Syntax NOTE( and )NOTE")
(internal-class-name . "Event")
(types . (general-music span-event slur-event))
))
(RevertProperty
. (
- (description . "The opposite of @ref{OverrideProperty}: remove a
+ (description . "The opposite of @ref{OverrideProperty}: remove a
previously added property from a graphical object definition
")
(OutputPropertySetMusic
. (
- (description . "Set grob properties in objects
+ (description . "Set grob properties in objects
individually. Syntax @code{\\outputproperty @var{predicate} @var{prop}
= @var{val}}.")
(TranslatorChange
. (
- (description . "Change staffs in Piano staff. Syntax @code{\\translator Staff = @var{new-id}}.")
+ (description . "Change staffs in Piano staff. Syntax @code{\\translator Staff = @var{new-id}}.")
(internal-class-name . "Music")
(iterator-ctor . , Change_iterator::constructor)
(types . (general-music translator-change-instruction))
(TimeScaledMusic
. (
- (description . "Multiply durations, as in tuplets. Syntax @code{\\times @var{fraction} @var{music}}, e.g.
+ (description . "Multiply durations, as in tuplets. Syntax @code{\\times @var{fraction} @var{music}}, e.g.
@code{\\times 2/3 @{ ... @}} for triplets.
")
(internal-class-name . "Time_scaled_music")
(TransposedMusic
. (
- (description . "Music that has been transposed.")
+ (description . "Music that has been transposed.")
(internal-class-name . "Transposed_music")
(types . (music-wrapper-music general-music transposed-music))
))
(UntransposableMusic
. (
- (description . "Music that can not be transposed.")
+ (description . "Music that can not be transposed.")
(internal-class-name . "Untransposable_music")
(types . (music-wrapper-music general-music untransposable-music))
(UnrelativableMusic
. (
- (description . "Music that can not be converted from relative to absolute notation.
+ (description . "Music that can not be converted from relative to absolute notation.
For example, transposed music.")
(internal-class-name . "Un_relativable_music")
(types . (music-wrapper-music general-music unrelativable-music))
(RelativeOctaveMusic
. (
- (description . "Music that was entered in relative octave notation.")
+ (description . "Music that was entered in relative octave notation.")
(internal-class-name . "Relative_octave_music")
(types . (music-wrapper-music general-music relative-octave-music))
(EventChord
. (
- (description . "Internally used to group a set of events.")
+ (description . "Internally used to group a set of events.")
(internal-class-name . "Event_chord")
(iterator-ctor . ,Event_chord_iterator::constructor)
(types . (general-music event-chord simultaneous-music))
(ScriptEvent
. (
- (description . "Add an articulation mark to a note. ")
+ (description . "Add an articulation mark to a note. ")
(internal-class-name . "Event")
(types . (general-music event))
(SkipMusic
. (
- (description . "Filler that takes up duration, does not print anything, and also
+ (description . "Filler that takes up duration, does not print anything, and also
does not create staffs or voices implicitly.
Syntax: @code{\\skip }@var{duration}.")
(SkipEvent
. (
- (description . "Filler that takes up duration, but does not print anything.
+ (description . "Filler that takes up duration, but does not print anything.
Syntax: @code{s}@var{duration}")
))
(SpanEvent
. (
- (description . "Event for anything that is started at a different time than stopped.")
+ (description . "Event for anything that is started at a different time than stopped.")
(internal-class-name . "Event")
(types . (general-music event))
(StringNumberEvent
. (
- (description . "Specify on which string to play this note. Syntax: @code{\\@var{number}}.")
+ (description . "Specify on which string to play this note. Syntax: @code{\\@var{number}}.")
(internal-class-name . "Event")
(types . (general-music string-number-event event))
(MetronomeChangeEvent
. (
- (description . "Change tempo setting (in beats per minute).")
+ (description . "Change tempo setting (in beats per minute).")
(internal-class-name . "Event")
(types . (general-music metronome-change-event tempo-event event))
))
(TextScriptEvent
. (
- (description . "")
+ (description . "")
(internal-class-name . "Event")
(types . (general-music script-event text-script-event event))
))
(TieEvent
. (
- (description . "A tie. Entered as @var{note}-~.")
+ (description . "A tie. Entered as @var{note}-~.")
(internal-class-name . "Event")
(types . (general-music tie-event event))
))
(VoiceSeparator
. (
- (description . "Separate polyphonic voices in simultaneous music. Syntax: @code{\\\\}")
+ (description . "Separate polyphonic voices in simultaneous music. Syntax: @code{\\\\}")
(internal-class-name . "Music")
(types . (separator general-music))
(UnfoldedRepeatedMusic
. (
(iterator-ctor . ,Unfolded_repeat_iterator::constructor)
- (description . "")
+ (description . "")
(start-moment-function . ,Repeated_music::first_start)
(internal-class-name . "Repeated_music")
(types . (general-music repeated-music unfolded-repeated-music))
(PercentRepeatedMusic
. (
(internal-class-name . "Repeated_music")
- (description . "Repeats encoded by percents.")
+ (description . "Repeats encoded by percents.")
(iterator-ctor . ,Percent_repeat_iterator::constructor)
(start-moment-function . ,Repeated_music::first_start)
(length . ,Repeated_music::unfolded_music_length)
(TremoloRepeatedMusic
. (
(iterator-ctor . ,Chord_tremolo_iterator::constructor)
- (description . "Repeated notes denoted by tremolo beams.")
+ (description . "Repeated notes denoted by tremolo beams.")
(internal-class-name . "Repeated_music")
(start-moment-function . ,Repeated_music::first_start)
(FoldedRepeatedMusic
. (
(internal-class-name . "Repeated_music")
- (description . "Repeats with alternatives placed in parallel. ")
- (iterator-ctor . ,Folded_repeat_iterator::constructor)
+ (description . "Repeats with alternatives placed in parallel. ")
+ (iterator-ctor . ,Folded_repeat_iterator::constructor)
(start-moment-function . ,Repeated_music::minimum_start)
(length . ,Repeated_music::folded_music_length)
(types . (general-music repeated-music folded-repeated-music))
(let
((l (cdr x)))
(set! l (assoc-set! l 'name (car x)))
- (set! l (assq-remove! l 'description))
+ (set! l (assq-remove! l 'description))
(hashq-set! music-name-to-property-table (car x) l)
(cons (car x) l)
))
music-descriptions))
+(define-public (make-music name . music-properties)
+ "Create a music object of given name, and set its properties
+according to `music-properties', a list of alterning property symbols
+and values. E.g:
+ (make-music 'OverrideProperty
+ 'symbol 'Stem
+ 'grob-property 'thickness
+ 'grob-value (* 2 1.5))"
+ (if (not (symbol? name))
+ (error (format "Not a symbol: ~a" name)))
+ (let ((props (hashq-ref music-name-to-property-table name '())))
+ (if (not (pair? props))
+ (error "Can not find music object" name))
+ (let ((m (ly:make-bare-music (cdr (assoc 'internal-class-name props)) props)))
+ (define (set-props mus-props)
+ (if (and (not (null? mus-props))
+ (not (null? (cdr mus-props))))
+ (begin
+ (set! (ly:music-property m (car mus-props)) (cadr mus-props))
+ (set-props (cddr mus-props)))))
+ (set-props music-properties)
+ m)))
-
+;; TODO remove make-music-by-name
(define-public (make-music-by-name x)
- (if (not (symbol? x))
- (error (format "Not a symbol: ~a" x)))
- (let*
- (
- (props (hashq-ref music-name-to-property-table x '()))
- (name (if (pair? props)
- (cdr (assoc 'internal-class-name props))
- (error "Can not find music object" x)))
- )
-
- (if (eq? props '())
- (ly:warn (format "Could not find music type `~a'" x)))
- (ly:make-bare-music name props)
- ))
-
-
+ "Deprecated. See make-music."
+ (ly:warn "make-music-by-name is deprecated. Use make-music instead.")
+ (make-music x))
(define-public (make-repeated-music name)
- (let*
- (
- (handle (assoc
- name
- '(("volta" . VoltaRepeatedMusic)
- ("unfold" . UnfoldedRepeatedMusic)
- ("percent" . PercentRepeatedMusic)
- ("tremolo" . TremoloRepeatedMusic)
- ("fold" . FoldedRepeatedMusic)
- )))
- (music-name
- (if (pair? handle)
- (cdr handle)
- (begin
- (ly:warn
- (string-append "Unknown repeat type `" name
- "'\nSee music-types.scm for supported repeats"))
- 'VoltaRepeatedMusic)
- )
- )
- )
-
- (make-music-by-name music-name)
- ))
+ (let* ((handle (assoc name '(("volta" . VoltaRepeatedMusic)
+ ("unfold" . UnfoldedRepeatedMusic)
+ ("percent" . PercentRepeatedMusic)
+ ("tremolo" . TremoloRepeatedMusic)
+ ("fold" . FoldedRepeatedMusic))))
+ (music-name (if (pair? handle)
+ (cdr handle)
+ (begin
+ (ly:warn (string-append "Unknown repeat type `" name
+ "'\nSee music-types.scm for supported repeats"))
+ 'VoltaRepeatedMusic))))
+ (make-music music-name)))
(set! music (inner-music-filter pred? music))
(if (ly:music? music)
music
- (make-music-by-name 'Music))) ;must return music.
+ (make-music 'Music))) ;must return music.
(define-public (remove-tag tag)
(lambda (mus)
(define-public (note-to-cluster music)
"Replace NoteEvents by ClusterNoteEvents."
(if (eq? (ly:music-property music 'name) 'NoteEvent)
- (let ((cn (make-music-by-name 'ClusterNoteEvent)))
- (set! (ly:music-property cn 'pitch)
- (ly:music-property music 'pitch))
- (set! (ly:music-property cn 'duration)
- (ly:music-property music 'duration))
- cn)
+ (make-music 'ClusterNoteEvent
+ 'pitch (ly:music-property music 'pitch)
+ 'duration (ly:music-property music 'duration))
music))
(define-public (notes-to-clusters music)
(define-public (make-grob-property-set grob gprop val)
"Make a Music expression that sets GPROP to VAL in GROB. Does a pop first,
i.e. this is not an override"
- (let ((m (make-music-by-name 'OverrideProperty)))
- (set! (ly:music-property m 'symbol) grob)
- (set! (ly:music-property m 'grob-property) gprop)
- (set! (ly:music-property m 'grob-value) val)
- (set! (ly:music-property m 'pop-first) #t)
- m))
+ (make-music 'OverrideProperty
+ 'symbol grob
+ 'grob-property gprop
+ 'grob-value val
+ 'pop-first #t))
(define-public (make-grob-property-override grob gprop val)
"Make a Music expression that sets GPROP to VAL in GROB. Does a pop first,
i.e. this is not an override"
- (let ((m (make-music-by-name 'OverrideProperty)))
- (set! (ly:music-property m 'symbol) grob)
- (set! (ly:music-property m 'grob-property) gprop)
- (set! (ly:music-property m 'grob-value) val)
- m))
+ (make-music 'OverrideProperty
+ 'symbol grob
+ 'grob-property gprop
+ 'grob-value val))
(define-public (make-grob-property-revert grob gprop)
"Revert the grob property GPROP for GROB."
- (let* ((m (make-music-by-name 'OverrideProperty)))
- (set! (ly:music-property m 'symbol) grob)
- (set! (ly:music-property m 'grob-property) gprop)
- m))
+ (make-music 'OverrideProperty
+ 'symbol grob
+ 'grob-property gprop))
(define direction-polyphonic-grobs
'(Tie Rest Slur Script TextScript Stem Dots DotColumn))
(list (make-grob-property-revert 'NoteColumn 'horizontal-shift)))))
-(define-public (context-spec-music m context . rest)
- "Add \\context CONTEXT = foo to M. "
- (let ((cm (make-music-by-name 'ContextSpeccedMusic)))
- (set! (ly:music-property cm 'element) m)
- (set! (ly:music-property cm 'context-type) context)
- (if (and (pair? rest) (string? (car rest)))
- (set! (ly:music-property cm 'context-id) (car rest)))
+(define*-public (context-spec-music m context #:optional id)
+ "Add \\context CONTEXT = ID to M. "
+ (let ((cm (make-music 'ContextSpeccedMusic
+ 'element m
+ 'context-type context)))
+ (if (string? id)
+ (set! (ly:music-property cm 'context-id) id))
cm))
(define-public (make-apply-context func)
- (let ((m (make-music-by-name 'ApplyContext)))
- (set! (ly:music-property m 'procedure) func)
- m))
+ (make-music 'ApplyContext
+ 'procedure func))
(define-public (make-sequential-music elts)
- (let ((m (make-music-by-name 'SequentialMusic)))
- (set! (ly:music-property m 'elements) elts)
- m))
+ (make-music 'SequentialMusic
+ 'elements elts))
(define-public (make-simultaneous-music elts)
- (let ((m (make-music-by-name 'SimultaneousMusic)))
- (set! (ly:music-property m 'elements) elts)
- m))
+ (make-music 'SimultaneousMusic
+ 'elements elts))
(define-public (make-event-chord elts)
- (let ((m (make-music-by-name 'EventChord)))
- (set! (ly:music-property m 'elements) elts)
- m))
+ (make-music 'EventChord
+ 'elements elts))
(define-public (make-skip-music dur)
- (let ((m (make-music-by-name 'SkipMusic)))
- (set! (ly:music-property m 'duration) dur)
- m))
+ (make-music 'SkipMusic
+ 'duration dur))
;;;;;;;;;;;;;;;;
;; mmrest
(define-public (make-multi-measure-rest duration location)
- (let ((start (make-music-by-name 'MultiMeasureRestEvent))
- (ch (make-music-by-name 'BarCheck))
- (ch2 (make-music-by-name 'BarCheck))
- (seq (make-music-by-name 'MultiMeasureRestMusicGroup)))
- (map (lambda (x) (set! (ly:music-property x 'origin) location))
- (list start ch ch2 seq))
- (set! (ly:music-property start 'duration) duration)
- (set! (ly:music-property seq 'elements)
- (list ch
- (make-event-chord (list start))
- ch2))
- seq))
+ (make-music 'MultiMeasureRestMusicGroup
+ 'origin location
+ 'elements (list (make-music 'BarCheck
+ 'origin location)
+ (make-event-chord (list (make-music 'MultiMeasureRestEvent
+ 'origin location
+ 'duration duration)))
+ (make-music 'BarCheck
+ 'origin location))))
(define-public (glue-mm-rest-texts music)
"Check if we have R1*4-\\markup { .. }, and if applicable convert to
a property set for MultiMeasureRestNumber."
-
(define (script-to-mmrest-text script-music)
"Extract 'direction and 'text from SCRIPT-MUSIC, and transform into property sets."
- (let ((text (ly:music-property script-music 'text))
- (dir (ly:music-property script-music 'direction))
- (p (make-music-by-name 'MultiMeasureTextEvent)))
+ (let ((dir (ly:music-property script-music 'direction))
+ (p (make-music 'MultiMeasureTextEvent
+ 'text (ly:music-property script-music 'text))))
(if (ly:dir? dir)
(set! (ly:music-property p 'direction) dir))
- (set! (ly:music-property p 'text) text)
p))
-
(if (eq? (ly:music-property music 'name) 'MultiMeasureRestMusicGroup)
(let* ((text? (lambda (x) (memq 'script-event (ly:music-property x 'types))))
(es (ly:music-property music 'elements))
(define-public (make-property-set sym val)
- (let ((m (make-music-by-name 'PropertySet)))
- (set! (ly:music-property m 'symbol) sym)
- (set! (ly:music-property m 'value) val)
- m))
+ (make-music 'PropertySet
+ 'symbol sym
+ 'value val))
(define-public (make-ottava-set octavation)
- (let ((m (make-music-by-name 'ApplyContext)))
-
+ (let ((m (make-music 'ApplyContext)))
(define (ottava-modify context)
"Either reset centralCPosition to the stored original, or remember
old centralCPosition, add OCTAVATION to centralCPosition, and set
(context-spec-music (make-property-set 'rehearsalMark label)
'Score)
#f))
- (ev (make-music-by-name 'MarkEvent))
+ (ev (make-music 'MarkEvent))
(ch (make-event-chord (list ev))))
(if set
(make-sequential-music (list set ch))
(ly:export (apply make-time-signature-set `(,num ,den . ,rest))))
(define-public (make-penalty-music pen)
- (let ((m (make-music-by-name 'BreakEvent)))
- (set! (ly:music-property m 'penalty) pen)
- m))
+ (make-music 'BreakEvent
+ 'penalty pen))
(define-public (make-articulation name)
- (let ((m (make-music-by-name 'ArticulationEvent)))
- (set! (ly:music-property m 'articulation-type) name)
- m))
+ (make-music 'ArticulationEvent
+ 'articulation-type name))
(define-public (make-lyric-event string duration)
- (let ((m (make-music-by-name 'LyricEvent)))
- (set! (ly:music-property m 'duration) duration)
- (set! (ly:music-property m 'text) string)
- m))
+ (make-music 'LyricEvent
+ 'duration duration
+ 'text string))
(define-public (make-span-event type spandir)
- (let ((m (make-music-by-name type)))
- (set! (ly:music-property m 'span-direction) spandir)
- m))
+ (make-music type
+ 'span-direction spandir))
(define-public (set-mus-properties! m alist)
"Set all of ALIST as properties of M."
m))
(define-public (empty-music)
- (ly:export (make-music-by-name 'Music)))
+ (ly:export (make-music 'Music)))
;;;
; Make a function that checks score element for being of a specific type.
(define-public (smart-bar-check n)
"Make a bar check that checks for a specific bar number.
"
- (let ((m (make-music-by-name 'ApplyContext)))
+ (let ((m (make-music 'ApplyContext)))
(define (checker tr)
(let* ((bn (ly:context-property tr 'currentBarNumber)))
(if (= bn n)