sc/lilypond [ Modules ]

[ Top ] [ Modules ]

lilypond/lp-get-mark [ Functions ]

[ Top ] [ lilypond ] [ Functions ]

DESCRIPTION

 lp-get-mark:
 Translation function for LilyPond marks (dynamics, accents, etc.).  Not
 generally called by the user but the list of symbols that can be used will
 be useful.  If <silent> then non-existing marks will not produce
 warnings/errors (but we'll return nil). 
 MDE Thu Sep 15 10:50:47 2016 -- default to the
 config setting 

SYNOPSIS

           (a "-> ")                    ; accent
           (lhp "-+ ")
           ;; see p229 of lilypond.pdf: need to define this command in file
           ;; this is done for us in lilypond.ly, which will be included if we
           ;; call write-lp-data-for-all with :use-custom-markup T 
           (bartok "^\\snappizzicato ") 
           (pizz "^\"pizz.\" ")
           (ord "^\"ord.\" ")
           (pizzp "^\"(pizz.)\" ")
           (clb "^\"clb\"")
           (cl "^\"cl\" ")
           (col-legno "^\"col legno\" ")
           (clt "^\"clt\" ")
           (arco "^\"arco\" ")
           (batt "^\"batt.\" ")
           (spe "^\"spe\" ")
           (sp "^\"sul pont.\" ")
           (st "^\"sul tasto\" ")
           (mv "^\"molto vib.\" ")
           (sv "^\"senza vib.\" ")
           (poco-crini "^\"poco crini\" ")
           (s "-. ")
           (ss "-! ") ; MDE Thu Dec 2 15:16:27 2021, Heidhausen
           (nail (no-lp-mark 'nail))
           (stopped (no-lp-mark 'stopped))
           (as "->-. ")
           (at "->-- ")
           (ts "-_ ")
           (te "-- ")
           ;; so unmeasured is implicit
           (t3 (format nil ":~a " (* 32 (expt 2 num-flags))))
           (flag "\\flageolet ")
           (niente "^\markup { niente } ")
           (pppp "\\pppp ")
           (ppp "\\ppp ")
           (pp "\\pp ")
           (p "\\p ")
           (mp "\\mp ")
           (mf "\\mf ")
           (f "\\f ")
           (ff "\\ff ")
           (fff "\\fff ")
           (ffff "\\ffff ")
           ;; MDE Sat Aug 11 15:51:16 2012 -- dynamics in parentheses
           (ffff-p "\\parenFFFF ")
           (fff-p "\\parenFFF ")
           (ff-p "\\parenFF ")
           (f-p "\\parenF ")
           (mf-p "\\parenMF ")
           (mp-p "\\parenMP ")
           (p-p "\\parenP ")
           (pp-p "\\parenPP ")
           (ppp-p "\\parenPPP ")
           (pppp-p "\\parenPPPP ")
           (sfz "\\sfz ")
           (downbow "\\downbow ")
           (upbow "\\upbow ")
           (open "\\open ")
           (I "^\\markup { \\teeny \"I\" } ")
           (II "^\\markup { \\teeny \"II\" } ")
           (III "^\\markup { \\teeny \"III\" } ")
           (IV "^\\markup { \\teeny \"IV\" } ")
           ;; MDE Thu Dec 26 14:14:34 2013 -- guitar string numbers
           (c1 "\\1 ")
           (c2 "\\2 ")
           (c3 "\\3 ")
           (c4 "\\4 ")
           (c5 "\\5 ")
           (c6 "\\6 ")
           (beg-sl "( ")
           (end-sl  ") ")
           ;; MDE Fri Apr  6 21:57:59 2012 -- apparently LP can't have nested
           ;; slurs but it does have phrase marks:  
           (beg-phrase "\\( ")
           (end-phrase "\\) ")
           ;; there's no start gliss / end gliss in lilypond
           (beg-gliss "\\glissando ")
           (end-gliss "")
           ;; 13.4.11
           (beg-8va "\\ottava #1 ")
           (end-8va "\\ottava #0 ")
           (beg-8vb "\\ottava #-1 ")
           (end-8vb "\\ottava #0 ")
           ;; MDE Mon Jan 18 11:43:43 2016
           (beg-15ma "\\ottava #2 ")
           (end-15ma "\\ottava #0 ")
           (beg-15mb "\\ottava #-2 ")
           (end-15mb "\\ottava #0 ")
           ;; NB note heads used to be added via (add-mark-before) but can now
           ;; be added by add-mark and friends (16.6.20) so if adding new heads
           ;; , make sure to add the mark symbol to the move-elements call in
           ;; event::separate-marks-before
           ;; 
           ;; (circled-x "\\once \\override NoteHead #'style = #'xcircle ")
           (circled-x "\\tweak #'style #'xcircle ")
           ;; (x-head "\\once \\override NoteHead #'style = #'cross ")
           (x-head "\\xNote ")
           ;; (triangle "\\once \\override NoteHead #'style = #'triangle ")
           (triangle "\\tweak #'style #'triangle ")
           ;; (triangle-up "\\once \\override NoteHead #'style = #'do ")
           (triangle-up "\\tweak #'style #'do ")
           (airy-head (no-lp-mark 'airy-head)) 
           ;; this has to be added to the event _before_ the one which needs to
           ;; start with these noteheads.
           (improvOn "\\improvisationOn ")
           (improvOff "\\improvisationOff ")
           ;; MDE Sat Nov  9 20:21:19 2013 -- in CMN it's :breath-in: a
           ;; triangle on its side (pointing left)
           ;; (wedge "\\once \\override NoteHead #'style = #'fa ")
           (wedge "\\tweak #'style #'fa ")
           ;; (square "\\once \\override NoteHead #'style = #'la ")
           (square "\\tweak #'style #'la ")
           ;; (mensural "\\once \\override NoteHead #'style = #'slash ")
           ;;(flag-head "\\once \\override NoteHead #'style = #'harmonic-mixed
           ;;")  
           ;; MDE Mon Apr 30 20:46:06 2012 -- see event::get-lp-data for how
           ;; this is handled 
           (flag-head "\\harmonic ") ; diamond
           ;; MDE Mon Apr 30 20:46:31 2012 -- flag-heads by default don't
           ;; display dots so we need to add-mark-before to get these to
           ;; display or turn them off again
           (flag-dots-on "\\set harmonicDots = ##t ")
           (flag-dots-off "\\set harmonicDots = ##f ")
           ;; circle head but stem extends through it like a vertical slash
           (none (no-lp-mark 'none))
           (trill-f (no-lp-mark 'trill-f))
           (trill-n (no-lp-mark 'trill-n))
           (trill-s (no-lp-mark 'trill-s))
           (beg-trill-a "\\pitchedTrill ") ; must be before note
           ;; we'll also need e.g. (trill-note g5) to give the note in ()
           (end-trill-a "\\stopTrillSpan ") ; after note
           ;; (no-lp-mark 'square))
           (slash (no-lp-mark 'slash))
           ;; MDE Sat Dec 28 11:37:22 2013 -- up and down arrows on arpeggio
           ;; lines will need more complex treatment (need a note-before mark
           ;; :/ ) 
           (arp "\\arpeggio ")
           (arrow-up (no-lp-mark 'arrow-up))
           (arrow-down (no-lp-mark 'arrow-down))
           (cresc-beg "\\< ")
           (cresc-end "\\! ")
           (dim-beg "\\> ")
           (dim-end "\\! ")
           (<< "<< ")
           (>> ">> ")
           ;; NB this override has to come exactly before the note/dynamic it
           ;; applies to. MDE Tue Jun 16 23:38:57 2020, Heidhausen -- again this
           ;; override should be OK (rather than tweak) as it's below the staff
           ;; rather than a property of a note (in a chord)
           ;; (hairpin0 "\\once \\override Hairpin #'circled-tip = ##t ")
           ;; MDE Thu May 11 15:26:00 2023, Heidhausen -- version 2.21 changes
           (hairpin0 "\\once \\override Hairpin.circled-tip = ##t ")
           ;; (dim0-beg "\\once \\override Hairpin #'circled-tip = ##t \\> ")
           (pause "\\fermata ")
           (long-pause "\\longfermata ")
           (short-pause
            "^\\markup { \\musicglyph #\"scripts.ushortfermata\" } ")
           ;; MDE Thu Apr  5 16:17:11 2012 -- these need the graphics files in
           ;; lilypond-graphics.zip to be in the same directory as the
           ;; generated lilypond files  
           (aeolian-light "^\\aeolianLight ") 
           (aeolian-dark "^\\aeolianDark ")
           ;; this one uses the graphic for close bracket
           (bracket-end "^\\bracketEnd ")
           (mphonic "^\\mphonic ")
           (mphonic-arr "^\\mphonicArr ")
           (mphonic-cons "^\\mphonicCons ")
           (mphonic-diss "^\\mphonicDiss ")
           (mphonic-cluster "^\\mphonicCluster ")
           (sing "^\\sing ")
           (high-sine "^\\high-sine ")
           (noise "^\\noise ")
           (focus "^\\focus ")
           (balance "^\\balance ")
           (alternate "^\\alternate ")
           (sing-arr "^\\singArr ")
           (arrow-up-down "^\\arrowUpDown ")
           ;; end lilypond-graphics.zip files
           ;; these must have been set up with the event::add-arrow method
           (start-arrow "\\startTextSpan ")
           (end-arrow "\\stopTextSpan ")
           (harm "^\\flageolet ")
           ;; 2.3.11
           ;; write sost. pedal as text (usually held for long time so brackets
           ;; not a good idea)
           ;; MDE Wed May 25 12:40:57 2016 -- update: do use the LP
           ;; sost. brackets after all
           (sost "\\sostenutoOn ")
           (sost-up "\\sostenutoOff ")
           (sost^ "\\sostenutoOff\\sostenutoOn ")
           (ped "\\sustainOn ")
           (ped^ "\\sustainOff\\sustainOn ")
           (ped-up "\\sustainOff ")
           (uc "\\unaCorda ")
           (tc "\\treCorde ")

lilypond/lp-salzedo-mark [ Functions ]

[ Top ] [ lilypond ] [ Functions ]

AUTHOR

 Ruben Philipp <me@rubenphilipp.com>

 CREATED
 2023-12-19

DESCRIPTION

 Returns the LilyPond markup for a harp salzedo pedal-mark given as a salzedo
 list (cf. harp-salzedo-to-tl-set).

ARGUMENTS

 - The salzedo list. E.g. '(0 -1 1 0 1 -1 1) for d, cf, bs, e, fs, gf, as

EXAMPLE

(lp-salzedo-mark '(1 -1 1 0 1 0 1))
;; => "_\\markup { \\harp-pedal \"v^v|-v-v\" }"

SYNOPSIS

(defun lp-salzedo-mark (salzedo)

lilypond/salzedo-to-ly-string [ Functions ]

[ Top ] [ lilypond ] [ Functions ]

AUTHOR

 Ruben Philipp <me@rubenphilipp.com>

 CREATED
 2023-12-19

DESCRIPTION

 This method converts a salzedo list to a string to be used with LilyPond's
 \harp-pedal markup. Cf.
 https://lilypond.org/doc/v2.23/Documentation/notation/harp

 N.B.: Steinberg's Dorico notation software uses the same syntax for entering
 harp pedal diagrams. 

ARGUMENTS

 A salzedo list (cf. harp-salzedo-to-tl-set). 

RETURN VALUE

 The LilyPond salzedo-string. 

EXAMPLE

(salzedo-to-ly-string '(0 1 0 1 -1 1 0))
=>
"-v-|v^v-"

SYNOPSIS

(defun salzedo-to-ly-string (salzedo)