LilyPond-Ruby 0.0.2.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/etc/fonts/conf.d/10-hinting-slight.conf +15 -0
- data/etc/fonts/conf.d/10-scale-bitmap-fonts.conf +83 -0
- data/etc/fonts/conf.d/11-lcdfilter-default.conf +17 -0
- data/etc/fonts/conf.d/20-unhint-small-vera.conf +49 -0
- data/etc/fonts/conf.d/30-metric-aliases.conf +637 -0
- data/etc/fonts/conf.d/40-nonlatin.conf +332 -0
- data/etc/fonts/conf.d/45-generic.conf +136 -0
- data/etc/fonts/conf.d/45-latin.conf +301 -0
- data/etc/fonts/conf.d/48-spacing.conf +16 -0
- data/etc/fonts/conf.d/49-sansserif.conf +22 -0
- data/etc/fonts/conf.d/50-user.conf +16 -0
- data/etc/fonts/conf.d/51-local.conf +7 -0
- data/etc/fonts/conf.d/60-generic.conf +64 -0
- data/etc/fonts/conf.d/60-latin.conf +88 -0
- data/etc/fonts/conf.d/65-fonts-persian.conf +418 -0
- data/etc/fonts/conf.d/65-nonlatin.conf +228 -0
- data/etc/fonts/conf.d/69-unifont.conf +28 -0
- data/etc/fonts/conf.d/80-delicious.conf +19 -0
- data/etc/fonts/conf.d/90-synthetic.conf +64 -0
- data/etc/fonts/conf.d/README +23 -0
- data/etc/fonts/fonts.conf +101 -0
- data/etc/relocate/fontconfig.reloc +2 -0
- data/etc/relocate/guile.reloc +2 -0
- data/etc/relocate/libexec.reloc +1 -0
- data/lib/guile/2.2/ccache/ice-9/and-let-star.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/arrays.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/atomic.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/binary-ports.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/boot-9.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/buffered-input.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/calling.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/channel.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/command-line.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/common-list.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/control.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/curried-definitions.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/debug.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/deprecated.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/documentation.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/eval-string.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/eval.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/expect.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/fdes-finalizers.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/format.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/ftw.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/futures.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/gap-buffer.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/getopt-long.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/hash-table.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/hcons.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/history.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/i18n.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/iconv.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/lineio.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/list.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/local-eval.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/ls.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/mapping.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/match.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/networking.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/null.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/occam-channel.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/optargs.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg/cache.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg/codegen.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg/simplify-tree.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg/string-peg.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg/using-parsers.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/peg.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/poe.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/poll.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/popen.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/ports.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/posix.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/pretty-print.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/psyntax-pp.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/q.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/r5rs.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/rdelim.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/receive.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/regex.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/runq.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/rw.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/safe-r5rs.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/safe.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/sandbox.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/save-stack.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/scm-style-repl.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/serialize.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/session.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/slib.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/stack-catch.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/streams.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/string-fun.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/suspendable-ports.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/syncase.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/textual-ports.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/threads.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/time.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/top-repl.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/unicode.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/vlist.go +0 -0
- data/lib/guile/2.2/ccache/ice-9/weak-vector.go +0 -0
- data/lib/guile/2.2/ccache/language/brainfuck/compile-scheme.go +0 -0
- data/lib/guile/2.2/ccache/language/brainfuck/compile-tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/brainfuck/parse.go +0 -0
- data/lib/guile/2.2/ccache/language/brainfuck/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/bytecode/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/bytecode.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/closure-conversion.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/compile-bytecode.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/constructors.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/contification.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/cse.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/dce.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/effects-analysis.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/elide-values.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/handle-interrupts.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/intmap.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/intset.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/licm.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/optimize.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/peel-loops.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/primitives.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/prune-bailouts.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/prune-top-level-scopes.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/reify-primitives.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/renumber.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/rotate-loops.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/self-references.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/simplify.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/slot-allocation.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/specialize-numbers.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/specialize-primcalls.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/split-rec.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/type-checks.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/type-fold.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/types.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/utils.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/verify.go +0 -0
- data/lib/guile/2.2/ccache/language/cps/with-cps.go +0 -0
- data/lib/guile/2.2/ccache/language/cps.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/array.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/base.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/compile-tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/function.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/impl.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/parse.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/ecmascript/tokenize.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/bindings.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/boot.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/compile-tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/falias.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/lexer.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/parser.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/runtime/function-slot.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/runtime/value-slot.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/runtime.go +0 -0
- data/lib/guile/2.2/ccache/language/elisp/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/scheme/compile-tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/scheme/decompile-tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/scheme/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/analyze.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/canonicalize.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/compile-cps.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/debug.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/effects.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/fix-letrec.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/optimize.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/peval.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/primitives.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il/spec.go +0 -0
- data/lib/guile/2.2/ccache/language/tree-il.go +0 -0
- data/lib/guile/2.2/ccache/language/value/spec.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/accessors.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/active-slot.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/composite-slot.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/describe.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/internal.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/save.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/simple.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops/stklos.go +0 -0
- data/lib/guile/2.2/ccache/oop/goops.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/arithmetic/bitwise.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/arithmetic/fixnums.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/arithmetic/flonums.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/base.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/bytevectors.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/conditions.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/control.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/enums.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/eval.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/exceptions.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/files.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/hashtables.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/io/ports.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/io/simple.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/lists.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/mutable-pairs.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/mutable-strings.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/programs.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/r5rs.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/records/inspection.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/records/procedural.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/records/syntactic.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/sorting.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/syntax-case.go +0 -0
- data/lib/guile/2.2/ccache/rnrs/unicode.go +0 -0
- data/lib/guile/2.2/ccache/rnrs.go +0 -0
- data/lib/guile/2.2/ccache/scripts/api-diff.go +0 -0
- data/lib/guile/2.2/ccache/scripts/autofrisk.go +0 -0
- data/lib/guile/2.2/ccache/scripts/compile.go +0 -0
- data/lib/guile/2.2/ccache/scripts/disassemble.go +0 -0
- data/lib/guile/2.2/ccache/scripts/display-commentary.go +0 -0
- data/lib/guile/2.2/ccache/scripts/doc-snarf.go +0 -0
- data/lib/guile/2.2/ccache/scripts/frisk.go +0 -0
- data/lib/guile/2.2/ccache/scripts/generate-autoload.go +0 -0
- data/lib/guile/2.2/ccache/scripts/help.go +0 -0
- data/lib/guile/2.2/ccache/scripts/lint.go +0 -0
- data/lib/guile/2.2/ccache/scripts/list.go +0 -0
- data/lib/guile/2.2/ccache/scripts/punify.go +0 -0
- data/lib/guile/2.2/ccache/scripts/read-rfc822.go +0 -0
- data/lib/guile/2.2/ccache/scripts/read-scheme-source.go +0 -0
- data/lib/guile/2.2/ccache/scripts/read-text-outline.go +0 -0
- data/lib/guile/2.2/ccache/scripts/scan-api.go +0 -0
- data/lib/guile/2.2/ccache/scripts/snarf-check-and-output-texi.go +0 -0
- data/lib/guile/2.2/ccache/scripts/snarf-guile-m4-docs.go +0 -0
- data/lib/guile/2.2/ccache/scripts/summarize-guile-TODO.go +0 -0
- data/lib/guile/2.2/ccache/scripts/use2dot.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-1.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-10.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-11.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-111.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-13.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-14.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-16.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-17.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-18.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-19.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-2.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-26.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-27.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-28.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-31.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-34.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-35.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-37.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-38.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-39.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-4/gnu.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-4.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-41.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-42.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-43.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-45.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-6.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-60.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-64.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-67.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-69.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-71.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-8.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-88.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-9/gnu.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-9.go +0 -0
- data/lib/guile/2.2/ccache/srfi/srfi-98.go +0 -0
- data/lib/guile/2.2/ccache/statprof.go +0 -0
- data/lib/guile/2.2/ccache/sxml/apply-templates.go +0 -0
- data/lib/guile/2.2/ccache/sxml/fold.go +0 -0
- data/lib/guile/2.2/ccache/sxml/match.go +0 -0
- data/lib/guile/2.2/ccache/sxml/simple.go +0 -0
- data/lib/guile/2.2/ccache/sxml/ssax/input-parse.go +0 -0
- data/lib/guile/2.2/ccache/sxml/ssax.go +0 -0
- data/lib/guile/2.2/ccache/sxml/transform.go +0 -0
- data/lib/guile/2.2/ccache/sxml/xpath.go +0 -0
- data/lib/guile/2.2/ccache/system/base/ck.go +0 -0
- data/lib/guile/2.2/ccache/system/base/compile.go +0 -0
- data/lib/guile/2.2/ccache/system/base/lalr.go +0 -0
- data/lib/guile/2.2/ccache/system/base/language.go +0 -0
- data/lib/guile/2.2/ccache/system/base/message.go +0 -0
- data/lib/guile/2.2/ccache/system/base/pmatch.go +0 -0
- data/lib/guile/2.2/ccache/system/base/syntax.go +0 -0
- data/lib/guile/2.2/ccache/system/base/target.go +0 -0
- data/lib/guile/2.2/ccache/system/base/types.go +0 -0
- data/lib/guile/2.2/ccache/system/foreign-object.go +0 -0
- data/lib/guile/2.2/ccache/system/foreign.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/command.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/common.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/coop-server.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/debug.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/error-handling.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/repl.go +0 -0
- data/lib/guile/2.2/ccache/system/repl/server.go +0 -0
- data/lib/guile/2.2/ccache/system/syntax.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/assembler.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/coverage.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/debug.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/disassembler.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/dwarf.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/elf.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/frame.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/inspect.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/linker.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/loader.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/program.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/trace.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/trap-state.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/traps.go +0 -0
- data/lib/guile/2.2/ccache/system/vm/vm.go +0 -0
- data/lib/guile/2.2/ccache/system/xref.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/docbook.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/html.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/indexing.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/plain-text.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/reflection.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/serialize.go +0 -0
- data/lib/guile/2.2/ccache/texinfo/string-utils.go +0 -0
- data/lib/guile/2.2/ccache/texinfo.go +0 -0
- data/lib/guile/2.2/ccache/web/client.go +0 -0
- data/lib/guile/2.2/ccache/web/http.go +0 -0
- data/lib/guile/2.2/ccache/web/request.go +0 -0
- data/lib/guile/2.2/ccache/web/response.go +0 -0
- data/lib/guile/2.2/ccache/web/server/http.go +0 -0
- data/lib/guile/2.2/ccache/web/server.go +0 -0
- data/lib/guile/2.2/ccache/web/uri.go +0 -0
- data/lib/guile.rb +19 -0
- data/lib/lilypond/2.24.1/ccache/lily/accreg.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/auto-beam.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/autochange.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/backend-library.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/bar-line.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/breath.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/c++.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/chord-entry.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/chord-ignatzek-names.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/chord-name.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/clip-region.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/color.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/curried-definitions.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-context-properties.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-event-classes.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-grob-interfaces.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-grob-properties.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-grobs.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-markup-commands.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-music-callbacks.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-music-display-methods.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-music-properties.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-music-types.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-note-names.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-stencil-commands.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/define-woodwind-diagrams.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/display-lily.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/display-woodwind-diagrams.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/file-cache.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/flag-styles.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/font-encodings.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/font.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/framework-cairo.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/framework-ps.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/framework-svg.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/fret-diagrams.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/graphviz.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/harp-pedals.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/layout-beam.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/layout-slur.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/lily-library.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/lily.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/ly-syntax-constructors.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/markup-macros.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/markup.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/midi.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/modal-transforms.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/music-functions.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/output-lib.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/output-ps.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/output-svg.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/page.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/paper-system.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/paper.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/parser-clef.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/parser-ly-from-scheme.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/part-combiner.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/predefined-fretboards.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/ps-to-png.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/scheme-engravers.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/scheme-performers.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/script.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/skyline.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/song-util.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/song.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/stencil.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/tablature.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/time-signature-settings.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/time-signature.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/titling.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/to-xml.go +0 -0
- data/lib/lilypond/2.24.1/ccache/lily/translation-functions.go +0 -0
- data/lib/lilypond/builder.rb +161 -0
- data/lib/lilypond-ruby.rb +18 -3
- data/share/emacs/site-lisp/lilypond-font-lock.el +208 -0
- data/share/emacs/site-lisp/lilypond-indent.el +605 -0
- data/share/emacs/site-lisp/lilypond-init.el +21 -0
- data/share/emacs/site-lisp/lilypond-mode.el +1204 -0
- data/share/emacs/site-lisp/lilypond-song.el +556 -0
- data/share/emacs/site-lisp/lilypond-what-beat.el +279 -0
- data/share/emacs/site-lisp/lilypond-words.el +1428 -0
- data/share/guile/2.2/guile-procedures.txt +8860 -0
- data/share/guile/2.2/ice-9/and-let-star.scm +73 -0
- data/share/guile/2.2/ice-9/arrays.scm +70 -0
- data/share/guile/2.2/ice-9/atomic.scm +38 -0
- data/share/guile/2.2/ice-9/binary-ports.scm +53 -0
- data/share/guile/2.2/ice-9/boot-9.scm +4131 -0
- data/share/guile/2.2/ice-9/buffered-input.scm +109 -0
- data/share/guile/2.2/ice-9/calling.scm +326 -0
- data/share/guile/2.2/ice-9/channel.scm +170 -0
- data/share/guile/2.2/ice-9/command-line.scm +477 -0
- data/share/guile/2.2/ice-9/common-list.scm +278 -0
- data/share/guile/2.2/ice-9/control.scm +110 -0
- data/share/guile/2.2/ice-9/curried-definitions.scm +57 -0
- data/share/guile/2.2/ice-9/debug.scm +25 -0
- data/share/guile/2.2/ice-9/deprecated.scm +93 -0
- data/share/guile/2.2/ice-9/documentation.scm +203 -0
- data/share/guile/2.2/ice-9/eval-string.scm +90 -0
- data/share/guile/2.2/ice-9/eval.scm +723 -0
- data/share/guile/2.2/ice-9/expect.scm +171 -0
- data/share/guile/2.2/ice-9/fdes-finalizers.scm +25 -0
- data/share/guile/2.2/ice-9/format.scm +1626 -0
- data/share/guile/2.2/ice-9/ftw.scm +564 -0
- data/share/guile/2.2/ice-9/futures.scm +308 -0
- data/share/guile/2.2/ice-9/gap-buffer.scm +283 -0
- data/share/guile/2.2/ice-9/getopt-long.scm +371 -0
- data/share/guile/2.2/ice-9/hash-table.scm +45 -0
- data/share/guile/2.2/ice-9/hcons.scm +80 -0
- data/share/guile/2.2/ice-9/history.scm +65 -0
- data/share/guile/2.2/ice-9/i18n.scm +531 -0
- data/share/guile/2.2/ice-9/iconv.scm +95 -0
- data/share/guile/2.2/ice-9/lineio.scm +115 -0
- data/share/guile/2.2/ice-9/list.scm +36 -0
- data/share/guile/2.2/ice-9/local-eval.scm +261 -0
- data/share/guile/2.2/ice-9/ls.scm +94 -0
- data/share/guile/2.2/ice-9/mapping.scm +118 -0
- data/share/guile/2.2/ice-9/match.scm +59 -0
- data/share/guile/2.2/ice-9/match.upstream.scm +917 -0
- data/share/guile/2.2/ice-9/networking.scm +94 -0
- data/share/guile/2.2/ice-9/null.scm +34 -0
- data/share/guile/2.2/ice-9/occam-channel.scm +261 -0
- data/share/guile/2.2/ice-9/optargs.scm +381 -0
- data/share/guile/2.2/ice-9/peg/cache.scm +45 -0
- data/share/guile/2.2/ice-9/peg/codegen.scm +359 -0
- data/share/guile/2.2/ice-9/peg/simplify-tree.scm +97 -0
- data/share/guile/2.2/ice-9/peg/string-peg.scm +273 -0
- data/share/guile/2.2/ice-9/peg/using-parsers.scm +116 -0
- data/share/guile/2.2/ice-9/peg.scm +42 -0
- data/share/guile/2.2/ice-9/poe.scm +116 -0
- data/share/guile/2.2/ice-9/poll.scm +172 -0
- data/share/guile/2.2/ice-9/popen.scm +178 -0
- data/share/guile/2.2/ice-9/ports.scm +566 -0
- data/share/guile/2.2/ice-9/posix.scm +75 -0
- data/share/guile/2.2/ice-9/pretty-print.scm +483 -0
- data/share/guile/2.2/ice-9/psyntax-pp.scm +3542 -0
- data/share/guile/2.2/ice-9/psyntax.scm +3326 -0
- data/share/guile/2.2/ice-9/q.scm +153 -0
- data/share/guile/2.2/ice-9/quasisyntax.scm +136 -0
- data/share/guile/2.2/ice-9/r5rs.scm +45 -0
- data/share/guile/2.2/ice-9/r6rs-libraries.scm +242 -0
- data/share/guile/2.2/ice-9/rdelim.scm +208 -0
- data/share/guile/2.2/ice-9/receive.scm +26 -0
- data/share/guile/2.2/ice-9/regex.scm +229 -0
- data/share/guile/2.2/ice-9/runq.scm +241 -0
- data/share/guile/2.2/ice-9/rw.scm +27 -0
- data/share/guile/2.2/ice-9/safe-r5rs.scm +145 -0
- data/share/guile/2.2/ice-9/safe.scm +34 -0
- data/share/guile/2.2/ice-9/sandbox.scm +1399 -0
- data/share/guile/2.2/ice-9/save-stack.scm +58 -0
- data/share/guile/2.2/ice-9/scm-style-repl.scm +279 -0
- data/share/guile/2.2/ice-9/serialize.scm +114 -0
- data/share/guile/2.2/ice-9/session.scm +530 -0
- data/share/guile/2.2/ice-9/slib.scm +33 -0
- data/share/guile/2.2/ice-9/stack-catch.scm +47 -0
- data/share/guile/2.2/ice-9/streams.scm +168 -0
- data/share/guile/2.2/ice-9/string-fun.scm +280 -0
- data/share/guile/2.2/ice-9/suspendable-ports.scm +788 -0
- data/share/guile/2.2/ice-9/syncase.scm +37 -0
- data/share/guile/2.2/ice-9/textual-ports.scm +70 -0
- data/share/guile/2.2/ice-9/threads.scm +392 -0
- data/share/guile/2.2/ice-9/time.scm +58 -0
- data/share/guile/2.2/ice-9/top-repl.scm +78 -0
- data/share/guile/2.2/ice-9/unicode.scm +26 -0
- data/share/guile/2.2/ice-9/vlist.scm +595 -0
- data/share/guile/2.2/ice-9/weak-vector.scm +31 -0
- data/share/guile/2.2/language/brainfuck/compile-scheme.scm +123 -0
- data/share/guile/2.2/language/brainfuck/compile-tree-il.scm +184 -0
- data/share/guile/2.2/language/brainfuck/parse.scm +95 -0
- data/share/guile/2.2/language/brainfuck/spec.scm +43 -0
- data/share/guile/2.2/language/bytecode/spec.scm +42 -0
- data/share/guile/2.2/language/bytecode.scm +104 -0
- data/share/guile/2.2/language/cps/closure-conversion.scm +848 -0
- data/share/guile/2.2/language/cps/compile-bytecode.scm +610 -0
- data/share/guile/2.2/language/cps/constructors.scm +106 -0
- data/share/guile/2.2/language/cps/contification.scm +448 -0
- data/share/guile/2.2/language/cps/cse.scm +414 -0
- data/share/guile/2.2/language/cps/dce.scm +363 -0
- data/share/guile/2.2/language/cps/effects-analysis.scm +597 -0
- data/share/guile/2.2/language/cps/elide-values.scm +88 -0
- data/share/guile/2.2/language/cps/handle-interrupts.scm +69 -0
- data/share/guile/2.2/language/cps/intmap.scm +765 -0
- data/share/guile/2.2/language/cps/intset.scm +830 -0
- data/share/guile/2.2/language/cps/licm.scm +308 -0
- data/share/guile/2.2/language/cps/optimize.scm +135 -0
- data/share/guile/2.2/language/cps/peel-loops.scm +287 -0
- data/share/guile/2.2/language/cps/primitives.scm +141 -0
- data/share/guile/2.2/language/cps/prune-bailouts.scm +86 -0
- data/share/guile/2.2/language/cps/prune-top-level-scopes.scm +63 -0
- data/share/guile/2.2/language/cps/reify-primitives.scm +179 -0
- data/share/guile/2.2/language/cps/renumber.scm +217 -0
- data/share/guile/2.2/language/cps/rotate-loops.scm +239 -0
- data/share/guile/2.2/language/cps/self-references.scm +79 -0
- data/share/guile/2.2/language/cps/simplify.scm +274 -0
- data/share/guile/2.2/language/cps/slot-allocation.scm +1058 -0
- data/share/guile/2.2/language/cps/spec.scm +51 -0
- data/share/guile/2.2/language/cps/specialize-numbers.scm +724 -0
- data/share/guile/2.2/language/cps/specialize-primcalls.scm +87 -0
- data/share/guile/2.2/language/cps/split-rec.scm +174 -0
- data/share/guile/2.2/language/cps/type-checks.scm +72 -0
- data/share/guile/2.2/language/cps/type-fold.scm +455 -0
- data/share/guile/2.2/language/cps/types.scm +1826 -0
- data/share/guile/2.2/language/cps/utils.scm +550 -0
- data/share/guile/2.2/language/cps/verify.scm +304 -0
- data/share/guile/2.2/language/cps/with-cps.scm +145 -0
- data/share/guile/2.2/language/cps.scm +358 -0
- data/share/guile/2.2/language/ecmascript/array.scm +121 -0
- data/share/guile/2.2/language/ecmascript/base.scm +251 -0
- data/share/guile/2.2/language/ecmascript/compile-tree-il.scm +576 -0
- data/share/guile/2.2/language/ecmascript/function.scm +78 -0
- data/share/guile/2.2/language/ecmascript/impl.scm +169 -0
- data/share/guile/2.2/language/ecmascript/parse.scm +352 -0
- data/share/guile/2.2/language/ecmascript/spec.scm +37 -0
- data/share/guile/2.2/language/ecmascript/tokenize.scm +513 -0
- data/share/guile/2.2/language/elisp/bindings.scm +107 -0
- data/share/guile/2.2/language/elisp/boot.el +617 -0
- data/share/guile/2.2/language/elisp/compile-tree-il.scm +812 -0
- data/share/guile/2.2/language/elisp/falias.scm +47 -0
- data/share/guile/2.2/language/elisp/lexer.scm +430 -0
- data/share/guile/2.2/language/elisp/parser.scm +222 -0
- data/share/guile/2.2/language/elisp/runtime/function-slot.scm +63 -0
- data/share/guile/2.2/language/elisp/runtime/value-slot.scm +24 -0
- data/share/guile/2.2/language/elisp/runtime.scm +153 -0
- data/share/guile/2.2/language/elisp/spec.scm +43 -0
- data/share/guile/2.2/language/scheme/compile-tree-il.scm +33 -0
- data/share/guile/2.2/language/scheme/decompile-tree-il.scm +796 -0
- data/share/guile/2.2/language/scheme/spec.scm +63 -0
- data/share/guile/2.2/language/tree-il/analyze.scm +1568 -0
- data/share/guile/2.2/language/tree-il/canonicalize.scm +82 -0
- data/share/guile/2.2/language/tree-il/compile-cps.scm +1149 -0
- data/share/guile/2.2/language/tree-il/debug.scm +246 -0
- data/share/guile/2.2/language/tree-il/effects.scm +591 -0
- data/share/guile/2.2/language/tree-il/fix-letrec.scm +314 -0
- data/share/guile/2.2/language/tree-il/optimize.scm +43 -0
- data/share/guile/2.2/language/tree-il/peval.scm +1669 -0
- data/share/guile/2.2/language/tree-il/primitives.scm +630 -0
- data/share/guile/2.2/language/tree-il/spec.scm +46 -0
- data/share/guile/2.2/language/tree-il.scm +630 -0
- data/share/guile/2.2/language/value/spec.scm +30 -0
- data/share/guile/2.2/oop/goops/accessors.scm +72 -0
- data/share/guile/2.2/oop/goops/active-slot.scm +63 -0
- data/share/guile/2.2/oop/goops/composite-slot.scm +83 -0
- data/share/guile/2.2/oop/goops/describe.scm +189 -0
- data/share/guile/2.2/oop/goops/internal.scm +30 -0
- data/share/guile/2.2/oop/goops/save.scm +874 -0
- data/share/guile/2.2/oop/goops/simple.scm +30 -0
- data/share/guile/2.2/oop/goops/stklos.scm +74 -0
- data/share/guile/2.2/oop/goops.scm +3176 -0
- data/share/guile/2.2/rnrs/arithmetic/bitwise.scm +92 -0
- data/share/guile/2.2/rnrs/arithmetic/fixnums.scm +291 -0
- data/share/guile/2.2/rnrs/arithmetic/flonums.scm +203 -0
- data/share/guile/2.2/rnrs/base.scm +291 -0
- data/share/guile/2.2/rnrs/bytevectors.scm +83 -0
- data/share/guile/2.2/rnrs/conditions.scm +225 -0
- data/share/guile/2.2/rnrs/control.scm +22 -0
- data/share/guile/2.2/rnrs/enums.scm +152 -0
- data/share/guile/2.2/rnrs/eval.scm +39 -0
- data/share/guile/2.2/rnrs/exceptions.scm +276 -0
- data/share/guile/2.2/rnrs/files.scm +96 -0
- data/share/guile/2.2/rnrs/hashtables.scm +190 -0
- data/share/guile/2.2/rnrs/io/ports.scm +554 -0
- data/share/guile/2.2/rnrs/io/simple.scm +167 -0
- data/share/guile/2.2/rnrs/lists.scm +55 -0
- data/share/guile/2.2/rnrs/mutable-pairs.scm +23 -0
- data/share/guile/2.2/rnrs/mutable-strings.scm +23 -0
- data/share/guile/2.2/rnrs/programs.scm +22 -0
- data/share/guile/2.2/rnrs/r5rs.scm +34 -0
- data/share/guile/2.2/rnrs/records/inspection.scm +81 -0
- data/share/guile/2.2/rnrs/records/procedural.scm +289 -0
- data/share/guile/2.2/rnrs/records/syntactic.scm +248 -0
- data/share/guile/2.2/rnrs/sorting.scm +27 -0
- data/share/guile/2.2/rnrs/syntax-case.scm +68 -0
- data/share/guile/2.2/rnrs/unicode.scm +104 -0
- data/share/guile/2.2/rnrs.scm +289 -0
- data/share/guile/2.2/scripts/api-diff.scm +179 -0
- data/share/guile/2.2/scripts/autofrisk.scm +218 -0
- data/share/guile/2.2/scripts/compile.scm +273 -0
- data/share/guile/2.2/scripts/disassemble.scm +38 -0
- data/share/guile/2.2/scripts/display-commentary.scm +67 -0
- data/share/guile/2.2/scripts/doc-snarf.scm +439 -0
- data/share/guile/2.2/scripts/frisk.scm +290 -0
- data/share/guile/2.2/scripts/generate-autoload.scm +144 -0
- data/share/guile/2.2/scripts/help.scm +188 -0
- data/share/guile/2.2/scripts/lint.scm +318 -0
- data/share/guile/2.2/scripts/list.scm +91 -0
- data/share/guile/2.2/scripts/punify.scm +87 -0
- data/share/guile/2.2/scripts/read-rfc822.scm +131 -0
- data/share/guile/2.2/scripts/read-scheme-source.scm +282 -0
- data/share/guile/2.2/scripts/read-text-outline.scm +253 -0
- data/share/guile/2.2/scripts/scan-api.scm +223 -0
- data/share/guile/2.2/scripts/snarf-check-and-output-texi.scm +303 -0
- data/share/guile/2.2/scripts/snarf-guile-m4-docs.scm +86 -0
- data/share/guile/2.2/scripts/summarize-guile-TODO.scm +213 -0
- data/share/guile/2.2/scripts/use2dot.scm +110 -0
- data/share/guile/2.2/srfi/srfi-1.scm +1061 -0
- data/share/guile/2.2/srfi/srfi-10.scm +89 -0
- data/share/guile/2.2/srfi/srfi-11.scm +146 -0
- data/share/guile/2.2/srfi/srfi-111.scm +37 -0
- data/share/guile/2.2/srfi/srfi-13.scm +132 -0
- data/share/guile/2.2/srfi/srfi-14.scm +99 -0
- data/share/guile/2.2/srfi/srfi-16.scm +51 -0
- data/share/guile/2.2/srfi/srfi-17.scm +174 -0
- data/share/guile/2.2/srfi/srfi-18.scm +382 -0
- data/share/guile/2.2/srfi/srfi-19.scm +1470 -0
- data/share/guile/2.2/srfi/srfi-2.scm +31 -0
- data/share/guile/2.2/srfi/srfi-26.scm +66 -0
- data/share/guile/2.2/srfi/srfi-27.scm +96 -0
- data/share/guile/2.2/srfi/srfi-28.scm +34 -0
- data/share/guile/2.2/srfi/srfi-31.scm +35 -0
- data/share/guile/2.2/srfi/srfi-34.scm +84 -0
- data/share/guile/2.2/srfi/srfi-35.scm +351 -0
- data/share/guile/2.2/srfi/srfi-37.scm +234 -0
- data/share/guile/2.2/srfi/srfi-38.scm +207 -0
- data/share/guile/2.2/srfi/srfi-39.scm +55 -0
- data/share/guile/2.2/srfi/srfi-4/gnu.scm +80 -0
- data/share/guile/2.2/srfi/srfi-4.scm +118 -0
- data/share/guile/2.2/srfi/srfi-41.scm +505 -0
- data/share/guile/2.2/srfi/srfi-42/ec.scm +1053 -0
- data/share/guile/2.2/srfi/srfi-42.scm +66 -0
- data/share/guile/2.2/srfi/srfi-43.scm +1077 -0
- data/share/guile/2.2/srfi/srfi-45.scm +93 -0
- data/share/guile/2.2/srfi/srfi-6.scm +29 -0
- data/share/guile/2.2/srfi/srfi-60.scm +73 -0
- data/share/guile/2.2/srfi/srfi-64/testing.scm +1040 -0
- data/share/guile/2.2/srfi/srfi-64.scm +55 -0
- data/share/guile/2.2/srfi/srfi-67/compare.scm +686 -0
- data/share/guile/2.2/srfi/srfi-67.scm +88 -0
- data/share/guile/2.2/srfi/srfi-69.scm +336 -0
- data/share/guile/2.2/srfi/srfi-71.scm +267 -0
- data/share/guile/2.2/srfi/srfi-8.scm +31 -0
- data/share/guile/2.2/srfi/srfi-88.scm +53 -0
- data/share/guile/2.2/srfi/srfi-9/gnu.scm +168 -0
- data/share/guile/2.2/srfi/srfi-9.scm +351 -0
- data/share/guile/2.2/srfi/srfi-98.scm +44 -0
- data/share/guile/2.2/statprof.scm +988 -0
- data/share/guile/2.2/sxml/apply-templates.scm +102 -0
- data/share/guile/2.2/sxml/fold.scm +250 -0
- data/share/guile/2.2/sxml/match.scm +75 -0
- data/share/guile/2.2/sxml/simple.scm +408 -0
- data/share/guile/2.2/sxml/ssax/input-parse.scm +180 -0
- data/share/guile/2.2/sxml/ssax.scm +265 -0
- data/share/guile/2.2/sxml/sxml-match.ss +1181 -0
- data/share/guile/2.2/sxml/transform.scm +298 -0
- data/share/guile/2.2/sxml/upstream/SSAX.scm +3235 -0
- data/share/guile/2.2/sxml/upstream/SXML-tree-trans.scm +249 -0
- data/share/guile/2.2/sxml/upstream/SXPath-old.scm +1216 -0
- data/share/guile/2.2/sxml/upstream/assert.scm +35 -0
- data/share/guile/2.2/sxml/upstream/input-parse.scm +326 -0
- data/share/guile/2.2/sxml/xpath.scm +493 -0
- data/share/guile/2.2/system/base/ck.scm +55 -0
- data/share/guile/2.2/system/base/compile.scm +282 -0
- data/share/guile/2.2/system/base/lalr.scm +51 -0
- data/share/guile/2.2/system/base/lalr.upstream.scm +2096 -0
- data/share/guile/2.2/system/base/language.scm +119 -0
- data/share/guile/2.2/system/base/message.scm +238 -0
- data/share/guile/2.2/system/base/pmatch.scm +68 -0
- data/share/guile/2.2/system/base/syntax.scm +299 -0
- data/share/guile/2.2/system/base/target.scm +152 -0
- data/share/guile/2.2/system/base/types.scm +561 -0
- data/share/guile/2.2/system/foreign-object.scm +91 -0
- data/share/guile/2.2/system/foreign.scm +200 -0
- data/share/guile/2.2/system/repl/command.scm +946 -0
- data/share/guile/2.2/system/repl/common.scm +263 -0
- data/share/guile/2.2/system/repl/coop-server.scm +200 -0
- data/share/guile/2.2/system/repl/debug.scm +210 -0
- data/share/guile/2.2/system/repl/describe.scm +347 -0
- data/share/guile/2.2/system/repl/error-handling.scm +183 -0
- data/share/guile/2.2/system/repl/repl.scm +233 -0
- data/share/guile/2.2/system/repl/server.scm +332 -0
- data/share/guile/2.2/system/syntax.scm +33 -0
- data/share/guile/2.2/system/vm/assembler.scm +2614 -0
- data/share/guile/2.2/system/vm/coverage.scm +351 -0
- data/share/guile/2.2/system/vm/debug.scm +766 -0
- data/share/guile/2.2/system/vm/disassembler.scm +658 -0
- data/share/guile/2.2/system/vm/dwarf.scm +1852 -0
- data/share/guile/2.2/system/vm/elf.scm +1042 -0
- data/share/guile/2.2/system/vm/frame.scm +485 -0
- data/share/guile/2.2/system/vm/inspect.scm +188 -0
- data/share/guile/2.2/system/vm/linker.scm +732 -0
- data/share/guile/2.2/system/vm/loader.scm +27 -0
- data/share/guile/2.2/system/vm/program.scm +312 -0
- data/share/guile/2.2/system/vm/trace.scm +121 -0
- data/share/guile/2.2/system/vm/trap-state.scm +302 -0
- data/share/guile/2.2/system/vm/traps.scm +608 -0
- data/share/guile/2.2/system/vm/vm.scm +32 -0
- data/share/guile/2.2/system/xref.scm +369 -0
- data/share/guile/2.2/texinfo/docbook.scm +240 -0
- data/share/guile/2.2/texinfo/html.scm +279 -0
- data/share/guile/2.2/texinfo/indexing.scm +75 -0
- data/share/guile/2.2/texinfo/plain-text.scm +322 -0
- data/share/guile/2.2/texinfo/reflection.scm +585 -0
- data/share/guile/2.2/texinfo/serialize.scm +300 -0
- data/share/guile/2.2/texinfo/string-utils.scm +410 -0
- data/share/guile/2.2/texinfo.scm +1263 -0
- data/share/guile/2.2/web/client.scm +513 -0
- data/share/guile/2.2/web/http.scm +2043 -0
- data/share/guile/2.2/web/request.scm +326 -0
- data/share/guile/2.2/web/response.scm +379 -0
- data/share/guile/2.2/web/server/http.scm +183 -0
- data/share/guile/2.2/web/server.scm +397 -0
- data/share/guile/2.2/web/uri.scm +552 -0
- data/share/lilypond/2.24.1/fontconfig/0bd3dc0958fa2205aaaa8ebb13e2872b-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/188ac73a183f12857f63bb60a4a6d603-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/32b6488e5b8292a2e95c79d947e009e8-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/3830d5c3ddfd5cd38a049b759396e72e-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/3f7329c5293ffd510edef78f73874cfd-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/4c599c202bc5c08e2d34565a40eac3b2-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/57e423e26b20ab21d0f2f29c145174c3-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/826f6b6ef79022e2eac8af26bf4b62f2-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/945677eb7aeaf62f1d50efc3fb3ec7d8-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/95530828ff6c81d309f8258d8d02a23e-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/CACHEDIR.TAG +4 -0
- data/share/lilypond/2.24.1/fontconfig/bf3b770c553c462765856025a94f1ce6-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/c855463f699352c367813e37f3f70ea7-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/d3e5c4ee2ceb1fc347f91d4cefc53bc0-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/d589a48862398ed80a3d6066f4f56f4c-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/d82eb4fd963d448e2fcb7d7b793b5df3-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/e13b20fdb08344e0e664864cc2ede53d-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/e52a45a1c8c8fe895fc0fc8c4e6999b8-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fontconfig/f1f2465696798768e9653f19e17ccdc8-le64.cache-8 +0 -0
- data/share/lilypond/2.24.1/fonts/00-lilypond-fonts.conf +99 -0
- data/share/lilypond/2.24.1/fonts/99-lilypond-fonts.conf +28 -0
- data/share/lilypond/2.24.1/fonts/otf/C059-BdIta.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/C059-Bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/C059-Italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/C059-Roman.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusMonoPS-Bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusMonoPS-BoldItalic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusMonoPS-Italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusMonoPS-Regular.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusSans-Bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusSans-BoldItalic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusSans-Italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/NimbusSans-Regular.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-11.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-13.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-14.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-16.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-18.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-20.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-23.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-26.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/emmentaler-brace.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyrecursor-bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyrecursor-bolditalic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyrecursor-italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyrecursor-regular.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreheros-bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreheros-bolditalic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreheros-italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreheros-regular.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreschola-bold.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreschola-bolditalic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreschola-italic.otf +0 -0
- data/share/lilypond/2.24.1/fonts/otf/texgyreschola-regular.otf +0 -0
- data/share/lilypond/2.24.1/fonts/source/common-modules-and-initialization.mf +26 -0
- data/share/lilypond/2.24.1/fonts/source/debugging-settings.mf +14 -0
- data/share/lilypond/2.24.1/fonts/source/declare-autometric-parameters.mf +9 -0
- data/share/lilypond/2.24.1/fonts/source/feta-accidentals.mf +58 -0
- data/share/lilypond/2.24.1/fonts/source/feta-accordion.mf +575 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet-generic.mf +16 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet20.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-alphabet26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-arrow.mf +114 -0
- data/share/lilypond/2.24.1/fonts/source/feta-arrowheads.mf +171 -0
- data/share/lilypond/2.24.1/fonts/source/feta-autometric.mf +303 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-a.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-b.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-c.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-d.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-e.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-f.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-g.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-generic.mf +47 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-h.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces-i.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-braces.mf +125 -0
- data/share/lilypond/2.24.1/fonts/source/feta-brackettips.mf +100 -0
- data/share/lilypond/2.24.1/fonts/source/feta-clefs.mf +963 -0
- data/share/lilypond/2.24.1/fonts/source/feta-dots.mf +37 -0
- data/share/lilypond/2.24.1/fonts/source/feta-dynamics.mf +891 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags-generic.mf +17 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags.mf +926 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags20.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flags26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-flats.mf +668 -0
- data/share/lilypond/2.24.1/fonts/source/feta-macros.mf +506 -0
- data/share/lilypond/2.24.1/fonts/source/feta-naturals.mf +223 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads-generic.mf +17 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads.mf +2642 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads20.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-noteheads26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta-numbers.mf +1677 -0
- data/share/lilypond/2.24.1/fonts/source/feta-other-generic.mf +27 -0
- data/share/lilypond/2.24.1/fonts/source/feta-params.mf +323 -0
- data/share/lilypond/2.24.1/fonts/source/feta-parenthesis.mf +63 -0
- data/share/lilypond/2.24.1/fonts/source/feta-pedals.mf +355 -0
- data/share/lilypond/2.24.1/fonts/source/feta-rests.mf +890 -0
- data/share/lilypond/2.24.1/fonts/source/feta-scripts.mf +2206 -0
- data/share/lilypond/2.24.1/fonts/source/feta-sharps.mf +524 -0
- data/share/lilypond/2.24.1/fonts/source/feta-sori-koron.mf +325 -0
- data/share/lilypond/2.24.1/fonts/source/feta-ties.mf +72 -0
- data/share/lilypond/2.24.1/fonts/source/feta-timesignatures.mf +119 -0
- data/share/lilypond/2.24.1/fonts/source/feta-trills.mf +321 -0
- data/share/lilypond/2.24.1/fonts/source/feta11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta20.mf +7 -0
- data/share/lilypond/2.24.1/fonts/source/feta23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/feta26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-accidentals.mf +483 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-clefs.mf +1636 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-custodes.mf +503 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-dots.mf +62 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-flags.mf +319 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-macros.mf +225 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads-generic.mf +16 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads.mf +2191 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads20.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-noteheads26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-other-generic.mf +24 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-rests.mf +428 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-scripts.mf +284 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan-timesignatures.mf +402 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan11.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan13.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan14.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan16.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan18.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan20.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan23.mf +6 -0
- data/share/lilypond/2.24.1/fonts/source/parmesan26.mf +6 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-11.svg +2525 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-11.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-13.svg +2530 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-13.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-14.svg +2526 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-14.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-16.svg +2523 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-16.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-18.svg +2519 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-18.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-20.svg +2512 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-20.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-23.svg +2506 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-23.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-26.svg +2510 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-26.woff +0 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-brace.svg +1757 -0
- data/share/lilypond/2.24.1/fonts/svg/emmentaler-brace.woff +0 -0
- data/share/lilypond/2.24.1/ly/Welcome_to_LilyPond.ly +45 -0
- data/share/lilypond/2.24.1/ly/arabic.ly +185 -0
- data/share/lilypond/2.24.1/ly/articulate.ly +1013 -0
- data/share/lilypond/2.24.1/ly/bagpipe.ly +368 -0
- data/share/lilypond/2.24.1/ly/base-tkit.ly +135 -0
- data/share/lilypond/2.24.1/ly/catalan.ly +23 -0
- data/share/lilypond/2.24.1/ly/chord-modifiers-init.ly +63 -0
- data/share/lilypond/2.24.1/ly/chord-repetition-init.ly +60 -0
- data/share/lilypond/2.24.1/ly/context-mods-init.ly +119 -0
- data/share/lilypond/2.24.1/ly/declarations-init.ly +167 -0
- data/share/lilypond/2.24.1/ly/deutsch.ly +23 -0
- data/share/lilypond/2.24.1/ly/drumpitch-init.ly +366 -0
- data/share/lilypond/2.24.1/ly/dynamic-scripts-init.ly +54 -0
- data/share/lilypond/2.24.1/ly/english.ly +23 -0
- data/share/lilypond/2.24.1/ly/engraver-init.ly +1619 -0
- data/share/lilypond/2.24.1/ly/espanol.ly +23 -0
- data/share/lilypond/2.24.1/ly/event-listener.ly +241 -0
- data/share/lilypond/2.24.1/ly/festival.ly +38 -0
- data/share/lilypond/2.24.1/ly/generate-documentation.ly +7 -0
- data/share/lilypond/2.24.1/ly/grace-init.ly +56 -0
- data/share/lilypond/2.24.1/ly/graphviz-init.ly +174 -0
- data/share/lilypond/2.24.1/ly/gregorian.ly +268 -0
- data/share/lilypond/2.24.1/ly/guile-debugger.ly +55 -0
- data/share/lilypond/2.24.1/ly/hel-arabic.ly +307 -0
- data/share/lilypond/2.24.1/ly/init.ly +96 -0
- data/share/lilypond/2.24.1/ly/italiano.ly +23 -0
- data/share/lilypond/2.24.1/ly/lilypond-book-preamble.ly +47 -0
- data/share/lilypond/2.24.1/ly/lyrics-tkit.ly +68 -0
- data/share/lilypond/2.24.1/ly/makam.ly +166 -0
- data/share/lilypond/2.24.1/ly/midi-init.ly +59 -0
- data/share/lilypond/2.24.1/ly/music-functions-init.ly +2254 -0
- data/share/lilypond/2.24.1/ly/nederlands.ly +23 -0
- data/share/lilypond/2.24.1/ly/norsk.ly +23 -0
- data/share/lilypond/2.24.1/ly/paper-defaults-init.ly +188 -0
- data/share/lilypond/2.24.1/ly/performer-init.ly +398 -0
- data/share/lilypond/2.24.1/ly/persian.ly +335 -0
- data/share/lilypond/2.24.1/ly/piano-tkit.ly +61 -0
- data/share/lilypond/2.24.1/ly/portugues.ly +23 -0
- data/share/lilypond/2.24.1/ly/predefined-fretboards-init.ly +78 -0
- data/share/lilypond/2.24.1/ly/predefined-guitar-fretboards.ly +506 -0
- data/share/lilypond/2.24.1/ly/predefined-guitar-ninth-fretboards.ly +75 -0
- data/share/lilypond/2.24.1/ly/predefined-mandolin-fretboards.ly +876 -0
- data/share/lilypond/2.24.1/ly/predefined-ukulele-fretboards.ly +1285 -0
- data/share/lilypond/2.24.1/ly/property-init.ly +858 -0
- data/share/lilypond/2.24.1/ly/satb.ly +214 -0
- data/share/lilypond/2.24.1/ly/scale-definitions-init.ly +117 -0
- data/share/lilypond/2.24.1/ly/scheme-sandbox.ly +39 -0
- data/share/lilypond/2.24.1/ly/script-init.ly +94 -0
- data/share/lilypond/2.24.1/ly/spanners-init.ly +146 -0
- data/share/lilypond/2.24.1/ly/ssaattbb.ly +335 -0
- data/share/lilypond/2.24.1/ly/staff-tkit.ly +182 -0
- data/share/lilypond/2.24.1/ly/string-tunings-init.ly +94 -0
- data/share/lilypond/2.24.1/ly/suomi.ly +23 -0
- data/share/lilypond/2.24.1/ly/svenska.ly +23 -0
- data/share/lilypond/2.24.1/ly/swing.ly +362 -0
- data/share/lilypond/2.24.1/ly/text-replacements.ly +150 -0
- data/share/lilypond/2.24.1/ly/titling-init.ly +150 -0
- data/share/lilypond/2.24.1/ly/toc-init.ly +182 -0
- data/share/lilypond/2.24.1/ly/turkish-makam.ly +609 -0
- data/share/lilypond/2.24.1/ly/vlaams.ly +23 -0
- data/share/lilypond/2.24.1/ly/vocal-tkit.ly +103 -0
- data/share/lilypond/2.24.1/ly/voice-tkit.ly +34 -0
- data/share/lilypond/2.24.1/ps/encodingdefs.ps +2611 -0
- data/share/lilypond/2.24.1/ps/lilyponddefs.ps +49 -0
- data/share/lilypond/2.24.1/ps/music-drawing-routines.ps +329 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_base.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_docbook.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_html.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_latex.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_snippets.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/book_texinfo.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/convertrules.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/langdefs.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/lilylib.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/midi.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/musicexp.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/musicxml.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/musicxml2ly_conversion.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/__pycache__/utilities.cpython-310.pyc +0 -0
- data/share/lilypond/2.24.1/python/book_base.py +331 -0
- data/share/lilypond/2.24.1/python/book_docbook.py +154 -0
- data/share/lilypond/2.24.1/python/book_html.py +178 -0
- data/share/lilypond/2.24.1/python/book_latex.py +373 -0
- data/share/lilypond/2.24.1/python/book_snippets.py +1052 -0
- data/share/lilypond/2.24.1/python/book_texinfo.py +437 -0
- data/share/lilypond/2.24.1/python/convertrules.py +4764 -0
- data/share/lilypond/2.24.1/python/langdefs.py +131 -0
- data/share/lilypond/2.24.1/python/lilylib.py +141 -0
- data/share/lilypond/2.24.1/python/midi.py +212 -0
- data/share/lilypond/2.24.1/python/musicexp.py +2781 -0
- data/share/lilypond/2.24.1/python/musicxml.py +1905 -0
- data/share/lilypond/2.24.1/python/musicxml2ly_conversion.py +80 -0
- data/share/lilypond/2.24.1/python/utilities.py +280 -0
- data/share/lilypond/2.24.1/scm/lily/accreg.scm +579 -0
- data/share/lilypond/2.24.1/scm/lily/auto-beam.scm +163 -0
- data/share/lilypond/2.24.1/scm/lily/autochange.scm +100 -0
- data/share/lilypond/2.24.1/scm/lily/backend-library.scm +593 -0
- data/share/lilypond/2.24.1/scm/lily/bar-line.scm +1281 -0
- data/share/lilypond/2.24.1/scm/lily/breath.scm +74 -0
- data/share/lilypond/2.24.1/scm/lily/c++.scm +174 -0
- data/share/lilypond/2.24.1/scm/lily/chord-entry.scm +278 -0
- data/share/lilypond/2.24.1/scm/lily/chord-ignatzek-names.scm +304 -0
- data/share/lilypond/2.24.1/scm/lily/chord-name.scm +217 -0
- data/share/lilypond/2.24.1/scm/lily/clip-region.scm +87 -0
- data/share/lilypond/2.24.1/scm/lily/color.scm +757 -0
- data/share/lilypond/2.24.1/scm/lily/curried-definitions.scm +68 -0
- data/share/lilypond/2.24.1/scm/lily/define-context-properties.scm +939 -0
- data/share/lilypond/2.24.1/scm/lily/define-event-classes.scm +142 -0
- data/share/lilypond/2.24.1/scm/lily/define-grob-interfaces.scm +640 -0
- data/share/lilypond/2.24.1/scm/lily/define-grob-properties.scm +1647 -0
- data/share/lilypond/2.24.1/scm/lily/define-grobs.scm +4027 -0
- data/share/lilypond/2.24.1/scm/lily/define-markup-commands.scm +5737 -0
- data/share/lilypond/2.24.1/scm/lily/define-music-callbacks.scm +257 -0
- data/share/lilypond/2.24.1/scm/lily/define-music-display-methods.scm +1350 -0
- data/share/lilypond/2.24.1/scm/lily/define-music-properties.scm +242 -0
- data/share/lilypond/2.24.1/scm/lily/define-music-types.scm +983 -0
- data/share/lilypond/2.24.1/scm/lily/define-note-names.scm +1421 -0
- data/share/lilypond/2.24.1/scm/lily/define-stencil-commands.scm +71 -0
- data/share/lilypond/2.24.1/scm/lily/define-woodwind-diagrams.scm +1215 -0
- data/share/lilypond/2.24.1/scm/lily/display-lily.scm +315 -0
- data/share/lilypond/2.24.1/scm/lily/display-woodwind-diagrams.scm +1985 -0
- data/share/lilypond/2.24.1/scm/lily/document-backend.scm +307 -0
- data/share/lilypond/2.24.1/scm/lily/document-context-mods.scm +98 -0
- data/share/lilypond/2.24.1/scm/lily/document-functions.scm +169 -0
- data/share/lilypond/2.24.1/scm/lily/document-identifiers.scm +76 -0
- data/share/lilypond/2.24.1/scm/lily/document-markup.scm +158 -0
- data/share/lilypond/2.24.1/scm/lily/document-music.scm +146 -0
- data/share/lilypond/2.24.1/scm/lily/document-outside-staff-priorities.scm +40 -0
- data/share/lilypond/2.24.1/scm/lily/document-paper-sizes.scm +71 -0
- data/share/lilypond/2.24.1/scm/lily/document-translation.scm +318 -0
- data/share/lilypond/2.24.1/scm/lily/document-type-predicates.scm +85 -0
- data/share/lilypond/2.24.1/scm/lily/documentation-generate.scm +259 -0
- data/share/lilypond/2.24.1/scm/lily/documentation-lib.scm +207 -0
- data/share/lilypond/2.24.1/scm/lily/file-cache.scm +28 -0
- data/share/lilypond/2.24.1/scm/lily/flag-styles.scm +249 -0
- data/share/lilypond/2.24.1/scm/lily/font-encodings.scm +1242 -0
- data/share/lilypond/2.24.1/scm/lily/font.scm +303 -0
- data/share/lilypond/2.24.1/scm/lily/framework-cairo.scm +26 -0
- data/share/lilypond/2.24.1/scm/lily/framework-ps.scm +896 -0
- data/share/lilypond/2.24.1/scm/lily/framework-svg.scm +172 -0
- data/share/lilypond/2.24.1/scm/lily/fret-diagrams.scm +1261 -0
- data/share/lilypond/2.24.1/scm/lily/graphviz.scm +78 -0
- data/share/lilypond/2.24.1/scm/lily/guile-debugger.scm +90 -0
- data/share/lilypond/2.24.1/scm/lily/harp-pedals.scm +172 -0
- data/share/lilypond/2.24.1/scm/lily/hyphenate-internal-words.scm +51 -0
- data/share/lilypond/2.24.1/scm/lily/layout-beam.scm +73 -0
- data/share/lilypond/2.24.1/scm/lily/layout-slur.scm +45 -0
- data/share/lilypond/2.24.1/scm/lily/lily-library.scm +1446 -0
- data/share/lilypond/2.24.1/scm/lily/lily-sort.scm +116 -0
- data/share/lilypond/2.24.1/scm/lily/lily.scm +929 -0
- data/share/lilypond/2.24.1/scm/lily/ly-syntax-constructors.scm +374 -0
- data/share/lilypond/2.24.1/scm/lily/markup-macros.scm +493 -0
- data/share/lilypond/2.24.1/scm/lily/markup.scm +126 -0
- data/share/lilypond/2.24.1/scm/lily/midi.scm +258 -0
- data/share/lilypond/2.24.1/scm/lily/modal-transforms.scm +337 -0
- data/share/lilypond/2.24.1/scm/lily/music-functions.scm +2878 -0
- data/share/lilypond/2.24.1/scm/lily/output-lib.scm +3377 -0
- data/share/lilypond/2.24.1/scm/lily/output-ps.scm +335 -0
- data/share/lilypond/2.24.1/scm/lily/output-svg.scm +684 -0
- data/share/lilypond/2.24.1/scm/lily/page.scm +321 -0
- data/share/lilypond/2.24.1/scm/lily/paper-system.scm +271 -0
- data/share/lilypond/2.24.1/scm/lily/paper.scm +376 -0
- data/share/lilypond/2.24.1/scm/lily/parser-clef.scm +205 -0
- data/share/lilypond/2.24.1/scm/lily/parser-ly-from-scheme.scm +170 -0
- data/share/lilypond/2.24.1/scm/lily/part-combiner.scm +998 -0
- data/share/lilypond/2.24.1/scm/lily/predefined-fretboards.scm +54 -0
- data/share/lilypond/2.24.1/scm/lily/ps-to-png.scm +182 -0
- data/share/lilypond/2.24.1/scm/lily/scheme-engravers.scm +1813 -0
- data/share/lilypond/2.24.1/scm/lily/scheme-performers.scm +126 -0
- data/share/lilypond/2.24.1/scm/lily/script.scm +416 -0
- data/share/lilypond/2.24.1/scm/lily/skyline.scm +25 -0
- data/share/lilypond/2.24.1/scm/lily/song-util.scm +191 -0
- data/share/lilypond/2.24.1/scm/lily/song.scm +853 -0
- data/share/lilypond/2.24.1/scm/lily/stencil.scm +998 -0
- data/share/lilypond/2.24.1/scm/lily/tablature.scm +392 -0
- data/share/lilypond/2.24.1/scm/lily/time-signature-settings.scm +473 -0
- data/share/lilypond/2.24.1/scm/lily/time-signature.scm +35 -0
- data/share/lilypond/2.24.1/scm/lily/titling.scm +99 -0
- data/share/lilypond/2.24.1/scm/lily/to-xml.scm +254 -0
- data/share/lilypond/2.24.1/scm/lily/translation-functions.scm +1169 -0
- data/share/lilypond/2.24.1/vim/compiler/lilypond.vim +36 -0
- data/share/lilypond/2.24.1/vim/ftdetect/lilypond.vim +4 -0
- data/share/lilypond/2.24.1/vim/ftplugin/lilypond.vim +91 -0
- data/share/lilypond/2.24.1/vim/indent/lilypond.vim +79 -0
- data/share/lilypond/2.24.1/vim/syntax/lilypond-words +1408 -0
- data/share/lilypond/2.24.1/vim/syntax/lilypond-words.vim +3 -0
- data/share/lilypond/2.24.1/vim/syntax/lilypond.vim +104 -0
- data/share/locale/ca/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/cs/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/da/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/de/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/el/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/eo/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/es/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/fi/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/fr/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/it/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/ja/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/nl/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/ru/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/sv/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/tr/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/uk/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/vi/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/zh_CN/LC_MESSAGES/lilypond.mo +0 -0
- data/share/locale/zh_TW/LC_MESSAGES/lilypond.mo +0 -0
- metadata +1135 -4
@@ -0,0 +1,4764 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# (setq py-indent-offset 4)
|
3
|
+
#
|
4
|
+
# This file is part of LilyPond, the GNU music typesetter.
|
5
|
+
#
|
6
|
+
# Copyright (C) 1998--2022 Han-Wen Nienhuys <hanwen@xs4all.nl>,
|
7
|
+
# Jan Nieuwenhuizen <janneke@gnu.org>
|
8
|
+
#
|
9
|
+
# LilyPond is free software: you can redistribute it and/or modify
|
10
|
+
# it under the terms of the GNU General Public License as published by
|
11
|
+
# the Free Software Foundation, either version 3 of the License, or
|
12
|
+
# (at your option) any later version.
|
13
|
+
#
|
14
|
+
# LilyPond is distributed in the hope that it will be useful,
|
15
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
# GNU General Public License for more details.
|
18
|
+
#
|
19
|
+
# You should have received a copy of the GNU General Public License
|
20
|
+
# along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
|
21
|
+
|
22
|
+
|
23
|
+
import re
|
24
|
+
import string
|
25
|
+
import sys
|
26
|
+
|
27
|
+
import lilylib
|
28
|
+
|
29
|
+
|
30
|
+
NOT_SMART = "\n" + _("Not smart enough to convert %s.") + "\n"
|
31
|
+
UPDATE_MANUALLY = _(
|
32
|
+
"Please refer to the manual for details, and update manually.") + "\n"
|
33
|
+
FROM_TO = _("%s has been replaced by %s") + "\n"
|
34
|
+
|
35
|
+
|
36
|
+
class FatalConversionError(Exception):
|
37
|
+
pass
|
38
|
+
|
39
|
+
|
40
|
+
conversions = []
|
41
|
+
stderr_write = sys.stderr.write
|
42
|
+
|
43
|
+
|
44
|
+
def warning(s):
|
45
|
+
stderr_write(_("warning: %s") % s)
|
46
|
+
|
47
|
+
# Decorator to make rule syntax simpler
|
48
|
+
|
49
|
+
|
50
|
+
def rule(version, message):
|
51
|
+
"""
|
52
|
+
version: a LilyPond version tuple like (2, 11, 50)
|
53
|
+
message: the message that describes the conversion.
|
54
|
+
|
55
|
+
This decorator adds its function together with the version and the
|
56
|
+
message to the global conversions list. (It doesn't need to return
|
57
|
+
the function as it isn't used directly anyway.)
|
58
|
+
|
59
|
+
A conversion rule using this decorator looks like this:
|
60
|
+
|
61
|
+
@rule ((1, 2, 3), "convert foo to bar")
|
62
|
+
def conv(s):
|
63
|
+
s = s.replace('foo', 'bar')
|
64
|
+
return s
|
65
|
+
|
66
|
+
"""
|
67
|
+
def dec(f):
|
68
|
+
conversions.append((version, f, message))
|
69
|
+
return dec
|
70
|
+
|
71
|
+
|
72
|
+
@rule((0, 1, 9), _('\\header { key = concat + with + operator }'))
|
73
|
+
def conv(s):
|
74
|
+
if re.search('\\\\multi', s):
|
75
|
+
stderr_write(NOT_SMART % "\\multi")
|
76
|
+
return s
|
77
|
+
|
78
|
+
|
79
|
+
@rule((0, 1, 19), _('deprecated %s') % '\\octave')
|
80
|
+
def conv(s):
|
81
|
+
if re.search('\\\\octave', s):
|
82
|
+
stderr_write(NOT_SMART % "\\octave")
|
83
|
+
stderr_write(UPDATE_MANUALLY)
|
84
|
+
# raise FatalConversionError ()
|
85
|
+
return s
|
86
|
+
|
87
|
+
|
88
|
+
@rule((0, 1, 20), _('deprecated \\textstyle, new \\key syntax'))
|
89
|
+
def conv(s):
|
90
|
+
s = re.sub('\\\\textstyle([^;]+);',
|
91
|
+
'\\\\property Lyrics . textstyle = \\1', s)
|
92
|
+
# harmful to current .lys
|
93
|
+
# s = re.sub ('\\\\key([^;]+);', '\\\\accidentals \\1;', s)
|
94
|
+
return s
|
95
|
+
|
96
|
+
|
97
|
+
@rule((0, 1, 21), '\\musical_pitch -> \\musicalpitch, \\meter -> \\time')
|
98
|
+
def conv(s):
|
99
|
+
s = re.sub('\\\\musical_pitch', '\\\\musicalpitch', s)
|
100
|
+
s = re.sub('\\\\meter', '\\\\time', s)
|
101
|
+
return s
|
102
|
+
|
103
|
+
|
104
|
+
@rule((1, 0, 0), _("bump version for release"))
|
105
|
+
def conv(s):
|
106
|
+
return s
|
107
|
+
|
108
|
+
|
109
|
+
@rule((1, 0, 1), '\\accidentals -> \\keysignature, specialaccidentals -> keyoctaviation')
|
110
|
+
def conv(s):
|
111
|
+
s = re.sub('\\\\accidentals', '\\\\keysignature', s)
|
112
|
+
s = re.sub('specialaccidentals *= *1', 'keyoctaviation = 0', s)
|
113
|
+
s = re.sub('specialaccidentals *= *0', 'keyoctaviation = 1', s)
|
114
|
+
return s
|
115
|
+
|
116
|
+
|
117
|
+
@rule((1, 0, 2), _('\\header { key = concat + with + operator }'))
|
118
|
+
def conv(s):
|
119
|
+
if re.search('\\\\header', s):
|
120
|
+
stderr_write(NOT_SMART % _("new \\header format"))
|
121
|
+
return s
|
122
|
+
|
123
|
+
|
124
|
+
@rule((1, 0, 3), '\\melodic -> \\notes')
|
125
|
+
def conv(s):
|
126
|
+
s = re.sub('\\\\melodic([^a-zA-Z])', '\\\\notes\\1', s)
|
127
|
+
return s
|
128
|
+
|
129
|
+
|
130
|
+
@rule((1, 0, 4), 'default_{paper,midi}')
|
131
|
+
def conv(s):
|
132
|
+
s = re.sub('default_paper *=', '', s)
|
133
|
+
s = re.sub('default_midi *=', '', s)
|
134
|
+
return s
|
135
|
+
|
136
|
+
|
137
|
+
@rule((1, 0, 5), 'ChoireStaff -> ChoirStaff')
|
138
|
+
def conv(s):
|
139
|
+
s = re.sub('ChoireStaff', 'ChoirStaff', s)
|
140
|
+
s = re.sub('\\\\output', 'output = ', s)
|
141
|
+
return s
|
142
|
+
|
143
|
+
|
144
|
+
@rule((1, 0, 6), 'foo = \\translator {\\type .. } ->\\translator {\\type ..; foo; }')
|
145
|
+
def conv(s):
|
146
|
+
if re.search('[a-zA-Z]+ = *\\translator', s):
|
147
|
+
stderr_write(NOT_SMART % _("\\translator syntax"))
|
148
|
+
# raise FatalConversionError ()
|
149
|
+
return s
|
150
|
+
|
151
|
+
|
152
|
+
@rule((1, 0, 7), '\\lyric -> \\lyrics')
|
153
|
+
def conv(s):
|
154
|
+
s = re.sub('\\\\lyrics*', '\\\\lyrics', s)
|
155
|
+
return s
|
156
|
+
|
157
|
+
|
158
|
+
@rule((1, 0, 10), '[2/3 ]1/1 -> \\times 2/3 ')
|
159
|
+
def conv(s):
|
160
|
+
s = re.sub('\\\\\\[/3+', '\\\\times 2/3 { ', s)
|
161
|
+
s = re.sub('\\[/3+', '\\\\times 2/3 { [', s)
|
162
|
+
s = re.sub('\\\\\\[([0-9/]+)', '\\\\times \\1 {', s)
|
163
|
+
s = re.sub('\\[([0-9/]+)', '\\\\times \\1 { [', s)
|
164
|
+
s = re.sub('\\\\\\]([0-9/]+)', '}', s)
|
165
|
+
s = re.sub('\\\\\\]', '}', s)
|
166
|
+
s = re.sub('\\]([0-9/]+)', '] }', s)
|
167
|
+
return s
|
168
|
+
|
169
|
+
|
170
|
+
@rule((1, 0, 12), 'Chord syntax stuff')
|
171
|
+
def conv(s):
|
172
|
+
return s
|
173
|
+
|
174
|
+
|
175
|
+
@rule((1, 0, 13), '<a ~ b> c -> <a b> ~ c')
|
176
|
+
def conv(s):
|
177
|
+
s = re.sub('<([^>~]+)~([^>]*)>', '<\\1 \\2> ~', s)
|
178
|
+
return s
|
179
|
+
|
180
|
+
|
181
|
+
@rule((1, 0, 14), '<[a b> <a b]>c -> [<a b> <a b>]')
|
182
|
+
def conv(s):
|
183
|
+
s = re.sub('<\\[', '[<', s)
|
184
|
+
s = re.sub('\\]>', '>]', s)
|
185
|
+
return s
|
186
|
+
|
187
|
+
|
188
|
+
@rule((1, 0, 16), '\\type -> \\context, textstyle -> textStyle')
|
189
|
+
def conv(s):
|
190
|
+
s = re.sub('\\\\type([^\n]*engraver)', '\\\\TYPE\\1', s)
|
191
|
+
s = re.sub('\\\\type([^\n]*performer)', '\\\\TYPE\\1', s)
|
192
|
+
s = re.sub('\\\\type', '\\\\context', s)
|
193
|
+
s = re.sub('\\\\TYPE', '\\\\type', s)
|
194
|
+
s = re.sub('textstyle', 'textStyle', s)
|
195
|
+
return s
|
196
|
+
|
197
|
+
|
198
|
+
@rule((1, 0, 18), _('\\repeat NUM Music Alternative -> \\repeat FOLDSTR Music Alternative'))
|
199
|
+
def conv(s):
|
200
|
+
if re.search('\\\\repeat', s):
|
201
|
+
stderr_write(NOT_SMART % "\\repeat")
|
202
|
+
# raise FatalConversionError ()
|
203
|
+
return s
|
204
|
+
|
205
|
+
|
206
|
+
@rule((1, 0, 19), 'fontsize -> fontSize, midi_instrument -> midiInstrument, SkipBars -> skipBars')
|
207
|
+
def conv(s):
|
208
|
+
s = re.sub('SkipBars', 'skipBars', s)
|
209
|
+
s = re.sub('fontsize', 'fontSize', s)
|
210
|
+
s = re.sub('midi_instrument', 'midiInstrument', s)
|
211
|
+
return s
|
212
|
+
|
213
|
+
|
214
|
+
@rule((1, 0, 20), '{,tie,slur}ydirection -> {v,tieV,slurV}erticalDirection')
|
215
|
+
def conv(s):
|
216
|
+
s = re.sub('tieydirection', 'tieVerticalDirection', s)
|
217
|
+
s = re.sub('slurydirection', 'slurVerticalDirection', s)
|
218
|
+
s = re.sub('ydirection', 'verticalDirection', s)
|
219
|
+
return s
|
220
|
+
|
221
|
+
|
222
|
+
@rule((1, 0, 21), 'hshift -> horizontalNoteShift')
|
223
|
+
def conv(s):
|
224
|
+
s = re.sub('hshift', 'horizontalNoteShift', s)
|
225
|
+
return s
|
226
|
+
|
227
|
+
|
228
|
+
@rule((1, 1, 52), _('deprecate %s') % '\\grouping')
|
229
|
+
def conv(s):
|
230
|
+
s = re.sub('\\\\grouping[^;]*;', '', s)
|
231
|
+
return s
|
232
|
+
|
233
|
+
|
234
|
+
@rule((1, 1, 55), '\\wheel -> \\coda')
|
235
|
+
def conv(s):
|
236
|
+
s = re.sub('\\\\wheel', '\\\\coda', s)
|
237
|
+
return s
|
238
|
+
|
239
|
+
|
240
|
+
@rule((1, 1, 65), 'slurdash -> slurDash, keyoctaviation -> keyOctaviation')
|
241
|
+
def conv(s):
|
242
|
+
s = re.sub('keyoctaviation', 'keyOctaviation', s)
|
243
|
+
s = re.sub('slurdash', 'slurDash', s)
|
244
|
+
return s
|
245
|
+
|
246
|
+
|
247
|
+
@rule((1, 1, 66), 'semi -> volta')
|
248
|
+
def conv(s):
|
249
|
+
s = re.sub('\\\\repeat *"?semi"?', '\\\\repeat "volta"', s)
|
250
|
+
return s
|
251
|
+
|
252
|
+
|
253
|
+
@rule((1, 1, 67), 'beamAuto -> noAutoBeaming')
|
254
|
+
def conv(s):
|
255
|
+
s = re.sub('"?beamAuto"? *= *"?0?"?', 'noAutoBeaming = "1"', s)
|
256
|
+
return s
|
257
|
+
|
258
|
+
|
259
|
+
@rule((1, 2, 0), 'automaticMelismas -> automaticMelismata')
|
260
|
+
def conv(s):
|
261
|
+
s = re.sub('automaticMelismas', 'automaticMelismata', s)
|
262
|
+
return s
|
263
|
+
|
264
|
+
|
265
|
+
@rule((1, 2, 1), 'dynamicDir -> dynamicDirection')
|
266
|
+
def conv(s):
|
267
|
+
s = re.sub('dynamicDir\\b', 'dynamicDirection', s)
|
268
|
+
return s
|
269
|
+
|
270
|
+
|
271
|
+
@rule((1, 3, 4), '\\cadenza -> \\cadenza{On|Off}')
|
272
|
+
def conv(s):
|
273
|
+
s = re.sub('\\\\cadenza *0 *;', '\\\\cadenzaOff', s)
|
274
|
+
s = re.sub('\\\\cadenza *1 *;', '\\\\cadenzaOn', s)
|
275
|
+
return s
|
276
|
+
|
277
|
+
|
278
|
+
@rule((1, 3, 5), 'beamAuto moment properties')
|
279
|
+
def conv(s):
|
280
|
+
s = re.sub('"?beamAuto([^"=]+)"? *= *"([0-9]+)/([0-9]+)" *;*',
|
281
|
+
'beamAuto\\1 = #(make-moment \\2 \\3)',
|
282
|
+
s)
|
283
|
+
return s
|
284
|
+
|
285
|
+
|
286
|
+
@rule((1, 3, 17), 'stemStyle -> flagStyle')
|
287
|
+
def conv(s):
|
288
|
+
s = re.sub('stemStyle',
|
289
|
+
'flagStyle',
|
290
|
+
s)
|
291
|
+
return s
|
292
|
+
|
293
|
+
|
294
|
+
@rule((1, 3, 18), 'staffLineLeading -> staffSpace')
|
295
|
+
def conv(s):
|
296
|
+
s = re.sub('staffLineLeading',
|
297
|
+
'staffSpace',
|
298
|
+
s)
|
299
|
+
return s
|
300
|
+
|
301
|
+
|
302
|
+
@rule((1, 3, 23), _('deprecate %s ') % '\\repetitions')
|
303
|
+
def conv(s):
|
304
|
+
if re.search('\\\\repetitions', s):
|
305
|
+
stderr_write(NOT_SMART % "\\repetitions")
|
306
|
+
# raise FatalConversionError ()
|
307
|
+
return s
|
308
|
+
|
309
|
+
|
310
|
+
@rule((1, 3, 35), 'textEmptyDimension -> textNonEmpty')
|
311
|
+
def conv(s):
|
312
|
+
s = re.sub('textEmptyDimension *= *##t',
|
313
|
+
'textNonEmpty = ##f',
|
314
|
+
s)
|
315
|
+
s = re.sub('textEmptyDimension *= *##f',
|
316
|
+
'textNonEmpty = ##t',
|
317
|
+
s)
|
318
|
+
return s
|
319
|
+
|
320
|
+
|
321
|
+
@rule((1, 3, 38), r"\musicalpitch { a b c } -> #'(a b c)")
|
322
|
+
def conv(s):
|
323
|
+
s = re.sub("([a-z]+)[ \t]*=[ \t]*\\\\musicalpitch *{([- 0-9]+)} *\n",
|
324
|
+
"(\\1 . (\\2))\n", s)
|
325
|
+
s = re.sub("\\\\musicalpitch *{([0-9 -]+)}",
|
326
|
+
"\\\\musicalpitch #'(\\1)", s)
|
327
|
+
if re.search('\\\\notenames', s):
|
328
|
+
stderr_write(NOT_SMART % _("new \\notenames format"))
|
329
|
+
return s
|
330
|
+
|
331
|
+
|
332
|
+
@rule((1, 3, 39), '\\key A ; ->\\key a;')
|
333
|
+
def conv(s):
|
334
|
+
def replace(match):
|
335
|
+
return '\\key %s;' % match.group(1).lower()
|
336
|
+
|
337
|
+
s = re.sub("\\\\key ([^;]+);", replace, s)
|
338
|
+
return s
|
339
|
+
|
340
|
+
|
341
|
+
@rule((1, 3, 41), '[:16 c4 d4 ] -> \\repeat "tremolo" 2 { c16 d16 }')
|
342
|
+
def conv(s):
|
343
|
+
if re.search('\\[:', s):
|
344
|
+
stderr_write(NOT_SMART % _("new tremolo format"))
|
345
|
+
return s
|
346
|
+
|
347
|
+
|
348
|
+
@rule((1, 3, 42), _('Staff_margin_engraver deprecated, use Instrument_name_engraver'))
|
349
|
+
def conv(s):
|
350
|
+
s = re.sub('Staff_margin_engraver', 'Instrument_name_engraver', s)
|
351
|
+
return s
|
352
|
+
|
353
|
+
|
354
|
+
@rule((1, 3, 49), 'noteHeadStyle value: string -> symbol')
|
355
|
+
def conv(s):
|
356
|
+
s = re.sub('note[hH]eadStyle\\s*=\\s*"?(\\w+)"?',
|
357
|
+
"noteHeadStyle = #'\\1", s)
|
358
|
+
return s
|
359
|
+
|
360
|
+
|
361
|
+
@rule((1, 3, 58), 'noteHeadStyle value: string -> symbol')
|
362
|
+
def conv(s):
|
363
|
+
if re.search('\\\\keysignature', s):
|
364
|
+
stderr_write(NOT_SMART % '\\keysignature')
|
365
|
+
return s
|
366
|
+
|
367
|
+
|
368
|
+
@rule((1, 3, 59), r'\key X ; -> \key X major; ')
|
369
|
+
def conv(s):
|
370
|
+
s = re.sub(r"""\\key *([a-z]+) *;""", r"""\\key \1 \\major;""", s)
|
371
|
+
return s
|
372
|
+
|
373
|
+
|
374
|
+
@rule((1, 3, 68), 'latexheaders = "\\input global" -> latexheaders = "global"')
|
375
|
+
def conv(s):
|
376
|
+
s = re.sub(r'latexheaders *= *"\\\\input ',
|
377
|
+
'latexheaders = "',
|
378
|
+
s)
|
379
|
+
return s
|
380
|
+
|
381
|
+
|
382
|
+
# TODO: lots of other syntax changes should be done here as well
|
383
|
+
@rule((1, 3, 92), 'basicXXXProperties -> XXX, Repeat_engraver -> Volta_engraver')
|
384
|
+
def conv(s):
|
385
|
+
s = re.sub('basicCollisionProperties', 'NoteCollision', s)
|
386
|
+
s = re.sub('basicVoltaSpannerProperties', "VoltaBracket", s)
|
387
|
+
s = re.sub('basicKeyProperties', "KeySignature", s)
|
388
|
+
|
389
|
+
s = re.sub('basicClefItemProperties', "Clef", s)
|
390
|
+
|
391
|
+
s = re.sub('basicLocalKeyProperties', "Accidentals", s)
|
392
|
+
s = re.sub('basicMarkProperties', "Accidentals", s)
|
393
|
+
s = re.sub('basic([A-Za-z_]+)Properties', '\\1', s)
|
394
|
+
|
395
|
+
s = re.sub('Repeat_engraver', 'Volta_engraver', s)
|
396
|
+
return s
|
397
|
+
|
398
|
+
|
399
|
+
@rule((1, 3, 93), _('change property definition case (eg. onevoice -> oneVoice)'))
|
400
|
+
def conv(s):
|
401
|
+
# Ugh, but meaning of \stemup changed too
|
402
|
+
# maybe we should do \stemup -> \stemUp\slurUp\tieUp ?
|
403
|
+
s = re.sub('\\\\stemup', '\\\\stemUp', s)
|
404
|
+
s = re.sub('\\\\stemdown', '\\\\stemDown', s)
|
405
|
+
s = re.sub('\\\\stemboth', '\\\\stemBoth', s)
|
406
|
+
|
407
|
+
s = re.sub('\\\\slurup', '\\\\slurUp', s)
|
408
|
+
s = re.sub('\\\\slurboth', '\\\\slurBoth', s)
|
409
|
+
s = re.sub('\\\\slurdown', '\\\\slurDown', s)
|
410
|
+
s = re.sub('\\\\slurdotted', '\\\\slurDotted', s)
|
411
|
+
s = re.sub('\\\\slurnormal', '\\\\slurNoDots', s)
|
412
|
+
|
413
|
+
s = re.sub('\\\\shiftoff', '\\\\shiftOff', s)
|
414
|
+
s = re.sub('\\\\shifton', '\\\\shiftOn', s)
|
415
|
+
s = re.sub('\\\\shiftonn', '\\\\shiftOnn', s)
|
416
|
+
s = re.sub('\\\\shiftonnn', '\\\\shiftOnnn', s)
|
417
|
+
|
418
|
+
s = re.sub('\\\\onevoice', '\\\\oneVoice', s)
|
419
|
+
s = re.sub('\\\\voiceone', '\\\\voiceOne', s)
|
420
|
+
s = re.sub('\\\\voicetwo', '\\\\voiceTwo', s)
|
421
|
+
s = re.sub('\\\\voicethree', '\\\\voiceThree', s)
|
422
|
+
s = re.sub('\\\\voicefour', '\\\\voiceFour', s)
|
423
|
+
|
424
|
+
# I don't know exactly when these happened...
|
425
|
+
# ugh, we lose context setting here...
|
426
|
+
s = re.sub('\\\\property *[^ ]*verticalDirection[^=]*= *#?"?(1|(\\\\up))"?',
|
427
|
+
'\\\\stemUp\\\\slurUp\\\\tieUp', s)
|
428
|
+
s = re.sub('\\\\property *[^ ]*verticalDirection[^=]*= *#?"?((-1)|(\\\\down))"?',
|
429
|
+
'\\\\stemDown\\\\slurDown\\\\tieDown', s)
|
430
|
+
s = re.sub('\\\\property *[^ ]*verticalDirection[^=]*= *#?"?(0|(\\\\center))"?',
|
431
|
+
'\\\\stemBoth\\\\slurBoth\\\\tieBoth', s)
|
432
|
+
|
433
|
+
s = re.sub('verticalDirection[^=]*= *#?"?(1|(\\\\up))"?',
|
434
|
+
'Stem \\\\override #\'direction = #0\nSlur \\\\override #\'direction = #0\n Tie \\\\override #\'direction = #1', s)
|
435
|
+
s = re.sub('verticalDirection[^=]*= *#?"?((-1)|(\\\\down))"?',
|
436
|
+
'Stem \\\\override #\'direction = #0\nSlur \\\\override #\'direction = #0\n Tie \\\\override #\'direction = #-1', s)
|
437
|
+
s = re.sub('verticalDirection[^=]*= *#?"?(0|(\\\\center))"?',
|
438
|
+
'Stem \\\\override #\'direction = #0\nSlur \\\\override #\'direction = #0\n Tie \\\\override #\'direction = #0', s)
|
439
|
+
|
440
|
+
s = re.sub(
|
441
|
+
'\\\\property *[^ .]*[.]?([a-z]+)VerticalDirection[^=]*= *#?"?(1|(\\\\up))"?', '\\\\\\1Up', s)
|
442
|
+
s = re.sub(
|
443
|
+
'\\\\property *[^ .]*[.]?([a-z]+)VerticalDirection[^=]*= *#?"?((-1)|(\\\\down))"?', '\\\\\\1Down', s)
|
444
|
+
s = re.sub(
|
445
|
+
'\\\\property *[^ .]*[.]?([a-z]+)VerticalDirection[^=]*= *#?"?(0|(\\\\center))"?', '\\\\\\1Both', s)
|
446
|
+
|
447
|
+
# (lacks capitalization slur -> Slur)
|
448
|
+
s = re.sub('([a-z]+)VerticalDirection[^=]*= *#?"?(1|(\\\\up))"?',
|
449
|
+
'\\1 \\\\override #\'direction = #1', s)
|
450
|
+
s = re.sub('([a-z]+)VerticalDirection[^=]*= *#?"?((-1)|(\\\\down))"?',
|
451
|
+
'\\1 \\\\override #\'direction = #-1', s)
|
452
|
+
s = re.sub('([a-z]+)VerticalDirection[^=]*= *#?"?(0|(\\\\center))"?',
|
453
|
+
'\\1 \\\\override #\'direction = #0', s)
|
454
|
+
|
455
|
+
# dynamic..
|
456
|
+
s = re.sub(
|
457
|
+
'\\\\property *[^ .]*[.]?dynamicDirection[^=]*= *#?"?(1|(\\\\up))"?', '\\\\dynamicUp', s)
|
458
|
+
s = re.sub(
|
459
|
+
'\\\\property *[^ .]*[.]?dyn[^=]*= *#?"?((-1)|(\\\\down))"?', '\\\\dynamicDown', s)
|
460
|
+
s = re.sub(
|
461
|
+
'\\\\property *[^ .]*[.]?dyn[^=]*= *#?"?(0|(\\\\center))"?', '\\\\dynamicBoth', s)
|
462
|
+
|
463
|
+
s = re.sub(
|
464
|
+
'\\\\property *[^ .]*[.]?([a-z]+)Dash[^=]*= *#?"?(0|(""))"?', '\\\\\\1NoDots', s)
|
465
|
+
s = re.sub(
|
466
|
+
'\\\\property *[^ .]*[.]?([a-z]+)Dash[^=]*= *#?"?([1-9]+)"?', '\\\\\\1Dotted', s)
|
467
|
+
|
468
|
+
s = re.sub(
|
469
|
+
'\\\\property *[^ .]*[.]?noAutoBeaming[^=]*= *#?"?(0|(""))"?', '\\\\autoBeamOn', s)
|
470
|
+
s = re.sub(
|
471
|
+
'\\\\property *[^ .]*[.]?noAutoBeaming[^=]*= *#?"?([1-9]+)"?', '\\\\autoBeamOff', s)
|
472
|
+
return s
|
473
|
+
|
474
|
+
|
475
|
+
@rule((1, 3, 97), 'ChordName -> ChordNames')
|
476
|
+
def conv(s):
|
477
|
+
s = re.sub('ChordNames*', 'ChordNames', s)
|
478
|
+
if re.search('\\\\textscript "[^"]* *"[^"]*"', s):
|
479
|
+
stderr_write(NOT_SMART % _("new \\textscript markup text"))
|
480
|
+
|
481
|
+
s = re.sub('\\textscript +("[^"]*")', '\\textscript #\\1', s)
|
482
|
+
return s
|
483
|
+
|
484
|
+
# TODO: add lots of these
|
485
|
+
|
486
|
+
|
487
|
+
@rule((1, 3, 98), 'CONTEXT.textStyle -> GROB.#font-style ')
|
488
|
+
def conv(s):
|
489
|
+
s = re.sub('\\\\property *"?Voice"? *[.] *"?textStyle"? *= *"([^"]*)"',
|
490
|
+
'\\\\property Voice.TextScript \\\\set #\'font-style = #\'\\1', s)
|
491
|
+
s = re.sub('\\\\property *"?Lyrics"? *[.] *"?textStyle"? *= *"([^"]*)"',
|
492
|
+
'\\\\property Lyrics.LyricText \\\\set #\'font-style = #\'\\1', s)
|
493
|
+
|
494
|
+
s = re.sub('\\\\property *"?([^.]+)"? *[.] *"?timeSignatureStyle"? *= *"([^"]*)"',
|
495
|
+
'\\\\property \\1.TimeSignature \\\\override #\'style = #\'\\2', s)
|
496
|
+
|
497
|
+
s = re.sub('"?timeSignatureStyle"? *= *#?""',
|
498
|
+
'TimeSignature \\\\override #\'style = ##f', s)
|
499
|
+
|
500
|
+
s = re.sub('"?timeSignatureStyle"? *= *#?"([^"]*)"',
|
501
|
+
'TimeSignature \\\\override #\'style = #\'\\1', s)
|
502
|
+
|
503
|
+
s = re.sub('#\'style *= #*"([^"])"', '#\'style = #\'\\1', s)
|
504
|
+
|
505
|
+
s = re.sub('\\\\property *"?([^.]+)"? *[.] *"?horizontalNoteShift"? *= *"?#?([-0-9]+)"?',
|
506
|
+
'\\\\property \\1.NoteColumn \\\\override #\'horizontal-shift = #\\2', s)
|
507
|
+
|
508
|
+
# ugh
|
509
|
+
s = re.sub('\\\\property *"?([^.]+)"? *[.] *"?flagStyle"? *= *""',
|
510
|
+
'\\\\property \\1.Stem \\\\override #\'flag-style = ##f', s)
|
511
|
+
|
512
|
+
s = re.sub('\\\\property *"?([^.]+)"? *[.] *"?flagStyle"? *= *"([^"]*)"',
|
513
|
+
'\\\\property \\1.Stem \\\\override #\'flag-style = #\'\\2', s)
|
514
|
+
return s
|
515
|
+
|
516
|
+
|
517
|
+
@rule((1, 3, 102), 'beamAutoEnd -> autoBeamSettings \\push (end * * * *)')
|
518
|
+
def conv(s):
|
519
|
+
s = re.sub('"?beamAutoEnd_([0-9]*)"? *= *(#\\([^)]*\\))',
|
520
|
+
'autoBeamSettings \\\\push #\'(end 1 \\1 * *) = \\2', s)
|
521
|
+
s = re.sub('"?beamAutoBegin_([0-9]*)"? *= *(#\\([^)]*\\))',
|
522
|
+
'autoBeamSettings \\\\push #\'(begin 1 \\1 * *) = \\2', s)
|
523
|
+
s = re.sub('"?beamAutoEnd"? *= *(#\\([^)]*\\))',
|
524
|
+
'autoBeamSettings \\\\push #\'(end * * * *) = \\1', s)
|
525
|
+
s = re.sub('"?beamAutoBegin"? *= *(#\\([^)]*\\))',
|
526
|
+
'autoBeamSettings \\\\push #\'(begin * * * *) = \\1', s)
|
527
|
+
return s
|
528
|
+
|
529
|
+
|
530
|
+
@rule((1, 3, 111), '\\push -> \\override, \\pop -> \\revert')
|
531
|
+
def conv(s):
|
532
|
+
s = re.sub('\\\\push', '\\\\override', s)
|
533
|
+
s = re.sub('\\\\pop', '\\\\revert', s)
|
534
|
+
return s
|
535
|
+
|
536
|
+
|
537
|
+
@rule((1, 3, 113), 'LyricVoice -> LyricsVoice')
|
538
|
+
def conv(s):
|
539
|
+
s = re.sub('LyricVoice', 'LyricsVoice', s)
|
540
|
+
# old fix
|
541
|
+
s = re.sub('Chord[Nn]ames*.Chord[Nn]ames*', 'ChordNames.ChordName', s)
|
542
|
+
s = re.sub('Chord[Nn]ames([ \t\n]+\\\\override)', 'ChordName\\1', s)
|
543
|
+
return s
|
544
|
+
|
545
|
+
|
546
|
+
def regularize_id(s):
|
547
|
+
s = ''
|
548
|
+
lastx = ''
|
549
|
+
for x in s:
|
550
|
+
if x == '_':
|
551
|
+
lastx = x
|
552
|
+
continue
|
553
|
+
elif x in string.digits:
|
554
|
+
x = chr(ord(x) - ord('0') + ord('A'))
|
555
|
+
elif x not in string.letters:
|
556
|
+
x = 'x'
|
557
|
+
elif x in string.lowercase and lastx == '_':
|
558
|
+
x = x.upper()
|
559
|
+
s = s + x
|
560
|
+
lastx = x
|
561
|
+
return s
|
562
|
+
|
563
|
+
|
564
|
+
@rule((1, 3, 117), _('identifier names: %s') % '$!foo_bar_123 -> xfooBarABC')
|
565
|
+
def conv(s):
|
566
|
+
def regularize_dollar_reference(match):
|
567
|
+
return regularize_id(match.group(1))
|
568
|
+
|
569
|
+
def regularize_assignment(match):
|
570
|
+
return '\n' + regularize_id(match.group(1)) + ' = '
|
571
|
+
s = re.sub(r'\$([^\t\n ]+)', regularize_dollar_reference, s)
|
572
|
+
s = re.sub('\n([^ \t\n]+)[ \t]*= *', regularize_assignment, s)
|
573
|
+
return s
|
574
|
+
|
575
|
+
|
576
|
+
@rule((1, 3, 120), 'paper_xxx -> paperXxxx, pedalup -> pedalUp.')
|
577
|
+
def conv(s):
|
578
|
+
def regularize_paper(match):
|
579
|
+
return regularize_id(match.group(1))
|
580
|
+
s = re.sub('(paper_[a-z]+)', regularize_paper, s)
|
581
|
+
s = re.sub('sustainup', 'sustainUp', s)
|
582
|
+
s = re.sub('nobreak', 'noBreak', s)
|
583
|
+
s = re.sub('sustaindown', 'sustainDown', s)
|
584
|
+
s = re.sub('sostenutoup', 'sostenutoUp', s)
|
585
|
+
s = re.sub('sostenutodown', 'sostenutoDown', s)
|
586
|
+
s = re.sub('unachorda', 'unaChorda', s)
|
587
|
+
s = re.sub('trechorde', 'treChorde', s)
|
588
|
+
return s
|
589
|
+
|
590
|
+
|
591
|
+
@rule((1, 3, 122), 'drarnChords -> chordChanges, \\musicalpitch -> \\pitch')
|
592
|
+
def conv(s):
|
593
|
+
s = re.sub('drarnChords', 'chordChanges', s)
|
594
|
+
s = re.sub(r'\\musicalpitch', r'\\pitch', s)
|
595
|
+
return s
|
596
|
+
|
597
|
+
|
598
|
+
@rule((1, 3, 136), 'ly-X-elt-property -> ly-X-grob-property')
|
599
|
+
def conv(s):
|
600
|
+
s = re.sub('ly-([sg])et-elt-property', 'ly-\\1et-grob-property', s)
|
601
|
+
return s
|
602
|
+
|
603
|
+
|
604
|
+
@rule((1, 3, 138), _('point-and-click argument changed to procedure.'))
|
605
|
+
def conv(s):
|
606
|
+
s = re.sub('point-and-click +#t',
|
607
|
+
'point-and-click line-column-location', s)
|
608
|
+
return s
|
609
|
+
|
610
|
+
|
611
|
+
@rule((1, 3, 138), 'followThread -> followVoice.')
|
612
|
+
def conv(s):
|
613
|
+
s = re.sub('followThread', 'followVoice', s)
|
614
|
+
s = re.sub('Thread.FollowThread', 'Voice.VoiceFollower', s)
|
615
|
+
s = re.sub('FollowThread', 'VoiceFollower', s)
|
616
|
+
return s
|
617
|
+
|
618
|
+
|
619
|
+
@rule((1, 3, 139), 'font-point-size -> font-design-size.')
|
620
|
+
def conv(s):
|
621
|
+
s = re.sub('font-point-size', 'font-design-size', s)
|
622
|
+
return s
|
623
|
+
|
624
|
+
|
625
|
+
@rule((1, 3, 141), 'xNoDots -> xSolid')
|
626
|
+
def conv(s):
|
627
|
+
s = re.sub('([a-zA-Z]*)NoDots', '\\1Solid', s)
|
628
|
+
return s
|
629
|
+
|
630
|
+
|
631
|
+
@rule((1, 3, 144), 'Chorda -> Corda')
|
632
|
+
def conv(s):
|
633
|
+
s = re.sub('([Cc])hord([ea])', '\\1ord\\2', s)
|
634
|
+
return s
|
635
|
+
|
636
|
+
|
637
|
+
@rule((1, 3, 145), 'ContextNameXxxxVerticalExtent -> XxxxVerticalExtent')
|
638
|
+
def conv(s):
|
639
|
+
s = re.sub('([A-Za-z]+)MinimumVerticalExtent',
|
640
|
+
'MinimumV@rticalExtent', s)
|
641
|
+
s = re.sub('([A-Za-z]+)ExtraVerticalExtent', 'ExtraV@rticalExtent', s)
|
642
|
+
s = re.sub('([A-Za-z]+)VerticalExtent', 'VerticalExtent', s)
|
643
|
+
s = re.sub('ExtraV@rticalExtent', 'ExtraVerticalExtent', s)
|
644
|
+
s = re.sub('MinimumV@rticalExtent', 'MinimumVerticalExtent', s)
|
645
|
+
return s
|
646
|
+
|
647
|
+
|
648
|
+
@rule((1, 3, 146), _('semicolons removed'))
|
649
|
+
def conv(s):
|
650
|
+
s = re.sub('\\\\key[ \t]*;', r'\\key \\default;', s)
|
651
|
+
s = re.sub('\\\\mark[ \t]*;', r'\\mark \\default;', s)
|
652
|
+
|
653
|
+
# Make sure groups of more than one ; have space before
|
654
|
+
# them, so that non of them gets removed by next rule
|
655
|
+
s = re.sub("([^ \n\t;]);(;+)", "\\1 ;\\2", s)
|
656
|
+
|
657
|
+
# Only remove ; that are not after spaces, # or ;
|
658
|
+
# Otherwise we interfere with Scheme comments,
|
659
|
+
# which is badbadbad.
|
660
|
+
s = re.sub("([^ \t;#]);", "\\1", s)
|
661
|
+
return s
|
662
|
+
|
663
|
+
|
664
|
+
@rule((1, 3, 147), 'default-neutral-direction -> neutral-direction')
|
665
|
+
def conv(s):
|
666
|
+
s = re.sub('default-neutral-direction', 'neutral-direction', s)
|
667
|
+
return s
|
668
|
+
|
669
|
+
|
670
|
+
@rule((1, 3, 148), '"(align" -> "(axis", "(rows" -> "(columns"')
|
671
|
+
def conv(s):
|
672
|
+
s = re.sub(r'\(align', '(axis', s)
|
673
|
+
s = re.sub(r'\(rows', '(columns', s)
|
674
|
+
return s
|
675
|
+
|
676
|
+
|
677
|
+
@rule((1, 5, 33), 'SystemStartDelimiter -> systemStartDelimiter')
|
678
|
+
def conv(s):
|
679
|
+
s = re.sub('SystemStartDelimiter', 'systemStartDelimiter', s)
|
680
|
+
return s
|
681
|
+
|
682
|
+
|
683
|
+
@rule((1, 5, 38), 'arithmetic... -> spacing...')
|
684
|
+
def conv(s):
|
685
|
+
s = re.sub('arithmetic-multiplier', 'spacing-increment', s)
|
686
|
+
s = re.sub('arithmetic-basicspace', 'shortest-duration-space', s)
|
687
|
+
return s
|
688
|
+
|
689
|
+
|
690
|
+
# 40 ?
|
691
|
+
@rule((1, 5, 40), _('%s property names') % 'breakAlignOrder')
|
692
|
+
def conv(s):
|
693
|
+
|
694
|
+
def func(match):
|
695
|
+
break_dict = {
|
696
|
+
"Instrument_name": "instrument-name",
|
697
|
+
"Left_edge_item": "left-edge",
|
698
|
+
"Span_bar": "span-bar",
|
699
|
+
"Breathing_sign": "breathing-sign",
|
700
|
+
"Staff_bar": "staff-bar",
|
701
|
+
"Clef_item": "clef",
|
702
|
+
"Key_item": "key-signature",
|
703
|
+
"Time_signature": "time-signature",
|
704
|
+
"Custos": "custos"
|
705
|
+
}
|
706
|
+
props = match.group(1)
|
707
|
+
for (k, v) in list(break_dict.items()):
|
708
|
+
props = re.sub(k, v, props)
|
709
|
+
return "breakAlignOrder = #'(%s)" % props
|
710
|
+
|
711
|
+
s = re.sub("breakAlignOrder *= *#'\\(([a-z_\n\tA-Z ]+)\\)",
|
712
|
+
func, s)
|
713
|
+
return s
|
714
|
+
|
715
|
+
|
716
|
+
@rule((1, 5, 49), 'noAutoBeaming -> autoBeaming')
|
717
|
+
def conv(s):
|
718
|
+
s = re.sub('noAutoBeaming *= *##f', 'autoBeaming = ##t', s)
|
719
|
+
s = re.sub('noAutoBeaming *= *##t', 'autoBeaming = ##f', s)
|
720
|
+
return s
|
721
|
+
|
722
|
+
|
723
|
+
@rule((1, 5, 52), 'tuplet-X-visibility -> X-visibility')
|
724
|
+
def conv(s):
|
725
|
+
s = re.sub('tuplet-bracket-visibility', 'bracket-visibility', s)
|
726
|
+
s = re.sub('tuplet-number-visibility', 'number-visibility', s)
|
727
|
+
return s
|
728
|
+
|
729
|
+
|
730
|
+
@rule((1, 5, 56), 'Pitch::transpose -> ly-transpose-pitch')
|
731
|
+
def conv(s):
|
732
|
+
s = re.sub('Pitch::transpose', 'ly-transpose-pitch', s)
|
733
|
+
return s
|
734
|
+
|
735
|
+
|
736
|
+
@rule((1, 5, 58), _('deprecate %s') % 'textNonEmpty')
|
737
|
+
def conv(s):
|
738
|
+
s = re.sub('textNonEmpty *= *##t',
|
739
|
+
"TextScript \\\\set #'no-spacing-rods = ##f", s)
|
740
|
+
s = re.sub('textNonEmpty *= *##f',
|
741
|
+
"TextScript \\\\set #'no-spacing-rods = ##t", s)
|
742
|
+
return s
|
743
|
+
|
744
|
+
|
745
|
+
@rule((1, 5, 59), 'XxxxVerticalExtent -> xxxVerticalExtent')
|
746
|
+
def conv(s):
|
747
|
+
s = re.sub('MinimumVerticalExtent', 'minimumV@rticalExtent', s)
|
748
|
+
s = re.sub('minimumVerticalExtent', 'minimumV@rticalExtent', s)
|
749
|
+
s = re.sub('ExtraVerticalExtent', 'extraV@rticalExtent', s)
|
750
|
+
s = re.sub('extraVerticalExtent', 'extraV@rticalExtent', s)
|
751
|
+
s = re.sub('VerticalExtent', 'verticalExtent', s)
|
752
|
+
s = re.sub('extraV@rticalExtent', 'extraVerticalExtent', s)
|
753
|
+
s = re.sub('minimumV@rticalExtent', 'minimumVerticalExtent', s)
|
754
|
+
return s
|
755
|
+
|
756
|
+
|
757
|
+
@rule((1, 5, 62), 'visibility-lambda -> break-visibility')
|
758
|
+
def conv(s):
|
759
|
+
s = re.sub('visibility-lambda', 'break-visibility', s)
|
760
|
+
return s
|
761
|
+
|
762
|
+
|
763
|
+
@rule((1, 5, 67), _('automaticMelismata turned on by default'))
|
764
|
+
def conv(s):
|
765
|
+
if re.search(r'\addlyrics', s) \
|
766
|
+
and re.search('automaticMelismata', s) is None:
|
767
|
+
stderr_write(NOT_SMART % "automaticMelismata")
|
768
|
+
stderr_write(
|
769
|
+
_("automaticMelismata is turned on by default since 1.5.67."))
|
770
|
+
stderr_write('\n')
|
771
|
+
raise FatalConversionError()
|
772
|
+
return s
|
773
|
+
|
774
|
+
|
775
|
+
@rule((1, 5, 68), 'ly-set-X-property -> ly-set-X-property!')
|
776
|
+
def conv(s):
|
777
|
+
s = re.sub('ly-set-grob-property([^!])', 'ly-set-grob-property!\1', s)
|
778
|
+
s = re.sub('ly-set-mus-property([^!])', 'ly-set-mus-property!\1', s)
|
779
|
+
return s
|
780
|
+
|
781
|
+
|
782
|
+
@rule((1, 5, 71), 'extent-[XY] -> [XY]-extent')
|
783
|
+
def conv(s):
|
784
|
+
s = re.sub('extent-X', 'X-extent', s)
|
785
|
+
s = re.sub('extent-Y', 'Y-extent', s)
|
786
|
+
return s
|
787
|
+
|
788
|
+
|
789
|
+
@rule((1, 5, 72), 'set! point-and-click -> set-point-and-click!')
|
790
|
+
def conv(s):
|
791
|
+
s = re.sub(r"#\(set! +point-and-click +line-column-location\)",
|
792
|
+
"#(set-point-and-click! 'line-column)", s)
|
793
|
+
s = re.sub(r"#\(set![ \t]+point-and-click +line-location\)",
|
794
|
+
"#(set-point-and-click! 'line)", s)
|
795
|
+
s = re.sub(r'#\(set! +point-and-click +#f\)',
|
796
|
+
"#(set-point-and-click! 'none)", s)
|
797
|
+
return s
|
798
|
+
|
799
|
+
|
800
|
+
@rule((1, 6, 5), 'Stems: flag-style -> stroke-style; style -> flag-style')
|
801
|
+
def conv(s):
|
802
|
+
s = re.sub('flag-style', 'stroke-style', s)
|
803
|
+
s = re.sub(r"""Stem([ ]+)\\override #'style""",
|
804
|
+
r"""Stem \\override #'flag-style""", s)
|
805
|
+
s = re.sub(r"""Stem([ ]+)\\set([ ]+)#'style""",
|
806
|
+
r"""Stem \\set #'flag-style""", s)
|
807
|
+
return s
|
808
|
+
|
809
|
+
|
810
|
+
def subst_req_name(match):
|
811
|
+
return "(make-music-by-name \'%sEvent)" % regularize_id(match.group(1))
|
812
|
+
|
813
|
+
|
814
|
+
@rule((1, 7, 1), 'ly-make-music foo_bar_req -> make-music-by-name FooBarEvent')
|
815
|
+
def conv(s):
|
816
|
+
s = re.sub(
|
817
|
+
'\\(ly-make-music *"([A-Z][a-z_]+)_req"\\)', subst_req_name, s)
|
818
|
+
s = re.sub('Request_chord', 'EventChord', s)
|
819
|
+
return s
|
820
|
+
|
821
|
+
|
822
|
+
spanner_subst = {
|
823
|
+
"text": 'TextSpanEvent',
|
824
|
+
"decrescendo": 'DecrescendoEvent',
|
825
|
+
"crescendo": 'CrescendoEvent',
|
826
|
+
"Sustain": 'SustainPedalEvent',
|
827
|
+
"slur": 'SlurEvent',
|
828
|
+
"UnaCorda": 'UnaCordaEvent',
|
829
|
+
"Sostenuto": 'SostenutoEvent',
|
830
|
+
}
|
831
|
+
|
832
|
+
|
833
|
+
def subst_ev_name(match):
|
834
|
+
stype = 'STOP'
|
835
|
+
if re.search('start', match.group(1)):
|
836
|
+
stype = 'START'
|
837
|
+
mtype = spanner_subst[match.group(2)]
|
838
|
+
return "(make-span-event '%s %s)" % (mtype, stype)
|
839
|
+
|
840
|
+
|
841
|
+
def subst_definition_ev_name(match):
|
842
|
+
return ' = #%s' % subst_ev_name(match)
|
843
|
+
|
844
|
+
|
845
|
+
def subst_inline_ev_name(match):
|
846
|
+
s = subst_ev_name(match)
|
847
|
+
return '#(ly-export %s)' % s
|
848
|
+
|
849
|
+
|
850
|
+
def subst_csp_definition(match):
|
851
|
+
return ' = #(make-event-chord (list %s))' % subst_ev_name(match)
|
852
|
+
|
853
|
+
|
854
|
+
def subst_csp_inline(match):
|
855
|
+
return '#(ly-export (make-event-chord (list %s)))' % subst_ev_name(match)
|
856
|
+
|
857
|
+
|
858
|
+
@rule((1, 7, 2), r'\\spanrequest -> #(make-span-event .. ), \script -> #(make-articulation .. )')
|
859
|
+
def conv(s):
|
860
|
+
s = re.sub(
|
861
|
+
r' *= *\\spanrequest *([^ ]+) *"([^"]+)"', subst_definition_ev_name, s)
|
862
|
+
s = re.sub(
|
863
|
+
r'\\spanrequest *([^ ]+) *"([^"]+)"', subst_inline_ev_name, s)
|
864
|
+
s = re.sub(
|
865
|
+
r' *= *\\commandspanrequest *([^ ]+) *"([^"]+)"', subst_csp_definition, s)
|
866
|
+
s = re.sub(
|
867
|
+
r'\\commandspanrequest *([^ ]+) *"([^"]+)"', subst_csp_inline, s)
|
868
|
+
s = re.sub(r'ly-id ', 'ly-import ', s)
|
869
|
+
|
870
|
+
s = re.sub(r' *= *\\script "([^"]+)"',
|
871
|
+
' = #(make-articulation "\\1")', s)
|
872
|
+
s = re.sub(r'\\script "([^"]+)"',
|
873
|
+
'#(ly-export (make-articulation "\\1"))', s)
|
874
|
+
return s
|
875
|
+
|
876
|
+
|
877
|
+
@rule((1, 7, 3), 'ly- -> ly:')
|
878
|
+
def conv(s):
|
879
|
+
s = re.sub(r'\(ly-', '(ly:', s)
|
880
|
+
|
881
|
+
changed = [
|
882
|
+
r'duration\?',
|
883
|
+
r'font-metric\?',
|
884
|
+
r'molecule\?',
|
885
|
+
r'moment\?',
|
886
|
+
r'music\?',
|
887
|
+
r'pitch\?',
|
888
|
+
'make-duration',
|
889
|
+
'music-duration-length',
|
890
|
+
'duration-log',
|
891
|
+
'duration-dotcount',
|
892
|
+
'intlog2',
|
893
|
+
'duration-factor',
|
894
|
+
'transpose-key-alist',
|
895
|
+
'get-system',
|
896
|
+
'get-broken-into',
|
897
|
+
'get-original',
|
898
|
+
'set-point-and-click!',
|
899
|
+
'make-moment',
|
900
|
+
'make-pitch',
|
901
|
+
'pitch-octave',
|
902
|
+
'pitch-alteration',
|
903
|
+
'pitch-notename',
|
904
|
+
'pitch-semitones',
|
905
|
+
r'pitch<\?',
|
906
|
+
r'dir\?',
|
907
|
+
'music-duration-compress',
|
908
|
+
'set-point-and-click!'
|
909
|
+
]
|
910
|
+
|
911
|
+
origre = r'\b(%s)' % '|'.join(changed)
|
912
|
+
|
913
|
+
s = re.sub(origre, r'ly:\1', s)
|
914
|
+
s = re.sub('set-point-and-click!', 'set-point-and-click', s)
|
915
|
+
return s
|
916
|
+
|
917
|
+
|
918
|
+
@rule((1, 7, 4), '<< >> -> < < > >')
|
919
|
+
def conv(s):
|
920
|
+
if re.search('new-chords-done', s):
|
921
|
+
return s
|
922
|
+
|
923
|
+
s = re.sub(r'<<', '< <', s)
|
924
|
+
s = re.sub(r'>>', '> >', s)
|
925
|
+
return s
|
926
|
+
|
927
|
+
|
928
|
+
@rule((1, 7, 5), '\\transpose TO -> \\transpose FROM TO')
|
929
|
+
def conv(s):
|
930
|
+
s = re.sub(r"\\transpose", r"\\transpose c'", s)
|
931
|
+
s = re.sub(r"\\transpose c' *([a-z]+)'", r"\\transpose c \1", s)
|
932
|
+
return s
|
933
|
+
|
934
|
+
|
935
|
+
@rule((1, 7, 6), r'note\\script -> note-\script')
|
936
|
+
def conv(s):
|
937
|
+
kws = ['arpeggio',
|
938
|
+
'sustainDown',
|
939
|
+
'sustainUp',
|
940
|
+
'f',
|
941
|
+
'p',
|
942
|
+
'pp',
|
943
|
+
'ppp',
|
944
|
+
'fp',
|
945
|
+
'ff',
|
946
|
+
'mf',
|
947
|
+
'mp',
|
948
|
+
'sfz',
|
949
|
+
]
|
950
|
+
|
951
|
+
origstr = '|'.join(kws)
|
952
|
+
s = re.sub(r'([^_^-])\\(%s)\b' % origstr, r'\1-\\\2', s)
|
953
|
+
return s
|
954
|
+
|
955
|
+
|
956
|
+
@rule((1, 7, 10), r"\property ChordName #'style -> #(set-chord-name-style 'style)")
|
957
|
+
def conv(s):
|
958
|
+
s = re.sub(r"\\property *ChordNames *\. *ChordName *\\(set|override) *#'style *= *#('[a-z]+)",
|
959
|
+
r"#(set-chord-name-style \2)", s)
|
960
|
+
s = re.sub(r"\\property *ChordNames *\. *ChordName *\\revert *#'style",
|
961
|
+
r"", s)
|
962
|
+
return s
|
963
|
+
|
964
|
+
|
965
|
+
@rule((1, 7, 11), "transpose-pitch -> pitch-transpose")
|
966
|
+
def conv(s):
|
967
|
+
s = re.sub(r"ly:transpose-pitch", "ly:pitch-transpose", s)
|
968
|
+
return s
|
969
|
+
|
970
|
+
|
971
|
+
@rule((1, 7, 13), "ly:XX-molecule-YY -> ly:molecule-XX-YY")
|
972
|
+
def conv(s):
|
973
|
+
s = re.sub(r"ly:get-molecule-extent", "ly:molecule-get-extent", s)
|
974
|
+
s = re.sub(r"ly:set-molecule-extent!", "ly:molecule-set-extent!", s)
|
975
|
+
s = re.sub(r"ly:add-molecule", "ly:molecule-add", s)
|
976
|
+
s = re.sub(r"ly:combine-molecule-at-edge",
|
977
|
+
"ly:molecule-combine-at-edge", s)
|
978
|
+
s = re.sub(r"ly:align-to!", "ly:molecule-align-to!", s)
|
979
|
+
return s
|
980
|
+
|
981
|
+
|
982
|
+
@rule((1, 7, 15), "linewidth = -1 -> raggedright = ##t")
|
983
|
+
def conv(s):
|
984
|
+
s = re.sub(
|
985
|
+
r"linewidth *= *-[0-9.]+ *(\\mm|\\cm|\\in|\\pt)?", 'raggedright = ##t', s)
|
986
|
+
return s
|
987
|
+
|
988
|
+
|
989
|
+
@rule((1, 7, 16), "divisiomaior -> divisioMaior")
|
990
|
+
def conv(s):
|
991
|
+
s = re.sub("divisiomaior",
|
992
|
+
"divisioMaior", s)
|
993
|
+
s = re.sub("divisiominima",
|
994
|
+
"divisioMinima", s)
|
995
|
+
s = re.sub("divisiomaxima",
|
996
|
+
"divisioMaxima", s)
|
997
|
+
return s
|
998
|
+
|
999
|
+
|
1000
|
+
@rule((1, 7, 17), "Skip_req -> Skip_event")
|
1001
|
+
def conv(s):
|
1002
|
+
s = re.sub("Skip_req_swallow_translator",
|
1003
|
+
"Skip_event_swallow_translator", s)
|
1004
|
+
return s
|
1005
|
+
|
1006
|
+
|
1007
|
+
@rule((1, 7, 18), "groupOpen/Close -> start/stopGroup, #'outer -> #'enclose-bounds")
|
1008
|
+
def conv(s):
|
1009
|
+
s = re.sub("groupOpen",
|
1010
|
+
"startGroup", s)
|
1011
|
+
s = re.sub("groupClose",
|
1012
|
+
"stopGroup", s)
|
1013
|
+
s = re.sub("#'outer",
|
1014
|
+
"#'enclose-bounds", s)
|
1015
|
+
|
1016
|
+
return s
|
1017
|
+
|
1018
|
+
|
1019
|
+
@rule((1, 7, 19), _("remove %s") % "GraceContext")
|
1020
|
+
def conv(s):
|
1021
|
+
if re.search(r'\\GraceContext', s):
|
1022
|
+
stderr_write(NOT_SMART % "GraceContext")
|
1023
|
+
stderr_write(FROM_TO
|
1024
|
+
% ("GraceContext", "#(add-to-grace-init .. )"))
|
1025
|
+
stderr_write(UPDATE_MANUALLY)
|
1026
|
+
raise FatalConversionError()
|
1027
|
+
|
1028
|
+
s = re.sub('HaraKiriStaffContext', 'RemoveEmptyStaffContext', s)
|
1029
|
+
return s
|
1030
|
+
|
1031
|
+
|
1032
|
+
@rule((1, 7, 22), "#'type -> #'style")
|
1033
|
+
def conv(s):
|
1034
|
+
s = re.sub(
|
1035
|
+
r"(set|override|revert) *#'type",
|
1036
|
+
r"\1 #'style",
|
1037
|
+
s)
|
1038
|
+
return s
|
1039
|
+
|
1040
|
+
|
1041
|
+
@rule((1, 7, 23), "barNonAuto -> automaticBars")
|
1042
|
+
def conv(s):
|
1043
|
+
s = re.sub(
|
1044
|
+
"barNonAuto *= *##t",
|
1045
|
+
"automaticBars = ##f",
|
1046
|
+
s)
|
1047
|
+
s = re.sub(
|
1048
|
+
"barNonAuto *= *##f",
|
1049
|
+
"automaticBars = ##t",
|
1050
|
+
s)
|
1051
|
+
return s
|
1052
|
+
|
1053
|
+
|
1054
|
+
@rule((1, 7, 24), _("cluster syntax"))
|
1055
|
+
def conv(s):
|
1056
|
+
if re.search(r'-(start|stop)Cluster', s):
|
1057
|
+
stderr_write(NOT_SMART % _("cluster syntax"))
|
1058
|
+
stderr_write(UPDATE_MANUALLY)
|
1059
|
+
|
1060
|
+
raise FatalConversionError()
|
1061
|
+
return s
|
1062
|
+
|
1063
|
+
|
1064
|
+
@rule((1, 7, 28), _("new Pedal style syntax"))
|
1065
|
+
def conv(s):
|
1066
|
+
s = re.sub(r"\\property *Staff\.(Sustain|Sostenuto|UnaCorda)Pedal *\\(override|set) *#'pedal-type *",
|
1067
|
+
r"\\property Staff.pedal\1Style ", s)
|
1068
|
+
s = re.sub(
|
1069
|
+
r"\\property *Staff\.(Sustain|Sostenuto|UnaCorda)Pedal *\\revert *#'pedal-type", '', s)
|
1070
|
+
return s
|
1071
|
+
|
1072
|
+
|
1073
|
+
def sub_chord(m):
|
1074
|
+
s = m.group(1)
|
1075
|
+
|
1076
|
+
origstr = '<%s>' % s
|
1077
|
+
if re.search(r'\\\\', s):
|
1078
|
+
return origstr
|
1079
|
+
|
1080
|
+
if re.search(r'\\property', s):
|
1081
|
+
return origstr
|
1082
|
+
|
1083
|
+
if re.match(r'^\s*\)?\s*\\[a-zA-Z]+', s):
|
1084
|
+
return origstr
|
1085
|
+
|
1086
|
+
durs = []
|
1087
|
+
|
1088
|
+
def sub_durs(m, durs=durs):
|
1089
|
+
durs.append(m.group(2))
|
1090
|
+
return m.group(1)
|
1091
|
+
|
1092
|
+
s = re.sub(r"([a-z]+[,'!? ]*)([0-9]+\.*)", sub_durs, s)
|
1093
|
+
dur_str = ''
|
1094
|
+
|
1095
|
+
for d in durs:
|
1096
|
+
if dur_str == '':
|
1097
|
+
dur_str = d
|
1098
|
+
if dur_str != d:
|
1099
|
+
return '<%s>' % m.group(1)
|
1100
|
+
|
1101
|
+
pslur_strs = ['']
|
1102
|
+
dyns = ['']
|
1103
|
+
slur_strs = ['']
|
1104
|
+
|
1105
|
+
last_str = ''
|
1106
|
+
while last_str != s:
|
1107
|
+
last_str = s
|
1108
|
+
|
1109
|
+
def sub_tremolos(m, slur_strs=slur_strs):
|
1110
|
+
tr = m.group(2)
|
1111
|
+
if tr not in slur_strs:
|
1112
|
+
slur_strs.append(tr)
|
1113
|
+
return m.group(1)
|
1114
|
+
|
1115
|
+
s = re.sub(r"([a-z]+[',!? ]*)(:[0-9]+)",
|
1116
|
+
sub_tremolos, s)
|
1117
|
+
|
1118
|
+
def sub_dyn_end(m, dyns=dyns):
|
1119
|
+
dyns.append(r' \!')
|
1120
|
+
return ' ' + m.group(2)
|
1121
|
+
|
1122
|
+
s = re.sub(r'(\\!)\s*([a-z]+)', sub_dyn_end, s)
|
1123
|
+
|
1124
|
+
def sub_slurs(m, slur_strs=slur_strs):
|
1125
|
+
if '-)' not in slur_strs:
|
1126
|
+
slur_strs.append(')')
|
1127
|
+
return m.group(1)
|
1128
|
+
|
1129
|
+
def sub_p_slurs(m, slur_strs=slur_strs):
|
1130
|
+
if r'-\)' not in slur_strs:
|
1131
|
+
slur_strs.append(r'\)')
|
1132
|
+
return m.group(1)
|
1133
|
+
|
1134
|
+
s = re.sub(r"\)[ ]*([a-z]+)", sub_slurs, s)
|
1135
|
+
s = re.sub(r"\\\)[ ]*([a-z]+)", sub_p_slurs, s)
|
1136
|
+
|
1137
|
+
def sub_begin_slurs(m, slur_strs=slur_strs):
|
1138
|
+
if '-(' not in slur_strs:
|
1139
|
+
slur_strs.append('(')
|
1140
|
+
return m.group(1)
|
1141
|
+
|
1142
|
+
s = re.sub(r"([a-z]+[,'!?0-9 ]*)\(",
|
1143
|
+
sub_begin_slurs, s)
|
1144
|
+
|
1145
|
+
def sub_begin_p_slurs(m, slur_strs=slur_strs):
|
1146
|
+
if r'-\(' not in slur_strs:
|
1147
|
+
slur_strs.append(r'\(')
|
1148
|
+
return m.group(1)
|
1149
|
+
|
1150
|
+
s = re.sub(r"([a-z]+[,'!?0-9 ]*)\\\(",
|
1151
|
+
sub_begin_p_slurs, s)
|
1152
|
+
|
1153
|
+
def sub_dyns(m, slur_strs=slur_strs):
|
1154
|
+
s = m.group(0)
|
1155
|
+
if s == '@STARTCRESC@':
|
1156
|
+
slur_strs.append("\\<")
|
1157
|
+
elif s == '@STARTDECRESC@':
|
1158
|
+
slur_strs.append("\\>")
|
1159
|
+
elif s == r'-?\\!':
|
1160
|
+
slur_strs.append('\\!')
|
1161
|
+
return ''
|
1162
|
+
|
1163
|
+
s = re.sub(r'@STARTCRESC@', sub_dyns, s)
|
1164
|
+
s = re.sub(r'-?\\!', sub_dyns, s)
|
1165
|
+
|
1166
|
+
def sub_articulations(m, slur_strs=slur_strs):
|
1167
|
+
a = m.group(1)
|
1168
|
+
if a not in slur_strs:
|
1169
|
+
slur_strs.append(a)
|
1170
|
+
return ''
|
1171
|
+
|
1172
|
+
s = re.sub(r"([_^-]\@ACCENT\@)", sub_articulations,
|
1173
|
+
s)
|
1174
|
+
s = re.sub(r"([_^-]\\[a-z]+)", sub_articulations,
|
1175
|
+
s)
|
1176
|
+
s = re.sub(r"([_^-][>_.+|^-])", sub_articulations,
|
1177
|
+
s)
|
1178
|
+
s = re.sub(r'([_^-]"[^"]+")', sub_articulations,
|
1179
|
+
s)
|
1180
|
+
|
1181
|
+
def sub_pslurs(m, slur_strs=slur_strs):
|
1182
|
+
slur_strs.append(' \\)')
|
1183
|
+
return m.group(1)
|
1184
|
+
s = re.sub(r"\\\)[ ]*([a-z]+)", sub_pslurs, s)
|
1185
|
+
|
1186
|
+
# end of while <>
|
1187
|
+
|
1188
|
+
suffix = ''.join(slur_strs) + ''.join(pslur_strs) \
|
1189
|
+
+ ''.join(dyns)
|
1190
|
+
|
1191
|
+
return '@STARTCHORD@%s@ENDCHORD@%s%s' % (s, dur_str, suffix)
|
1192
|
+
|
1193
|
+
|
1194
|
+
def sub_chords(s):
|
1195
|
+
simend = '>'
|
1196
|
+
simstart = '<'
|
1197
|
+
chordstart = '<<'
|
1198
|
+
chordend = '>>'
|
1199
|
+
marker_str = '%% new-chords-done %%'
|
1200
|
+
|
1201
|
+
if re.search(marker_str, s):
|
1202
|
+
return s
|
1203
|
+
s = re.sub('<<', '@STARTCHORD@', s)
|
1204
|
+
s = re.sub('>>', '@ENDCHORD@', s)
|
1205
|
+
|
1206
|
+
s = re.sub(r'\\<', '@STARTCRESC@', s)
|
1207
|
+
s = re.sub(r'\\>', '@STARTDECRESC@', s)
|
1208
|
+
s = re.sub(r'([_^-])>', r'\1@ACCENT@', s)
|
1209
|
+
s = re.sub(r'<([^<>{}]+)>', sub_chord, s)
|
1210
|
+
|
1211
|
+
# add dash: -[, so that [<<a b>> c d] becomes
|
1212
|
+
# <<a b>>-[ c d]
|
1213
|
+
# and gets skipped by articulation_substitute
|
1214
|
+
s = re.sub(r'\[ *(@STARTCHORD@[^@]+@ENDCHORD@[0-9.]*)',
|
1215
|
+
r'\1-[', s)
|
1216
|
+
s = re.sub(r'\\! *(@STARTCHORD@[^@]+@ENDCHORD@[0-9.]*)',
|
1217
|
+
r'\1-\\!', s)
|
1218
|
+
|
1219
|
+
s = re.sub(r'<([^?])', r'%s\1' % simstart, s)
|
1220
|
+
s = re.sub(r'>([^?])', r'%s\1' % simend, s)
|
1221
|
+
s = re.sub('@STARTCRESC@', r'\\<', s)
|
1222
|
+
s = re.sub('@STARTDECRESC@', r'\\>', s)
|
1223
|
+
s = re.sub(r'\\context *Voice *@STARTCHORD@',
|
1224
|
+
'@STARTCHORD@', s)
|
1225
|
+
s = re.sub('@STARTCHORD@', chordstart, s)
|
1226
|
+
s = re.sub('@ENDCHORD@', chordend, s)
|
1227
|
+
s = re.sub(r'@ACCENT@', '>', s)
|
1228
|
+
return s
|
1229
|
+
|
1230
|
+
|
1231
|
+
markup_start = re.compile(r"([-^_]|\\mark)\s*(#\s*'\s*)\(")
|
1232
|
+
musicglyph = re.compile(r"\(\s*music\b")
|
1233
|
+
columns = re.compile(r"\(\s*columns\b")
|
1234
|
+
submarkup_start = re.compile(r"\(\s*([a-zA-Z]+)")
|
1235
|
+
leftpar = re.compile(r"\(")
|
1236
|
+
rightpar = re.compile(r"\)")
|
1237
|
+
|
1238
|
+
|
1239
|
+
def text_markup(s):
|
1240
|
+
result = ''
|
1241
|
+
# Find the beginning of each markup:
|
1242
|
+
match = markup_start.search(s)
|
1243
|
+
while match:
|
1244
|
+
result = result + s[:match.end(1)] + r" \markup"
|
1245
|
+
s = s[match.end(2):]
|
1246
|
+
# Count matching parentheses to find the end of the
|
1247
|
+
# current markup:
|
1248
|
+
nesting_level = 0
|
1249
|
+
pars = re.finditer(r"[()]", s)
|
1250
|
+
for par in pars:
|
1251
|
+
if par.group() == '(':
|
1252
|
+
nesting_level = nesting_level + 1
|
1253
|
+
else:
|
1254
|
+
nesting_level = nesting_level - 1
|
1255
|
+
if nesting_level == 0:
|
1256
|
+
markup_end = par.end()
|
1257
|
+
break
|
1258
|
+
# The full markup in old syntax:
|
1259
|
+
markup = s[:markup_end]
|
1260
|
+
# Modify to new syntax:
|
1261
|
+
markup = musicglyph.sub(r"{\\musicglyph", markup)
|
1262
|
+
markup = columns.sub(r"{", markup)
|
1263
|
+
markup = submarkup_start.sub(r"{\\\1", markup)
|
1264
|
+
markup = leftpar.sub("{", markup)
|
1265
|
+
markup = rightpar.sub("}", markup)
|
1266
|
+
|
1267
|
+
result = result + markup
|
1268
|
+
# Find next markup
|
1269
|
+
s = s[markup_end:]
|
1270
|
+
match = markup_start.search(s)
|
1271
|
+
result = result + s
|
1272
|
+
return result
|
1273
|
+
|
1274
|
+
|
1275
|
+
def articulation_substitute(s):
|
1276
|
+
s = re.sub(r"""([^-])\[ *(\\?\)?[a-z]+[,']*[!?]?[0-9:]*\.*)""",
|
1277
|
+
r"\1 \2[", s)
|
1278
|
+
s = re.sub(r"""([^-])\\\) *([a-z]+[,']*[!?]?[0-9:]*\.*)""",
|
1279
|
+
r"\1 \2\\)", s)
|
1280
|
+
s = re.sub(r"""([^-\\])\) *([a-z]+[,']*[!?]?[0-9:]*\.*)""",
|
1281
|
+
r"\1 \2)", s)
|
1282
|
+
s = re.sub(r"""([^-])\\! *([a-z]+[,']*[!?]?[0-9:]*\.*)""",
|
1283
|
+
r"\1 \2\\!", s)
|
1284
|
+
return s
|
1285
|
+
|
1286
|
+
|
1287
|
+
string_or_scheme = re.compile('("(?:[^"\\\\]|\\\\.)*")|(#\\s*\'?\\s*\\()')
|
1288
|
+
|
1289
|
+
# Only apply articulation_substitute () outside strings and
|
1290
|
+
# Scheme expressions:
|
1291
|
+
|
1292
|
+
|
1293
|
+
def smarter_articulation_subst(s):
|
1294
|
+
result = ''
|
1295
|
+
# Find the beginning of next string or Scheme expr.:
|
1296
|
+
match = string_or_scheme.search(s)
|
1297
|
+
while match:
|
1298
|
+
# Convert the preceding LilyPond code:
|
1299
|
+
previous_chunk = s[:match.start()]
|
1300
|
+
result = result + articulation_substitute(previous_chunk)
|
1301
|
+
if match.group(1): # Found a string
|
1302
|
+
# Copy the string to output:
|
1303
|
+
result = result + match.group(1)
|
1304
|
+
s = s[match.end(1):]
|
1305
|
+
else: # Found a Scheme expression. Count
|
1306
|
+
# matching parentheses to find its end
|
1307
|
+
s = s[match.start():]
|
1308
|
+
nesting_level = 0
|
1309
|
+
pars = re.finditer(r"[()]", s)
|
1310
|
+
for par in pars:
|
1311
|
+
if par.group() == '(':
|
1312
|
+
nesting_level = nesting_level + 1
|
1313
|
+
else:
|
1314
|
+
nesting_level = nesting_level - 1
|
1315
|
+
if nesting_level == 0:
|
1316
|
+
scheme_end = par.end()
|
1317
|
+
break
|
1318
|
+
# Copy the Scheme expression to output:
|
1319
|
+
result = result + s[:scheme_end]
|
1320
|
+
s = s[scheme_end:]
|
1321
|
+
# Find next string or Scheme expression:
|
1322
|
+
match = string_or_scheme.search(s)
|
1323
|
+
# Convert the remainder of the file
|
1324
|
+
result = result + articulation_substitute(s)
|
1325
|
+
return result
|
1326
|
+
|
1327
|
+
|
1328
|
+
def conv_relative(s):
|
1329
|
+
if re.search(r"\\relative", s):
|
1330
|
+
s = "#(ly:set-option 'old-relative)\n" + s
|
1331
|
+
|
1332
|
+
return s
|
1333
|
+
|
1334
|
+
|
1335
|
+
@rule((1, 9, 0), _("""New relative mode,
|
1336
|
+
Postfix articulations, new text markup syntax, new chord syntax."""))
|
1337
|
+
def conv(s):
|
1338
|
+
s = re.sub(r"#'\(\)", "@SCM_EOL@", s)
|
1339
|
+
s = conv_relative(s)
|
1340
|
+
s = sub_chords(s)
|
1341
|
+
|
1342
|
+
s = text_markup(s)
|
1343
|
+
s = smarter_articulation_subst(s)
|
1344
|
+
s = re.sub("@SCM_EOL@", "#'()", s)
|
1345
|
+
return s
|
1346
|
+
|
1347
|
+
|
1348
|
+
@rule((1, 9, 1), _("Remove - before articulation"))
|
1349
|
+
def conv(s):
|
1350
|
+
if re.search("font-style", s):
|
1351
|
+
stderr_write(NOT_SMART % "font-style")
|
1352
|
+
stderr_write(UPDATE_MANUALLY)
|
1353
|
+
|
1354
|
+
raise FatalConversionError()
|
1355
|
+
|
1356
|
+
s = re.sub(r'-\\markup', r'@\\markup', s)
|
1357
|
+
s = re.sub(r'-\\', r'\\', s)
|
1358
|
+
s = re.sub(r'-\)', ')', s)
|
1359
|
+
s = re.sub(r'-\(', '(', s)
|
1360
|
+
s = re.sub(r'-\[', '[', s)
|
1361
|
+
s = re.sub(r'-\]', ']', s)
|
1362
|
+
s = re.sub('-~', '~', s)
|
1363
|
+
s = re.sub(r'@\\markup', r'-\\markup', s)
|
1364
|
+
return s
|
1365
|
+
|
1366
|
+
|
1367
|
+
@rule((1, 9, 2), "\\newcontext -> \\new")
|
1368
|
+
def conv(s):
|
1369
|
+
s = re.sub('ly:set-context-property',
|
1370
|
+
'ly:set-context-property!', s)
|
1371
|
+
s = re.sub('\\\\newcontext', '\\\\new', s)
|
1372
|
+
s = re.sub('\\\\grace[\t\n ]*([^{ ]+)',
|
1373
|
+
r'\\grace { \1 }', s)
|
1374
|
+
s = re.sub("\\\\grace[\t\n ]*{([^}]+)}",
|
1375
|
+
r"""\\grace {
|
1376
|
+
\\property Voice.Stem \\override #'stroke-style = #"grace"
|
1377
|
+
\1
|
1378
|
+
\\property Voice.Stem \\revert #'stroke-style }
|
1379
|
+
""", s)
|
1380
|
+
return s
|
1381
|
+
|
1382
|
+
|
1383
|
+
@rule((1, 9, 3), (_("%s misspelling") % "\\acciaccatura") +
|
1384
|
+
", fingerHorizontalDirection -> fingeringOrientations")
|
1385
|
+
def conv(s):
|
1386
|
+
s = re.sub('accacciatura',
|
1387
|
+
'acciaccatura', s)
|
1388
|
+
|
1389
|
+
if re.search("context-spec-music", s):
|
1390
|
+
stderr_write(NOT_SMART % "context-spec-music")
|
1391
|
+
stderr_write(UPDATE_MANUALLY)
|
1392
|
+
|
1393
|
+
raise FatalConversionError()
|
1394
|
+
|
1395
|
+
s = re.sub('fingerHorizontalDirection *= *#(LEFT|-1)',
|
1396
|
+
"fingeringOrientations = #'(up down left)", s)
|
1397
|
+
s = re.sub('fingerHorizontalDirection *= *#(RIGHT|1)',
|
1398
|
+
"fingeringOrientations = #'(up down right)", s)
|
1399
|
+
return s
|
1400
|
+
|
1401
|
+
|
1402
|
+
@rule((1, 9, 4), _('Swap < > and << >>'))
|
1403
|
+
def conv(s):
|
1404
|
+
if re.search('\\figures', s):
|
1405
|
+
warning(_("attempting automatic \\figures conversion. Check results!"))
|
1406
|
+
|
1407
|
+
def figures_replace(m):
|
1408
|
+
s = m.group(1)
|
1409
|
+
s = re.sub('<', '@FIGOPEN@', s)
|
1410
|
+
s = re.sub('>', '@FIGCLOSE@', s)
|
1411
|
+
return '\\figures { %s }' % s
|
1412
|
+
|
1413
|
+
s = re.sub(r'\\figures[ \t\n]*{([^}]+)}', figures_replace, s)
|
1414
|
+
s = re.sub(r'\\<', '@STARTCRESC@', s)
|
1415
|
+
s = re.sub(r'\\>', '@STARTDECRESC@', s)
|
1416
|
+
s = re.sub(r'([-^_])>', r'\1@ACCENT@', s)
|
1417
|
+
s = re.sub(r'<<', '@STARTCHORD@', s)
|
1418
|
+
s = re.sub(r'>>', '@ENDCHORD@', s)
|
1419
|
+
s = re.sub(r'>', '@ENDSIMUL@', s)
|
1420
|
+
s = re.sub(r'<', '@STARTSIMUL@', s)
|
1421
|
+
s = re.sub('@STARTDECRESC@', '\\>', s)
|
1422
|
+
s = re.sub('@STARTCRESC@', '\\<', s)
|
1423
|
+
s = re.sub('@ACCENT@', '>', s)
|
1424
|
+
s = re.sub('@ENDCHORD@', '>', s)
|
1425
|
+
s = re.sub('@STARTCHORD@', '<', s)
|
1426
|
+
s = re.sub('@STARTSIMUL@', '<<', s)
|
1427
|
+
s = re.sub('@ENDSIMUL@', '>>', s)
|
1428
|
+
s = re.sub('@FIGOPEN@', '<', s)
|
1429
|
+
s = re.sub('@FIGCLOSE@', '>', s)
|
1430
|
+
return s
|
1431
|
+
|
1432
|
+
|
1433
|
+
@rule((1, 9, 5), 'HaraKiriVerticalGroup -> RemoveEmptyVerticalGroup')
|
1434
|
+
def conv(s):
|
1435
|
+
s = re.sub('HaraKiriVerticalGroup', 'RemoveEmptyVerticalGroup', s)
|
1436
|
+
return s
|
1437
|
+
|
1438
|
+
|
1439
|
+
@rule((1, 9, 6), _('deprecate %s') % 'ly:get-font')
|
1440
|
+
def conv(s):
|
1441
|
+
if re.search("ly:get-font", s):
|
1442
|
+
stderr_write(NOT_SMART % "ly:get-font")
|
1443
|
+
stderr_write(FROM_TO
|
1444
|
+
% ("(ly:paper-get-font (ly:grob-get-paper foo) .. )",
|
1445
|
+
"(ly:paper-get-font (ly:grob-get-paper foo) .. )"))
|
1446
|
+
stderr_write(UPDATE_MANUALLY)
|
1447
|
+
raise FatalConversionError()
|
1448
|
+
|
1449
|
+
if re.search(r"\\pitch *#", s):
|
1450
|
+
stderr_write(NOT_SMART % "\\pitch")
|
1451
|
+
stderr_write(_("Use Scheme code to construct arbitrary note events."))
|
1452
|
+
stderr_write('\n')
|
1453
|
+
|
1454
|
+
raise FatalConversionError()
|
1455
|
+
return s
|
1456
|
+
|
1457
|
+
|
1458
|
+
@rule((1, 9, 7), _('''use symbolic constants for alterations,
|
1459
|
+
remove \\outputproperty, move ly:verbose into ly:get-option'''))
|
1460
|
+
def conv(s):
|
1461
|
+
def sub_alteration(m):
|
1462
|
+
alt = m.group(3)
|
1463
|
+
alt = {
|
1464
|
+
'-1': 'FLAT',
|
1465
|
+
'-2': 'DOUBLE-FLAT',
|
1466
|
+
'0': 'NATURAL',
|
1467
|
+
'1': 'SHARP',
|
1468
|
+
'2': 'DOUBLE-SHARP',
|
1469
|
+
}[alt]
|
1470
|
+
|
1471
|
+
return '(ly:make-pitch %s %s %s)' % (m.group(1), m.group(2),
|
1472
|
+
alt)
|
1473
|
+
|
1474
|
+
s = re.sub("\\(ly:make-pitch *([0-9-]+) *([0-9-]+) *([0-9-]+) *\\)",
|
1475
|
+
sub_alteration, s)
|
1476
|
+
|
1477
|
+
s = re.sub("ly:verbose", "ly:get-option 'verbose", s)
|
1478
|
+
|
1479
|
+
m = re.search("\\\\outputproperty #([^#]+)[\t\n ]*#'([^ ]+)", s)
|
1480
|
+
if m:
|
1481
|
+
stderr_write(_(
|
1482
|
+
r"""\outputproperty found,
|
1483
|
+
Please hand-edit, using
|
1484
|
+
|
1485
|
+
\applyoutput #(outputproperty-compatibility %s '%s <GROB PROPERTY VALUE>)
|
1486
|
+
|
1487
|
+
as a substitution text.""") % (m.group(1), m.group(2)))
|
1488
|
+
raise FatalConversionError()
|
1489
|
+
|
1490
|
+
if re.search("ly:(make-pitch|pitch-alteration)", s) \
|
1491
|
+
or re.search("keySignature", s):
|
1492
|
+
stderr_write(NOT_SMART % "pitches")
|
1493
|
+
stderr_write(
|
1494
|
+
_("""The alteration field of Scheme pitches was multiplied by 2
|
1495
|
+
to support quarter tone accidentals. You must update the following constructs manually:
|
1496
|
+
|
1497
|
+
* calls of ly:make-pitch and ly:pitch-alteration
|
1498
|
+
* keySignature settings made with \\property
|
1499
|
+
"""))
|
1500
|
+
raise FatalConversionError()
|
1501
|
+
return s
|
1502
|
+
|
1503
|
+
|
1504
|
+
@rule((1, 9, 8), "dash-length -> dash-fraction")
|
1505
|
+
def conv(s):
|
1506
|
+
if re.search("dash-length", s):
|
1507
|
+
stderr_write(NOT_SMART % "dash-length")
|
1508
|
+
stderr_write(FROM_TO % ("dash-length", "dash-fraction"))
|
1509
|
+
stderr_write(UPDATE_MANUALLY)
|
1510
|
+
raise FatalConversionError()
|
1511
|
+
return s
|
1512
|
+
|
1513
|
+
|
1514
|
+
@rule((2, 1, 1), "font-relative-size -> font-size")
|
1515
|
+
def conv(s):
|
1516
|
+
def func(match):
|
1517
|
+
return "#'font-size = #%d" % (2*int(match.group(1)))
|
1518
|
+
|
1519
|
+
s = re.sub(r"#'font-relative-size\s*=\s*#\+?([0-9-]+)", func, s)
|
1520
|
+
s = re.sub(r"#'font-family\s*=\s*#'ancient",
|
1521
|
+
r"#'font-family = #'music", s)
|
1522
|
+
return s
|
1523
|
+
|
1524
|
+
|
1525
|
+
@rule((2, 1, 2), "ly:get-music-length -> ly:music-length")
|
1526
|
+
def conv(s):
|
1527
|
+
s = re.sub(r"ly:get-music-length", "ly:music-length", s)
|
1528
|
+
return s
|
1529
|
+
|
1530
|
+
|
1531
|
+
@rule((2, 1, 3), "stanza -> instrument")
|
1532
|
+
def conv(s):
|
1533
|
+
s = re.sub(r"\.\s+stz=", ". instr ", s)
|
1534
|
+
return s
|
1535
|
+
|
1536
|
+
|
1537
|
+
@rule((2, 1, 4), _("removal of automaticMelismata; use melismaBusyProperties instead."))
|
1538
|
+
def conv(s):
|
1539
|
+
def func(match):
|
1540
|
+
c = match.group(1)
|
1541
|
+
b = match.group(2)
|
1542
|
+
|
1543
|
+
if b == 't':
|
1544
|
+
if c == 'Score':
|
1545
|
+
return ''
|
1546
|
+
return r" \property %s.melismaBusyProperties \unset" % c
|
1547
|
+
|
1548
|
+
assert b == 'f', "Value must be ##t or ##f and not ##%s" % b
|
1549
|
+
return r"\property %s.melismaBusyProperties = #'(melismaBusy)" % c
|
1550
|
+
|
1551
|
+
s = re.sub(
|
1552
|
+
r"\\property ([a-zA-Z]+)\s*\.\s*automaticMelismata\s*=\s*##([ft])", func, s)
|
1553
|
+
return s
|
1554
|
+
|
1555
|
+
|
1556
|
+
@rule((2, 1, 7), "\\translator Staff -> \\change Staff")
|
1557
|
+
def conv(s):
|
1558
|
+
s = re.sub(r"\\translator\s+([a-zA-Z]+)", r"\\change \1", s)
|
1559
|
+
return s
|
1560
|
+
|
1561
|
+
|
1562
|
+
@rule((2, 1, 10), "\\newaddlyrics -> \\lyricsto")
|
1563
|
+
def conv(s):
|
1564
|
+
s = re.sub(r"\\newaddlyrics", r"\\lyricsto", s)
|
1565
|
+
return s
|
1566
|
+
|
1567
|
+
|
1568
|
+
@rule((2, 1, 11), """\\include "paper16.ly" -> #(set-staff-size 16)
|
1569
|
+
\\note #3 #1 #1 -> \\note #"8." #1
|
1570
|
+
""")
|
1571
|
+
def conv(s):
|
1572
|
+
s = re.sub(r'\\include\s*"paper([0-9]+)(-init)?.ly"',
|
1573
|
+
r"#(set-staff-size \1)", s)
|
1574
|
+
|
1575
|
+
def sub_note(match):
|
1576
|
+
dur = ''
|
1577
|
+
log = int(match.group(1))
|
1578
|
+
dots = int(match.group(2))
|
1579
|
+
|
1580
|
+
if log >= 0:
|
1581
|
+
dur = '%d' % (1 << log)
|
1582
|
+
else:
|
1583
|
+
dur = {-1: 'breve',
|
1584
|
+
-2: 'longa',
|
1585
|
+
-3: 'maxima'}[log]
|
1586
|
+
|
1587
|
+
dur += ('.' * dots)
|
1588
|
+
|
1589
|
+
return r'\note #"%s" #%s' % (dur, match.group(3))
|
1590
|
+
|
1591
|
+
s = re.sub(r'\\note\s+#([0-9-]+)\s+#([0-9]+)\s+#([0-9.-]+)',
|
1592
|
+
sub_note, s)
|
1593
|
+
return s
|
1594
|
+
|
1595
|
+
|
1596
|
+
@rule((2, 1, 12), "OttavaSpanner -> OttavaBracket")
|
1597
|
+
def conv(s):
|
1598
|
+
s = re.sub(r"OttavaSpanner", r"OttavaBracket", s)
|
1599
|
+
return s
|
1600
|
+
|
1601
|
+
|
1602
|
+
@rule((2, 1, 13), "set-staff-size -> set-global-staff-size")
|
1603
|
+
def conv(s):
|
1604
|
+
s = re.sub(r"\(set-staff-size ", r"(set-global-staff-size ", s)
|
1605
|
+
return s
|
1606
|
+
|
1607
|
+
|
1608
|
+
@rule((2, 1, 14), "style = dotted -> dash-fraction = 0")
|
1609
|
+
def conv(s):
|
1610
|
+
s = re.sub(r"#'style\s*=\s*#'dotted-line",
|
1611
|
+
r"#'dash-fraction = #0.0 ", s)
|
1612
|
+
return s
|
1613
|
+
|
1614
|
+
|
1615
|
+
@rule((2, 1, 15), "LyricsVoice . instr(ument) -> vocalName")
|
1616
|
+
def conv(s):
|
1617
|
+
s = re.sub(r'LyricsVoice\s*\.\s*instrument\s*=\s*("[^"]*")',
|
1618
|
+
r'LyricsVoice . vocalName = \1', s)
|
1619
|
+
|
1620
|
+
s = re.sub(r'LyricsVoice\s*\.\s*instr\s*=\s*("[^"]*")',
|
1621
|
+
r'LyricsVoice . vocNam = \1', s)
|
1622
|
+
return s
|
1623
|
+
|
1624
|
+
|
1625
|
+
@rule((2, 1, 16), '\\musicglyph #"accidentals-NUM" -> \\sharp/flat/etc.')
|
1626
|
+
def conv(s):
|
1627
|
+
def sub_acc(m):
|
1628
|
+
d = {
|
1629
|
+
'4': 'doublesharp',
|
1630
|
+
'3': 'threeqsharp',
|
1631
|
+
'2': 'sharp',
|
1632
|
+
'1': 'semisharp',
|
1633
|
+
'0': 'natural',
|
1634
|
+
'-1': 'semiflat',
|
1635
|
+
'-2': 'flat',
|
1636
|
+
'-3': 'threeqflat',
|
1637
|
+
'-4': 'doubleflat'}
|
1638
|
+
return '\\%s' % d[m.group(1)]
|
1639
|
+
|
1640
|
+
s = re.sub(r'\\musicglyph\s*#"accidentals-([0-9-]+)"',
|
1641
|
+
sub_acc, s)
|
1642
|
+
return s
|
1643
|
+
|
1644
|
+
|
1645
|
+
@rule((2, 1, 17), _("\\partcombine syntax change to \\newpartcombine"))
|
1646
|
+
def conv(s):
|
1647
|
+
|
1648
|
+
if re.search(r'\\partcombine', s):
|
1649
|
+
stderr_write(NOT_SMART % "\\partcombine")
|
1650
|
+
stderr_write(UPDATE_MANUALLY)
|
1651
|
+
raise FatalConversionError()
|
1652
|
+
|
1653
|
+
# this rule doesn't really work,
|
1654
|
+
# too lazy to figure out why.
|
1655
|
+
s = re.sub(r'\\context\s+Voice\s*=\s*one\s*\\partcombine\s+Voice\s*\\context\s+Thread\s*=\s*one(.*)\s*'
|
1656
|
+
+ r'\\context\s+Thread\s*=\s*two',
|
1657
|
+
'\\\\newpartcombine\n\\1\n', s)
|
1658
|
+
return s
|
1659
|
+
|
1660
|
+
|
1661
|
+
@rule((2, 1, 18), """\\newpartcombine -> \\partcombine,
|
1662
|
+
\\autochange Staff -> \\autochange
|
1663
|
+
""")
|
1664
|
+
def conv(s):
|
1665
|
+
s = re.sub(r'\\newpartcombine', r'\\partcombine', s)
|
1666
|
+
s = re.sub(r'\\autochange\s+Staff', r'\\autochange ', s)
|
1667
|
+
return s
|
1668
|
+
|
1669
|
+
|
1670
|
+
@rule((2, 1, 19), _("""Drum notation changes, Removing \\chordmodifiers, \\notenames.
|
1671
|
+
Harmonic notes. Thread context removed. Lyrics context removed."""))
|
1672
|
+
def conv(s):
|
1673
|
+
if re.search('include "drumpitch', s):
|
1674
|
+
stderr_write(_("Drums found. Enclose drum notes in \\drummode"))
|
1675
|
+
|
1676
|
+
s = re.sub(r'\\include "drumpitch-init.ly"', '', s)
|
1677
|
+
|
1678
|
+
s = re.sub(r'\\pitchnames ', 'pitchnames = ', s)
|
1679
|
+
s = re.sub(r'\\chordmodifiers ', 'chordmodifiers = ', s)
|
1680
|
+
s = re.sub(r'\bdrums\b\s*=', 'drumContents = ', s)
|
1681
|
+
s = re.sub(r'\\drums\b', r'\\drumContents ', s)
|
1682
|
+
|
1683
|
+
if re.search('drums->paper', s):
|
1684
|
+
stderr_write(_("\n%s found. Check file manually!\n") %
|
1685
|
+
_("Drum notation"))
|
1686
|
+
|
1687
|
+
s = re.sub(r"""\\apply\s+#\(drums->paper\s+'([a-z]+)\)""",
|
1688
|
+
r"""\\property DrumStaff.drumStyleTable = #\1-style""",
|
1689
|
+
s)
|
1690
|
+
|
1691
|
+
if re.search('Thread', s):
|
1692
|
+
stderr_write(_("\n%s found. Check file manually!\n") % "Thread")
|
1693
|
+
|
1694
|
+
s = re.sub(r"""(\\once\s*)?\\property\s+Thread\s*\.\s*NoteHead\s*"""
|
1695
|
+
+ r"""\\(set|override)\s*#'style\s*=\s*#'harmonic"""
|
1696
|
+
+ r"""\s+([a-z]+[,'=]*)([0-9]*\.*)""", r"""<\3\\harmonic>\4""", s)
|
1697
|
+
|
1698
|
+
s = re.sub(r"""\\new Thread""", r"""\\context Voice""", s)
|
1699
|
+
s = re.sub(r"""Thread""", """Voice""", s)
|
1700
|
+
|
1701
|
+
if re.search('\bLyrics\b', s):
|
1702
|
+
stderr_write(_("\n%s found. Check file manually!\n") % "Lyrics")
|
1703
|
+
|
1704
|
+
s = re.sub(r"""LyricsVoice""", r"""L@ricsVoice""", s)
|
1705
|
+
s = re.sub(r"""\bLyrics\b""", r"""LyricsVoice""", s)
|
1706
|
+
s = re.sub(r"""LyricsContext""", r"""LyricsVoiceContext""", s)
|
1707
|
+
s = re.sub(r"""L@ricsVoice""", r"""LyricsVoice""", s)
|
1708
|
+
return s
|
1709
|
+
|
1710
|
+
|
1711
|
+
@rule((2, 1, 20), "nonevent-skip -> skip-music")
|
1712
|
+
def conv(s):
|
1713
|
+
s = re.sub(r'nonevent-skip', 'skip-music', s)
|
1714
|
+
return s
|
1715
|
+
|
1716
|
+
|
1717
|
+
@rule((2, 1, 21), """molecule-callback -> print-function,
|
1718
|
+
brew_molecule -> print
|
1719
|
+
brew-new-markup-molecule -> Text_item::print
|
1720
|
+
LyricsVoice -> Lyrics
|
1721
|
+
tupletInvisible -> TupletBracket \\set #'transparent
|
1722
|
+
%s.
|
1723
|
+
""" % (_("remove %s") % "Grob::preset_extent"))
|
1724
|
+
def conv(s):
|
1725
|
+
s = re.sub(r'molecule-callback', 'print-function', s)
|
1726
|
+
s = re.sub(r'brew_molecule', 'print', s)
|
1727
|
+
s = re.sub(r'brew-new-markup-molecule', 'Text_item::print', s)
|
1728
|
+
s = re.sub(r'LyricsVoice', 'Lyrics', s)
|
1729
|
+
s = re.sub(r'tupletInvisible',
|
1730
|
+
r"TupletBracket \\set #'transparent", s)
|
1731
|
+
# s = re.sub (r'molecule', 'collage', s)
|
1732
|
+
# molecule -> collage
|
1733
|
+
s = re.sub(r"\\property\s+[a-zA-Z]+\s*\.\s*[a-zA-Z]+\s*"
|
1734
|
+
+ r"\\set\s*#'X-extent-callback\s*=\s*#Grob::preset_extent",
|
1735
|
+
"", s)
|
1736
|
+
return s
|
1737
|
+
|
1738
|
+
|
1739
|
+
@rule((2, 1, 22), """%s
|
1740
|
+
\\set A.B = #C , \\unset A.B
|
1741
|
+
\\override A.B #C = #D, \\revert A.B #C
|
1742
|
+
|
1743
|
+
""" % _("new syntax for property settings:"))
|
1744
|
+
def conv(s):
|
1745
|
+
s = re.sub(r'(\\property[^=]+)=\s*([-0-9]+)',
|
1746
|
+
r'\1= #\2', s)
|
1747
|
+
s = re.sub(r'\\property\s+([^. ]+)\s*\.\s*([^\\=]+)\s*\\(set|override)',
|
1748
|
+
r"\\overrid@ \1.\2 ", s)
|
1749
|
+
s = re.sub(r'\\property\s+([^. ]+)\s*\.\s*([^\\= ]+)\s*=\s*',
|
1750
|
+
r'\\s@t \1.\2 = ', s)
|
1751
|
+
s = re.sub(r'\\property\s+([^. ]+)\s*\.\s*([^\\= ]+)\s*\\unset',
|
1752
|
+
r'\\uns@t \1.\2 ', s)
|
1753
|
+
s = re.sub(r'\\property\s+([^. ]+)\s*\.\s*([^\\= ]+)\s*\\revert'
|
1754
|
+
+ r"\s*#'([-a-z0-9_]+)",
|
1755
|
+
r"\\rev@rt \1.\2 #'\3", s)
|
1756
|
+
s = re.sub(r'Voice\.', '', s)
|
1757
|
+
s = re.sub(r'Lyrics\.', '', s)
|
1758
|
+
s = re.sub(r'ChordNames\.', '', s)
|
1759
|
+
|
1760
|
+
s = re.sub('rev@rt', 'revert', s)
|
1761
|
+
s = re.sub('s@t', 'set', s)
|
1762
|
+
s = re.sub('overrid@', 'override', s)
|
1763
|
+
|
1764
|
+
s = re.sub('molecule', 'stencil', s)
|
1765
|
+
s = re.sub('Molecule', 'Stencil', s)
|
1766
|
+
return s
|
1767
|
+
|
1768
|
+
|
1769
|
+
@rule((2, 1, 23), _("Property setting syntax in \\translator{ }"))
|
1770
|
+
def conv(s):
|
1771
|
+
def subst_in_trans(match):
|
1772
|
+
s = match.group(0)
|
1773
|
+
s = re.sub(r'\s([a-zA-Z]+)\s*\\override',
|
1774
|
+
r' \\override \1', s)
|
1775
|
+
s = re.sub(r'\s([a-zA-Z]+)\s*\\set',
|
1776
|
+
r' \\override \1', s)
|
1777
|
+
s = re.sub(r'\s([a-zA-Z]+)\s*\\revert',
|
1778
|
+
r' \\revert \1', s)
|
1779
|
+
return s
|
1780
|
+
s = re.sub(r'\\(translator|with)\s*{[^}]+}', subst_in_trans, s)
|
1781
|
+
|
1782
|
+
def sub_abs(m):
|
1783
|
+
|
1784
|
+
context = m.group('context')
|
1785
|
+
d = m.groupdict()
|
1786
|
+
if context:
|
1787
|
+
context = " '%s" % context[:-1] # -1: remove .
|
1788
|
+
else:
|
1789
|
+
context = ''
|
1790
|
+
|
1791
|
+
d['context'] = context
|
1792
|
+
|
1793
|
+
return r"""#(override-auto-beam-setting %(prop)s %(num)s %(den)s%(context)s)""" % d
|
1794
|
+
|
1795
|
+
s = re.sub(r"""\\override\s*(?P<context>[a-zA-Z]+\s*\.\s*)?autoBeamSettings"""
|
1796
|
+
+ r"""\s*#(?P<prop>[^=]+)\s*=\s*#\(ly:make-moment\s+(?P<num>\d+)\s+(?P<den>\d)\s*\)""",
|
1797
|
+
sub_abs, s)
|
1798
|
+
return s
|
1799
|
+
|
1800
|
+
|
1801
|
+
@rule((2, 1, 24), "music-list? -> ly:music-list?")
|
1802
|
+
def conv(s):
|
1803
|
+
s = re.sub(r'music-list\?', 'ly:music-list?', s)
|
1804
|
+
s = re.sub(r'\|\s*~', '~ |', s)
|
1805
|
+
return s
|
1806
|
+
|
1807
|
+
|
1808
|
+
@rule((2, 1, 25), _("Scheme grob function renaming"))
|
1809
|
+
def conv(s):
|
1810
|
+
s = re.sub(r'ly:get-spanner-bound', 'ly:spanner-get-bound', s)
|
1811
|
+
s = re.sub(r'ly:get-extent', 'ly:grob-extent', s)
|
1812
|
+
s = re.sub(r'ly:get-system', 'ly:grob-system', s)
|
1813
|
+
s = re.sub(r'ly:get-original', 'ly:grob-original', s)
|
1814
|
+
s = re.sub(r'ly:get-parent', 'ly:grob-parent', s)
|
1815
|
+
s = re.sub(r'ly:get-broken-into', 'ly:spanner-broken-into', s)
|
1816
|
+
s = re.sub(r'Melisma_engraver', 'Melisma_translator', s)
|
1817
|
+
if re.search("ly:get-paper-variable", s):
|
1818
|
+
stderr_write(NOT_SMART % "ly:paper-get-variable")
|
1819
|
+
stderr_write(_('Use %s\n') % '(ly:paper-lookup (ly:grob-paper ))')
|
1820
|
+
raise FatalConversionError()
|
1821
|
+
|
1822
|
+
s = re.sub(r'\\defaultAccidentals',
|
1823
|
+
"#(set-accidental-style 'default)", s)
|
1824
|
+
s = re.sub(r'\\voiceAccidentals', "#(set-accidental-style 'voice)", s)
|
1825
|
+
s = re.sub(r'\\modernAccidentals',
|
1826
|
+
"#(set-accidental-style 'modern)", s)
|
1827
|
+
s = re.sub(r'\\modernCautionaries',
|
1828
|
+
"#(set-accidental-style 'modern-cautionary)", s)
|
1829
|
+
s = re.sub(r'\\modernVoiceAccidental',
|
1830
|
+
"#(set-accidental-style 'modern-voice)", s)
|
1831
|
+
s = re.sub(r'\\modernVoiceCautionaries',
|
1832
|
+
"#(set-accidental-style 'modern-voice-cautionary)", s)
|
1833
|
+
s = re.sub(r'\\pianoAccidentals', "#(set-accidental-style 'piano)", s)
|
1834
|
+
s = re.sub(r'\\pianoCautionaries',
|
1835
|
+
"#(set-accidental-style 'piano-cautionary)", s)
|
1836
|
+
s = re.sub(r'\\forgetAccidentals',
|
1837
|
+
"#(set-accidental-style 'forget)", s)
|
1838
|
+
s = re.sub(r'\\noResetKey', "#(set-accidental-style 'no-reset)", s)
|
1839
|
+
return s
|
1840
|
+
|
1841
|
+
|
1842
|
+
@rule((2, 1, 26), _("More Scheme function renaming"))
|
1843
|
+
def conv(s):
|
1844
|
+
s = re.sub('ly:set-grob-property!', 'ly:grob-set-property!', s)
|
1845
|
+
s = re.sub('ly:set-mus-property!', 'ly:music-set-property!', s)
|
1846
|
+
s = re.sub('ly:set-context-property!', 'ly:context-set-property!', s)
|
1847
|
+
s = re.sub('ly:get-grob-property', 'ly:grob-property', s)
|
1848
|
+
s = re.sub('ly:get-mus-property', 'ly:music-property', s)
|
1849
|
+
s = re.sub('ly:get-context-property', 'ly:context-property', s)
|
1850
|
+
return s
|
1851
|
+
|
1852
|
+
|
1853
|
+
@rule((2, 1, 27), "property transposing -> tuning")
|
1854
|
+
def conv(s):
|
1855
|
+
def subst(m):
|
1856
|
+
(o, g) = divmod(int(m.group(2)), 12)
|
1857
|
+
|
1858
|
+
lower_pitches = [x for x in [0, 2, 4, 5, 7, 9, 11, 12] if x <= g]
|
1859
|
+
s = len(lower_pitches) - 1
|
1860
|
+
a = g - lower_pitches[-1]
|
1861
|
+
|
1862
|
+
s = 'cdefgab' [s]
|
1863
|
+
s += ['eses', 'es', '', 'is', 'isis'][a + 2]
|
1864
|
+
o += 1 # c' is octave 0
|
1865
|
+
if o < 0:
|
1866
|
+
s += (-o) * ","
|
1867
|
+
elif o > 0:
|
1868
|
+
s += o * "'"
|
1869
|
+
|
1870
|
+
return '\\transposition %s ' % s
|
1871
|
+
|
1872
|
+
s = re.sub(r"\\set ([A-Za-z]+\s*\.\s*)?transposing\s*=\s*#([-0-9]+)",
|
1873
|
+
subst, s)
|
1874
|
+
return s
|
1875
|
+
|
1876
|
+
|
1877
|
+
@rule((2, 1, 28), """make-music-by-name -> make-music,
|
1878
|
+
new syntax for setting \\arpeggioBracket""")
|
1879
|
+
def conv(s):
|
1880
|
+
s = re.sub(r'make-music-by-name', 'make-music', s)
|
1881
|
+
s = re.sub(r"\\override\s+.*Arpeggio\s+#.print-function\s+=\s+\\arpeggioBracket",
|
1882
|
+
r"\\arpeggioBracket", s)
|
1883
|
+
return s
|
1884
|
+
|
1885
|
+
|
1886
|
+
@rule((2, 1, 29), '\\center -> \\center-align, \\translator -> \\context')
|
1887
|
+
def conv(s):
|
1888
|
+
s = re.sub(r'\\center([^-])', r'\\center-align\1', s)
|
1889
|
+
s = re.sub(r'\\translator', r'\\context', s)
|
1890
|
+
return s
|
1891
|
+
|
1892
|
+
|
1893
|
+
@rule((2, 1, 30), '''\\threeq{flat,sharp} -> \\sesqui{flat,sharp}
|
1894
|
+
ly:get-mutable-properties -> ly:mutable-music-properties
|
1895
|
+
centralCPosition -> middleCPosition
|
1896
|
+
ly:unset-context-property -> ly:context-unset-property
|
1897
|
+
ly:translator-find -> ly:context-find
|
1898
|
+
ly:get-stencil-extent -> ly:stencil-extent
|
1899
|
+
''')
|
1900
|
+
def conv(s):
|
1901
|
+
s = re.sub(r'\\threeq(flat|sharp)', r'\\sesqui\1', s)
|
1902
|
+
s = re.sub(r'ly:stencil-get-extent',
|
1903
|
+
'ly:stencil-extent', s)
|
1904
|
+
s = re.sub(r'ly:translator-find',
|
1905
|
+
'ly:context-find', s)
|
1906
|
+
s = re.sub('ly:unset-context-property', 'ly:context-unset-property',
|
1907
|
+
s)
|
1908
|
+
|
1909
|
+
s = re.sub(r'ly:get-mutable-properties',
|
1910
|
+
'ly:mutable-music-properties', s)
|
1911
|
+
s = re.sub(r'centralCPosition',
|
1912
|
+
'middleCPosition', s)
|
1913
|
+
return s
|
1914
|
+
|
1915
|
+
|
1916
|
+
@rule((2, 1, 31), 'remove \\alias Timing')
|
1917
|
+
def conv(s):
|
1918
|
+
s = re.sub(r'\\alias\s*"?Timing"?', '', s)
|
1919
|
+
return s
|
1920
|
+
|
1921
|
+
|
1922
|
+
@rule((2, 1, 33), 'breakAlignOrder -> break-align-orders.')
|
1923
|
+
def conv(s):
|
1924
|
+
s = re.sub(r"(\\set\s+)?(?P<context>(Score\.)?)breakAlignOrder\s*=\s*#'(?P<list>[^\)]+)",
|
1925
|
+
r"\n\\override \g<context>BreakAlignment #'break-align-orders = "
|
1926
|
+
+ r"#(make-vector 3 '\g<list>)", s)
|
1927
|
+
return s
|
1928
|
+
|
1929
|
+
|
1930
|
+
@rule((2, 1, 34), 'set-paper-size -> set-default-paper-size.')
|
1931
|
+
def conv(s):
|
1932
|
+
s = re.sub(r"\(set-paper-size",
|
1933
|
+
"(set-default-paper-size", s)
|
1934
|
+
return s
|
1935
|
+
|
1936
|
+
|
1937
|
+
@rule((2, 1, 36), 'ly:mutable-music-properties -> ly:music-mutable-properties')
|
1938
|
+
def conv(s):
|
1939
|
+
s = re.sub(r"ly:mutable-music-properties",
|
1940
|
+
"ly:music-mutable-properties", s)
|
1941
|
+
return s
|
1942
|
+
|
1943
|
+
|
1944
|
+
@rule((2, 2, 0), _("bump version for release"))
|
1945
|
+
def conv(s):
|
1946
|
+
return s
|
1947
|
+
|
1948
|
+
|
1949
|
+
@rule((2, 3, 1), '\\apply -> \\applymusic')
|
1950
|
+
def conv(s):
|
1951
|
+
return re.sub(r'\\apply\b', r'\\applymusic', s)
|
1952
|
+
|
1953
|
+
|
1954
|
+
@rule((2, 3, 2), '\\FooContext -> \\Foo')
|
1955
|
+
def conv(s):
|
1956
|
+
if re.search('textheight', s):
|
1957
|
+
stderr_write(NOT_SMART % "textheight")
|
1958
|
+
stderr_write(UPDATE_MANUALLY)
|
1959
|
+
stderr_write(
|
1960
|
+
_("""Page layout has been changed, using paper size and margins.
|
1961
|
+
textheight is no longer used.
|
1962
|
+
"""))
|
1963
|
+
s = re.sub(r'\\OrchestralScoreContext', r'\\Score', s)
|
1964
|
+
|
1965
|
+
def func(m):
|
1966
|
+
if m.group(1) not in ['RemoveEmptyStaff',
|
1967
|
+
'AncientRemoveEmptyStaffContext',
|
1968
|
+
'EasyNotation']:
|
1969
|
+
return '\\' + m.group(1)
|
1970
|
+
return m.group(0)
|
1971
|
+
|
1972
|
+
s = re.sub(r'\\([a-zA-Z]+)Context\b', func, s)
|
1973
|
+
s = re.sub('ly:paper-lookup', 'ly:output-def-lookup', s)
|
1974
|
+
return s
|
1975
|
+
|
1976
|
+
|
1977
|
+
@rule((2, 3, 4), _('remove %s') % '\\notes')
|
1978
|
+
def conv(s):
|
1979
|
+
s = re.sub(r'\\notes\b', '', s)
|
1980
|
+
return s
|
1981
|
+
|
1982
|
+
|
1983
|
+
@rule((2, 3, 6), 'lastpagefill -> raggedlastbottom')
|
1984
|
+
def conv(s):
|
1985
|
+
s = re.sub(r'lastpagefill\s*=\s*"?1"', 'raggedlastbottom = ##t', s)
|
1986
|
+
return s
|
1987
|
+
|
1988
|
+
|
1989
|
+
@rule((2, 3, 8), 'remove \\consistsend, strip \\lyrics from \\lyricsto.')
|
1990
|
+
def conv(s):
|
1991
|
+
s = re.sub(r'\\consistsend', r'\\consists', s)
|
1992
|
+
s = re.sub(r'\\lyricsto\s+("?[a-zA-Z]+"?)(\s*\\new Lyrics\s*)?\\lyrics',
|
1993
|
+
r'\\lyricsto \1 \2', s)
|
1994
|
+
return s
|
1995
|
+
|
1996
|
+
|
1997
|
+
@rule((2, 3, 9), 'neo_mensural -> neomensural, if-text-padding -> bound-padding')
|
1998
|
+
def conv(s):
|
1999
|
+
s = re.sub(r'neo_mensural', 'neomensural', s)
|
2000
|
+
s = re.sub(r'if-text-padding', 'bound-padding', s)
|
2001
|
+
return s
|
2002
|
+
|
2003
|
+
|
2004
|
+
@rule((2, 3, 10), '\\addlyrics -> \\oldaddlyrics, \\newlyrics -> \\addlyrics')
|
2005
|
+
def conv(s):
|
2006
|
+
s = re.sub(r'\\addlyrics', r'\\oldaddlyrics', s)
|
2007
|
+
s = re.sub(r'\\newlyrics', r'\\addlyrics', s)
|
2008
|
+
if re.search(r"\\override\s*TextSpanner", s):
|
2009
|
+
stderr_write(
|
2010
|
+
"\nWarning: TextSpanner has been split into DynamicTextSpanner and TextSpanner\n")
|
2011
|
+
return s
|
2012
|
+
|
2013
|
+
|
2014
|
+
@rule((2, 3, 11), '\\setMmRestFermata -> ^\\fermataMarkup')
|
2015
|
+
def conv(s):
|
2016
|
+
s = re.sub(r'\\setMmRestFermata\s+(R[0-9.*/]*)',
|
2017
|
+
r'\1^\\fermataMarkup', s)
|
2018
|
+
return s
|
2019
|
+
|
2020
|
+
|
2021
|
+
@rule((2, 3, 12), '''\\newpage -> \\pageBreak, junk \\script{up,down,both},
|
2022
|
+
soloADue -> printPartCombineTexts, #notes-to-clusters -> \\makeClusters
|
2023
|
+
''')
|
2024
|
+
def conv(s):
|
2025
|
+
s = re.sub(r'\\newpage', r'\\pageBreak', s)
|
2026
|
+
s = re.sub(r'\\scriptUp', r"""{
|
2027
|
+
\\override TextScript #'direction = #1
|
2028
|
+
\\override Script #'direction = #1
|
2029
|
+
}""", s)
|
2030
|
+
s = re.sub(r'\\scriptDown', r"""{
|
2031
|
+
\\override TextScript #'direction = #-1
|
2032
|
+
\\override Script #'direction = #-1
|
2033
|
+
}""", s)
|
2034
|
+
s = re.sub(r'\\scriptBoth', r"""{
|
2035
|
+
\\revert TextScript #'direction
|
2036
|
+
\\revert Script #'direction
|
2037
|
+
}""", s)
|
2038
|
+
s = re.sub('soloADue', 'printPartCombineTexts', s)
|
2039
|
+
s = re.sub(r'\\applymusic\s*#notes-to-clusters',
|
2040
|
+
r'\\makeClusters', s)
|
2041
|
+
|
2042
|
+
s = re.sub(r'pagenumber\s*=', 'firstpagenumber = ', s)
|
2043
|
+
return s
|
2044
|
+
|
2045
|
+
|
2046
|
+
@rule((2, 3, 16), _('''\\foo -> \\foomode (for chords, notes, etc.)
|
2047
|
+
fold \\new FooContext \\foomode into \\foo.'''))
|
2048
|
+
def conv(s):
|
2049
|
+
s = re.sub(r'\\chords\b', r'\\chordmode', s)
|
2050
|
+
s = re.sub(r'\\lyrics\b', r'\\lyricmode', s)
|
2051
|
+
s = re.sub(r'\\figures\b', r'\\figuremode', s)
|
2052
|
+
s = re.sub(r'\\notes\b', r'\\notemode', s)
|
2053
|
+
s = re.sub(r'\\drums\b', r'\\drummode', s)
|
2054
|
+
s = re.sub(r'\\chordmode\s*\\new ChordNames', r'\\chords', s)
|
2055
|
+
s = re.sub(r'\\new ChordNames\s*\\chordmode', r'\\chords', s)
|
2056
|
+
s = re.sub(r'\\new FiguredBass\s*\\figuremode', r'\\figures', s)
|
2057
|
+
s = re.sub(r'\\figuremode\s*\new FiguredBass', r'\\figures', s)
|
2058
|
+
s = re.sub(r'\\new DrumStaff\s*\\drummode', r'\\drums', s)
|
2059
|
+
s = re.sub(r'\\drummode\s*\\new DrumStaff', r'\\drums', s)
|
2060
|
+
|
2061
|
+
return s
|
2062
|
+
|
2063
|
+
|
2064
|
+
@rule((2, 3, 17), '''slurBoth -> slurNeutral, stemBoth -> stemNeutral, etc.
|
2065
|
+
\\applymusic #(remove-tag 'foo) -> \\removeWithTag 'foo''')
|
2066
|
+
def conv(s):
|
2067
|
+
s = re.sub(
|
2068
|
+
r'(slur|stem|phrasingSlur|tie|dynamic|dots|tuplet|arpeggio|)Both', r'\1Neutral', s)
|
2069
|
+
s = re.sub(r"\\applymusic\s*#\(remove-tag\s*'([a-z-0-9]+)\)",
|
2070
|
+
r"\\removeWithTag #'\1", s)
|
2071
|
+
return s
|
2072
|
+
|
2073
|
+
|
2074
|
+
@rule((2, 3, 18), 'Text_item -> Text_interface')
|
2075
|
+
def conv(s):
|
2076
|
+
s = re.sub(r'Text_item', 'Text_interface', s)
|
2077
|
+
return s
|
2078
|
+
|
2079
|
+
|
2080
|
+
@rule((2, 3, 22), 'paper -> layout, bookpaper -> paper')
|
2081
|
+
def conv(s):
|
2082
|
+
s = re.sub(r'\\paper', r'\\layout', s)
|
2083
|
+
s = re.sub(r'\\bookpaper', r'\\paper', s)
|
2084
|
+
if re.search('paper-set-staff-size', s):
|
2085
|
+
warning(_('''staff size should be changed at top-level
|
2086
|
+
with
|
2087
|
+
|
2088
|
+
#(set-global-staff-size <STAFF-HEIGHT-IN-POINT>)
|
2089
|
+
|
2090
|
+
'''))
|
2091
|
+
|
2092
|
+
s = re.sub(r'#\(paper-set-staff-size',
|
2093
|
+
'%Use set-global-staff-size at toplevel\n% #(layout-set-staff-size', s)
|
2094
|
+
return s
|
2095
|
+
|
2096
|
+
|
2097
|
+
@rule((2, 3, 23), r'\context Foo = NOTENAME -> \context Foo = "NOTENAME"')
|
2098
|
+
def conv(s):
|
2099
|
+
s = re.sub(r'\\context\s+([a-zA-Z]+)\s*=\s*([a-z]+)\s',
|
2100
|
+
r'\\context \1 = "\2" ',
|
2101
|
+
s)
|
2102
|
+
return s
|
2103
|
+
|
2104
|
+
|
2105
|
+
@rule((2, 3, 24), _('''regularize other identifiers'''))
|
2106
|
+
def conv(s):
|
2107
|
+
def sub(m):
|
2108
|
+
return regularize_id(m.group(1))
|
2109
|
+
s = re.sub(r'(maintainer_email|maintainer_web|midi_stuff|gourlay_maxmeasures)',
|
2110
|
+
sub, s)
|
2111
|
+
return s
|
2112
|
+
|
2113
|
+
|
2114
|
+
@rule((2, 3, 25), 'petrucci_c1 -> petrucci-c1, 1style -> single-digit')
|
2115
|
+
def conv(s):
|
2116
|
+
s = re.sub('petrucci_c1', 'petrucci-c1', s)
|
2117
|
+
s = re.sub('1style', 'single-digit', s)
|
2118
|
+
return s
|
2119
|
+
|
2120
|
+
|
2121
|
+
@rule((2, 4, 0), _("bump version for release"))
|
2122
|
+
def conv(s):
|
2123
|
+
return s
|
2124
|
+
|
2125
|
+
|
2126
|
+
@rule((2, 5, 0), '\\quote -> \\quoteDuring')
|
2127
|
+
def conv(s):
|
2128
|
+
s = re.sub(r'\\quote\s+"?([a-zA-Z0-9]+)"?\s+([0-9.*/]+)',
|
2129
|
+
r'\\quoteDuring #"\1" { \\skip \2 }',
|
2130
|
+
s)
|
2131
|
+
return s
|
2132
|
+
|
2133
|
+
|
2134
|
+
@rule((2, 5, 1), 'ly:import-module -> ly:module-copy')
|
2135
|
+
def conv(s):
|
2136
|
+
s = re.sub(r'ly:import-module',
|
2137
|
+
r'ly:module-copy', s)
|
2138
|
+
return s
|
2139
|
+
|
2140
|
+
|
2141
|
+
@rule((2, 5, 2), r'\markup .. < .. > .. -> \markup .. { .. } ..')
|
2142
|
+
def conv(s):
|
2143
|
+
s = re.sub(r'\\(column|fill-line|dir-column|center-align|right-align|left-align|bracketed-y-column)\s*<(([^>]|<[^>]*>)*)>',
|
2144
|
+
r'\\\1 {\2}', s)
|
2145
|
+
s = re.sub(r'\\(column|fill-line|dir-column|center-align|right-align|left-align|bracketed-y-column)\s*<(([^>]|<[^>]*>)*)>',
|
2146
|
+
r'\\\1 {\2}', s)
|
2147
|
+
s = re.sub(r'\\(column|fill-line|dir-column|center-align|right-align|left-align|bracketed-y-column)\s*<(([^>]|<[^>]*>)*)>',
|
2148
|
+
r'\\\1 {\2}', s)
|
2149
|
+
|
2150
|
+
def get_markup(m):
|
2151
|
+
s = m.group(0)
|
2152
|
+
s = re.sub(r'''((\\"|})\s*){''', '\2 \\line {', s)
|
2153
|
+
return s
|
2154
|
+
s = re.sub(r'\\markup\s*{([^}]|{[^}]*})*}', get_markup, s)
|
2155
|
+
return s
|
2156
|
+
|
2157
|
+
|
2158
|
+
@rule((2, 5, 3), 'ly:find-glyph-by-name -> ly:font-get-glyph, remove - from glyphnames.')
|
2159
|
+
def conv(s):
|
2160
|
+
s = re.sub('ly:find-glyph-by-name', 'ly:font-get-glyph', s)
|
2161
|
+
s = re.sub('"(scripts|clefs|accidentals)-', r'"\1.', s)
|
2162
|
+
s = re.sub("'hufnagel-do-fa", "'hufnagel.do.fa", s)
|
2163
|
+
s = re.sub(
|
2164
|
+
"'(vaticana|hufnagel|medicaea|petrucci|neomensural|mensural)-", r"'\1.", s)
|
2165
|
+
return s
|
2166
|
+
|
2167
|
+
|
2168
|
+
@rule((2, 5, 12), r'\set Slur #\'dashed = #X -> \slurDashed')
|
2169
|
+
def conv(s):
|
2170
|
+
s = re.sub(r"\\override\s+(Voice\.)?Slur #'dashed\s*=\s*#\d*(\.\d+)?",
|
2171
|
+
r"\\slurDashed", s)
|
2172
|
+
return s
|
2173
|
+
|
2174
|
+
|
2175
|
+
@rule((2, 5, 13), _('\\encoding: smart recode latin1..utf-8. Remove ly:point-and-click'))
|
2176
|
+
def conv(s):
|
2177
|
+
def func(match):
|
2178
|
+
encoding = match.group(1)
|
2179
|
+
|
2180
|
+
if encoding == 'latin1':
|
2181
|
+
return match.group(2)
|
2182
|
+
|
2183
|
+
stderr_write(NOT_SMART % ("\\encoding: %s" % encoding))
|
2184
|
+
stderr_write(_("LilyPond source must be UTF-8"))
|
2185
|
+
stderr_write('\n')
|
2186
|
+
if encoding == 'TeX':
|
2187
|
+
stderr_write(_("Try the texstrings backend"))
|
2188
|
+
stderr_write('\n')
|
2189
|
+
else:
|
2190
|
+
stderr_write(_("Do something like: %s") %
|
2191
|
+
("recode %s..utf-8 FILE" % encoding))
|
2192
|
+
stderr_write('\n')
|
2193
|
+
stderr_write(_("Or save as UTF-8 in your editor"))
|
2194
|
+
stderr_write('\n')
|
2195
|
+
raise FatalConversionError()
|
2196
|
+
|
2197
|
+
s = re.sub(r'\\encoding\s+"?([a-zA-Z0-9]+)"?(\s+)', func, s)
|
2198
|
+
|
2199
|
+
s = re.sub(r"#\(ly:set-point-and-click '[a-z-]+\)", '', s)
|
2200
|
+
return s
|
2201
|
+
|
2202
|
+
|
2203
|
+
@rule((2, 5, 17), _('remove %s') % 'ly:stencil-set-extent!')
|
2204
|
+
def conv(s):
|
2205
|
+
if re.search("ly:stencil-set-extent!", s):
|
2206
|
+
stderr_write(NOT_SMART % "ly:stencil-set-extent!")
|
2207
|
+
stderr_write(_('Use %s\n') %
|
2208
|
+
'(set! VAR (ly:make-stencil (ly:stencil-expr VAR) X-EXT Y-EXT))')
|
2209
|
+
raise FatalConversionError()
|
2210
|
+
if re.search("ly:stencil-align-to!", s):
|
2211
|
+
stderr_write(NOT_SMART % "ly:stencil-align-to!")
|
2212
|
+
stderr_write(_('Use %s\n') %
|
2213
|
+
'(set! VAR (ly:stencil-aligned-to VAR AXIS DIR))')
|
2214
|
+
raise FatalConversionError()
|
2215
|
+
return s
|
2216
|
+
|
2217
|
+
|
2218
|
+
@rule((2, 5, 18), 'ly:warn -> ly:warning')
|
2219
|
+
def conv(s):
|
2220
|
+
s = re.sub(r"ly:warn\b", 'ly:warning', s)
|
2221
|
+
return s
|
2222
|
+
|
2223
|
+
|
2224
|
+
@rule((2, 5, 21), _('warn about auto beam settings'))
|
2225
|
+
def conv(s):
|
2226
|
+
if re.search("(override-|revert-)auto-beam-setting", s)\
|
2227
|
+
or re.search("autoBeamSettings", s):
|
2228
|
+
stderr_write(NOT_SMART % _("auto beam settings"))
|
2229
|
+
stderr_write(_('''
|
2230
|
+
Auto beam settings must now specify each interesting moment in a measure
|
2231
|
+
explicitly; 1/4 is no longer multiplied to cover moments 1/2 and 3/4 too.
|
2232
|
+
'''))
|
2233
|
+
stderr_write(UPDATE_MANUALLY)
|
2234
|
+
raise FatalConversionError()
|
2235
|
+
return s
|
2236
|
+
|
2237
|
+
|
2238
|
+
@rule((2, 5, 25), 'unfoldrepeats -> unfoldRepeats, compressmusic -> compressMusic')
|
2239
|
+
def conv(s):
|
2240
|
+
s = re.sub(r"unfoldrepeats", 'unfoldRepeats', s)
|
2241
|
+
s = re.sub(r"compressmusic", 'compressMusic', s)
|
2242
|
+
return s
|
2243
|
+
|
2244
|
+
|
2245
|
+
@rule((2, 6, 0), _("bump version for release"))
|
2246
|
+
def conv(s):
|
2247
|
+
return s
|
2248
|
+
|
2249
|
+
|
2250
|
+
@rule((2, 7, 0), 'ly:get-default-font -> ly:grob-default-font')
|
2251
|
+
def conv(s):
|
2252
|
+
return re.sub('ly:get-default-font', 'ly:grob-default-font', s)
|
2253
|
+
|
2254
|
+
|
2255
|
+
@rule((2, 7, 1), '''ly:parser-define -> ly:parser-define!
|
2256
|
+
excentricity -> eccentricity
|
2257
|
+
Timing_engraver -> Timing_translator + Default_bar_line_engraver
|
2258
|
+
''')
|
2259
|
+
def conv(s):
|
2260
|
+
s = re.sub('ly:parser-define', 'ly:parser-define!', s)
|
2261
|
+
s = re.sub('excentricity', 'eccentricity', s)
|
2262
|
+
s = re.sub(r'\\(consists|remove) *"?Timing_engraver"?',
|
2263
|
+
r'\\\1 "Timing_translator" \\\1 "Default_bar_line_engraver"',
|
2264
|
+
s)
|
2265
|
+
return s
|
2266
|
+
|
2267
|
+
|
2268
|
+
@rule((2, 7, 2), 'ly:X-moment -> ly:moment-X')
|
2269
|
+
def conv(s):
|
2270
|
+
s = re.sub('ly:(add|mul|mod|div)-moment', r'ly:moment-\1', s)
|
2271
|
+
return s
|
2272
|
+
|
2273
|
+
|
2274
|
+
@rule((2, 7, 4), 'keyAccidentalOrder -> keyAlterationOrder')
|
2275
|
+
def conv(s):
|
2276
|
+
s = re.sub('keyAccidentalOrder', 'keyAlterationOrder', s)
|
2277
|
+
return s
|
2278
|
+
|
2279
|
+
|
2280
|
+
@rule((2, 7, 6), '''Performer_group_performer -> Performer_group, Engraver_group_engraver -> Engraver_group,
|
2281
|
+
inside-slur -> avoid-slur''')
|
2282
|
+
def conv(s):
|
2283
|
+
s = re.sub('Performer_group_performer', 'Performer_group', s)
|
2284
|
+
s = re.sub('Engraver_group_engraver', 'Engraver_group', s)
|
2285
|
+
s = re.sub(r"#'inside-slur\s*=\s*##t *",
|
2286
|
+
r"#'avoid-slur = #'inside ", s)
|
2287
|
+
s = re.sub(r"#'inside-slur\s*=\s*##f *",
|
2288
|
+
r"#'avoid-slur = #'around ", s)
|
2289
|
+
s = re.sub(r"#'inside-slur",
|
2290
|
+
r"#'avoid-slur", s)
|
2291
|
+
return s
|
2292
|
+
|
2293
|
+
|
2294
|
+
@rule((2, 7, 10), '\\applyxxx -> \\applyXxx')
|
2295
|
+
def conv(s):
|
2296
|
+
s = re.sub(r'\\applyoutput', r'\\applyOutput', s)
|
2297
|
+
s = re.sub(r'\\applycontext', r'\\applyContext', s)
|
2298
|
+
s = re.sub(r'\\applymusic', r'\\applyMusic', s)
|
2299
|
+
s = re.sub(r'ly:grob-suicide', 'ly:grob-suicide!', s)
|
2300
|
+
return s
|
2301
|
+
|
2302
|
+
|
2303
|
+
@rule((2, 7, 11), '"tabloid" -> "11x17"')
|
2304
|
+
def conv(s):
|
2305
|
+
s = re.sub('"tabloid"', '"11x17"', s)
|
2306
|
+
return s
|
2307
|
+
|
2308
|
+
|
2309
|
+
@rule((2, 7, 12), 'outputProperty -> overrideProperty')
|
2310
|
+
def conv(s):
|
2311
|
+
s = re.sub(r'outputProperty', 'overrideProperty', s)
|
2312
|
+
return s
|
2313
|
+
|
2314
|
+
|
2315
|
+
@rule((2, 7, 13), 'layout engine refactoring [FIXME]')
|
2316
|
+
def conv(s):
|
2317
|
+
def subber(match):
|
2318
|
+
newkey = {'spacing-procedure': 'springs-and-rods',
|
2319
|
+
'after-line-breaking-callback': 'after-line-breaking',
|
2320
|
+
'before-line-breaking-callback': 'before-line-breaking',
|
2321
|
+
'print-function': 'stencil'}[match.group(3)]
|
2322
|
+
what = match.group(1)
|
2323
|
+
grob = match.group(2)
|
2324
|
+
|
2325
|
+
if what == 'revert':
|
2326
|
+
return "revert %s #'callbacks %% %s\n" % (grob, newkey)
|
2327
|
+
if what == 'override':
|
2328
|
+
return "override %s #'callbacks #'%s" % (grob, newkey)
|
2329
|
+
raise RuntimeError('1st group should match revert or override')
|
2330
|
+
|
2331
|
+
s = re.sub(r"(override|revert)\s*([a-zA-Z.]+)\s*#'(spacing-procedure|after-line-breaking-callback"
|
2332
|
+
+ r"|before-line-breaking-callback|print-function)",
|
2333
|
+
subber, s)
|
2334
|
+
|
2335
|
+
if re.search('bar-size-procedure', s):
|
2336
|
+
stderr_write(NOT_SMART % "bar-size-procedure")
|
2337
|
+
if re.search('space-function', s):
|
2338
|
+
stderr_write(NOT_SMART % "space-function")
|
2339
|
+
if re.search('verticalAlignmentChildCallback', s):
|
2340
|
+
stderr_write(_('verticalAlignmentChildCallback has been deprecated'))
|
2341
|
+
stderr_write('\n')
|
2342
|
+
return s
|
2343
|
+
|
2344
|
+
|
2345
|
+
@rule((2, 7, 14), _('Remove callbacks property, deprecate XY-extent-callback.'))
|
2346
|
+
def conv(s):
|
2347
|
+
s = re.sub(r"\\override +([A-Z.a-z]+) #'callbacks",
|
2348
|
+
r"\\override \1", s)
|
2349
|
+
s = re.sub(r"\\revert ([A-Z.a-z]+) #'callbacks % ([a-zA-Z]+)",
|
2350
|
+
r"\\revert \1 #'\2", s)
|
2351
|
+
s = re.sub(r"([XY]-extent)-callback", r'\1', s)
|
2352
|
+
s = re.sub(r"RemoveEmptyVerticalGroup", "VerticalAxisGroup", s)
|
2353
|
+
s = re.sub(r"\\set ([a-zA-Z]*\.?)minimumVerticalExtent",
|
2354
|
+
r"\\override \1VerticalAxisGroup #'minimum-Y-extent",
|
2355
|
+
s)
|
2356
|
+
s = re.sub(r"minimumVerticalExtent",
|
2357
|
+
r"\\override VerticalAxisGroup #'minimum-Y-extent",
|
2358
|
+
s)
|
2359
|
+
s = re.sub(r"\\set ([a-zA-Z]*\.?)extraVerticalExtent",
|
2360
|
+
r"\\override \1VerticalAxisGroup #'extra-Y-extent", s)
|
2361
|
+
s = re.sub(r"\\set ([a-zA-Z]*\.?)verticalExtent",
|
2362
|
+
r"\\override \1VerticalAxisGroup #'Y-extent", s)
|
2363
|
+
return s
|
2364
|
+
|
2365
|
+
|
2366
|
+
@rule((2, 7, 15), _('Use grob closures iso. XY-offset-callbacks.'))
|
2367
|
+
def conv(s):
|
2368
|
+
if re.search('[XY]-offset-callbacks', s):
|
2369
|
+
stderr_write(NOT_SMART % "[XY]-offset-callbacks")
|
2370
|
+
if re.search('position-callbacks', s):
|
2371
|
+
stderr_write(NOT_SMART % "position-callbacks")
|
2372
|
+
return s
|
2373
|
+
|
2374
|
+
|
2375
|
+
@rule((2, 7, 18), r"""bassFigureFormatFunction -> figuredBassFormatter
|
2376
|
+
deprecate alignBassFigureAccidentals.
|
2377
|
+
""")
|
2378
|
+
def conv(s):
|
2379
|
+
s = re.sub('bassFigureFormatFunction', 'figuredBassFormatter', s)
|
2380
|
+
if re.search('alignBassFigureAccidentals', s):
|
2381
|
+
stderr_write(NOT_SMART % "alignBassFigureAccidentals")
|
2382
|
+
return s
|
2383
|
+
|
2384
|
+
|
2385
|
+
@rule((2, 7, 22), r"\tag #'(a b) -> \tag #'a \tag #'b")
|
2386
|
+
def conv(s):
|
2387
|
+
def sub_syms(m):
|
2388
|
+
syms = m.group(1).split()
|
2389
|
+
tags = ["\\tag #'%s" % s for s in syms]
|
2390
|
+
return ' '.join(tags)
|
2391
|
+
|
2392
|
+
s = re.sub(r"\\tag #'\(([^)]+)\)", sub_syms, s)
|
2393
|
+
return s
|
2394
|
+
|
2395
|
+
|
2396
|
+
@rule((2, 7, 24), _('deprecate %s') % 'number-visibility')
|
2397
|
+
def conv(s):
|
2398
|
+
s = re.sub(r"#'number-visibility",
|
2399
|
+
"#'number-visibility % number-visibility is deprecated. Tune the TupletNumber instead\n",
|
2400
|
+
s)
|
2401
|
+
return s
|
2402
|
+
|
2403
|
+
|
2404
|
+
@rule((2, 7, 28), "ly:spanner-get-bound -> ly:spanner-bound")
|
2405
|
+
def conv(s):
|
2406
|
+
s = re.sub(r"ly:spanner-get-bound", "ly:spanner-bound", s)
|
2407
|
+
return s
|
2408
|
+
|
2409
|
+
|
2410
|
+
@rule((2, 7, 29), "override Stem #'beamed-* -> #'details #'beamed-*")
|
2411
|
+
def conv(s):
|
2412
|
+
for a in ['beamed-lengths', 'beamed-minimum-free-lengths',
|
2413
|
+
'lengths',
|
2414
|
+
'beamed-extreme-minimum-free-lengths']:
|
2415
|
+
s = re.sub(r"\\override\s+Stem\s+#'%s" % a,
|
2416
|
+
r"\\override Stem #'details #'%s" % a,
|
2417
|
+
s)
|
2418
|
+
return s
|
2419
|
+
|
2420
|
+
|
2421
|
+
@rule((2, 7, 30), "\\epsfile")
|
2422
|
+
def conv(s):
|
2423
|
+
s = re.sub(r'\\epsfile *#"', r'\\epsfile #X #10 #"', s)
|
2424
|
+
return s
|
2425
|
+
|
2426
|
+
|
2427
|
+
@rule((2, 7, 31), "Foo_bar::bla_bla -> ly:foo-bar::bla-bla")
|
2428
|
+
def conv(s):
|
2429
|
+
def sub_cxx_id(m):
|
2430
|
+
s = m.group(1)
|
2431
|
+
return 'ly:' + s.lower().replace('_', '-')
|
2432
|
+
|
2433
|
+
s = re.sub(r'([A-Z][a-z_0-9]+::[a-z_0-9]+)',
|
2434
|
+
sub_cxx_id, s)
|
2435
|
+
return s
|
2436
|
+
|
2437
|
+
|
2438
|
+
@rule((2, 7, 32), _(r"foobar -> foo-bar for \paper, \layout"))
|
2439
|
+
def conv(s):
|
2440
|
+
identifier_subs = [
|
2441
|
+
('inputencoding', 'input-encoding'),
|
2442
|
+
('printpagenumber', 'print-page-number'),
|
2443
|
+
('outputscale', 'output-scale'),
|
2444
|
+
('betweensystemspace', 'between-system-space'),
|
2445
|
+
('betweensystempadding', 'between-system-padding'),
|
2446
|
+
('pagetopspace', 'page-top-space'),
|
2447
|
+
('raggedlastbottom', 'ragged-last-bottom'),
|
2448
|
+
('raggedright', 'ragged-right'),
|
2449
|
+
('raggedlast', 'ragged-last'),
|
2450
|
+
('raggedbottom', 'ragged-bottom'),
|
2451
|
+
('aftertitlespace', 'after-title-space'),
|
2452
|
+
('beforetitlespace', 'before-title-space'),
|
2453
|
+
('betweentitlespace', 'between-title-space'),
|
2454
|
+
('topmargin', 'top-margin'),
|
2455
|
+
('bottommargin', 'bottom-margin'),
|
2456
|
+
('headsep', 'head-separation'),
|
2457
|
+
('footsep', 'foot-separation'),
|
2458
|
+
('rightmargin', 'right-margin'),
|
2459
|
+
('leftmargin', 'left-margin'),
|
2460
|
+
('printfirstpagenumber', 'print-first-page-number'),
|
2461
|
+
('firstpagenumber', 'first-page-number'),
|
2462
|
+
('hsize', 'paper-width'),
|
2463
|
+
('vsize', 'paper-height'),
|
2464
|
+
('horizontalshift', 'horizontal-shift'),
|
2465
|
+
('staffspace', 'staff-space'),
|
2466
|
+
('linethickness', 'line-thickness'),
|
2467
|
+
('ledgerlinethickness', 'ledger-line-thickness'),
|
2468
|
+
('blotdiameter', 'blot-diameter'),
|
2469
|
+
('staffheight', 'staff-height'),
|
2470
|
+
('linewidth', 'line-width'),
|
2471
|
+
('annotatespacing', 'annotate-spacing')
|
2472
|
+
]
|
2473
|
+
|
2474
|
+
for (a, b) in identifier_subs:
|
2475
|
+
# for C++:
|
2476
|
+
# s = re.sub ('"%s"' % a, '"%s"' b, s)
|
2477
|
+
|
2478
|
+
s = re.sub(a, b, s)
|
2479
|
+
return s
|
2480
|
+
|
2481
|
+
|
2482
|
+
@rule((2, 7, 32), "debug-beam-quanting -> debug-beam-scoring")
|
2483
|
+
def conv(s):
|
2484
|
+
s = re.sub('debug-beam-quanting', 'debug-beam-scoring', s)
|
2485
|
+
return s
|
2486
|
+
|
2487
|
+
|
2488
|
+
@rule((2, 7, 36), "def-(music-function|markup-command) -> define-(music-function|markup-command)")
|
2489
|
+
def conv(s):
|
2490
|
+
s = re.sub('def-music-function', 'define-music-function', s)
|
2491
|
+
s = re.sub('def-markup-command', 'define-markup-command', s)
|
2492
|
+
return s
|
2493
|
+
|
2494
|
+
|
2495
|
+
@rule((2, 7, 40), "rehearsalMarkAlignSymbol/barNumberAlignSymbol -> break-align-symbol")
|
2496
|
+
def conv(s):
|
2497
|
+
s = re.sub(r'\\set\s+Score\s*\.\s*barNumberAlignSymbol\s*=',
|
2498
|
+
r"\\override Score.BarNumber #'break-align-symbol = ", s)
|
2499
|
+
s = re.sub(r'\\set\s*Score\s*\.\s*rehearsalMarkAlignSymbol\s*=',
|
2500
|
+
r"\\override Score.RehearsalMark #'break-align-symbol = ", s)
|
2501
|
+
return s
|
2502
|
+
|
2503
|
+
|
2504
|
+
@rule((2, 9, 4), "(page-)penalty -> (page-)break-penalty")
|
2505
|
+
def conv(s):
|
2506
|
+
s = re.sub('page-penalty', 'page-break-penalty', s)
|
2507
|
+
s = re.sub('([^-])penalty', '\1break-penalty', s)
|
2508
|
+
return s
|
2509
|
+
|
2510
|
+
|
2511
|
+
@rule((2, 9, 6), "\\context Foo \\applyOutput #bla -> \\applyOutput #'Foo #bla ")
|
2512
|
+
def conv(s):
|
2513
|
+
s = re.sub(
|
2514
|
+
r'\\context\s+"?([a-zA-Z]+)"?\s*\\applyOutput', r"\\applyOutput #'\1", s)
|
2515
|
+
return s
|
2516
|
+
|
2517
|
+
|
2518
|
+
@rule((2, 9, 9), "annotatefoo -> annotate-foo")
|
2519
|
+
def conv(s):
|
2520
|
+
s = re.sub('annotatepage', 'annotate-page', s)
|
2521
|
+
s = re.sub('annotateheaders', 'annotate-headers', s)
|
2522
|
+
s = re.sub('annotatesystems', 'annotate-systems', s)
|
2523
|
+
return s
|
2524
|
+
|
2525
|
+
|
2526
|
+
@rule((2, 9, 11), "\\set tupletNumberFormatFunction -> \\override #'text = ")
|
2527
|
+
def conv(s):
|
2528
|
+
s = re.sub(r"""(\\set\s)?(?P<context>[a-zA-Z]*.?)tupletNumberFormatFunction\s*=\s*#denominator-tuplet-formatter""",
|
2529
|
+
r"""\\override \g<context>TupletNumber #'text = #tuplet-number::calc-denominator-text""", s)
|
2530
|
+
|
2531
|
+
s = re.sub(r"""(\\set\s+)?(?P<context>[a-zA-Z]*.?)tupletNumberFormatFunction\s*=\s*#fraction-tuplet-formatter""",
|
2532
|
+
r"""\\override \g<context>TupletNumber #'text = #tuplet-number::calc-fraction-text""", s)
|
2533
|
+
|
2534
|
+
if re.search('tupletNumberFormatFunction', s):
|
2535
|
+
stderr_write("\n")
|
2536
|
+
stderr_write(
|
2537
|
+
"tupletNumberFormatFunction has been removed. Use #'text property on TupletNumber")
|
2538
|
+
stderr_write("\n")
|
2539
|
+
return s
|
2540
|
+
|
2541
|
+
|
2542
|
+
@rule((2, 9, 13), "instrument -> instrumentName, instr -> shortInstrumentName, vocNam -> shortVocalName")
|
2543
|
+
def conv(s):
|
2544
|
+
s = re.sub('vocNam', 'shortVocalName', s)
|
2545
|
+
s = re.sub(r'\.instr\s*=', r'.shortInstrumentName =', s)
|
2546
|
+
s = re.sub(r'\.instrument\s*=', r'.instrumentName =', s)
|
2547
|
+
return s
|
2548
|
+
|
2549
|
+
|
2550
|
+
@rule((2, 9, 16), _("deprecate \\tempo in \\midi"))
|
2551
|
+
def conv(s):
|
2552
|
+
|
2553
|
+
def sub_tempo(m):
|
2554
|
+
dur = int(m.group(1))
|
2555
|
+
dots = len(m.group(2))
|
2556
|
+
count = int(m.group(3))
|
2557
|
+
|
2558
|
+
log2 = 0
|
2559
|
+
while dur > 1:
|
2560
|
+
dur /= 2
|
2561
|
+
log2 += 1
|
2562
|
+
|
2563
|
+
den = (1 << dots) * (1 << log2)
|
2564
|
+
num = ((1 << (dots+1)) - 1)
|
2565
|
+
|
2566
|
+
return r"""
|
2567
|
+
\midi {
|
2568
|
+
\context {
|
2569
|
+
\Score
|
2570
|
+
tempoWholesPerMinute = #(ly:make-moment %d %d)
|
2571
|
+
}
|
2572
|
+
}
|
2573
|
+
|
2574
|
+
""" % (num*count, den)
|
2575
|
+
|
2576
|
+
s = re.sub(
|
2577
|
+
r'\\midi\s*{\s*\\tempo ([0-9]+)\s*([.]*)\s*=\s*([0-9]+)\s*}', sub_tempo, s)
|
2578
|
+
return s
|
2579
|
+
|
2580
|
+
|
2581
|
+
@rule((2, 9, 19), "printfirst-page-number -> print-first-page-number")
|
2582
|
+
def conv(s):
|
2583
|
+
s = re.sub('printfirst-page-number', 'print-first-page-number', s)
|
2584
|
+
return s
|
2585
|
+
|
2586
|
+
|
2587
|
+
@rule((2, 10, 0), _("bump version for release"))
|
2588
|
+
def conv(s):
|
2589
|
+
return s
|
2590
|
+
|
2591
|
+
|
2592
|
+
@rule((2, 11, 2), "ly:clone-parser -> ly:parser-clone")
|
2593
|
+
def conv(s):
|
2594
|
+
return re.sub('ly:clone-parser',
|
2595
|
+
'ly:parser-clone', s)
|
2596
|
+
|
2597
|
+
|
2598
|
+
@rule((2, 11, 3), "no-spacing-rods -> extra-spacing-width")
|
2599
|
+
def conv(s):
|
2600
|
+
s = re.sub(r"no-spacing-rods\s+=\s+##t",
|
2601
|
+
r"extra-spacing-width = #'(+inf.0 . -inf.0)", s)
|
2602
|
+
s = re.sub(r"no-spacing-rods\s+=\s+##f",
|
2603
|
+
r"extra-spacing-width = #'(0 . 0)", s)
|
2604
|
+
return s
|
2605
|
+
|
2606
|
+
|
2607
|
+
@rule((2, 11, 5), _("deprecate cautionary-style. Use AccidentalCautionary properties"))
|
2608
|
+
def conv(s):
|
2609
|
+
s = re.sub(r"Accidental\s*#'cautionary-style\s*=\s*#'smaller",
|
2610
|
+
"AccidentalCautionary #'font-size = #-2", s)
|
2611
|
+
s = re.sub(r"Accidental\s*#'cautionary-style\s*=\s*#'parentheses",
|
2612
|
+
"AccidentalCautionary #'parenthesized = ##t", s)
|
2613
|
+
s = re.sub(r"([A-Za-z]+)\s*#'cautionary-style\s*=\s*#'parentheses",
|
2614
|
+
r"\1 #'parenthesized = ##t", s)
|
2615
|
+
s = re.sub(r"([A-Za-z]+)\s*#'cautionary-style\s*=\s*#'smaller",
|
2616
|
+
r"\1 #'font-size = #-2", s)
|
2617
|
+
return s
|
2618
|
+
|
2619
|
+
|
2620
|
+
@rule((2, 11, 6), _("Rename accidental glyphs, use glyph-name-alist."))
|
2621
|
+
def conv(s):
|
2622
|
+
|
2623
|
+
def sub_acc_name(m):
|
2624
|
+
idx = int(m.group(1).replace('M', '-'))
|
2625
|
+
|
2626
|
+
return ["accidentals.doublesharp",
|
2627
|
+
"accidentals.sharp.slashslash.stemstemstem",
|
2628
|
+
"accidentals.sharp",
|
2629
|
+
"accidentals.sharp.slashslash.stem",
|
2630
|
+
"accidentals.natural",
|
2631
|
+
"accidentals.mirroredflat",
|
2632
|
+
"accidentals.flat",
|
2633
|
+
"accidentals.mirroredflat.flat",
|
2634
|
+
"accidentals.flatflat"][4-idx]
|
2635
|
+
|
2636
|
+
s = re.sub(r"accidentals[.](M?[-0-9]+)",
|
2637
|
+
sub_acc_name, s)
|
2638
|
+
s = re.sub(r"(KeySignature|Accidental[A-Za-z]*)\s*#'style\s*=\s*#'([a-z]+)",
|
2639
|
+
r"\1 #'glyph-name-alist = #alteration-\2-glyph-name-alist", s)
|
2640
|
+
# FIXME: standard vs default, alteration-FOO vs FOO-alteration
|
2641
|
+
s = s.replace('alteration-default-glyph-name-alist',
|
2642
|
+
'standard-alteration-glyph-name-alist')
|
2643
|
+
return s
|
2644
|
+
|
2645
|
+
|
2646
|
+
@rule((2, 11, 10), """allowBeamBreak -> Beam #'breakable = ##t
|
2647
|
+
addquote -> addQuote
|
2648
|
+
""")
|
2649
|
+
def conv(s):
|
2650
|
+
s = re.sub(r'(\\set\s+)?([A-Z][a-zA-Z]+\s*\.\s*)allowBeamBreak',
|
2651
|
+
r"\\override \2Beam #'breakable", s)
|
2652
|
+
s = re.sub(r'(\\set\s+)?allowBeamBreak',
|
2653
|
+
r"\\override Beam #'breakable", s)
|
2654
|
+
s = re.sub(r'addquote', 'addQuote', s)
|
2655
|
+
if re.search("Span_dynamic_performer", s):
|
2656
|
+
stderr_write(
|
2657
|
+
"Span_dynamic_performer has been merged into Dynamic_performer")
|
2658
|
+
|
2659
|
+
return s
|
2660
|
+
|
2661
|
+
|
2662
|
+
@rule((2, 11, 11), "layout-set-staff-size -> layout-set-absolute-staff-size")
|
2663
|
+
def conv(s):
|
2664
|
+
s = re.sub(r'\(layout-set-staff-size \(\*\s*([0-9.]+)\s*(pt|mm|cm)\)\)',
|
2665
|
+
r'(layout-set-absolute-staff-size (* \1 \2))', s)
|
2666
|
+
return s
|
2667
|
+
|
2668
|
+
|
2669
|
+
@rule((2, 11, 13), "#'arrow = ##t -> #'bound-details #'right #'arrow = ##t")
|
2670
|
+
def conv(s):
|
2671
|
+
s = re.sub(r"\\override\s*([a-zA-Z.]+)\s*#'arrow\s*=\s*##t",
|
2672
|
+
r"\\override \1 #'bound-details #'right #'arrow = ##t",
|
2673
|
+
s)
|
2674
|
+
|
2675
|
+
if re.search('edge-text', s):
|
2676
|
+
stderr_write(NOT_SMART % _("edge-text settings for TextSpanner"))
|
2677
|
+
stderr_write(_("Use\n\n%s") %
|
2678
|
+
"\t\\override TextSpanner #'bound-details #'right #'text = <right-text>\n"
|
2679
|
+
"\t\\override TextSpanner #'bound-details #'left #'text = <left-text>\n")
|
2680
|
+
return s
|
2681
|
+
|
2682
|
+
|
2683
|
+
@rule((2, 11, 15), "TextSpanner #'edge-height -> #'bound-details #'right/left #'text = ...\n\
|
2684
|
+
Remove 'forced-distance for fixed spacing between staves in a PianoStaff.")
|
2685
|
+
def conv(s):
|
2686
|
+
def sub_edge_height(m):
|
2687
|
+
s = ''
|
2688
|
+
for (var, h) in [('left', m.group(3)),
|
2689
|
+
('right', m.group(4))]:
|
2690
|
+
|
2691
|
+
if h and float(h):
|
2692
|
+
once = m.group(1)
|
2693
|
+
if not once:
|
2694
|
+
once = ''
|
2695
|
+
context = m.group(2)
|
2696
|
+
if not context:
|
2697
|
+
context = ''
|
2698
|
+
|
2699
|
+
s += (r"%s \override %sTextSpanner #'bound-details #'%s #'text = \markup { \draw-line #'(0 . %s) }"
|
2700
|
+
% (once, context, var, h))
|
2701
|
+
|
2702
|
+
s += '\n'
|
2703
|
+
|
2704
|
+
return s
|
2705
|
+
|
2706
|
+
s = re.sub(
|
2707
|
+
r"(\\once)?\s*\\override\s*([a-zA-Z]+\s*[.]\s*)?TextSpanner\s*#'edge-height\s*=\s*#'\(\s*([0-9.-]+)\s+[.]\s+([0-9.-]+)\s*\)", sub_edge_height, s)
|
2708
|
+
if re.search(r"#'forced-distance", s):
|
2709
|
+
stderr_write(NOT_SMART % "VerticalAlignment #'forced-distance")
|
2710
|
+
stderr_write(_("Use the `alignment-offsets' sub-property of\n"))
|
2711
|
+
stderr_write(_("NonMusicalPaperColumn #'line-break-system-details\n"))
|
2712
|
+
stderr_write(_("to set fixed distances between staves.\n"))
|
2713
|
+
return s
|
2714
|
+
|
2715
|
+
|
2716
|
+
@rule((2, 11, 23), "#'break-align-symbol -> #'break-align-symbols")
|
2717
|
+
def conv(s):
|
2718
|
+
s = re.sub(r"\\override\s*([a-zA-Z.]+)\s*#'break-align-symbol\s*=\s*#'([a-z-]+)",
|
2719
|
+
r"\\override \1 #'break-align-symbols = #'(\2)", s)
|
2720
|
+
return s
|
2721
|
+
|
2722
|
+
|
2723
|
+
@rule((2, 11, 35), """scripts.caesura -> scripts.caesura.curved.
|
2724
|
+
""" + _("Use #'style not #'dash-fraction to select solid/dashed lines."))
|
2725
|
+
def conv(s):
|
2726
|
+
s = re.sub(r"scripts\.caesura",
|
2727
|
+
r"scripts.caesura.curved", s)
|
2728
|
+
|
2729
|
+
if re.search('dash-fraction', s):
|
2730
|
+
stderr_write(NOT_SMART % _("all settings related to dashed lines"))
|
2731
|
+
stderr_write(
|
2732
|
+
_("Use \\override ... #'style = #'line for solid lines and\n"))
|
2733
|
+
stderr_write(
|
2734
|
+
_("\t\\override ... #'style = #'dashed-line for dashed lines."))
|
2735
|
+
return s
|
2736
|
+
|
2737
|
+
|
2738
|
+
@rule((2, 11, 38), """\\setEasyHeads -> \\easyHeadsOn, \\fatText -> \\textLengthOn,
|
2739
|
+
\\emptyText -> \\textLengthOff""")
|
2740
|
+
def conv(s):
|
2741
|
+
s = re.sub(r"setEasyHeads", r"easyHeadsOn", s)
|
2742
|
+
s = re.sub(r"fatText", r"textLengthOn", s)
|
2743
|
+
s = re.sub(r"emptyText", r"textLengthOff", s)
|
2744
|
+
return s
|
2745
|
+
|
2746
|
+
|
2747
|
+
@rule((2, 11, 46), "\\set hairpinToBarline -> \\override Hairpin #'to-barline")
|
2748
|
+
def conv(s):
|
2749
|
+
s = re.sub(r"\\set\s+([a-zA-Z]+)\s*.\s*hairpinToBarline\s*=\s*##([tf]+)",
|
2750
|
+
r"\\override \1.Hairpin #'to-barline = ##\2", s)
|
2751
|
+
s = re.sub(r"\\set\s+hairpinToBarline\s*=\s*##([tf]+)",
|
2752
|
+
r"\\override Hairpin #'to-barline = ##\1", s)
|
2753
|
+
s = re.sub(r"\\unset\s+([a-zA-Z]+)\s*.\s*hairpinToBarline",
|
2754
|
+
r"\\revert \1.Hairpin #'to-barline", s)
|
2755
|
+
s = re.sub(r"\\unset\s+hairpinToBarline",
|
2756
|
+
r"\\revert Hairpin #'to-barline", s)
|
2757
|
+
s = re.sub(r"hairpinToBarline\s*=\s*##([tf]+)",
|
2758
|
+
r"\\override Hairpin #'to-barline = ##\1", s)
|
2759
|
+
s = re.sub(r"\\set (de|)crescendoSpanner = #'dashed-line",
|
2760
|
+
r"\\set \1crescendoSpanner = #'text", s)
|
2761
|
+
return s
|
2762
|
+
|
2763
|
+
|
2764
|
+
@rule((2, 11, 48), "\\compressMusic -> \\scaleDurations")
|
2765
|
+
def conv(s):
|
2766
|
+
s = re.sub(r"compressMusic", r"scaleDurations", s)
|
2767
|
+
return s
|
2768
|
+
|
2769
|
+
|
2770
|
+
@rule((2, 11, 50), _("metronomeMarkFormatter uses text markup as second argument,\n\
|
2771
|
+
fret diagram properties moved to fret-diagram-details."))
|
2772
|
+
def conv(s):
|
2773
|
+
# warning 1/2: metronomeMarkFormatter uses text markup as second argument
|
2774
|
+
if re.search('metronomeMarkFormatter', s):
|
2775
|
+
stderr_write(NOT_SMART % "metronomeMarkFormatter")
|
2776
|
+
stderr_write(
|
2777
|
+
_("metronomeMarkFormatter got an additional text argument.\n"))
|
2778
|
+
stderr_write(_("The function assigned to Score.metronomeMarkFunction now uses the signature\n%s") %
|
2779
|
+
"\t(format-metronome-markup text dur count context)\n")
|
2780
|
+
|
2781
|
+
# warning 2/2: fret diagram properties moved to fret-diagram-details
|
2782
|
+
fret_props = ['barre-type',
|
2783
|
+
'dot-color',
|
2784
|
+
'dot-radius',
|
2785
|
+
'finger-code',
|
2786
|
+
'fret-count',
|
2787
|
+
'label-dir',
|
2788
|
+
'number-type',
|
2789
|
+
'string-count',
|
2790
|
+
'xo-font-magnification',
|
2791
|
+
'mute-string',
|
2792
|
+
'open-string',
|
2793
|
+
'orientation']
|
2794
|
+
for prop in fret_props:
|
2795
|
+
if re.search(prop, s):
|
2796
|
+
stderr_write(NOT_SMART %
|
2797
|
+
(_("%s in fret-diagram properties") % prop))
|
2798
|
+
stderr_write(_('Use %s\n') % "fret-diagram-details")
|
2799
|
+
return s
|
2800
|
+
|
2801
|
+
|
2802
|
+
@rule((2, 11, 51), "\\octave -> \\octaveCheck, \\arpeggioUp -> \\arpeggioArrowUp,\n\
|
2803
|
+
\\arpeggioDown -> \\arpeggioArrowDown, \\arpeggioNeutral -> \\arpeggioNormal,\n\
|
2804
|
+
\\setTextCresc -> \\crescTextCresc, \\setTextDecresc -> \\dimTextDecresc,\n\
|
2805
|
+
\\setTextDecr -> \\dimTextDecr, \\setTextDim -> \\dimTextDim,\n\
|
2806
|
+
\\setHairpinCresc -> \\crescHairpin, \\setHairpinDecresc -> \\dimHairpin,\n\
|
2807
|
+
\\sustainUp -> \\sustainOff, \\sustainDown -> \\sustainOn\n\
|
2808
|
+
\\sostenutoDown -> \\sostenutoOn, \\sostenutoUp -> \\sostenutoOff")
|
2809
|
+
def conv(s):
|
2810
|
+
s = re.sub(r"\\octave(?![a-zA-Z])", r"\\octaveCheck", s)
|
2811
|
+
s = re.sub(r"arpeggioUp", r"arpeggioArrowUp", s)
|
2812
|
+
s = re.sub(r"arpeggioDown", r"arpeggioArrowDown", s)
|
2813
|
+
s = re.sub(r"arpeggioNeutral", r"arpeggioNormal", s)
|
2814
|
+
s = re.sub(r"setTextCresc", r"crescTextCresc", s)
|
2815
|
+
s = re.sub(r"setTextDecresc", r"dimTextDecresc", s)
|
2816
|
+
s = re.sub(r"setTextDecr", r"dimTextDecr", s)
|
2817
|
+
s = re.sub(r"setTextDim", r"dimTextDim", s)
|
2818
|
+
s = re.sub(r"setHairpinCresc", r"crescHairpin", s)
|
2819
|
+
s = re.sub(r"setHairpinDecresc", r"dimHairpin", s)
|
2820
|
+
s = re.sub(r"sustainUp", r"sustainOff", s)
|
2821
|
+
s = re.sub(r"sustainDown", r"sustainOn", s)
|
2822
|
+
s = re.sub(r"sostenutoDown", r"sostenutoOn", s)
|
2823
|
+
s = re.sub(r"sostenutoUp", r"sostenutoOff", s)
|
2824
|
+
return s
|
2825
|
+
|
2826
|
+
|
2827
|
+
@rule((2, 11, 52), "\\setHairpinDim -> \\dimHairpin")
|
2828
|
+
def conv(s):
|
2829
|
+
s = s.replace("setHairpinDim", "dimHairpin")
|
2830
|
+
return s
|
2831
|
+
|
2832
|
+
|
2833
|
+
@rule((2, 11, 53), "infinite-spacing-height -> extra-spacing-height")
|
2834
|
+
def conv(s):
|
2835
|
+
s = re.sub(r"infinite-spacing-height\s+=\s+##t",
|
2836
|
+
r"extra-spacing-height = #'(-inf.0 . +inf.0)", s)
|
2837
|
+
s = re.sub(r"infinite-spacing-height\s+=\s+##f",
|
2838
|
+
r"extra-spacing-height = #'(0 . 0)", s)
|
2839
|
+
return s
|
2840
|
+
|
2841
|
+
|
2842
|
+
@rule((2, 11, 55), "#(set-octavation oct) -> \\ottava #oct,\n\
|
2843
|
+
\\put-adjacent markup axis dir markup -> \\put-adjacent axis dir markup markup")
|
2844
|
+
def conv(s):
|
2845
|
+
s = re.sub(r"#\(set-octavation (-*[0-9]+)\)", r"\\ottava #\1", s)
|
2846
|
+
if re.search('put-adjacent', s):
|
2847
|
+
stderr_write(NOT_SMART % _("\\put-adjacent argument order"))
|
2848
|
+
stderr_write(_("Axis and direction now come before markups:\n"))
|
2849
|
+
stderr_write(_("\\put-adjacent axis dir markup markup."))
|
2850
|
+
stderr_write("\n")
|
2851
|
+
return s
|
2852
|
+
|
2853
|
+
|
2854
|
+
@rule((2, 11, 57), "\\center-align -> \\center-column, \\hcenter -> \\center-align")
|
2855
|
+
def conv(s):
|
2856
|
+
s = re.sub(r"([\\:]+)center-align", r"\1center-column", s)
|
2857
|
+
s = re.sub(r"hcenter(\s+)", r"center-align\1", s)
|
2858
|
+
return s
|
2859
|
+
|
2860
|
+
|
2861
|
+
@rule((2, 11, 60), "printallheaders -> print-all-headers")
|
2862
|
+
def conv(s):
|
2863
|
+
s = re.sub(r"printallheaders", r"print-all-headers", s)
|
2864
|
+
return s
|
2865
|
+
|
2866
|
+
|
2867
|
+
@rule((2, 11, 61), "gregorian-init.ly -> gregorian.ly")
|
2868
|
+
def conv(s):
|
2869
|
+
s = re.sub(r'\\include(\s+)"gregorian-init.ly"',
|
2870
|
+
r'\\include\1"gregorian.ly"', s)
|
2871
|
+
return s
|
2872
|
+
|
2873
|
+
|
2874
|
+
@rule((2, 11, 62), "makam-init.ly -> makam.ly, \\bigger -> \\larger")
|
2875
|
+
def conv(s):
|
2876
|
+
s = re.sub(r'\\include(\s+)"makam-init.ly"',
|
2877
|
+
r'\\include\1"makam.ly"', s)
|
2878
|
+
s = re.sub(r"([\\:])bigger", r"\1larger", s)
|
2879
|
+
return s
|
2880
|
+
|
2881
|
+
|
2882
|
+
@rule((2, 11, 64), "systemSeparatorMarkup -> system-separator-markup,\n\
|
2883
|
+
InnerStaffGroup -> StaffGroup, InnerChoirStaff -> ChoirStaff")
|
2884
|
+
def conv(s):
|
2885
|
+
s = re.sub(r'systemSeparatorMarkup', r'system-separator-markup', s)
|
2886
|
+
if re.search(r'\\InnerStaffGroup', s):
|
2887
|
+
stderr_write(NOT_SMART % _("re-definition of InnerStaffGroup"))
|
2888
|
+
stderr_write(FROM_TO % ("InnerStaffGroup", "StaffGroup"))
|
2889
|
+
stderr_write(UPDATE_MANUALLY)
|
2890
|
+
raise FatalConversionError()
|
2891
|
+
if re.search(r'\\InnerChoirStaff', s):
|
2892
|
+
stderr_write(NOT_SMART % _("re-definition of InnerChoirStaff"))
|
2893
|
+
stderr_write(FROM_TO % ("InnerChoirStaff", "ChoirStaff"))
|
2894
|
+
stderr_write(UPDATE_MANUALLY)
|
2895
|
+
raise FatalConversionError()
|
2896
|
+
|
2897
|
+
s = re.sub('InnerStaffGroup', 'StaffGroup', s)
|
2898
|
+
s = re.sub('InnerChoirStaff', 'ChoirStaff', s)
|
2899
|
+
return s
|
2900
|
+
|
2901
|
+
|
2902
|
+
@rule((2, 12, 0),
|
2903
|
+
_("Syntax changes for \\addChordShape and \\chord-shape") + "\n" +
|
2904
|
+
_("bump version for release"))
|
2905
|
+
def conv(s):
|
2906
|
+
if re.search(r'\\addChordShape', s):
|
2907
|
+
stderr_write(NOT_SMART % "addChordShape")
|
2908
|
+
stderr_write(_("stringTuning must be added to addChordShape call.\n"))
|
2909
|
+
stderr_write(UPDATE_MANUALLY)
|
2910
|
+
raise FatalConversionError()
|
2911
|
+
if re.search(r'\\chord-shape', s):
|
2912
|
+
stderr_write(NOT_SMART % "chord-shape")
|
2913
|
+
stderr_write(_("stringTuning must be added to chord-shape call.\n"))
|
2914
|
+
stderr_write(UPDATE_MANUALLY)
|
2915
|
+
raise FatalConversionError()
|
2916
|
+
return s
|
2917
|
+
|
2918
|
+
|
2919
|
+
@rule((2, 12, 3),
|
2920
|
+
_("Remove oldaddlyrics"))
|
2921
|
+
def conv(s):
|
2922
|
+
if re.search(r'\\oldaddlyrics', s):
|
2923
|
+
stderr_write(NOT_SMART % "oldaddlyrics")
|
2924
|
+
stderr_write(_("oldaddlyrics is no longer supported. \n \
|
2925
|
+
Use addlyrics or lyricsto instead.\n"))
|
2926
|
+
stderr_write(UPDATE_MANUALLY)
|
2927
|
+
raise FatalConversionError()
|
2928
|
+
return s
|
2929
|
+
|
2930
|
+
|
2931
|
+
@rule((2, 13, 0), _("keySignature property not reversed any more\n\
|
2932
|
+
MIDI 47: orchestral strings -> orchestral harp"))
|
2933
|
+
def conv(s):
|
2934
|
+
if re.search(r'\set Staff.keySignature', s):
|
2935
|
+
stderr_write(NOT_SMART % "Staff.keySignature")
|
2936
|
+
stderr_write(_("The alist for Staff.keySignature is no \
|
2937
|
+
longer in reversed order.\n"))
|
2938
|
+
s = s.replace('"orchestral strings"', '"orchestral harp"')
|
2939
|
+
return s
|
2940
|
+
|
2941
|
+
|
2942
|
+
@rule((2, 13, 1),
|
2943
|
+
_("\\bar \".\" now produces a thick barline\n\
|
2944
|
+
ly:hairpin::after-line-breaking -> ly:spanner::kill-zero-spanned-time\n\
|
2945
|
+
Dash parameters for slurs and ties are now in dash-definition"))
|
2946
|
+
def conv(s):
|
2947
|
+
if re.search(r'\\bar\s*"\."', s):
|
2948
|
+
stderr_write(NOT_SMART % "\\bar \".\"")
|
2949
|
+
stderr_write(_("\\bar \".\" now produces a thick barline.\n"))
|
2950
|
+
stderr_write(UPDATE_MANUALLY)
|
2951
|
+
s = re.sub(r'ly:hairpin::after-line-breaking',
|
2952
|
+
r'ly:spanner::kill-zero-spanned-time', s)
|
2953
|
+
if re.search(r"(Slur|Tie)\w+#'dash-fraction", s) \
|
2954
|
+
or re.search(r"(Slur|Tie)\w+#'dash-period", s):
|
2955
|
+
stderr_write(NOT_SMART % "dash-fraction, dash-period")
|
2956
|
+
stderr_write(
|
2957
|
+
_("Dash parameters for slurs and ties are now in \'dash-definition.\n"))
|
2958
|
+
stderr_write(UPDATE_MANUALLY)
|
2959
|
+
return s
|
2960
|
+
|
2961
|
+
|
2962
|
+
@rule((2, 13, 4),
|
2963
|
+
_("Autobeaming rules have changed. override-auto-beam-setting and\n\
|
2964
|
+
revert-auto-beam-setting have been eliminated.\n\
|
2965
|
+
\\overrideBeamSettings has been added.\n\
|
2966
|
+
beatGrouping has been eliminated.\n\
|
2967
|
+
Different settings for vertical layout.\n\
|
2968
|
+
ly:system-start-text::print -> system-start-text::print\n\
|
2969
|
+
Beam #'thickness -> Beam #'beam-thickness\n\
|
2970
|
+
ly:note-head::brew-ez-stencil -> note-head::brew-ez-stencil\n\
|
2971
|
+
ly:ambitus::print -> ambitus::print\n\
|
2972
|
+
Explicit dynamics context definition from `Piano centered dynamics'\n\
|
2973
|
+
template replaced by new `Dynamics' context."))
|
2974
|
+
def conv(s):
|
2975
|
+
if re.search("override-auto-beam-setting", s):
|
2976
|
+
stderr_write(NOT_SMART % "override-auto-beam-setting")
|
2977
|
+
stderr_write(_(" \
|
2978
|
+
Autobeam settings are now overriden with \\overrideBeamSettings.\n"))
|
2979
|
+
stderr_write(UPDATE_MANUALLY)
|
2980
|
+
if re.search("revert-auto-beam-setting", s):
|
2981
|
+
stderr_write(NOT_SMART % "override-auto-beam-setting")
|
2982
|
+
stderr_write(_(" \
|
2983
|
+
Autobeam settings are now reverted with \\revertBeamSettings.\n"))
|
2984
|
+
stderr_write(UPDATE_MANUALLY)
|
2985
|
+
s = re.sub(r"\\set\s+beatGrouping", r"\\setBeatGrouping", s)
|
2986
|
+
if re.search(r"\w+\s*.\s*beatGrouping", s):
|
2987
|
+
stderr_write(NOT_SMART % "beatGrouping")
|
2988
|
+
stderr_write(_(" \
|
2989
|
+
beatGrouping with a specified context must now be accomplished with\n\
|
2990
|
+
\\overrideBeamSettings.\n"))
|
2991
|
+
stderr_write(UPDATE_MANUALLY)
|
2992
|
+
if re.search(r'alignment-offsets', s):
|
2993
|
+
stderr_write(NOT_SMART % "alignment-offsets")
|
2994
|
+
stderr_write(_("alignment-offsets has been changed to alignment-distances: \
|
2995
|
+
you must now specify the distances between staves rather than the offset of staves.\n"))
|
2996
|
+
stderr_write(UPDATE_MANUALLY)
|
2997
|
+
s = re.sub('ly:(system-start-text::print|note-head::brew-ez-stencil|ambitus::print)',
|
2998
|
+
'\\1', s)
|
2999
|
+
s = re.sub('(\\bBeam\\s+#\')(?=thickness\\b)', '\\1beam-', s)
|
3000
|
+
s = re.sub(r'(\\context\s*\{{1}[^\}]+\\type\s+"?Engraver_group"?\s+\\name\s+"*Dynamics"*[^\}]*\}{1})',
|
3001
|
+
'% [Convert-ly] The Dynamics context is now included by default.', s)
|
3002
|
+
return s
|
3003
|
+
|
3004
|
+
|
3005
|
+
@rule((2, 13, 10),
|
3006
|
+
_("Remove obsolete engravers/translators: Note_swallow_translator,\n\
|
3007
|
+
Rest_swallow_translator, Skip_event_swallow_translator, Swallow_engraver,\n\
|
3008
|
+
Swallow_performer and String_number_engraver.\n\
|
3009
|
+
New vertical spacing variables."))
|
3010
|
+
def conv(s):
|
3011
|
+
s = re.sub(r'\\(consists|remove)\s+"*(Swallow_(engraver|performer)|'
|
3012
|
+
'(Note|Rest|Skip_event)_swallow_translator|String_number_engraver)"*',
|
3013
|
+
'', s)
|
3014
|
+
|
3015
|
+
# match through the end of assignments in the form "x = 30", "x = 1 \in", or "x = #3"
|
3016
|
+
s = re.sub(r"(page-top-space)\s*=\s*(([+-]?[.\d]*\s*\\[-\w]+)|(#?\s*[-+]?[.\d]+))",
|
3017
|
+
r"obsolete-\g<0>"
|
3018
|
+
r" top-system-spacing #'space = #(/ obsolete-\1 staff-space)",
|
3019
|
+
s)
|
3020
|
+
s = re.sub(r"(between-system-space)\s*=\s*(([+-]?[.\d]*\s*\\[-\w]+)|(#?\s*[-+]?[.\d]+))",
|
3021
|
+
r"obsolete-\g<0>"
|
3022
|
+
r" between-system-spacing #'space = #(/ obsolete-\1 staff-space)"
|
3023
|
+
r" between-scores-system-spacing #'space = #(/ obsolete-\1 staff-space)",
|
3024
|
+
s)
|
3025
|
+
s = re.sub(r"(between-system-padding)\s*=\s*(([+-]?[.\d]*\s*\\[-\w]+)|(#?\s*[-+]?[.\d]+))",
|
3026
|
+
r"obsolete-\g<0>"
|
3027
|
+
r" between-system-spacing #'padding = #(/ obsolete-\1 staff-space)"
|
3028
|
+
r" between-scores-system-spacing #'padding = #(/ obsolete-\1 staff-space)",
|
3029
|
+
s)
|
3030
|
+
s = re.sub(r"((before|between|after)-title-space)\s*=\s*(([+-]?[.\d]*\s*\\[-\w]+)|(#?\s*[-+]?[.\d]+))",
|
3031
|
+
r"obsolete-\g<0>"
|
3032
|
+
r" \2-title-spacing #'space = #(/ obsolete-\1 staff-space)",
|
3033
|
+
s)
|
3034
|
+
|
3035
|
+
if re.search(r"VerticalAxisGroup\s*#\s*'minimum-Y-extent", s):
|
3036
|
+
stderr_write(NOT_SMART % "minimum-Y-extent")
|
3037
|
+
stderr_write(
|
3038
|
+
_("Vertical spacing no longer depends on the Y-extent of a VerticalAxisGroup.\n"))
|
3039
|
+
stderr_write(UPDATE_MANUALLY)
|
3040
|
+
|
3041
|
+
return s
|
3042
|
+
|
3043
|
+
|
3044
|
+
@rule((2, 13, 16),
|
3045
|
+
_("Unify fetaNumber and fetaDynamic encodings"))
|
3046
|
+
def conv(s):
|
3047
|
+
return re.sub(r'\bfeta(Number|Dynamic)', 'fetaText', s)
|
3048
|
+
|
3049
|
+
|
3050
|
+
@rule((2, 13, 18),
|
3051
|
+
_("\\RemoveEmpty*StaffContext -> \\*Staff \\RemoveEmptyStaves"))
|
3052
|
+
def conv(s):
|
3053
|
+
s = re.sub(r"\\RemoveEmpty(|Drum|Rhythmic|Tab)StaffContext",
|
3054
|
+
r"\\\1Staff \\RemoveEmptyStaves",
|
3055
|
+
s)
|
3056
|
+
s = re.sub(r"\\AncientRemoveEmptyStaffContext",
|
3057
|
+
r"\\VaticanaStaff \\RemoveEmptyStaves",
|
3058
|
+
s)
|
3059
|
+
return s
|
3060
|
+
|
3061
|
+
|
3062
|
+
@rule((2, 13, 20),
|
3063
|
+
_("\\cresc etc. are now postfix operators"))
|
3064
|
+
def conv(s):
|
3065
|
+
s = re.sub(r'\\(cresc|dim|endcresc|enddim)\b', r'\\deprecated\1', s)
|
3066
|
+
return s
|
3067
|
+
|
3068
|
+
|
3069
|
+
@rule((2, 13, 27),
|
3070
|
+
("interval-translate -> coord-translate"))
|
3071
|
+
def conv(s):
|
3072
|
+
s = re.sub('interval-translate', 'coord-translate', s)
|
3073
|
+
return s
|
3074
|
+
|
3075
|
+
|
3076
|
+
@rule((2, 13, 29),
|
3077
|
+
_("Eliminate beamSettings, beatLength, \\setBeatGrouping, \\overrideBeamSettings and \\revertBeamSettings.\n\
|
3078
|
+
\"accordion.accEtcbase\" -> \"accordion.etcbass\""))
|
3079
|
+
def conv(s):
|
3080
|
+
def sub_acc(m):
|
3081
|
+
d = {
|
3082
|
+
'Dot': 'dot',
|
3083
|
+
'Discant': 'discant',
|
3084
|
+
'Bayanbase': 'bayanbass',
|
3085
|
+
'Stdbase': 'stdbass',
|
3086
|
+
'Freebase': 'freebass',
|
3087
|
+
'OldEE': 'oldEE'
|
3088
|
+
}
|
3089
|
+
return '"accordion.%s"' % d[m.group(1)]
|
3090
|
+
|
3091
|
+
s = re.sub(r'"accordion\.acc([a-zA-Z]+)"',
|
3092
|
+
sub_acc, s)
|
3093
|
+
if re.search(r'overrideBeamSettings', s):
|
3094
|
+
stderr_write(NOT_SMART % "\\overrideBeamSettings")
|
3095
|
+
stderr_write(
|
3096
|
+
_("Use \\set beamExceptions or \\overrideTimeSignatureSettings.\n"))
|
3097
|
+
stderr_write(UPDATE_MANUALLY)
|
3098
|
+
if re.search(r'revertBeamSettings', s):
|
3099
|
+
stderr_write(NOT_SMART % "\\revertBeamSettings")
|
3100
|
+
stderr_write(
|
3101
|
+
_("Use \\set beamExceptions or \\revertTimeSignatureSettings.\n"))
|
3102
|
+
stderr_write(UPDATE_MANUALLY)
|
3103
|
+
if re.search(r'beamSettings', s):
|
3104
|
+
stderr_write(NOT_SMART % "beamSettings")
|
3105
|
+
stderr_write(_("Use baseMoment, beatStructure, and beamExceptions.\n"))
|
3106
|
+
stderr_write(UPDATE_MANUALLY)
|
3107
|
+
if re.search(r'beatLength', s):
|
3108
|
+
stderr_write(NOT_SMART % "beatLength")
|
3109
|
+
stderr_write(_("Use baseMoment and beatStructure.\n"))
|
3110
|
+
stderr_write(UPDATE_MANUALLY)
|
3111
|
+
if re.search(r'setBeatGrouping', s):
|
3112
|
+
stderr_write(NOT_SMART % "setbeatGrouping")
|
3113
|
+
stderr_write(_("Use baseMoment and beatStructure.\n"))
|
3114
|
+
stderr_write(UPDATE_MANUALLY)
|
3115
|
+
return s
|
3116
|
+
|
3117
|
+
|
3118
|
+
@rule((2, 13, 31),
|
3119
|
+
_("Woodwind diagrams: Move size, thickness, and graphic from argument list to properties.\n\
|
3120
|
+
Deprecate negative dash-period for hidden lines: use #'style = #'none instead."))
|
3121
|
+
def conv(s):
|
3122
|
+
if re.search(r'woodwind-diagram', s):
|
3123
|
+
stderr_write(NOT_SMART % "woodwind-diagrams")
|
3124
|
+
stderr_write(
|
3125
|
+
_("Move size, thickness, and graphic to properties. Argument should be just the key list.\n"))
|
3126
|
+
stderr_write(UPDATE_MANUALLY)
|
3127
|
+
s = re.sub(r"dash-period\s+=\s*#\s*-[0-9.]+",
|
3128
|
+
r"style = #'none",
|
3129
|
+
s)
|
3130
|
+
return s
|
3131
|
+
|
3132
|
+
|
3133
|
+
@rule((2, 13, 36),
|
3134
|
+
_("Rename vertical spacing variables.\n\
|
3135
|
+
Add fretboard-table argument to savePredefinedFretboard."))
|
3136
|
+
def conv(s):
|
3137
|
+
s = re.sub('after-title-spacing', 'markup-system-spacing', s)
|
3138
|
+
s = re.sub('before-title-spacing', 'score-markup-spacing', s)
|
3139
|
+
s = re.sub('between-scores-system-spacing', 'score-system-spacing', s)
|
3140
|
+
# this rule also converts page-breaking-between-system-spacing:
|
3141
|
+
s = re.sub('between-system-spacing', 'system-system-spacing', s)
|
3142
|
+
s = re.sub('between-title-spacing', 'markup-markup-spacing', s)
|
3143
|
+
s = re.sub('bottom-system-spacing', 'last-bottom-spacing', s)
|
3144
|
+
s = re.sub('top-title-spacing', 'top-markup-spacing', s)
|
3145
|
+
|
3146
|
+
s = re.sub(r"storePredefinedDiagram",
|
3147
|
+
r"storePredefinedDiagram #default-fret-table",
|
3148
|
+
s)
|
3149
|
+
return s
|
3150
|
+
|
3151
|
+
|
3152
|
+
@rule((2, 13, 39),
|
3153
|
+
_("Rename vertical spacing grob properties."))
|
3154
|
+
def conv(s):
|
3155
|
+
# this rule also converts default-next-staff-spacing:
|
3156
|
+
s = re.sub('next-staff-spacing',
|
3157
|
+
'staff-staff-spacing', s)
|
3158
|
+
# this is not a mistake:
|
3159
|
+
# Both 'next- and 'between- become 'staff-staff-spacing.
|
3160
|
+
# There is no conflict since they are in different grobs.
|
3161
|
+
s = re.sub('between-staff-spacing',
|
3162
|
+
'staff-staff-spacing', s)
|
3163
|
+
s = re.sub('after-last-staff-spacing',
|
3164
|
+
'staffgroup-staff-spacing', s)
|
3165
|
+
s = re.sub('inter-staff-spacing',
|
3166
|
+
'nonstaff-relatedstaff-spacing', s)
|
3167
|
+
s = re.sub('non-affinity-spacing',
|
3168
|
+
'nonstaff-unrelatedstaff-spacing', s)
|
3169
|
+
s = re.sub('inter-loose-line-spacing',
|
3170
|
+
'nonstaff-nonstaff-spacing', s)
|
3171
|
+
|
3172
|
+
return s
|
3173
|
+
|
3174
|
+
|
3175
|
+
@rule((2, 13, 40),
|
3176
|
+
_("Remove \\paper variables head-separation and foot-separation."))
|
3177
|
+
def conv(s):
|
3178
|
+
if re.search(r'head-separation', s):
|
3179
|
+
stderr_write(NOT_SMART % "head-separation")
|
3180
|
+
stderr_write(_("Adjust settings for top-system-spacing instead.\n"))
|
3181
|
+
stderr_write(UPDATE_MANUALLY)
|
3182
|
+
if re.search(r'foot-separation', s):
|
3183
|
+
stderr_write(NOT_SMART % "foot-separation")
|
3184
|
+
stderr_write(_("Adjust settings for last-bottom-spacing instead.\n"))
|
3185
|
+
stderr_write(UPDATE_MANUALLY)
|
3186
|
+
|
3187
|
+
return s
|
3188
|
+
|
3189
|
+
|
3190
|
+
@rule((2, 13, 42),
|
3191
|
+
_("Rename space to basic-distance in various spacing alists.\n\
|
3192
|
+
Remove HarmonicParenthesesItem grob."))
|
3193
|
+
def conv(s):
|
3194
|
+
s = re.sub(
|
3195
|
+
r'\(space\s+\.\s+([0-9]*\.?[0-9]*)\)', r'(basic-distance . \1)', s)
|
3196
|
+
s = re.sub(r"#'space\s+=\s+#?([0-9]*\.?[0-9]*)",
|
3197
|
+
r"#'basic-distance = #\1", s)
|
3198
|
+
if re.search(r'HarmonicParenthesesItem', s):
|
3199
|
+
stderr_write(NOT_SMART % "HarmonicParenthesesItem")
|
3200
|
+
stderr_write(_("HarmonicParenthesesItem has been eliminated.\n"))
|
3201
|
+
stderr_write(
|
3202
|
+
_("Harmonic parentheses are part of the TabNoteHead grob.\n"))
|
3203
|
+
stderr_write(UPDATE_MANUALLY)
|
3204
|
+
return s
|
3205
|
+
|
3206
|
+
|
3207
|
+
@rule((2, 13, 44),
|
3208
|
+
_("Remove context from overrideTimeSignatureSettings and revertTimeSignatureSettings.\n"))
|
3209
|
+
def conv(s):
|
3210
|
+
s = re.sub(
|
3211
|
+
r"\\(override|revert)TimeSignatureSettings(\s+[^#]*)(#[^#]*)#", r"\\\1TimeSignatureSettings\2#", s)
|
3212
|
+
return s
|
3213
|
+
|
3214
|
+
|
3215
|
+
@rule((2, 13, 46),
|
3216
|
+
_("Change stringTunings from a list of semitones to a list of pitches.\n"
|
3217
|
+
"Change tenor and baritone ukulele names in string tunings.\n"
|
3218
|
+
"Generate messages for manual conversion of vertical spacing if required."))
|
3219
|
+
def conv(s):
|
3220
|
+
def semitones2pitch(semitones):
|
3221
|
+
steps = [0, 0, 1, 1, 2, 3, 3, 4, 4, 5, 5, 6]
|
3222
|
+
alterations = ["NATURAL", "SHARP", "NATURAL", "SHARP", "NATURAL",
|
3223
|
+
"NATURAL", "SHARP", "NATURAL", "SHARP", "NATURAL", "SHARP", "NATURAL"]
|
3224
|
+
octave = 0
|
3225
|
+
while semitones > 11:
|
3226
|
+
octave += 1
|
3227
|
+
semitones -= 12
|
3228
|
+
while semitones < 0:
|
3229
|
+
octave -= 1
|
3230
|
+
semitones += 12
|
3231
|
+
pitchArgs = "%d %d %s" % (
|
3232
|
+
octave, steps[semitones], alterations[semitones])
|
3233
|
+
return pitchArgs
|
3234
|
+
|
3235
|
+
def convert_tones(semitone_list):
|
3236
|
+
tones = semitone_list.split()
|
3237
|
+
res = ""
|
3238
|
+
for tone in tones:
|
3239
|
+
args = semitones2pitch(int(tone))
|
3240
|
+
res += ",(ly:make-pitch " + args + ") "
|
3241
|
+
return res
|
3242
|
+
|
3243
|
+
def new_tunings(matchobj):
|
3244
|
+
return "stringTunings = #`(" + convert_tones(matchobj.group(1)) + ")"
|
3245
|
+
s = re.sub(r"stringTunings\s*=\s*#'\(([\d\s-]*)\)",
|
3246
|
+
new_tunings, s)
|
3247
|
+
|
3248
|
+
s = re.sub(r"ukulele-(tenor|baritone)-tuning", r"\1-ukulele-tuning", s)
|
3249
|
+
|
3250
|
+
if re.search(r"[^-]page-top-space", s):
|
3251
|
+
stderr_write(NOT_SMART % "page-top-space")
|
3252
|
+
stderr_write(UPDATE_MANUALLY)
|
3253
|
+
if re.search(r"[^-]between-system-(space|padding)", s):
|
3254
|
+
stderr_write(NOT_SMART % "between-system-space, -padding")
|
3255
|
+
stderr_write(UPDATE_MANUALLY)
|
3256
|
+
if re.search(r"[^-](before|between|after)-title-space", s):
|
3257
|
+
stderr_write(NOT_SMART % "before-, between-, after-title-space")
|
3258
|
+
stderr_write(UPDATE_MANUALLY)
|
3259
|
+
if re.search(r"\\name\s", s):
|
3260
|
+
stderr_write(
|
3261
|
+
"\n" + _("Vertical spacing changes might affect user-defined contexts.") + "\n")
|
3262
|
+
stderr_write(UPDATE_MANUALLY)
|
3263
|
+
|
3264
|
+
return s
|
3265
|
+
|
3266
|
+
|
3267
|
+
@rule((2, 13, 48),
|
3268
|
+
_("Replace bar-size with bar-extent."))
|
3269
|
+
def conv(s):
|
3270
|
+
def size_as_extent(matchobj):
|
3271
|
+
half = "%g" % (float(matchobj.group(1)) / 2)
|
3272
|
+
return "bar-extent = #'(-" + half + " . " + half + ")"
|
3273
|
+
|
3274
|
+
s = re.sub(r"bar-size\s*=\s*#([0-9\.]+)", size_as_extent, s)
|
3275
|
+
|
3276
|
+
return s
|
3277
|
+
|
3278
|
+
|
3279
|
+
@rule((2, 13, 51),
|
3280
|
+
_("Woodwind diagrams: Changes to the clarinet diagram."))
|
3281
|
+
def conv(s):
|
3282
|
+
if re.search(r'\\woodwind-diagram\s*#[^#]*clarinet\s', s):
|
3283
|
+
stderr_write(NOT_SMART % "woodwind-diagrams")
|
3284
|
+
stderr_write(
|
3285
|
+
_("Clarinet fingering changed to reflect actual anatomy of instrument.\n"))
|
3286
|
+
stderr_write(UPDATE_MANUALLY)
|
3287
|
+
return s
|
3288
|
+
|
3289
|
+
|
3290
|
+
@rule((2, 14, 0),
|
3291
|
+
_("bump version for release"))
|
3292
|
+
def conv(s):
|
3293
|
+
return s
|
3294
|
+
|
3295
|
+
|
3296
|
+
@rule((2, 15, 7),
|
3297
|
+
_("Handling of non-automatic footnotes."))
|
3298
|
+
def conv(s):
|
3299
|
+
if re.search(r'\\footnote', s):
|
3300
|
+
stderr_write(NOT_SMART % "\\footnote")
|
3301
|
+
stderr_write(
|
3302
|
+
_("If you are using non-automatic footnotes, make sure to set footnote-auto-numbering = ##f in the paper block.\n"))
|
3303
|
+
stderr_write(UPDATE_MANUALLY)
|
3304
|
+
return s
|
3305
|
+
|
3306
|
+
|
3307
|
+
@rule((2, 15, 9),
|
3308
|
+
_("Change in internal property for MultiMeasureRest"))
|
3309
|
+
def conv(s):
|
3310
|
+
if re.search(r'use-breve-rest', s):
|
3311
|
+
stderr_write(NOT_SMART % "use-breve-rest")
|
3312
|
+
stderr_write(
|
3313
|
+
_("This internal property has been replaced by round-up-to-longer-rest, round-up-exceptions and usable-duration-logs.\n"))
|
3314
|
+
stderr_write(UPDATE_MANUALLY)
|
3315
|
+
return s
|
3316
|
+
|
3317
|
+
|
3318
|
+
@rule((2, 15, 10),
|
3319
|
+
_("Creation of a Flag grob and moving of certain Stem properties to this grob"))
|
3320
|
+
def conv(s):
|
3321
|
+
s = re.sub(r"Stem\s+#'flag-style", r"Flag #'style", s)
|
3322
|
+
s = re.sub(r"Stem\s+#'stroke-style", r"Flag #'stroke-style", s)
|
3323
|
+
s = re.sub(r"Stem\s+#'flag", r"Flag #'stencil", s)
|
3324
|
+
s = re.sub(r"(\s+(?:\\once\s*)?)\\override\s+Stem\s+#'transparent\s*=\s*##t",
|
3325
|
+
r"\g<1>\\override Stem #'transparent = ##t\g<1>\\override Flag #'transparent = ##t", s)
|
3326
|
+
s = re.sub(r"(\s+(?:\\once\s*)?)\\revert\s*Stem\s+#'transparent",
|
3327
|
+
r"\g<1>\\revert Stem #'transparent\g<1>\\revert Flag #'transparent", s)
|
3328
|
+
s = re.sub(r"(\s+(?:\\once\s*)?)\\override\s+Stem\s+#'stencil\s*=\s*##f",
|
3329
|
+
r"\g<1>\\override Stem #'stencil = ##f\g<1>\\override Flag #'stencil = ##f", s)
|
3330
|
+
s = re.sub(r"(\s+(?:\\once\s*)?)\\revert\s*Stem\s+#'stencil",
|
3331
|
+
r"\g<1>\\revert Stem #'stencil\g<1>\\revert Flag #'stencil", s)
|
3332
|
+
return s
|
3333
|
+
|
3334
|
+
|
3335
|
+
@rule((2, 15, 16), r"\makeStringTuning, \contextStringTuning -> \stringTuning")
|
3336
|
+
def conv(s):
|
3337
|
+
s = re.sub(r"(\s+)\\contextStringTuning(\s+)#'([-a-zA-Z]+)(\s+<[^<>]+>)",
|
3338
|
+
r"""\g<1>#(define \g<3> #{ \\stringTuning\g<4> #})\g<1>\\set stringTunings = #\g<3>""",
|
3339
|
+
s)
|
3340
|
+
s = re.sub(r"""
|
3341
|
+
\\makeStringTuning(\s+)#'([-a-zA-Z]+)""",
|
3342
|
+
r"""
|
3343
|
+
"\g<2>" = \\stringTuning""", s)
|
3344
|
+
s = re.sub(r"\\makeStringTuning(\s+)#'([-a-zA-Z]+)(\s+<[^<>]+>)",
|
3345
|
+
r"#(define \g<2> #{ \\stringTuning\g<3> #})", s)
|
3346
|
+
return s
|
3347
|
+
|
3348
|
+
|
3349
|
+
@rule((2, 15, 17), "\\markuplines -> \\markuplist\n\
|
3350
|
+
Change Beam broken slope syntax.")
|
3351
|
+
def conv(s):
|
3352
|
+
s = re.sub(r"""
|
3353
|
+
\\markuplines( +)([^ ].*)
|
3354
|
+
\1([^ ])""", r"""
|
3355
|
+
\\markuplist\g<1>\g<2>
|
3356
|
+
\g<1>\g<3>""", s)
|
3357
|
+
s = re.sub(r"\\markuplines", r"\\markuplist", s)
|
3358
|
+
s = re.sub(r"@funindex markuplines", r"@funindex markuplist", s)
|
3359
|
+
if re.search(r'consistent-broken-slope', s):
|
3360
|
+
stderr_write(NOT_SMART % "consistent-broken-slope")
|
3361
|
+
stderr_write(
|
3362
|
+
_("consistent-broken-slope is now handled through the positions callback.\n"))
|
3363
|
+
stderr_write(
|
3364
|
+
_("input/regression/beam-broken-classic.ly shows how broken beams are now handled.\n"))
|
3365
|
+
stderr_write(UPDATE_MANUALLY)
|
3366
|
+
return s
|
3367
|
+
|
3368
|
+
|
3369
|
+
def paren_matcher(n):
|
3370
|
+
# poor man's matched paren scanning, gives up
|
3371
|
+
# after n+1 levels. Matches any string with balanced
|
3372
|
+
# parens inside; add the outer parens yourself if needed.
|
3373
|
+
# Nongreedy.
|
3374
|
+
return r"[^()]*?(?:\("*n+r"[^()]*?"+r"\)[^()]*?)*?"*n
|
3375
|
+
|
3376
|
+
|
3377
|
+
def undollar_scm(m):
|
3378
|
+
return re.sub(r"\$(.?)", r"\1", m.group(0))
|
3379
|
+
|
3380
|
+
|
3381
|
+
def undollar_embedded(m):
|
3382
|
+
s = re.sub(r"#\$", "#", m.group(1))
|
3383
|
+
# poor man's matched paren scanning after #, gives up
|
3384
|
+
# after 25 levels.
|
3385
|
+
s = re.sub(r"#`?\("+paren_matcher(25)+r"\)", undollar_scm, s)
|
3386
|
+
return m.string[m.start(0):m.start(1)] + s + m.string[m.end(1):m.end(0)]
|
3387
|
+
|
3388
|
+
|
3389
|
+
def strip_export(s):
|
3390
|
+
return re.sub(r"\(ly:export\s+(" + paren_matcher(25) + r")\)",
|
3391
|
+
r"\1", s)
|
3392
|
+
|
3393
|
+
|
3394
|
+
def export_puller(m):
|
3395
|
+
if not re.search(r"ly:export\s+", m.group(0)):
|
3396
|
+
return m.group(0)
|
3397
|
+
return "$" + strip_export(m.string[m.start(0)+1:m.end(0)])
|
3398
|
+
|
3399
|
+
|
3400
|
+
def ugly_function_rewriter(m):
|
3401
|
+
return m.string[m.start(0):m.start(1)] + strip_export(m.group(1)) + m.string[m.end(1):m.end(0)]
|
3402
|
+
|
3403
|
+
|
3404
|
+
should_really_be_music_function = "(?:\
|
3405
|
+
set-time-signature|empty-music|add-grace-property|\
|
3406
|
+
remove-grace-property|set-accidental-style)"
|
3407
|
+
|
3408
|
+
|
3409
|
+
def record_ugly(m):
|
3410
|
+
global should_really_be_music_function
|
3411
|
+
if not re.match(should_really_be_music_function, m.group(1)) \
|
3412
|
+
and re.search(r"ly:export\s+", m.group(2)):
|
3413
|
+
should_really_be_music_function = \
|
3414
|
+
should_really_be_music_function[:-1] + "|" + m.group(1) + ")"
|
3415
|
+
return m.group(0)
|
3416
|
+
|
3417
|
+
|
3418
|
+
@rule((2, 15, 18), "#$ -> #, ly:export -> $")
|
3419
|
+
def conv(s):
|
3420
|
+
s = re.sub(r"(?s)#@?\{(.*?)#@?\}", undollar_embedded, s)
|
3421
|
+
s = re.sub(r"#\(define(?:-public)?\s+\(([-a-zA-Z]+)"
|
3422
|
+
+ r"\b[^()]*?\)(" + paren_matcher(25)
|
3423
|
+
+ r")\)", record_ugly, s)
|
3424
|
+
s = re.sub(r"\(define(?:-public)?\s+\(" + should_really_be_music_function
|
3425
|
+
+ r"\b[^()]*\)(" + paren_matcher(25)
|
3426
|
+
+ r")\)", ugly_function_rewriter, s)
|
3427
|
+
s = re.sub(r"#(?=\(" + should_really_be_music_function + ")", "$", s)
|
3428
|
+
s = re.sub(r"#\(markup\*(?=\s)", r"$(markup", s)
|
3429
|
+
s = re.sub(r"#\("+paren_matcher(25)+r"\)", export_puller, s)
|
3430
|
+
if re.search(r"\(ly:export\s+", s):
|
3431
|
+
stderr_write(NOT_SMART % "ly:export")
|
3432
|
+
return s
|
3433
|
+
|
3434
|
+
|
3435
|
+
@rule((2, 15, 19), r"$(set-time-signature ...) -> \time")
|
3436
|
+
def conv(s):
|
3437
|
+
s = re.sub(r"\$\(set-time-signature\s+([0-9]+)\s+([0-9]+)\s*\)",
|
3438
|
+
r"\\time \1/\2", s)
|
3439
|
+
s = re.sub(r"\$\(set-time-signature\s+([0-9]+)\s+([0-9]+)\s+(" +
|
3440
|
+
paren_matcher(5) + r")\)", r"\\time #\3 \1/\2", s)
|
3441
|
+
if re.search(r"\(set-time-signature\s+", s):
|
3442
|
+
stderr_write(NOT_SMART % "set-time-signature")
|
3443
|
+
return s
|
3444
|
+
|
3445
|
+
|
3446
|
+
@rule((2, 15, 20), r"$(set-accidental-style ...) -> \accidentalStyle")
|
3447
|
+
def conv(s):
|
3448
|
+
s = re.sub(r"\$\(set-accidental-style\s+'([-a-z]+)\)",
|
3449
|
+
r'\\accidentalStyle "\1"', s)
|
3450
|
+
s = re.sub(r"\$\(set-accidental-style\s+'([-a-z]+)\s+'([-A-Za-z]+)\s*\)",
|
3451
|
+
r'''\\accidentalStyle #'\2 "\1"''', s)
|
3452
|
+
s = re.sub(r"(@funindex\s+)set-accidental-style",
|
3453
|
+
r"\1\\accidentalStyle", s)
|
3454
|
+
return s
|
3455
|
+
|
3456
|
+
|
3457
|
+
def brace_matcher(n):
|
3458
|
+
# poor man's matched brace scanning, gives up
|
3459
|
+
# after n+1 levels. Matches any string with balanced
|
3460
|
+
# braces inside; add the outer braces yourself if needed.
|
3461
|
+
# Nongreedy.
|
3462
|
+
return r"[^{}]*?(?:{"*n+r"[^{}]*?"+r"}[^{}]*?)*?"*n
|
3463
|
+
|
3464
|
+
|
3465
|
+
matchstring = r'"(?:[^"\\]|\\.)*"'
|
3466
|
+
matcharg = (r"\s+(?:[$#]['`]?\s*(?:[a-zA-Z][^ \t\n()\\]*|" + matchstring
|
3467
|
+
+ r"|#?\(" + paren_matcher(20) + r"\)|"
|
3468
|
+
+ r"-?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)|"
|
3469
|
+
+ r"#(?:[tf]|\\.|@?\{" + brace_matcher(10) + r"#@?\}))|"
|
3470
|
+
+ matchstring + r"|\\[a-z_A-Z]+|[0-9]+(?:/[0-9]+)?|-[0-9]+)")
|
3471
|
+
matchfullmarkup = (r'\\markup\s*(?:@?\{' + brace_matcher(20) + r'\}|' +
|
3472
|
+
matchstring + r'|(?:\\[a-z_A-Z][a-z_A-Z-]*(?:' + matcharg +
|
3473
|
+
r')*?\s*)*(?:' + matchstring + r"|@?\{" + brace_matcher(20) +
|
3474
|
+
r"\}))")
|
3475
|
+
matchmarkup = "(?:" + matchstring + "|" + matchfullmarkup + ")"
|
3476
|
+
|
3477
|
+
|
3478
|
+
@rule((2, 15, 25), r"\(auto)?Footnote(Grob)? -> \footnote")
|
3479
|
+
def conv(s):
|
3480
|
+
# The following replacement includes the final markup argument in
|
3481
|
+
# the match in order to better avoid touching the equally named
|
3482
|
+
# markup function. The other functions have unique names, so
|
3483
|
+
# there is no point in including their last, possibly complex
|
3484
|
+
# argument in the match.
|
3485
|
+
s = re.sub(r"\\footnote(" + matcharg + (r")(\s*" + matchmarkup)*2 + ")",
|
3486
|
+
r"\\footnote\2\1\3", s)
|
3487
|
+
s = re.sub(r"\\footnoteGrob"+("(" + matcharg + ")")*2 + r"(\s*" + matchmarkup + ")",
|
3488
|
+
r"\\footnote\3\2\1", s)
|
3489
|
+
s = re.sub(r"\\autoFootnoteGrob" + ("(" + matcharg + ")")*2,
|
3490
|
+
r"\\footnote\2\1", s)
|
3491
|
+
s = re.sub(r"\\autoFootnote",
|
3492
|
+
r"\\footnote", s)
|
3493
|
+
return s
|
3494
|
+
|
3495
|
+
|
3496
|
+
@rule((2, 15, 32), r"tempoWholesPerMinute -> \tempo")
|
3497
|
+
def conv(s):
|
3498
|
+
def sub_tempo(m):
|
3499
|
+
num = int(m.group(1))
|
3500
|
+
den = int(m.group(2))
|
3501
|
+
|
3502
|
+
if (den & (den - 1)) != 0:
|
3503
|
+
return m.group(0)
|
3504
|
+
|
3505
|
+
# Don't try dotted forms if they result in less than 30 bpm.
|
3506
|
+
# It is not actually relevant to get this right since this
|
3507
|
+
# only occurs in non-printing situations
|
3508
|
+
if den >= 16 and (num % 7) == 0 and num >= 210:
|
3509
|
+
return r"\tempo %d.. = %d" % (den/4, num/7)
|
3510
|
+
|
3511
|
+
if den >= 8 and (num % 3) == 0 and num >= 90:
|
3512
|
+
return r"\tempo %d. = %d" % (den/2, num/3)
|
3513
|
+
|
3514
|
+
return r"\tempo %d = %d" % (den, num)
|
3515
|
+
|
3516
|
+
s = re.sub(r"\\context\s*@?\{\s*\\Score\s+tempoWholesPerMinute\s*=\s*" +
|
3517
|
+
r"#\(ly:make-moment\s+([0-9]+)\s+([0-9]+)\)\s*@?\}",
|
3518
|
+
sub_tempo, s)
|
3519
|
+
return s
|
3520
|
+
|
3521
|
+
|
3522
|
+
@rule((2, 15, 39), r"\footnote ... -> \footnote ... \default")
|
3523
|
+
def conv(s):
|
3524
|
+
def not_first(s):
|
3525
|
+
def match_fun(m):
|
3526
|
+
if m.group(1):
|
3527
|
+
return m.group(0)
|
3528
|
+
return m.expand(s)
|
3529
|
+
return match_fun
|
3530
|
+
s = re.sub("(" + matchfullmarkup + ")|"
|
3531
|
+
+ r"(\\footnote(?:\s*"
|
3532
|
+
+ matchmarkup + ")?" + matcharg + "(?:" + matcharg
|
3533
|
+
+ r")?\s+" + matchmarkup + ")",
|
3534
|
+
not_first(r"\2 \\default"), s)
|
3535
|
+
return s
|
3536
|
+
|
3537
|
+
|
3538
|
+
@rule((2, 15, 40), r"Remove beamWholeMeasure")
|
3539
|
+
def conv(s):
|
3540
|
+
if re.search(r"\bbeamWholeMeasure\b", s):
|
3541
|
+
stderr_write(NOT_SMART % "beamWholeMeasure")
|
3542
|
+
stderr_write(
|
3543
|
+
_("beamExceptions controls whole-measure beaming.") + "\n")
|
3544
|
+
return s
|
3545
|
+
|
3546
|
+
|
3547
|
+
@rule((2, 15, 42), r"\set stringTuning -> \set Staff.stringTuning")
|
3548
|
+
def conv(s):
|
3549
|
+
s = re.sub(r"(\\set\s+)stringTuning", r"\1Staff.stringTuning", s)
|
3550
|
+
return s
|
3551
|
+
|
3552
|
+
|
3553
|
+
wordsyntax = r"[a-zA-Z\200-\377]+(?:[-_][a-zA-Z\200-\377]+)*"
|
3554
|
+
|
3555
|
+
|
3556
|
+
@rule((2, 15, 43), r'"custom-tuning" = -> custom-tuning =')
|
3557
|
+
def conv(s):
|
3558
|
+
s = re.sub(
|
3559
|
+
'\n"(' + wordsyntax + r')"(\s*=\s*\\stringTuning)', "\n\\1\\2", s)
|
3560
|
+
return s
|
3561
|
+
|
3562
|
+
|
3563
|
+
@rule((2, 16, 0),
|
3564
|
+
_("bump version for release"))
|
3565
|
+
def conv(s):
|
3566
|
+
return s
|
3567
|
+
|
3568
|
+
|
3569
|
+
@rule((2, 17, 0), r"blank-*-force -> blank-*-penalty")
|
3570
|
+
def conv(s):
|
3571
|
+
s = re.sub('blank-page-force', 'blank-page-penalty', s)
|
3572
|
+
s = re.sub('blank-last-page-force', 'blank-last-page-penalty', s)
|
3573
|
+
s = re.sub('blank-after-score-page-force',
|
3574
|
+
'blank-after-score-page-penalty', s)
|
3575
|
+
return s
|
3576
|
+
|
3577
|
+
|
3578
|
+
@rule((2, 17, 4), r"\shape Grob #offsets -> \shape #offsets Grob")
|
3579
|
+
def conv(s):
|
3580
|
+
s = re.sub(r"\\shape(\s+(?:[a-zA-Z]+|" + matchstring + "))(" +
|
3581
|
+
matcharg + ")", r"\\shape\2\1", s)
|
3582
|
+
return s
|
3583
|
+
|
3584
|
+
|
3585
|
+
barstring = r"(\\bar|whichBar|defaultBarType|segnoType|doubleRepeatType|startRepeatType|endRepeatType|doubleRepeatSegnoType|startRepeatSegnoType|endRepeatSegnoType)(\s*[=]?\s*[#]?)"
|
3586
|
+
|
3587
|
+
|
3588
|
+
@rule((2, 17, 5), r"New bar line interface")
|
3589
|
+
def conv(s):
|
3590
|
+
s = re.sub(barstring + r'"\|:"', '\\1\\2".|:"', s)
|
3591
|
+
s = re.sub(barstring + r'":\|"', '\\1\\2":|."', s)
|
3592
|
+
s = re.sub(barstring + r'"\|\|:"', '\\1\\2".|:-||"', s)
|
3593
|
+
s = re.sub(barstring + r'":\|:"', '\\1\\2":..:"', s)
|
3594
|
+
s = re.sub(barstring + r'"\.\|\."', '\\1\\2".."', s)
|
3595
|
+
s = re.sub(barstring + r'"\|S"', '\\1\\2"S-|"', s)
|
3596
|
+
s = re.sub(barstring + r'"S\|"', '\\1\\2"S-S"', s)
|
3597
|
+
s = re.sub(barstring + r'":\|S"', '\\1\\2":|.S"', s)
|
3598
|
+
s = re.sub(barstring + r'":\|S\."', '\\1\\2":|.S-S"', s)
|
3599
|
+
s = re.sub(barstring + r'"S\|:"', '\\1\\2"S.|:-S"', s)
|
3600
|
+
s = re.sub(barstring + r'"\.S\|:"', '\\1\\2"S.|:"', s)
|
3601
|
+
s = re.sub(barstring + r'":\|S\|:"', '\\1\\2":|.S.|:"', s)
|
3602
|
+
s = re.sub(barstring + r'":\|S\.\|:"', '\\1\\2":|.S.|:-S"', s)
|
3603
|
+
s = re.sub(barstring + r'":"', '\\1\\2";"', s)
|
3604
|
+
s = re.sub(barstring + r'"\|s"', '\\1\\2"|-s"', s)
|
3605
|
+
s = re.sub(barstring + r'"dashed"', '\\1\\2"!"', s)
|
3606
|
+
s = re.sub(barstring + r'"kievan"', '\\1\\2"k"', s)
|
3607
|
+
s = re.sub(barstring + r'"empty"', '\\1\\2"-"', s)
|
3608
|
+
return s
|
3609
|
+
|
3610
|
+
|
3611
|
+
symbol_list = (r"#'(?:" + wordsyntax + r"|\(\s*" + wordsyntax
|
3612
|
+
+ r"(?:\s+" + wordsyntax + r")*\s*\))")
|
3613
|
+
|
3614
|
+
grob_path = symbol_list + r"(?:\s+" + symbol_list + r")*"
|
3615
|
+
|
3616
|
+
grob_spec = wordsyntax + r"(?:\s*\.\s*" + wordsyntax + r")?"
|
3617
|
+
|
3618
|
+
def path_replace(m):
|
3619
|
+
return m.group(1) + ".".join(re.findall(wordsyntax, m.group(2)))
|
3620
|
+
|
3621
|
+
def convert_overrides_to_dots(s):
|
3622
|
+
return re.sub(r"(\\(?:override|revert)\s+)(" + grob_spec + r"\s+" + grob_path + ")",
|
3623
|
+
path_replace, s)
|
3624
|
+
|
3625
|
+
# The following regexp appears to be unusually expensive to compile,
|
3626
|
+
# so we do it only once instead of for every file
|
3627
|
+
footnotec = re.compile("(" + matchfullmarkup + ")|"
|
3628
|
+
+ r"(\\footnote(?:\s*"
|
3629
|
+
+ matchmarkup + ")?" + matcharg + ")(" + matcharg
|
3630
|
+
+ r")?(\s+" + matchmarkup + r")(\s+\\default)?")
|
3631
|
+
|
3632
|
+
@rule((2, 17, 6), r"""\accidentalStyle #'Context "style" -> \accidentalStyle Context.style
|
3633
|
+
\alterBroken "Context.grob" -> \alterBroken Context.grob
|
3634
|
+
\overrideProperty "Context.grob" -> \overrideProperty Context.grob
|
3635
|
+
\tweak Grob #'symbol -> \tweak Grob.symbol""")
|
3636
|
+
def conv(s):
|
3637
|
+
def patrep(m):
|
3638
|
+
def fn_path_replace(m):
|
3639
|
+
x = ".".join(re.findall(wordsyntax, m.group(2)))
|
3640
|
+
if x in ["TimeSignature", "KeySignature", "BarLine",
|
3641
|
+
"Clef", "StaffSymbol", "OttavaBracket",
|
3642
|
+
"LedgerLineSpanner"]:
|
3643
|
+
x = "Staff." + x
|
3644
|
+
return m.group(1) + x
|
3645
|
+
if m.group(1):
|
3646
|
+
return m.group(0)
|
3647
|
+
x = m.group(2) + m.group(4)
|
3648
|
+
|
3649
|
+
if m.group(3):
|
3650
|
+
x = x + re.sub(r"(\s*)(" + symbol_list + ")", fn_path_replace,
|
3651
|
+
m.group(3))
|
3652
|
+
|
3653
|
+
if not m.group(5):
|
3654
|
+
x = r"\single" + x
|
3655
|
+
return x
|
3656
|
+
|
3657
|
+
s = re.sub(r'''(\\accidentalStyle\s+)#?"([-A-Za-z]+)"''',
|
3658
|
+
r"\1\2", s)
|
3659
|
+
s = re.sub(r'''(\\accidentalStyle\s+)#'([A-Za-z]+)\s+#?"?([-A-Za-z]+)"?''',
|
3660
|
+
r"\1\2.\3", s)
|
3661
|
+
s = re.sub(r'''(\\(?:alterBroken|overrideProperty)\s+)#?"([A-Za-z]+)\s*\.\s*([A-Za-z]+)"''',
|
3662
|
+
r"\1\2.\3", s)
|
3663
|
+
s = re.sub(r'''(\\tweak\s+)#?"?([A-W][A-Za-z]*)"?\s+?#'([a-zX-Z][-A-Za-z]*)''',
|
3664
|
+
r"\1\2.\3", s)
|
3665
|
+
s = re.sub(r'''(\\tweak\s+)#'([a-zX-Z][-A-Za-z]*)''',
|
3666
|
+
r"\1\2", s)
|
3667
|
+
s = footnotec.sub(patrep, s)
|
3668
|
+
s = re.sub(r'''(\\alterBroken)(\s+[A-Za-z.]+)(''' + matcharg
|
3669
|
+
+ matcharg + ")", r"\1\3\2", s)
|
3670
|
+
s = re.sub(r"(\\overrideProperty\s+)(" + grob_spec + r"\s+" + grob_path + ")",
|
3671
|
+
path_replace, s)
|
3672
|
+
s = convert_overrides_to_dots(s)
|
3673
|
+
return s
|
3674
|
+
|
3675
|
+
|
3676
|
+
@rule((2, 17, 11), r"""\times -> \tuplet, \set tupletSpannerDuration -> \tupletSpan
|
3677
|
+
(ly:make-moment 1 4) -> (ly:make-moment 1/4)
|
3678
|
+
(ly:make-duration 0 0 1 2) -> (ly:make-duration 0 0 1/2)""")
|
3679
|
+
def conv(s):
|
3680
|
+
def sub_dur(m):
|
3681
|
+
num = int(m.group(1))
|
3682
|
+
den = int(m.group(2))
|
3683
|
+
|
3684
|
+
# if den is no power of 2, don't even try to use an unscaled duration
|
3685
|
+
if (den & (den - 1)) != 0:
|
3686
|
+
return r"\tupletSpan 1*%d/%d" % (num, den)
|
3687
|
+
|
3688
|
+
if den >= 4 and num == 7:
|
3689
|
+
return r"\tupletSpan %d.." % (den/4)
|
3690
|
+
|
3691
|
+
if den >= 2 and num == 3:
|
3692
|
+
return r"\tupletSpan %d." % (den/2)
|
3693
|
+
|
3694
|
+
if num == 1:
|
3695
|
+
return r"\tupletSpan %d" % den
|
3696
|
+
|
3697
|
+
return r"\tupletSpan 1*%d/%d" % (num, den)
|
3698
|
+
|
3699
|
+
s = re.sub(r"\\set\s+tupletSpannerDuration\s*=\s*" +
|
3700
|
+
r"#\(ly:make-moment\s+([0-9]+)\s+([0-9]+)\s*\)",
|
3701
|
+
sub_dur, s)
|
3702
|
+
s = re.sub(r"\\unset tupletSpannerDuration",
|
3703
|
+
r"\\tupletSpan \\default", s)
|
3704
|
+
s = re.sub(r"\\times(\s*)([0-9]+)/([0-9]+)",
|
3705
|
+
r"\\tuplet\1\3/\2", s)
|
3706
|
+
|
3707
|
+
s = re.sub(r"(\(ly:make-moment\s+-?[0-9]+)\s+([1-9][0-9]*\))",
|
3708
|
+
r"\1/\2", s)
|
3709
|
+
s = re.sub(r"(\(ly:make-moment\s+-?[0-9]+)\s+([0-9]+\s+-?[0-9]+)\s([0-9]+\))",
|
3710
|
+
r"\1/\2/\3", s)
|
3711
|
+
s = re.sub(r"(\(ly:make-duration\s+-?[0-9]+\s+[0-9]+\s+[0-9]+)\s+([0-9]+\))",
|
3712
|
+
r"\1/\2", s)
|
3713
|
+
return s
|
3714
|
+
|
3715
|
+
|
3716
|
+
@rule((2, 17, 14), r"\accepts ... -> \accepts ... \defaultchild ...")
|
3717
|
+
def conv(s):
|
3718
|
+
def matchaccepts(m):
|
3719
|
+
# First weed out definitions starting from an existing
|
3720
|
+
# definition: we assume that the inherited \defaultchild is
|
3721
|
+
# good enough for our purposes. Heuristic: starts with a
|
3722
|
+
# backslash and an uppercase letter.
|
3723
|
+
if re.match(r"\s*\\[A-Z]", m.group(1)):
|
3724
|
+
return m.group(0)
|
3725
|
+
# existing defaultchild obviously trumps all
|
3726
|
+
if re.search(r"\\defaultchild[^-_a-zA-Z]", m.group(1)):
|
3727
|
+
return m.group(0)
|
3728
|
+
# take the first \\accepts if any and replicate it
|
3729
|
+
return re.sub("(\r?\n[ \t]*|[ \t]+)"
|
3730
|
+
+ r"""\\accepts(\s+(?:#?".*?"|[-_a-zA-Z]+))""",
|
3731
|
+
r"\g<0>\1\\defaultchild\2",
|
3732
|
+
m.group(0), 1)
|
3733
|
+
|
3734
|
+
s = re.sub(r"\\context\s*@?\{(" + brace_matcher(20) + r")\}",
|
3735
|
+
matchaccepts, s)
|
3736
|
+
return s
|
3737
|
+
|
3738
|
+
|
3739
|
+
@rule((2, 17, 15), r"""#(ly:set-option 'old-relative)
|
3740
|
+
\relative -> \relative c'""")
|
3741
|
+
def conv(s):
|
3742
|
+
if re.search(r"[#$]\(ly:set-option\s+'old-relative", s):
|
3743
|
+
stderr_write(NOT_SMART % "#(ly:set-option 'old-relative)")
|
3744
|
+
stderr_write(UPDATE_MANUALLY)
|
3745
|
+
raise FatalConversionError()
|
3746
|
+
# If the file contains a language switch to a language where the
|
3747
|
+
# name of c is not "c", we can't reliably know which parts of the
|
3748
|
+
# file will need "c" and which need "do".
|
3749
|
+
m = re.search(
|
3750
|
+
r'\\language\s(?!\s*#?"(?:nederlands|deutsch|english|norsk|suomi|svenska))"', s)
|
3751
|
+
if m:
|
3752
|
+
# Heuristic: if there is a non-commented { before the language
|
3753
|
+
# selection, we can't be sure.
|
3754
|
+
# Also if there is any selection of a non-do language.
|
3755
|
+
if (re.search("^[^%\n]*\\{", m.string[:m.start()], re.M)
|
3756
|
+
or re.search(r'\\language\s(?!\s*#?"(?:catalan|espanol|español|italiano|français|portugues|vlaams))"', s)):
|
3757
|
+
do = "$(ly:make-pitch 0 0)"
|
3758
|
+
else:
|
3759
|
+
do = "do'"
|
3760
|
+
else:
|
3761
|
+
do = "c'"
|
3762
|
+
s = re.sub(r"(\\relative)(\s+(\{|[\\<]))",
|
3763
|
+
r"\1 " + do + r"\2", s)
|
3764
|
+
return s
|
3765
|
+
|
3766
|
+
|
3767
|
+
@rule((2, 17, 18),
|
3768
|
+
"Rename OctavateEight to ClefModifier, rename related properties.")
|
3769
|
+
def conv(s):
|
3770
|
+
s = re.sub('OctavateEight',
|
3771
|
+
'ClefModifier', s)
|
3772
|
+
s = re.sub('octavate-eight-interface',
|
3773
|
+
'clef-modifier-interface', s)
|
3774
|
+
s = re.sub('clefOctavation',
|
3775
|
+
'clefTransposition', s)
|
3776
|
+
s = re.sub('clefOctavationFormatter',
|
3777
|
+
'clefTranspositionFormatter', s)
|
3778
|
+
s = re.sub('clefOctavationStyle',
|
3779
|
+
'clefTranspositionStyle', s)
|
3780
|
+
s = re.sub('cueClefOctavation',
|
3781
|
+
'cueClefTransposition', s)
|
3782
|
+
s = re.sub('cueClefOctavationFormatter',
|
3783
|
+
'cueClefTranspositionFormatter', s)
|
3784
|
+
s = re.sub('cueClefOctavationStyle',
|
3785
|
+
'cueClefTranspositionStyle', s)
|
3786
|
+
return s
|
3787
|
+
|
3788
|
+
|
3789
|
+
@rule((2, 17, 19), r"\column { \vspace #2 } -> \column { \combine \null \vspace #2 }")
|
3790
|
+
def conv(s):
|
3791
|
+
def vspace_replace(m):
|
3792
|
+
|
3793
|
+
# vspace now always adds space and does not, for example, change the
|
3794
|
+
# impact of either baselineskip or descenders on the line above.
|
3795
|
+
#
|
3796
|
+
# We can't simulate the old behavior in a simpler manner. A command
|
3797
|
+
# of its own is not really warranted since this behavior combines
|
3798
|
+
# badly enough with other spacing considerations (like baselineskip
|
3799
|
+
# and descenders) as to make it not all that useful. So this
|
3800
|
+
# conversion rule is here more for compatibility's sake rather than
|
3801
|
+
# preserving desirable behavior.
|
3802
|
+
|
3803
|
+
s = re.sub(r"(\\\\?)vspace(\s)",
|
3804
|
+
r"\1combine \1null \1vspace\2", m.group(0))
|
3805
|
+
return s
|
3806
|
+
|
3807
|
+
s = re.sub(r"\\(?:left-|right-|center-|)column\s*\{" + brace_matcher(20) + r"\}",
|
3808
|
+
vspace_replace, s)
|
3809
|
+
return s
|
3810
|
+
|
3811
|
+
|
3812
|
+
@rule((2, 17, 20), _(r"Flag.transparent and Flag.color inherit from Stem"))
|
3813
|
+
def conv(s):
|
3814
|
+
s = re.sub(r"(((?:\\once\s*)?)\\override\s+((?:\w+\.)?)Stem\.(transparent|color)\s*=\s*(#\S+))\s+\2\\override\s+\3Flag\.\4\s*=\s*\5",
|
3815
|
+
r"\1", s)
|
3816
|
+
s = re.sub(r"(((?:\\once\s*)?)\\revert\s+((?:\w+\.)?)Stem\.(transparent|color))\s+\2\\revert\s+\3Flag\.\4",
|
3817
|
+
r"\1", s)
|
3818
|
+
s = re.sub(r"(\\tweak\s+((?:\w+\.)?)Stem\.(transparent|color)\s+(#\S+))\s+\\tweak\s+\2Flag\.\3\s+\4",
|
3819
|
+
r"\1", s)
|
3820
|
+
return s
|
3821
|
+
|
3822
|
+
|
3823
|
+
@rule((2, 17, 25), r'''\tempo 4. = 50~60 -> \tempo 4. = 50-60
|
3824
|
+
-| -> -!
|
3825
|
+
pipeSymbol, escapedParenthesisOpenSymbol ... -> "|", "\\(" ...''')
|
3826
|
+
def conv(s):
|
3827
|
+
# This goes for \tempo commands ending with a range, like
|
3828
|
+
# = 50 ~ 60
|
3829
|
+
# and uses - instead. We don't explicitly look for \tempo since the
|
3830
|
+
# complete syntax has a large number of variants, and this is quite
|
3831
|
+
# unlikely to occur in other contexts
|
3832
|
+
s = re.sub(r"(=\s*[0-9]+\s*)~(\s*[0-9]+\s)", r"\1-\2", s)
|
3833
|
+
# Match strings, and articulation shorthands that end in -^_
|
3834
|
+
# so that we leave alone -| in quoted strings and c4--|
|
3835
|
+
|
3836
|
+
def subnonstring(m):
|
3837
|
+
if m.group(1):
|
3838
|
+
return m.group(1)+"!"
|
3839
|
+
return m.group(0)
|
3840
|
+
s = re.sub(r"([-^_])\||" + matchstring +
|
3841
|
+
r"|[-^_][-^_]", subnonstring, s)
|
3842
|
+
s = re.sub(r"\bdashBar\b", "dashBang", s)
|
3843
|
+
orig = ["pipeSymbol",
|
3844
|
+
"bracketOpenSymbol",
|
3845
|
+
"bracketCloseSymbol",
|
3846
|
+
"tildeSymbol",
|
3847
|
+
"parenthesisOpenSymbol",
|
3848
|
+
"parenthesisCloseSymbol",
|
3849
|
+
"escapedExclamationSymbol",
|
3850
|
+
"escapedParenthesisOpenSymbol",
|
3851
|
+
"escapedParenthesisCloseSymbol",
|
3852
|
+
"escapedBiggerSymbol",
|
3853
|
+
"escapedSmallerSymbol"]
|
3854
|
+
repl = [r'"|"',
|
3855
|
+
r'"["',
|
3856
|
+
r'"]"',
|
3857
|
+
r'"~"',
|
3858
|
+
r'"("',
|
3859
|
+
r'")"',
|
3860
|
+
r'"\\!"',
|
3861
|
+
r'"\\("',
|
3862
|
+
r'"\\)"',
|
3863
|
+
r'"\\>"',
|
3864
|
+
r'"\\<"']
|
3865
|
+
words = r"\b(?:(" + ")|(".join(orig) + r"))\b"
|
3866
|
+
|
3867
|
+
def wordreplace(m):
|
3868
|
+
def instring(m):
|
3869
|
+
return re.sub(r'["\\]', r'\\\g<0>', repl[m.lastindex-1])
|
3870
|
+
if m.lastindex:
|
3871
|
+
return repl[m.lastindex-1]
|
3872
|
+
return '"' + re.sub(words, instring, m.group(0)[1:-1]) + '"'
|
3873
|
+
s = re.sub(words + "|" + matchstring, wordreplace, s)
|
3874
|
+
return s
|
3875
|
+
|
3876
|
+
|
3877
|
+
@rule((2, 17, 27), r'''\stringTuning \notemode -> \stringTuning''')
|
3878
|
+
def conv(s):
|
3879
|
+
s = re.sub(r"\\stringTuning\s*\\notemode(\s*)@?\{\s*(.*?)\s*@?\}",
|
3880
|
+
r"\\stringTuning\1\2", s)
|
3881
|
+
if re.search(r'[^-\w]staff-padding[^-\w]', s):
|
3882
|
+
stderr_write(NOT_SMART % "staff-padding")
|
3883
|
+
stderr_write(
|
3884
|
+
_("Staff-padding now controls the distance to the baseline, not the nearest point."))
|
3885
|
+
return s
|
3886
|
+
|
3887
|
+
|
3888
|
+
@rule((2, 17, 29), r'''Dynamic_engraver -> New_dynamic_engraver+Dynamic_align_engraver
|
3889
|
+
New_dynamic_engraver -> Dynamic_engraver''')
|
3890
|
+
def conv(s):
|
3891
|
+
s = re.sub("(\r?\n?[ \t]*\\\\(?:consists|remove)\\s*)(\"?)Dynamic_engraver\\2",
|
3892
|
+
r"\1\2New_dynamic_engraver\2\1\2Dynamic_align_engraver\2",
|
3893
|
+
s)
|
3894
|
+
# Should we warn about any remaining Dynamic_engraver? Possibly it
|
3895
|
+
# will do the job just fine.
|
3896
|
+
s = re.sub("New_dynamic_engraver", "Dynamic_engraver", s)
|
3897
|
+
return s
|
3898
|
+
|
3899
|
+
|
3900
|
+
@rule((2, 17, 97), r'''(make-relative (a b) b ...) -> make-relative (a b) #{ a b #}...''')
|
3901
|
+
def conv(s):
|
3902
|
+
s = re.sub(r"(\(make-relative\s+\(\s*(([A-Za-z][-_A-Za-z0-9]*)" +
|
3903
|
+
r"(?:\s+[A-Za-z][-_A-Za-z0-9]*)*)\s*\)\s*)\3(?=\s)",
|
3904
|
+
r"\1(make-event-chord (list \2))", s)
|
3905
|
+
s = re.sub(r"(\(make-relative\s+\(\s*([A-Za-z][-_A-Za-z0-9]*" +
|
3906
|
+
r"(?:\s+([A-Za-z][-_A-Za-z0-9]*))+)\s*\)\s*)\3(?=\s)",
|
3907
|
+
r"\1(make-sequential-music (list \2))", s)
|
3908
|
+
return s
|
3909
|
+
|
3910
|
+
|
3911
|
+
@rule((2, 18, 0),
|
3912
|
+
_("bump version for release"))
|
3913
|
+
def conv(s):
|
3914
|
+
return s
|
3915
|
+
|
3916
|
+
|
3917
|
+
@rule((2, 19, 2), r"\lyricsto \new/\context/... -> \new/\context/... \lyricsto")
|
3918
|
+
def conv(s):
|
3919
|
+
word = r'(?:#?"[^"]*"|\b' + wordsyntax + r'\b)'
|
3920
|
+
s = re.sub(r"(\\lyricsto\s*" + word + r"\s*)(\\(?:new|context)\s*" + word
|
3921
|
+
+ r"(?:\s*=\s*" + word + r")?\s*)",
|
3922
|
+
r"\2\1", s)
|
3923
|
+
s = re.sub(r"(\\lyricsto\s*" + word + r"\s*)\\lyricmode\b\s*",
|
3924
|
+
r"\1", s)
|
3925
|
+
s = re.sub(r"(\\lyricsto\s*" + word + r"\s*)\\lyrics\b\s*",
|
3926
|
+
r"\\new Lyrics \1", s)
|
3927
|
+
s = re.sub(r'\\lyricmode\s*(\\lyricsto\b)', r"\1", s)
|
3928
|
+
return s
|
3929
|
+
|
3930
|
+
|
3931
|
+
@rule((2, 19, 7), "keySignature -> keyAlterations")
|
3932
|
+
def conv(s):
|
3933
|
+
s = re.sub(r'\bkeySignature\b', 'keyAlterations', s)
|
3934
|
+
s = re.sub(r'\blastKeySignature\b', 'lastKeyAlterations', s)
|
3935
|
+
s = re.sub(r'\blocalKeySignature\b', 'localAlterations', s)
|
3936
|
+
return s
|
3937
|
+
|
3938
|
+
|
3939
|
+
@rule((2, 19, 11), "thin-kern -> segno-kern")
|
3940
|
+
def conv(s):
|
3941
|
+
s = re.sub(r'\bthin-kern\b', 'segno-kern', s)
|
3942
|
+
return s
|
3943
|
+
|
3944
|
+
# before_id is written in a manner where it will only substantially
|
3945
|
+
# (rather than as a lookbefore assertion) match material that could
|
3946
|
+
# not be part of a previous id. In that manner, one replacement does
|
3947
|
+
# not inhibit an immediately adjacent replacement.
|
3948
|
+
|
3949
|
+
|
3950
|
+
before_id = r'(?:^|(?<!\\)(?:\\\\)+|(?<=[^-_\\a-zA-Z])|(?<=[^a-zA-Z][-_]))'
|
3951
|
+
|
3952
|
+
# after_id is a pure lookbehind assertion so its match string is
|
3953
|
+
# always empty
|
3954
|
+
|
3955
|
+
after_id = r'(?![a-zA-Z]|[-_][a-zA-Z])'
|
3956
|
+
|
3957
|
+
|
3958
|
+
@rule((2, 19, 16), r"""implicitTimeSignatureVisibility -> initialTimeSignatureVisibility
|
3959
|
+
csharp -> c-sharp
|
3960
|
+
TimeSignature: style = #'() -> style = #'numbered""")
|
3961
|
+
def conv(s):
|
3962
|
+
s = re.sub(r'\bimplicitTimeSignatureVisibility\b',
|
3963
|
+
'initialTimeSignatureVisibility', s)
|
3964
|
+
s = re.sub('(' + before_id + r'[a-g])((?:sharp){1,2}|(?:flat){1,2})'
|
3965
|
+
+ after_id, r'\1-\2', s)
|
3966
|
+
s = re.sub(r"""\\override
|
3967
|
+
(\s+)
|
3968
|
+
([a-zA-Z]+\.)?TimeSignature.style
|
3969
|
+
(\s*)
|
3970
|
+
=
|
3971
|
+
(\s*)
|
3972
|
+
\#'\(\)""",
|
3973
|
+
r"\\override\1\2TimeSignature.style\3=\4#'numbered",
|
3974
|
+
s,
|
3975
|
+
flags=re.VERBOSE)
|
3976
|
+
|
3977
|
+
s = re.sub(r"""\\tweak
|
3978
|
+
(\s+)
|
3979
|
+
(TimeSignature\.)?style
|
3980
|
+
(\s*)
|
3981
|
+
\#'\(\)
|
3982
|
+
(\s+)
|
3983
|
+
\\time
|
3984
|
+
""",
|
3985
|
+
r"\\tweak\1\2style\3#'numbered\4\\time",
|
3986
|
+
s,
|
3987
|
+
flags=re.VERBOSE)
|
3988
|
+
return s
|
3989
|
+
|
3990
|
+
|
3991
|
+
@rule((2, 19, 22), """whiteout -> whiteout-box
|
3992
|
+
(define-xxx-function (parser location ...) -> (define-xxx-function (...)
|
3993
|
+
(xxx ... parser ...) -> (xxx ... ...)
|
3994
|
+
ChordNameVoice -> ChordNames""")
|
3995
|
+
def conv(s):
|
3996
|
+
# whiteout -> whiteout-box
|
3997
|
+
s = re.sub(r"\\whiteout(?![a-z_-])", r"\\whiteout-box", s)
|
3998
|
+
s = re.sub(r"\b\.whiteout(?![a-z_-])\b", r".whiteout-box", s)
|
3999
|
+
s = re.sub(r"#'whiteout(?![a-z_-])\b", r"#'whiteout-box", s)
|
4000
|
+
s = re.sub(r"\bstencil-whiteout\b", r"stencil-whiteout-box", s)
|
4001
|
+
|
4002
|
+
# (define-xxx-function (parser location ...) -> (define-xxx-function (...)
|
4003
|
+
def topsubst(s):
|
4004
|
+
def subst(m):
|
4005
|
+
def subsub(m):
|
4006
|
+
s = (m.group(1)
|
4007
|
+
+ re.sub(r'(?<=\s|["\\()])' + m.group(2) + r'(?=\s|["\\()])',
|
4008
|
+
r'(*location*)',
|
4009
|
+
re.sub(r'(?<=\s|["\\()])parser(?=\s|["\\()])',
|
4010
|
+
r'(*parser*)', topsubst(m.group(3)))))
|
4011
|
+
return s
|
4012
|
+
return re.sub(r'(\([-a-z]+\s*\(+)parser\s+([-a-z]+)\s*((?:.|\n)*)$',
|
4013
|
+
subsub, m.group(0))
|
4014
|
+
return re.sub(r'\(define-(?:music|event|scheme|void)-function(?=\s|["(])'
|
4015
|
+
+ paren_matcher(20) + r'\)', subst, s)
|
4016
|
+
s = topsubst(s)
|
4017
|
+
|
4018
|
+
# (xxx ... parser ...) -> (xxx ... ...)
|
4019
|
+
def repl(m):
|
4020
|
+
return m.group(1) + inner(m.group(2))
|
4021
|
+
|
4022
|
+
def inner(s):
|
4023
|
+
s = re.sub(r"(\((?:" +
|
4024
|
+
r"ly:parser-lexer|" +
|
4025
|
+
r"ly:parser-clone|" +
|
4026
|
+
r"ly:parser-output-name|" +
|
4027
|
+
r"ly:parser-error|" +
|
4028
|
+
r"ly:parser-define!|" +
|
4029
|
+
r"ly:parser-lookup|" +
|
4030
|
+
r"ly:parser-has-error\?|" +
|
4031
|
+
r"ly:parser-clear-error|" +
|
4032
|
+
r"ly:parser-set-note-names|" +
|
4033
|
+
r"ly:parser-include-string|" +
|
4034
|
+
r"note-names-language|" +
|
4035
|
+
r"display-lily-music|" +
|
4036
|
+
r"music->lily-string|" +
|
4037
|
+
r"note-name->lily-string|" +
|
4038
|
+
r"value->lily-string|"
|
4039
|
+
r"check-grob-path|" +
|
4040
|
+
r"event-chord-wrap!|" +
|
4041
|
+
r"collect-bookpart-for-book|" +
|
4042
|
+
r"collect-scores-for-book|" +
|
4043
|
+
r"collect-music-aux|" +
|
4044
|
+
r"collect-book-music-for-book|" +
|
4045
|
+
r"scorify-music|" +
|
4046
|
+
r"collect-music-for-book|" +
|
4047
|
+
r"collect-book-music-for-book|" +
|
4048
|
+
r"toplevel-book-handler|" +
|
4049
|
+
r"default-toplevel-book-handler|" +
|
4050
|
+
r"print-book-with-defaults|" +
|
4051
|
+
r"toplevel-music-handler|" +
|
4052
|
+
r"toplevel-score-handler|" +
|
4053
|
+
r"toplevel-text-handler|" +
|
4054
|
+
r"toplevel-bookpart-handler|" +
|
4055
|
+
r"book-music-handler|" +
|
4056
|
+
r"context-mod-music-handler|" +
|
4057
|
+
r"bookpart-music-handler|" +
|
4058
|
+
r"output-def-music-handler|" +
|
4059
|
+
r"print-book-with-defaults-as-systems|" +
|
4060
|
+
r"add-score|" +
|
4061
|
+
r"add-text|" +
|
4062
|
+
r"add-music|" +
|
4063
|
+
r"make-part-combine-music|" +
|
4064
|
+
r"make-directed-part-combine-music|" +
|
4065
|
+
r"add-quotable|" +
|
4066
|
+
r"paper-variable|" +
|
4067
|
+
r"make-autochange-music|" +
|
4068
|
+
r"context-mod-from-music|" +
|
4069
|
+
r"context-defs-from-music)" +
|
4070
|
+
r'(?=\s|[()]))(' + paren_matcher(20) + ")"
|
4071
|
+
r"(?:\s+parser(?=\s|[()])|\s*\(\*parser\*\))", repl, s)
|
4072
|
+
return s
|
4073
|
+
s = inner(s)
|
4074
|
+
# This is the simplest case, resulting from one music function
|
4075
|
+
# trying to call another one via Scheme. The caller is supposed
|
4076
|
+
# to have its uses of parser/location converted to
|
4077
|
+
# (*parser*)/(*location*) already. Other uses of
|
4078
|
+
# ly:music-function-extract are harder to convert but unlikely.
|
4079
|
+
s = re.sub(r'(\(\s*\(ly:music-function-extract\s+' + wordsyntax +
|
4080
|
+
r'\s*\)\s+)\(\*parser\*\)\s*\(\*location\*\)', r'\1',
|
4081
|
+
s)
|
4082
|
+
|
4083
|
+
s = re.sub(r'ChordNameVoice', r'ChordNames', s)
|
4084
|
+
return s
|
4085
|
+
|
4086
|
+
|
4087
|
+
@rule((2, 19, 24), r"""music-has-type -> music-is-of-type?
|
4088
|
+
\applyOutput #'Context -> \applyOutput Context""")
|
4089
|
+
def conv(s):
|
4090
|
+
s = re.sub(r'(?<=\s|["\\()])' + "music-has-type" + r'(?=\s|["\\()])',
|
4091
|
+
"music-is-of-type?", s)
|
4092
|
+
s = re.sub(r"(\\applyOutput\s+)#'([a-zA-Z])", r"\1\2", s)
|
4093
|
+
return s
|
4094
|
+
|
4095
|
+
|
4096
|
+
@rule((2, 19, 28), r"c:5.x, c:5^x, c:sus -> c:3.5.x, c:3.5^x, c:5")
|
4097
|
+
def conv(s):
|
4098
|
+
s = re.sub(r":5([.^][1-9])", r":3.5\1", s)
|
4099
|
+
# row back for self-defeating forms
|
4100
|
+
s = re.sub(r":3\.5((?:\.[0-9]+)*\^(?:[0-9]+\.)*)3\.", r":5\1", s)
|
4101
|
+
s = re.sub(
|
4102
|
+
r":3\.5((?:\.[0-9]+)*\^?:[0-9]+(?:\.[0-9]+)*)\.3(?![.0-9])", r":5\1", s)
|
4103
|
+
s = re.sub(r":3\.5((?:\.[0-9]+)*)\^3(?=\s|\})", r":5\1", s)
|
4104
|
+
s = re.sub(r":sus(?=\s|\})", ":5", s)
|
4105
|
+
s = re.sub(r":1\.5(?=\s|[.^}])", r":5", s)
|
4106
|
+
return s
|
4107
|
+
|
4108
|
+
|
4109
|
+
@rule((2, 19, 29), r"partcombine*Once -> \once \partcombine*")
|
4110
|
+
def conv(s):
|
4111
|
+
s = re.sub(r"(\\partcombine(?:Apart|Chords|Unisono|SoloII?|Automatic))Once\b",
|
4112
|
+
r"\\once \1", s)
|
4113
|
+
s = re.sub(r"(\\partcombineForce" + matcharg + r")\s*##f(\s)",
|
4114
|
+
r"\1\2", s)
|
4115
|
+
s = re.sub(r"(\\partcombineForce" + matcharg + r")\s*##t(\s)",
|
4116
|
+
r"\\once \1\2", s)
|
4117
|
+
return s
|
4118
|
+
|
4119
|
+
|
4120
|
+
@rule((2, 19, 32), r"whiteout-box -> whiteout")
|
4121
|
+
def conv(s):
|
4122
|
+
s = re.sub(r"\\whiteout-box(?![a-z_-])", r"\\whiteout", s)
|
4123
|
+
s = re.sub(r"\b\.whiteout-box(?![a-z_-])\b", r".whiteout", s)
|
4124
|
+
s = re.sub(r"#'whiteout-box(?![a-z_-])\b", r"#'whiteout", s)
|
4125
|
+
return s
|
4126
|
+
|
4127
|
+
|
4128
|
+
@rule((2, 19, 39), r"...-spacing #'prop... = -> ...-spacing.prop... =")
|
4129
|
+
def conv(s):
|
4130
|
+
s = re.sub(r"(\s)((?:markup-markup-spacing|markup-system-spacing"
|
4131
|
+
r"|score-markup-spacing|last-bottom-spacing"
|
4132
|
+
r"|score-system-spacing|system-system-spacing"
|
4133
|
+
r"|top-markup-spacing|top-system-spacing)"
|
4134
|
+
r"(?:\s+#\s*'\s*" + wordsyntax + r")+)(?=\s*=)", path_replace, s)
|
4135
|
+
return s
|
4136
|
+
|
4137
|
+
|
4138
|
+
@rule((2, 19, 40), r"\time #'(2 3) ... -> \time 2,3 ...")
|
4139
|
+
def conv(s):
|
4140
|
+
def repl(m):
|
4141
|
+
return m.group(1) + re.sub(r"\s+", ",", m.group(2))
|
4142
|
+
|
4143
|
+
s = re.sub(r"(beatStructure\s*=\s*)#'\(([0-9]+(?:\s+[0-9]+)+)\)",
|
4144
|
+
repl, s)
|
4145
|
+
|
4146
|
+
s = re.sub(r"(\\time\s*)#'\(([0-9]+(?:\s+[0-9]+)+)\)", repl, s)
|
4147
|
+
|
4148
|
+
def repl(m):
|
4149
|
+
subst = re.sub(r"\s+", ",", m.group(1))
|
4150
|
+
return subst + (4 + len(m.group(1)) - len(subst)) * " " + m.group(2)
|
4151
|
+
|
4152
|
+
s = re.sub(r"#'\(([0-9]+(?:\s+[0-9]+)+)\)(\s+%\s*beatStructure)",
|
4153
|
+
repl, s)
|
4154
|
+
return s
|
4155
|
+
|
4156
|
+
|
4157
|
+
@rule((2, 19, 46), r"\context ... \modification -> \context ... \with \modification")
|
4158
|
+
def conv(s):
|
4159
|
+
word = r'(?:#?"[^"]*"|\b' + wordsyntax + r'\b)'
|
4160
|
+
mods = "|".join(re.findall("\n(" + wordsyntax + r")\s*=\s*\\with(?:\s|\\|\{)", s)
|
4161
|
+
+ ['RemoveEmptyStaves', 'RemoveAllEmptyStaves'])
|
4162
|
+
s = re.sub(r"(\\(?:drums|figures|chords|lyrics|addlyrics|"
|
4163
|
+
+ r"(?:new|context)\s*" + word
|
4164
|
+
+ r"(?:\s*=\s*" + word + r")?)\s*)(\\(?:" + mods + "))",
|
4165
|
+
r"\1\\with \2", s)
|
4166
|
+
return s
|
4167
|
+
|
4168
|
+
|
4169
|
+
@rule((2, 19, 49), r"""id -> output-attributes.id or output-attributes
|
4170
|
+
for \tweak, \override, \overrideProperty, and \revert""")
|
4171
|
+
def conv(s):
|
4172
|
+
# path cannot start with '-' or '_' and matches zero or more path
|
4173
|
+
# units that each end in a dot
|
4174
|
+
path = r"(?:[a-zA-Z\200-\377](?:[-_]?[a-zA-Z\200-\377])*(?:\s*\.\s*))*"
|
4175
|
+
|
4176
|
+
# Manual editing is needed when id is set to #(...) or \xxx
|
4177
|
+
manual_edits = r"(\\(?:tweak|override|overrideProperty)\s+" + \
|
4178
|
+
path + r")id(\s*=?\s*(?:\\|#\s*\())"
|
4179
|
+
automatic = r"(\\(?:tweak|override|overrideProperty|revert)\s+" + path + r")id"
|
4180
|
+
if re.search(manual_edits, s):
|
4181
|
+
stderr_write(NOT_SMART % "\"output-attributes\"")
|
4182
|
+
stderr_write(
|
4183
|
+
_("Previously the \"id\" grob property (string) was used for SVG output.") + "\n")
|
4184
|
+
stderr_write(
|
4185
|
+
_("Now \"output-attributes\" (association list) is used instead.") + "\n")
|
4186
|
+
stderr_write(UPDATE_MANUALLY)
|
4187
|
+
|
4188
|
+
# First, for manual editing cases we convert 'id' to 'output-attributes'
|
4189
|
+
# because Grob.output-attributes.id = #(lambda ... ) will not work.
|
4190
|
+
# Then for the rest we convert 'id' to 'output-attributes.id'
|
4191
|
+
s = re.sub(manual_edits, r"\1output-attributes\2", s)
|
4192
|
+
s = re.sub(automatic, r"\1output-attributes.id", s)
|
4193
|
+
return s
|
4194
|
+
|
4195
|
+
|
4196
|
+
@rule((2, 20, 0), r'''\language "deutsch": beh -> heh''')
|
4197
|
+
def conv(s):
|
4198
|
+
changes = re.findall(r'\\language\s*#?"([a-zçñ]+)"', s)
|
4199
|
+
if changes and (changes.count('deutsch') == len(changes)):
|
4200
|
+
s = re.sub(r'\bbeh\b', 'heh', s)
|
4201
|
+
return s
|
4202
|
+
|
4203
|
+
|
4204
|
+
matchscmarg = (r'(?:[a-zA-Z_][-a-zA-Z_0-9]*|"(?:[^\\"]|\\.)*"|[-+]?[0-9.]+|\('
|
4205
|
+
+ paren_matcher(10) + r"\))")
|
4206
|
+
|
4207
|
+
string_duration_re = (r'(?P<startquote>#?")'
|
4208
|
+
r'(?P<dur>1|2|4|8|16|32|64|128|256|breve|longa|maxima)'
|
4209
|
+
r'(?P<ws>\s*)'
|
4210
|
+
r'(?P<dots>[.]*)'
|
4211
|
+
r'(?P<endquote>")')
|
4212
|
+
|
4213
|
+
def to_ly_duration(match):
|
4214
|
+
# Take a match against string_duration_re, possibly embedded in a
|
4215
|
+
# larger regex. Return the corresponding duration in LilyPond
|
4216
|
+
# syntax with braces, like "{4.}" or "{\longa}".
|
4217
|
+
if match.group("dur") in (r"breve", r"longa", r"maxima"):
|
4218
|
+
new_dur = '\\' + match.group("dur")
|
4219
|
+
else:
|
4220
|
+
new_dur = match.group("dur")
|
4221
|
+
return (match.group()[:match.start("startquote")-match.start()]
|
4222
|
+
+ '{' + new_dur
|
4223
|
+
+ match.group("dots") + '}'
|
4224
|
+
+ match.group()[match.end("endquote")-match.start():])
|
4225
|
+
|
4226
|
+
def to_scm_duration(match):
|
4227
|
+
# Same as string_to_ly_duration, with result in Scheme syntax.
|
4228
|
+
# "4." => (ly:make-duration 2 1)
|
4229
|
+
# "longa" => (ly:make-duration -2 0)
|
4230
|
+
dur_log = {"1": 0, "2": 1, "4": 2, "8": 3, "16": 4,
|
4231
|
+
"32": 5, "64": 6, "128": 7, "256": 8,
|
4232
|
+
"breve": -1, "longa": -2, "maxima": -4}[match.group("dur")]
|
4233
|
+
dot_count = len(match.group("dots"))
|
4234
|
+
new = f"(ly:make-duration {dur_log} {dot_count})"
|
4235
|
+
return (match.group()[:match.start("startquote")-match.start()]
|
4236
|
+
+ new
|
4237
|
+
+ match.group()[match.end("endquote")-match.start():])
|
4238
|
+
|
4239
|
+
# \note #"4." => \note {4.} in 2.21.0
|
4240
|
+
# \rest #"4." => \rest {4.} in 2.23.1
|
4241
|
+
def convert_string_to_duration_for_command(markup_command, s):
|
4242
|
+
s = re.sub(rf'\\{markup_command}\s*{string_duration_re}', to_ly_duration, s)
|
4243
|
+
s = re.sub(rf'#:{markup_command}\s+{string_duration_re}', to_scm_duration, s)
|
4244
|
+
return s
|
4245
|
+
|
4246
|
+
@rule((2, 21, 0), r"""\note #"4." -> \note {4.}
|
4247
|
+
\markup-command #" -> \markup-command "
|
4248
|
+
\partcombine* -> \partCombine, \autochange -> \autoChange
|
4249
|
+
scripts.trilelement -> scripts.trillelement
|
4250
|
+
\fermataMarkup -> \fermata
|
4251
|
+
remove \\powerChords, deprecate banter-chord-names and jazz-chord-names
|
4252
|
+
\compressFullBarRests -> \compressEmptyMeasures
|
4253
|
+
""")
|
4254
|
+
def conv(s):
|
4255
|
+
s = convert_string_to_duration_for_command("note", s)
|
4256
|
+
s = re.sub(r"\(tuplet-number::(?:fraction-with-notes|non-default-fraction-with-notes|append-note-wrapper)\s" +
|
4257
|
+
paren_matcher(20) + r"\)",
|
4258
|
+
lambda match: re.sub(string_duration_re, to_scm_duration, match.group()),
|
4259
|
+
s)
|
4260
|
+
s = re.sub(r'(\\(?:fret-diagram(?:-terse)?|harp-pedal|justify-string'
|
4261
|
+
r'|lookup|musicglyph|postscript|simple|tied-lyric|verbatim-file'
|
4262
|
+
r'|with-url|wordwrap-string'
|
4263
|
+
r'|discant|freeBass|stdBass|stdBassIV|stdBassV|stdBassVI'
|
4264
|
+
r')\s*)[#$](\\?")',
|
4265
|
+
r'\1\2', s)
|
4266
|
+
s = re.sub(r"\\partcombine(Force|Up|Down|Chords|Apart|Unisono|SoloI|SoloII|Automatic|)\b",
|
4267
|
+
r"\\partCombine\1", s)
|
4268
|
+
s = re.sub(r"\\autochange", r"\\autoChange", s)
|
4269
|
+
s = re.sub(r'\\powerChords', '', s)
|
4270
|
+
s = re.sub(r'"scripts\.trilelement"', r'"scripts.trillelement"', s)
|
4271
|
+
s = re.sub(r"\\fermataMarkup", r"\\fermata", s)
|
4272
|
+
s = re.sub(r"\\(compress|expand)FullBarRests", r"\\\1EmptyMeasures", s)
|
4273
|
+
if re.search(r"#(banter|jazz)-chordnames", s):
|
4274
|
+
stderr_write(NOT_SMART % "alternative chord naming functions")
|
4275
|
+
stderr_write(UPDATE_MANUALLY)
|
4276
|
+
return s
|
4277
|
+
|
4278
|
+
|
4279
|
+
@rule((2, 21, 2), r'''\tocItem "string" -> \tocItem \markup "string"''')
|
4280
|
+
def conv(s):
|
4281
|
+
s = re.sub(r'\\tocItem\s+"', r'\\tocItem \\markup "', s)
|
4282
|
+
return s
|
4283
|
+
|
4284
|
+
|
4285
|
+
@rule((2, 22, 0), _("bump version for release"))
|
4286
|
+
def conv(s):
|
4287
|
+
return s
|
4288
|
+
|
4289
|
+
|
4290
|
+
@rule((2, 23, 1), r"""
|
4291
|
+
combine u/d variants of triangle, do, re, and ti noteheads
|
4292
|
+
rename bar line "S" to "S-||"
|
4293
|
+
rename bar line "S-|" to "S"
|
4294
|
+
\rest "4." -> \rest {4.}
|
4295
|
+
""")
|
4296
|
+
def conv(s):
|
4297
|
+
s = re.sub(r'"noteheads\.[ud](1|2)(triangle|(?:do|re|ti)(?:Thin)?)"',
|
4298
|
+
r'"noteheads.s\1\2"', s)
|
4299
|
+
s = re.sub(r'\\bar(\s+)"S"', r'\\bar\1"S-||"', s)
|
4300
|
+
s = re.sub(r'\\bar(\s+)"S-\|"', r'\\bar\1"S"', s)
|
4301
|
+
s = re.sub(r'segnoType(\s+=\s+)#?"S"', r'segnoType\1"S-||"', s)
|
4302
|
+
s = re.sub(r'segnoType(\s+=\s+)#?"S-\|"', r'segnoType\1"S"', s)
|
4303
|
+
s = convert_string_to_duration_for_command("rest", s)
|
4304
|
+
# Be more general than \override #'(multi-measure-rest . #t),
|
4305
|
+
# there's also \override #'((something . else) (multi-measure-rest . #t))
|
4306
|
+
if "#'(multi-measure-rest . #t)" in s and r"\rest-by-number" in s:
|
4307
|
+
# Don't convert blindly since it may also be use of \rest-by-number
|
4308
|
+
# for a normal rest and \rest with \override #'(multi-measure-rest . #t)
|
4309
|
+
# somewhere else.
|
4310
|
+
stderr_write(NOT_SMART % r"\override #'(multi-measure-rest . #t) \rest-by-number")
|
4311
|
+
stderr_write(r"""
|
4312
|
+
Instead of (for example)
|
4313
|
+
\markup \override #'(multi-measure-rest . #t) \rest-by-number #0 #0
|
4314
|
+
use
|
4315
|
+
\markup \multi-measure-rest-by-number #1
|
4316
|
+
|
4317
|
+
The argument of \multi-measure-rest-by-number is the number of measures
|
4318
|
+
the multi-measure rest lasts.
|
4319
|
+
""")
|
4320
|
+
stderr_write(UPDATE_MANUALLY)
|
4321
|
+
return s
|
4322
|
+
|
4323
|
+
|
4324
|
+
melody_engraver_warning = r"""
|
4325
|
+
If you had
|
4326
|
+
|
4327
|
+
\override Stem.neutral-direction = #DOWN
|
4328
|
+
|
4329
|
+
and
|
4330
|
+
|
4331
|
+
\override Stem.neutral-direction #'()
|
4332
|
+
|
4333
|
+
to turn the use of the Melody_engraver off
|
4334
|
+
and on, respectively, you should instead use
|
4335
|
+
|
4336
|
+
\set suspendMelodyDecisions = ##t
|
4337
|
+
|
4338
|
+
and
|
4339
|
+
|
4340
|
+
\set suspendMelodyDecisions = ##f
|
4341
|
+
|
4342
|
+
"""
|
4343
|
+
|
4344
|
+
@rule((2, 23, 2), r"""
|
4345
|
+
warn about behavior change of Melody_engraver with Stem.neutral-direction
|
4346
|
+
adapt module names to (lily) namespace
|
4347
|
+
""")
|
4348
|
+
def conv(s):
|
4349
|
+
# Detect changes to the Stem.neutral-direction property
|
4350
|
+
# in conjunction with the Melody_engraver. The string
|
4351
|
+
# "Stem.neutral-direction" is sufficient for the former,
|
4352
|
+
# since there is no situation where \tweak neutral-direction ...
|
4353
|
+
# would cause the property to end up on the Stem.
|
4354
|
+
#
|
4355
|
+
# Convert
|
4356
|
+
# \consists Melody_engraver
|
4357
|
+
# \override Stem.neutral-direction = #'()
|
4358
|
+
# to just
|
4359
|
+
# \consists Melody_engraver
|
4360
|
+
#
|
4361
|
+
# Warn about other uses, it's too tricky to convert them
|
4362
|
+
# (e.g., \tweak Stem.color \tweak Stem.neutral-direction #DOWN ...
|
4363
|
+
# should become \once \set suspendMelodyDecisions = ##t \tweak Stem.color ...).
|
4364
|
+
neutral_dir = r'Stem\.neutral-direction'
|
4365
|
+
neutral_dir_override = r"\\override\s+{}\s+=\s+#'\(\)".format(neutral_dir)
|
4366
|
+
melody_engraver = r'\\consists\s+"?Melody_engraver"?'
|
4367
|
+
typical_usage = r'({})\s+{}'.format(melody_engraver, neutral_dir_override)
|
4368
|
+
s = re.sub(typical_usage, r"\1", s)
|
4369
|
+
if re.search(neutral_dir, s) and re.search('Melody_engraver', s):
|
4370
|
+
stderr_write(NOT_SMART % "Stem.neutral-direction with Melody_engraver")
|
4371
|
+
stderr_write(melody_engraver_warning)
|
4372
|
+
stderr_write(UPDATE_MANUALLY)
|
4373
|
+
|
4374
|
+
s = re.sub(r'\(scm (accreg|display-lily|graphviz|guile-debugger|song|to-xml)\)',
|
4375
|
+
r'(lily \1)', s)
|
4376
|
+
return s
|
4377
|
+
|
4378
|
+
round_filled_polygon_warning = r"""
|
4379
|
+
ly:round-filled-polygon was renamed to ly:round-polygon and now takes
|
4380
|
+
an additional optional parameter specifying whether the polygon is filled.
|
4381
|
+
The default value of the extroversion optional parameter was changed from
|
4382
|
+
-1 to 0.
|
4383
|
+
"""
|
4384
|
+
|
4385
|
+
@rule((2, 23, 3), r"""
|
4386
|
+
glyph-name-alist -> alteration-glyph-name-alist
|
4387
|
+
ly:round-filled-polygon -> ly:round-polygon
|
4388
|
+
""")
|
4389
|
+
def conv(s):
|
4390
|
+
# The negative lookbehind assertion is to avoid matching
|
4391
|
+
# standard-alteration-glyph-name-alist and similar.
|
4392
|
+
s = re.sub(r"(?<!-)glyph-name-alist", "alteration-glyph-name-alist", s)
|
4393
|
+
if "ly:round-filled-polygon" in s:
|
4394
|
+
stderr_write(NOT_SMART % "ly:round-filled-polygon")
|
4395
|
+
stderr_write(round_filled_polygon_warning)
|
4396
|
+
stderr_write(UPDATE_MANUALLY)
|
4397
|
+
return s
|
4398
|
+
|
4399
|
+
trill_pitch_group_re = r"""TrillPitchGroup\.
|
4400
|
+
(
|
4401
|
+
font # recognize all font-something properties
|
4402
|
+
| color
|
4403
|
+
| extra-offset
|
4404
|
+
| layer
|
4405
|
+
| output-attributes
|
4406
|
+
| rotation
|
4407
|
+
| stencil
|
4408
|
+
| stencils
|
4409
|
+
| transparent
|
4410
|
+
| whiteout # also whiteout-style
|
4411
|
+
)
|
4412
|
+
"""
|
4413
|
+
|
4414
|
+
repl = r"TrillPitchParentheses.\1"
|
4415
|
+
|
4416
|
+
on_the_fly_replacements = (
|
4417
|
+
(r"[\\#$]print-page-number-check-first", r"\\if \\should-print-page-number"),
|
4418
|
+
(r"[\\#$]create-page-number-stencil", r"\\if \\should-print-page-numbers-global"),
|
4419
|
+
(r"[\\#$]print-all-headers", r"\\if \\should-print-all-headers"),
|
4420
|
+
(r"[\\#$]first-page", r"\\if \\on-first-page"),
|
4421
|
+
(r"[\\#$]not-first-page", r"\\unless \\on-first-page"),
|
4422
|
+
(r"[#$]\(on-page (\d+)\)", r"\\if \\on-page #\1"),
|
4423
|
+
(r"[\\#$]last-page", r"\\if \\on-last-page"),
|
4424
|
+
(r"[\\#$]part-first-page", r"\\if \\on-first-page-of-part"),
|
4425
|
+
(r"[\\#$]not-part-first-page", r"\\unless \\on-first-page-of-part"),
|
4426
|
+
(r"[\\#$]part-last-page", r"\\if \\on-last-page-of-part"),
|
4427
|
+
(r"[\\#$]not-single-page", r"\\unless \\single-page"),
|
4428
|
+
)
|
4429
|
+
|
4430
|
+
@rule((2, 23, 4), r"""
|
4431
|
+
ly:context-now -> ly:context-current-moment
|
4432
|
+
ControlPointItem, ControlPointSpanner -> ControlPoint
|
4433
|
+
ControlPolygonItem, ControlPolygonSpanner -> ControlPolygon
|
4434
|
+
FootnoteItem, FootnoteSpanner -> Footnote
|
4435
|
+
BalloonTextItem, BalloonTextSpanner -> BalloonText
|
4436
|
+
\on-the-fly #some-procedure -> \if \some-condition
|
4437
|
+
""")
|
4438
|
+
def conv(s):
|
4439
|
+
s = re.sub("ly:context-now", "ly:context-current-moment", s)
|
4440
|
+
# It's unlikely that users would have wanted different settings
|
4441
|
+
# for the item type and the spanner type, so this should be reasonable.
|
4442
|
+
item_spanner = (r"(ControlPoint|ControlPolygon|Footnote|BalloonText)"
|
4443
|
+
r"(Item|Spanner)")
|
4444
|
+
s = re.sub(item_spanner, r"\1", s)
|
4445
|
+
s = re.sub("ParenthesesItem", "Parentheses", s)
|
4446
|
+
s = re.sub("parentheses-item::", "parentheses-interface::", s)
|
4447
|
+
s = re.sub(trill_pitch_group_re, repl, s, flags=re.VERBOSE)
|
4448
|
+
for pattern, replacement in on_the_fly_replacements:
|
4449
|
+
complete_pattern = r"\\on-the-fly\s+" + pattern
|
4450
|
+
s = re.sub(complete_pattern, replacement, s)
|
4451
|
+
return s
|
4452
|
+
|
4453
|
+
@rule((2, 23, 5), r"""
|
4454
|
+
Mark_tracking_translator
|
4455
|
+
""")
|
4456
|
+
def conv(s):
|
4457
|
+
if re.search(r'\\consists\s+"?Mark_engraver"?', s):
|
4458
|
+
stderr_write(NOT_SMART % "\\consists Mark_engraver")
|
4459
|
+
stderr_write(_("If independent mark sequences are desired, use multiple Mark_tracking_translators."))
|
4460
|
+
stderr_write('\n')
|
4461
|
+
stderr_write(UPDATE_MANUALLY)
|
4462
|
+
return s
|
4463
|
+
|
4464
|
+
dash_abbreviations = ["Hat", "Plus", "Dash", "Bang", "Larger", "Dot", "Underscore"]
|
4465
|
+
|
4466
|
+
|
4467
|
+
markup2string_warning = """
|
4468
|
+
The signature of the markup->string Scheme function changed. Calls with
|
4469
|
+
just one argument are not affected. Calls using the second optional
|
4470
|
+
argument, the list of header modules, should be changed from
|
4471
|
+
|
4472
|
+
(markup->string <markup> <header list>)
|
4473
|
+
|
4474
|
+
to
|
4475
|
+
|
4476
|
+
(markup->string <markup> #:props (headers-property-alist-chain <header list>))
|
4477
|
+
|
4478
|
+
"""
|
4479
|
+
|
4480
|
+
@rule((2, 23, 6), r"""
|
4481
|
+
defaultBarType -> measureBarType
|
4482
|
+
markFormatter -> rehearsalMarkFormatter
|
4483
|
+
startRepeatType -> startRepeatBarType (etc.)
|
4484
|
+
make-articulation "X" -> make-articulation 'X
|
4485
|
+
'articulation-type "X" -> 'articulation-type 'X
|
4486
|
+
dashX = "Y" -> dashX = #(make-articulation 'Y)
|
4487
|
+
markup->string 2nd argument change
|
4488
|
+
ly:grob-spanned-rank-interval -> ly:grob-spanned-column-rank-interval
|
4489
|
+
""")
|
4490
|
+
# It would be nicer to do
|
4491
|
+
# dashX = "Y" -> dashX = \Y
|
4492
|
+
# but it is not guaranteed that for any 'symbol valid as 'articulation-type
|
4493
|
+
# (see the list in scm/script.scm), there is a corresponding after-event \symbol
|
4494
|
+
# defined via #(make-articulation 'symbol ...) in ly/script-init.ly or
|
4495
|
+
# ly/gregorian.ly. (Example: There is no \comma as of 2.23.5)
|
4496
|
+
def conv(s):
|
4497
|
+
s = re.sub("defaultBarType", "measureBarType", s)
|
4498
|
+
s = re.sub("doubleRepeatSegnoType", "doubleRepeatSegnoBarType", s)
|
4499
|
+
s = re.sub("doubleRepeatType", "doubleRepeatBarType", s)
|
4500
|
+
s = re.sub("endRepeatSegnoType", "endRepeatSegnoBarType", s)
|
4501
|
+
s = re.sub("endRepeatType", "endRepeatBarType", s)
|
4502
|
+
s = re.sub("fineSegnoType", "fineSegnoBarType", s)
|
4503
|
+
s = re.sub("fineStartRepeatSegnoType", "fineStartRepeatSegnoBarType", s)
|
4504
|
+
s = re.sub("markFormatter", "rehearsalMarkFormatter", s)
|
4505
|
+
s = re.sub("segnoType", "segnoBarType", s)
|
4506
|
+
s = re.sub("startRepeatSegnoType", "startRepeatSegnoBarType", s)
|
4507
|
+
s = re.sub("startRepeatType", "startRepeatBarType", s)
|
4508
|
+
s = re.sub("underlyingRepeatType", "underlyingRepeatBarType", s)
|
4509
|
+
s = re.sub(r'''((make-articulation|'articulation-type)\s+)"(\w+)"''', r"\1'\3", s)
|
4510
|
+
s = re.sub(r'(dash(%s)\s+)=(\s+)"(\w+)"' % "|".join(dash_abbreviations),
|
4511
|
+
r"\1=\3#(make-articulation '\4)", s)
|
4512
|
+
# The case (markup->string <symbol>) is easy to detect and should
|
4513
|
+
# not be warned about. Cases with one argument that is more complex
|
4514
|
+
# than a symbol are harder to detect reliably, so we conservatively
|
4515
|
+
# print the warning.
|
4516
|
+
if re.search(r"(?!(?<=\()markup\->string\s+\w+\))markup->string", s):
|
4517
|
+
stderr_write(NOT_SMART % "markup->string")
|
4518
|
+
stderr_write(markup2string_warning)
|
4519
|
+
stderr_write(UPDATE_MANUALLY)
|
4520
|
+
s = s.replace("ly:grob-spanned-rank-interval", "ly:grob-spanned-column-rank-interval")
|
4521
|
+
return s
|
4522
|
+
|
4523
|
+
bar_numbers_warning = _(r"""
|
4524
|
+
Warning:
|
4525
|
+
|
4526
|
+
Your score contains a setting of barNumberVisibility to
|
4527
|
+
#all-bar-numbers-visible and a setting of BarNumber.break-visibility,
|
4528
|
+
but not \bar "" command. This likely means that you have
|
4529
|
+
been using
|
4530
|
+
|
4531
|
+
\set Score.barNumberVisibility = #all-bar-numbers-visible
|
4532
|
+
\override Score.BarNumber.break-visibility = #end-of-line-invisible
|
4533
|
+
|
4534
|
+
in order to print bar numbers in the middle of systems
|
4535
|
+
in addition to bar numbers at the beginning of systems.
|
4536
|
+
In 2.23.7 and later, this will print the first bar number
|
4537
|
+
too, which has always been the intended effect of
|
4538
|
+
#all-bar-numbers-visible, but did not work without \bar ""
|
4539
|
+
for technical reasons. If you do not want the first
|
4540
|
+
bar number, remove the command
|
4541
|
+
|
4542
|
+
\set Score.barNumberVisibility = #all-bar-numbers-visible
|
4543
|
+
""")
|
4544
|
+
|
4545
|
+
@rule((2, 23, 7), r"""
|
4546
|
+
all-bar-numbers-visible + BarNumber.break-visibility + no \bar "" -> warning
|
4547
|
+
""")
|
4548
|
+
def conv(s):
|
4549
|
+
if (
|
4550
|
+
"all-bar-numbers-visible" in s
|
4551
|
+
and "BarNumber.break-visibility" in s
|
4552
|
+
and r'\bar ""' not in s
|
4553
|
+
):
|
4554
|
+
stderr_write(bar_numbers_warning)
|
4555
|
+
return s
|
4556
|
+
|
4557
|
+
@rule((2, 23, 8), r"""
|
4558
|
+
scripts.augmentum -> dots.dotvaticana
|
4559
|
+
scripts.trillelement -> scripts.trill_element
|
4560
|
+
ly:skyline::get-touching-point -> ly:skyline-touching-point
|
4561
|
+
ly:skyline::get-distance -> ly:skyline-distance
|
4562
|
+
ly:skyline::get-max-height -> ly:skyline-max-height
|
4563
|
+
ly:skyline::get-max-height-position -> ly:skyline-max-height-position
|
4564
|
+
ly:skyline::get-height -> ly:skyline-height
|
4565
|
+
Remove Default_bar_line_engraver
|
4566
|
+
""")
|
4567
|
+
def conv(s):
|
4568
|
+
s = re.sub(r"scripts\.augmentum", r"dots.dotvaticana", s)
|
4569
|
+
s = re.sub(r"scripts\.trillelement", r"scripts.trill_element", s)
|
4570
|
+
s = re.sub(r"ly:skyline::get-touching-point", "ly:skyline-touching-point", s)
|
4571
|
+
s = re.sub(r"ly:skyline::get-distance", "ly:skyline-distance", s)
|
4572
|
+
s = re.sub(r"ly:skyline::get-max-height", "ly:skyline-max-height", s)
|
4573
|
+
s = re.sub(r"ly:skyline::get-max-height-position", "ly:skyline-max-height-position", s)
|
4574
|
+
s = re.sub(r"ly:skyline::get-height", "ly:skyline-height", s)
|
4575
|
+
s = re.sub(r'[\t ]*\\(consists|remove)\s*"?Default_bar_line_engraver"?[\t ]*\n?',
|
4576
|
+
r'', s)
|
4577
|
+
return s
|
4578
|
+
|
4579
|
+
percent_x_off_warning = r"""
|
4580
|
+
The X-offset property of PercentRepeat is no longer relative to the
|
4581
|
+
default position (centered), but to the left of the span within
|
4582
|
+
which the object is centered. Overrides/tweaks to PercentRepeat.X-offset
|
4583
|
+
should be updated.
|
4584
|
+
"""
|
4585
|
+
|
4586
|
+
@rule((2, 23, 9), r"""
|
4587
|
+
ly:percent-repeat-item-interface::xxx -> ly:percent-repeat-interface::xxx
|
4588
|
+
""")
|
4589
|
+
def conv(s):
|
4590
|
+
s = re.sub(r"ly:percent-repeat-item-interface::", "ly:percent-repeat-interface::", s)
|
4591
|
+
if "PercentRepeat.X-offset" in s:
|
4592
|
+
stderr_write(NOT_SMART % "PercentRepeat.X-offset")
|
4593
|
+
stderr_write(percent_x_off_warning)
|
4594
|
+
stderr_write(UPDATE_MANUALLY)
|
4595
|
+
return s
|
4596
|
+
|
4597
|
+
@rule((2, 23, 10), r"""
|
4598
|
+
automaticBars = ##f -> measureBarType = #'()
|
4599
|
+
\\bar "-" -> \\bar ""
|
4600
|
+
BarType = "-" -> BarType = ""
|
4601
|
+
\featherDurations #(ly:make-moment x/y) -> \featherDurations x/y
|
4602
|
+
\consists Chord_name_engraver -> \consists Chord_name_engraver \consists Current_chord_text_engraver
|
4603
|
+
\remove Chord_name_engraver -> \remove Chord_name_engraver \remove Current_chord_text_engraver
|
4604
|
+
)
|
4605
|
+
""")
|
4606
|
+
def conv(s):
|
4607
|
+
s = re.sub(r"automaticBars\s*=\s*##f", r"measureBarType = #'()", s)
|
4608
|
+
if "automaticBars" in s:
|
4609
|
+
stderr_write(NOT_SMART % "advanced use of automaticBars")
|
4610
|
+
stderr_write("""
|
4611
|
+
The automaticBars property has been removed. Instead, set
|
4612
|
+
measureBarType to #'() or a valid bar type.
|
4613
|
+
""")
|
4614
|
+
stderr_write(UPDATE_MANUALLY)
|
4615
|
+
s = re.sub(r'\\bar\s*"-"', r'\\bar ""', s)
|
4616
|
+
s = re.sub(r'BarType\s*=\s*"-"', r'BarType = ""', s)
|
4617
|
+
s = re.sub(r'(\\featherDurations\s+)#\(ly:make-moment\s+([0-9/]+)\)',
|
4618
|
+
r'\1\2', s)
|
4619
|
+
s = re.sub(r'\\(consists|remove) "?Chord_name_engraver"?',
|
4620
|
+
r'\\\1 Chord_name_engraver \\\1 Current_chord_text_engraver',
|
4621
|
+
s)
|
4622
|
+
# This change is also in the rule for 2.13.18. It is being
|
4623
|
+
# replicated here because the removal was only done in 2.23.10.
|
4624
|
+
# This ensures that a score that had previously been updated to a
|
4625
|
+
# version between 2.13.18 and 2.23.10 without running convert-ly
|
4626
|
+
# can still be fixed in the 2.23.10 upgrade using convert-ly.
|
4627
|
+
# Since the change was advertised earlier, this is not part of the
|
4628
|
+
# rule description.
|
4629
|
+
s = re.sub(r"\\RemoveEmpty(|Drum|Rhythmic|Tab)StaffContext",
|
4630
|
+
r"\\\1Staff \\RemoveEmptyStaves",
|
4631
|
+
s)
|
4632
|
+
s = re.sub(r"\\AncientRemoveEmptyStaffContext",
|
4633
|
+
r"\\VaticanaStaff \\RemoveEmptyStaves",
|
4634
|
+
s)
|
4635
|
+
return s
|
4636
|
+
|
4637
|
+
@rule((2, 23, 11), r"""
|
4638
|
+
\bar "B" -> \bar "B-|" for B in { .| .|: [|: S S.|: }
|
4639
|
+
""")
|
4640
|
+
def conv(s):
|
4641
|
+
# We convert only \bar because automatic bar lines configured with
|
4642
|
+
# context properties layer themselves.
|
4643
|
+
changed_bar_types = [ # bar types which had an implicit "|" at EOL
|
4644
|
+
r'\.\|', # .|
|
4645
|
+
r'\.\|:', # .|:
|
4646
|
+
r'\[\|:', # [|:
|
4647
|
+
r'S', # S
|
4648
|
+
r'S\.\|:'] # S.|:
|
4649
|
+
s = re.sub(r'\\bar\s*"(' + '|'.join(changed_bar_types) + ')"',
|
4650
|
+
r'\\bar "\1-|"', s)
|
4651
|
+
# New syntax was introduced in 2.17.6, but this version adds a warning,
|
4652
|
+
# which is more insistent.
|
4653
|
+
s = convert_overrides_to_dots(s)
|
4654
|
+
return s
|
4655
|
+
|
4656
|
+
fine_iteration_warning = _(r"""
|
4657
|
+
Warning: \fine no longer enforces the end of the music. If your piece
|
4658
|
+
has music following \fine that you want to exclude when it is
|
4659
|
+
unfolded, use \volta to exclude it.
|
4660
|
+
""")
|
4661
|
+
|
4662
|
+
new_ancient_divisio_grob_warning = _(r"""
|
4663
|
+
MensuralStaff and VaticanaStaff now use Divisio_engraver to engrave
|
4664
|
+
divisiones as Divisio grobs.
|
4665
|
+
|
4666
|
+
Previously, the respective Voice-aliased contexts used
|
4667
|
+
Breathing_sign_engraver to engrave divisiones as BreathingSign grobs.
|
4668
|
+
Because of the new names and the move from Voice to Staff, layout
|
4669
|
+
adjustments for the old scheme are not effective for the new.
|
4670
|
+
|
4671
|
+
If you are not content with the new default layout, deal with Divisio
|
4672
|
+
and Divisio_engraver in the appropriate Staff-aliased context.
|
4673
|
+
""")
|
4674
|
+
|
4675
|
+
new_modern_divisio_grob_warning = _(r"""
|
4676
|
+
GregorianTranscriptionStaff now engraves \divisioMinima,
|
4677
|
+
\divisioMaior, and \divisioMaxima as BarLine grobs using Bar_engraver,
|
4678
|
+
and engraves \caesura and \virgula as Divisio grobs using
|
4679
|
+
Divisio_engraver.
|
4680
|
+
|
4681
|
+
Previously, GregorianTranscriptionVoice used Breathing_sign_engraver
|
4682
|
+
to engrave these as BreathingSign grobs. Because of the new names and
|
4683
|
+
the move from Voice to Staff, layout adjustments for the old scheme
|
4684
|
+
are not effective for the new.
|
4685
|
+
|
4686
|
+
If you are not content with the new default layout, deal with BarLine,
|
4687
|
+
Bar_engraver, Divisio, and Divisio_engraver in
|
4688
|
+
GregorianTranscriptionStaff context. \EnableGregorianDivisiones may
|
4689
|
+
also be used to switch to engraving Divisio grobs instead of BarLine
|
4690
|
+
grobs.
|
4691
|
+
""")
|
4692
|
+
|
4693
|
+
@rule((2, 23, 12), r"""
|
4694
|
+
barAlways = ##t -> forbidBreakBetweenBarLines = ##f
|
4695
|
+
\fine no longer stops iteration
|
4696
|
+
New Divisio grob
|
4697
|
+
""")
|
4698
|
+
def conv(s):
|
4699
|
+
s = re.sub(r'barAlways\s*=\s*##t', r'forbidBreakBetweenBarLines = ##f', s)
|
4700
|
+
s = re.sub(r'barAlways\s*=\s*##f', r'forbidBreakBetweenBarLines = ##t', s)
|
4701
|
+
if ('\\fine' in s) and (('\\repeat segno' in s) or
|
4702
|
+
('\\repeat volta' in s)):
|
4703
|
+
stderr_write(NOT_SMART % "music following \\fine")
|
4704
|
+
stderr_write(fine_iteration_warning)
|
4705
|
+
stderr_write(UPDATE_MANUALLY)
|
4706
|
+
if re.search(r"GregorianTranscription(Staff|Voice)", s) and \
|
4707
|
+
(("BreathingSign" in s) or ("Breathing_sign_engraver" in s)):
|
4708
|
+
stderr_write(NOT_SMART % "BreathingSign to BarLine or Divisio")
|
4709
|
+
stderr_write(new_modern_divisio_grob_warning)
|
4710
|
+
stderr_write(UPDATE_MANUALLY)
|
4711
|
+
if re.search(r"(Mensural|Vaticana)(Staff|Voice)", s) and \
|
4712
|
+
(("BreathingSign" in s) or ("Breathing_sign_engraver" in s)):
|
4713
|
+
stderr_write(NOT_SMART % "BreathingSign to Divisio")
|
4714
|
+
stderr_write(new_ancient_divisio_grob_warning)
|
4715
|
+
stderr_write(UPDATE_MANUALLY)
|
4716
|
+
return s
|
4717
|
+
|
4718
|
+
remove_bar_always_warning = _(r"""
|
4719
|
+
The barAlways property has been removed. Instead, use
|
4720
|
+
forbidBreakBetweenBarLines.
|
4721
|
+
""")
|
4722
|
+
|
4723
|
+
@rule((2, 23, 13), r"""
|
4724
|
+
filtered-map -> filter-map
|
4725
|
+
Remove barAlways
|
4726
|
+
""")
|
4727
|
+
def conv(s):
|
4728
|
+
s = re.sub(r"filtered-map", "(@ (srfi srfi-1) filter-map)", s)
|
4729
|
+
if "barAlways" in s:
|
4730
|
+
stderr_write(NOT_SMART % "advanced use of barAlways")
|
4731
|
+
stderr_write(remove_bar_always_warning)
|
4732
|
+
stderr_write(UPDATE_MANUALLY)
|
4733
|
+
return s
|
4734
|
+
|
4735
|
+
@rule((2, 23, 14), r"""
|
4736
|
+
changed convention for ly:skylines-for-stencil second argument
|
4737
|
+
""")
|
4738
|
+
def conv(s):
|
4739
|
+
if "ly:skylines-for-stencil" in s:
|
4740
|
+
stderr_write(NOT_SMART % "ly:skylines-for-stencil second argument")
|
4741
|
+
stderr_write("""
|
4742
|
+
The second argument to ly:skylines-for-stencil is now the 'horizon axis', which
|
4743
|
+
is the opposite of the convention used previously.
|
4744
|
+
""")
|
4745
|
+
stderr_write(UPDATE_MANUALLY)
|
4746
|
+
return s
|
4747
|
+
|
4748
|
+
@rule((2, 24, 0), _("bump version for release"))
|
4749
|
+
def conv(s):
|
4750
|
+
return s
|
4751
|
+
|
4752
|
+
|
4753
|
+
# Guidelines to write rules (please keep this at the end of this file)
|
4754
|
+
#
|
4755
|
+
# - keep at most one rule per version; if several conversions should be done,
|
4756
|
+
# concatenate them into a single "conv" function;
|
4757
|
+
#
|
4758
|
+
# - enclose strings to be localized with `_(' and `)';
|
4759
|
+
#
|
4760
|
+
# - write rule for bumping major stable version with
|
4761
|
+
#
|
4762
|
+
# _ ("bump version for release")
|
4763
|
+
#
|
4764
|
+
# as exact description.
|