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,2781 @@
|
|
1
|
+
# musicexp.py
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
#
|
4
|
+
# This file is part of LilyPond, the GNU music typesetter.
|
5
|
+
#
|
6
|
+
# Copyright (C) 2005--2022 Han-Wen Nienhuys <hanwen@xs4all.nl>,
|
7
|
+
# 2007--2011 Reinhold Kainhofer <reinhold@kainhofer.com>
|
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
|
+
from fractions import Fraction
|
24
|
+
import inspect
|
25
|
+
import math
|
26
|
+
import re
|
27
|
+
import sys
|
28
|
+
import utilities
|
29
|
+
import warnings
|
30
|
+
|
31
|
+
import lilylib as ly
|
32
|
+
|
33
|
+
# Store previously converted pitch for \relative conversion as a global state variable
|
34
|
+
previous_pitch = None
|
35
|
+
relative_pitches = False
|
36
|
+
whatOrnament = ""
|
37
|
+
ly_dur = None # stores lilypond durations
|
38
|
+
|
39
|
+
|
40
|
+
def escape_instrument_string(input_string):
|
41
|
+
retstring = input_string.replace("\"", "\\\"")
|
42
|
+
if re.match('.*[\r\n]+.*', retstring):
|
43
|
+
rx = re.compile(r'[\n\r]+')
|
44
|
+
strings = rx.split(retstring)
|
45
|
+
retstring = "\\markup { \\center-column { "
|
46
|
+
for s in strings:
|
47
|
+
retstring += "\\line {\"" + s + "\"} "
|
48
|
+
retstring += "} }"
|
49
|
+
else:
|
50
|
+
retstring = "\"" + retstring + "\""
|
51
|
+
return retstring
|
52
|
+
|
53
|
+
|
54
|
+
class Output_stack_element:
|
55
|
+
def __init__(self):
|
56
|
+
self.factor = Fraction(1)
|
57
|
+
|
58
|
+
def copy(self):
|
59
|
+
o = Output_stack_element()
|
60
|
+
o.factor = self.factor
|
61
|
+
return o
|
62
|
+
|
63
|
+
|
64
|
+
class Output_printer(object):
|
65
|
+
"""
|
66
|
+
A class that takes care of formatting (eg.: indenting) a
|
67
|
+
Music expression as a .ly file.
|
68
|
+
"""
|
69
|
+
|
70
|
+
def __init__(self):
|
71
|
+
self._line = ''
|
72
|
+
self._indent = 4
|
73
|
+
self._nesting = 0
|
74
|
+
self._file = sys.stdout
|
75
|
+
self._line_len = 72
|
76
|
+
self._output_state_stack = [Output_stack_element()]
|
77
|
+
self._skipspace = False
|
78
|
+
self._last_duration = None
|
79
|
+
|
80
|
+
def set_file(self, file):
|
81
|
+
self._file = file
|
82
|
+
|
83
|
+
def dump_version(self, version):
|
84
|
+
self.print_verbatim('\\version "' + version + '"')
|
85
|
+
self.newline()
|
86
|
+
|
87
|
+
def get_indent(self):
|
88
|
+
return self._nesting * self._indent
|
89
|
+
|
90
|
+
def override(self):
|
91
|
+
last = self._output_state_stack[-1]
|
92
|
+
self._output_state_stack.append(last.copy())
|
93
|
+
|
94
|
+
def add_factor(self, factor):
|
95
|
+
self.override()
|
96
|
+
self._output_state_stack[-1].factor *= factor
|
97
|
+
|
98
|
+
def revert(self):
|
99
|
+
del self._output_state_stack[-1]
|
100
|
+
if not self._output_state_stack:
|
101
|
+
raise RuntimeError('empty stack')
|
102
|
+
|
103
|
+
def duration_factor(self):
|
104
|
+
return self._output_state_stack[-1].factor
|
105
|
+
|
106
|
+
def print_verbatim(self, s):
|
107
|
+
self._line += s
|
108
|
+
|
109
|
+
def unformatted_output(self, s):
|
110
|
+
# don't indent on \< and indent only once on <<
|
111
|
+
self._nesting += (s.count('<')
|
112
|
+
- s.count(r'\<') - s.count('<<')
|
113
|
+
+ s.count('{'))
|
114
|
+
self._nesting -= (s.count('>') - s.count(r'\>') - s.count('>>')
|
115
|
+
- s.count('->') - s.count('_>')
|
116
|
+
- s.count('^>')
|
117
|
+
+ s.count('}'))
|
118
|
+
self.print_verbatim(s)
|
119
|
+
|
120
|
+
def print_duration_string(self, s):
|
121
|
+
if self._last_duration == s:
|
122
|
+
return
|
123
|
+
|
124
|
+
self.unformatted_output(s)
|
125
|
+
|
126
|
+
# def print_note_color (self, object, rgb=None):
|
127
|
+
# if rgb:
|
128
|
+
# str = ("\\once\\override %s.color = #(rgb-color %s # %s %s)" % (object, rgb[0], rgb[1], rgb[2]))
|
129
|
+
# else:
|
130
|
+
# str = "\\revert %s.color" % object
|
131
|
+
# self.newline()
|
132
|
+
# self.add_word(str)
|
133
|
+
# self.newline()
|
134
|
+
|
135
|
+
def add_word(self, s):
|
136
|
+
if len(s) + 1 + len(self._line) > self._line_len:
|
137
|
+
self.newline()
|
138
|
+
self._skipspace = True
|
139
|
+
|
140
|
+
if not self._skipspace:
|
141
|
+
self._line += ' '
|
142
|
+
self.unformatted_output(s)
|
143
|
+
self._skipspace = False
|
144
|
+
|
145
|
+
def newline(self):
|
146
|
+
self._file.write(self._line + '\n')
|
147
|
+
self._line = ' ' * self._indent * self._nesting
|
148
|
+
self._skipspace = True
|
149
|
+
|
150
|
+
def skipspace(self):
|
151
|
+
self._skipspace = True
|
152
|
+
|
153
|
+
def __call__(self, arg):
|
154
|
+
self.dump(arg)
|
155
|
+
|
156
|
+
def dump(self, s):
|
157
|
+
if self._skipspace:
|
158
|
+
self._skipspace = False
|
159
|
+
self.unformatted_output(s)
|
160
|
+
else:
|
161
|
+
# Avoid splitting quoted strings (e.g. "1. Wie") when indenting.
|
162
|
+
words = utilities.split_string_and_preserve_doublequoted_substrings(
|
163
|
+
s)
|
164
|
+
for w in words:
|
165
|
+
self.add_word(w)
|
166
|
+
|
167
|
+
def close(self):
|
168
|
+
self.newline()
|
169
|
+
self._file.close()
|
170
|
+
self._file = None
|
171
|
+
|
172
|
+
|
173
|
+
class Duration:
|
174
|
+
def __init__(self):
|
175
|
+
self.duration_log = 0
|
176
|
+
self.dots = 0
|
177
|
+
self.factor = Fraction(1)
|
178
|
+
|
179
|
+
def lisp_expression(self):
|
180
|
+
return '(ly:make-duration %d %d %d %d)' % (self.duration_log,
|
181
|
+
self.dots,
|
182
|
+
self.factor.numerator,
|
183
|
+
self.factor.denominator)
|
184
|
+
|
185
|
+
def ly_expression(self, factor=None, scheme_mode=False):
|
186
|
+
global ly_dur # stores lilypond durations
|
187
|
+
if not factor:
|
188
|
+
factor = self.factor
|
189
|
+
|
190
|
+
if self.duration_log < 0:
|
191
|
+
if scheme_mode:
|
192
|
+
longer_dict = {-1: "breve", -2: "longa"}
|
193
|
+
else:
|
194
|
+
longer_dict = {-1: "\\breve", -2: "\\longa"}
|
195
|
+
dur_str = longer_dict.get(self.duration_log, "1")
|
196
|
+
else:
|
197
|
+
dur_str = '%d' % (1 << self.duration_log)
|
198
|
+
dur_str += '.' * self.dots
|
199
|
+
|
200
|
+
if factor != Fraction(1, 1):
|
201
|
+
if factor.denominator != 1:
|
202
|
+
dur_str += '*%d/%d' % (factor.numerator, factor.denominator)
|
203
|
+
else:
|
204
|
+
dur_str += '*%d' % factor.numerator
|
205
|
+
|
206
|
+
if dur_str.isdigit():
|
207
|
+
ly_dur = int(dur_str)
|
208
|
+
# TODO: We need to deal with dotted notes and scaled durations
|
209
|
+
# otherwise ly_dur won't work in combination with tremolos.
|
210
|
+
return dur_str
|
211
|
+
|
212
|
+
def print_ly(self, outputter):
|
213
|
+
dur_str = self.ly_expression(self.factor / outputter.duration_factor())
|
214
|
+
outputter.print_duration_string(dur_str)
|
215
|
+
|
216
|
+
def __repr__(self):
|
217
|
+
return self.ly_expression()
|
218
|
+
|
219
|
+
def copy(self):
|
220
|
+
d = Duration()
|
221
|
+
d.dots = self.dots
|
222
|
+
d.duration_log = self.duration_log
|
223
|
+
d.factor = self.factor
|
224
|
+
return d
|
225
|
+
|
226
|
+
def get_length(self):
|
227
|
+
dot_fact = Fraction((1 << (1 + self.dots)) - 1,
|
228
|
+
1 << self.dots)
|
229
|
+
|
230
|
+
log = abs(self.duration_log)
|
231
|
+
dur = 1 << log
|
232
|
+
if self.duration_log < 0:
|
233
|
+
base = Fraction(dur)
|
234
|
+
else:
|
235
|
+
base = Fraction(1, dur)
|
236
|
+
|
237
|
+
return base * dot_fact * self.factor
|
238
|
+
|
239
|
+
|
240
|
+
def set_create_midi(option):
|
241
|
+
"""
|
242
|
+
Implement the midi command line option '-m' and '--midi'.
|
243
|
+
If True, add midi-block to .ly file (see L{musicexp.Score.print_ly}).
|
244
|
+
|
245
|
+
@param option: Indicates whether the midi-block has to be added or not.
|
246
|
+
@type option: boolean
|
247
|
+
"""
|
248
|
+
global midi_option
|
249
|
+
midi_option = option
|
250
|
+
|
251
|
+
|
252
|
+
def get_create_midi():
|
253
|
+
"""
|
254
|
+
Return, if exists the state of the midi-option.
|
255
|
+
|
256
|
+
@return: The state of the midi-option.
|
257
|
+
@rtype: boolean
|
258
|
+
"""
|
259
|
+
try:
|
260
|
+
return midi_option
|
261
|
+
except NameError:
|
262
|
+
return False
|
263
|
+
|
264
|
+
# implement the command line option '--transpose'
|
265
|
+
|
266
|
+
|
267
|
+
def set_transpose(option):
|
268
|
+
global transpose_option
|
269
|
+
transpose_option = option
|
270
|
+
|
271
|
+
|
272
|
+
def get_transpose(optType):
|
273
|
+
try:
|
274
|
+
if optType == "string":
|
275
|
+
return '\\transpose c %s' % transpose_option
|
276
|
+
elif optType == "integer":
|
277
|
+
p = generic_tone_to_pitch(transpose_option)
|
278
|
+
return p.semitones()
|
279
|
+
except Exception: ## TODO: find out what the possible exception is here.
|
280
|
+
if optType == "string":
|
281
|
+
return ""
|
282
|
+
elif optType == "integer":
|
283
|
+
return 0
|
284
|
+
|
285
|
+
# implement the command line option '--tab-clef'
|
286
|
+
|
287
|
+
|
288
|
+
def set_tab_clef(option):
|
289
|
+
global tab_clef_option
|
290
|
+
tab_clef_option = option
|
291
|
+
|
292
|
+
|
293
|
+
def get_tab_clef():
|
294
|
+
try:
|
295
|
+
return ("tab", tab_clef_option)[tab_clef_option == "tab" or tab_clef_option == "moderntab"]
|
296
|
+
except NameError:
|
297
|
+
return "tab"
|
298
|
+
|
299
|
+
# definitions of the command line option '--string-numbers'
|
300
|
+
|
301
|
+
|
302
|
+
def set_string_numbers(option):
|
303
|
+
global string_numbers_option
|
304
|
+
string_numbers_option = option
|
305
|
+
|
306
|
+
|
307
|
+
def get_string_numbers():
|
308
|
+
try:
|
309
|
+
return ("t", string_numbers_option)[string_numbers_option == "t" or string_numbers_option == "f"]
|
310
|
+
except NameError:
|
311
|
+
return "t"
|
312
|
+
|
313
|
+
|
314
|
+
def generic_tone_to_pitch(tone):
|
315
|
+
accidentals_dict = {
|
316
|
+
"": 0,
|
317
|
+
"es": -1,
|
318
|
+
"s": -1,
|
319
|
+
"eses": -2,
|
320
|
+
"ses": -2,
|
321
|
+
"is": 1,
|
322
|
+
"isis": 2
|
323
|
+
}
|
324
|
+
p = Pitch()
|
325
|
+
tone_ = tone.strip().lower()
|
326
|
+
p.octave = tone_.count("'") - tone_.count(",")
|
327
|
+
tone_ = tone_.replace(",", "").replace("'", "")
|
328
|
+
p.step = ((ord(tone_[0]) - ord('a') + 5) % 7)
|
329
|
+
p.alteration = accidentals_dict.get(tone_[1:], 0)
|
330
|
+
return p
|
331
|
+
|
332
|
+
# Implement the different note names for the various languages
|
333
|
+
|
334
|
+
|
335
|
+
def pitch_generic(pitch, notenames, accidentals):
|
336
|
+
s = notenames[pitch.step]
|
337
|
+
halftones = int(pitch.alteration)
|
338
|
+
if halftones < 0:
|
339
|
+
s += accidentals[0] * (-halftones)
|
340
|
+
elif pitch.alteration > 0:
|
341
|
+
s += accidentals[3] * (halftones)
|
342
|
+
# Handle remaining fraction to pitch.alteration (for microtones)
|
343
|
+
if halftones != pitch.alteration:
|
344
|
+
if None in accidentals[1:3]:
|
345
|
+
ly.warning(
|
346
|
+
_("Language does not support microtones contained in the piece"))
|
347
|
+
else:
|
348
|
+
try:
|
349
|
+
s += {-0.5: accidentals[1], 0.5: accidentals[2]
|
350
|
+
}[pitch.alteration - halftones]
|
351
|
+
except KeyError:
|
352
|
+
ly.warning(
|
353
|
+
_("Language does not support microtones contained in the piece"))
|
354
|
+
return s
|
355
|
+
|
356
|
+
|
357
|
+
def pitch_general(pitch):
|
358
|
+
s = pitch_generic(pitch, ['c', 'd', 'e', 'f', 'g', 'a', 'b'], [
|
359
|
+
'es', 'eh', 'ih', 'is'])
|
360
|
+
if "h" in s: # no short forms for quarter tones
|
361
|
+
return s
|
362
|
+
return s.replace('aes', 'as').replace('ees', 'es')
|
363
|
+
|
364
|
+
|
365
|
+
def pitch_nederlands(pitch):
|
366
|
+
return pitch_general(pitch)
|
367
|
+
|
368
|
+
|
369
|
+
def pitch_catalan(pitch):
|
370
|
+
s = pitch_generic(pitch, ['do', 're', 'mi', 'fa', 'sol', 'la', 'si'], [
|
371
|
+
'b', 'qb', 'qd', 'd'])
|
372
|
+
return s.replace('bq', 'tq').replace('dq', 'tq').replace('bt', 'c').replace('dt', 'c')
|
373
|
+
|
374
|
+
|
375
|
+
def pitch_deutsch(pitch):
|
376
|
+
s = pitch_generic(pitch, ['c', 'd', 'e', 'f', 'g', 'a', 'h'], [
|
377
|
+
'es', 'eh', 'ih', 'is'])
|
378
|
+
if s == 'hes':
|
379
|
+
return 'b'
|
380
|
+
if s[0] == "a":
|
381
|
+
return s.replace('e', 'a').replace('aa', 'a')
|
382
|
+
return s.replace('ee', 'e')
|
383
|
+
|
384
|
+
|
385
|
+
def pitch_english(pitch):
|
386
|
+
s = pitch_generic(pitch, ['c', 'd', 'e', 'f', 'g', 'a', 'b'], [
|
387
|
+
'f', 'qf', 'qs', 's'])
|
388
|
+
return s[0] + s[1:].replace('fq', 'tq').replace('sq', 'tq')
|
389
|
+
|
390
|
+
|
391
|
+
def pitch_espanol(pitch):
|
392
|
+
s = pitch_generic(pitch, ['do', 're', 'mi', 'fa', 'sol', 'la', 'si'], [
|
393
|
+
'b', 'cb', 'cs', 's'])
|
394
|
+
return s.replace('bc', 'tc').replace('sc', 'tc')
|
395
|
+
|
396
|
+
|
397
|
+
def pitch_francais(pitch):
|
398
|
+
s = pitch_generic(pitch, ['do', 'ré', 'mi', 'fa', 'sol', 'la', 'si'], [
|
399
|
+
'b', 'sb', 'sd', 'd'])
|
400
|
+
return s
|
401
|
+
|
402
|
+
|
403
|
+
def pitch_italiano(pitch):
|
404
|
+
s = pitch_generic(pitch, ['do', 're', 'mi', 'fa', 'sol', 'la', 'si'], [
|
405
|
+
'b', 'sb', 'sd', 'd'])
|
406
|
+
return s
|
407
|
+
|
408
|
+
|
409
|
+
def pitch_norsk(pitch):
|
410
|
+
s = pitch_generic(pitch, ['c', 'd', 'e', 'f', 'g', 'a', 'h'], [
|
411
|
+
'ess', 'eh', 'ih', 'iss'])
|
412
|
+
return s.replace('hess', 'b')
|
413
|
+
|
414
|
+
|
415
|
+
def pitch_portugues(pitch):
|
416
|
+
s = pitch_generic(pitch, ['do', 're', 'mi', 'fa', 'sol', 'la', 'si'], [
|
417
|
+
'b', 'bqt', 'sqt', 's'])
|
418
|
+
return s.replace('bbq', 'btq').replace('ssq', 'stq')
|
419
|
+
|
420
|
+
|
421
|
+
def pitch_suomi(pitch):
|
422
|
+
s = pitch_generic(pitch, ['c', 'd', 'e', 'f', 'g', 'a', 'h'], [
|
423
|
+
'es', 'eh', 'ih', 'is'])
|
424
|
+
if s == 'hes':
|
425
|
+
return 'b'
|
426
|
+
return s.replace('aes', 'as').replace('ees', 'es')
|
427
|
+
|
428
|
+
|
429
|
+
def pitch_svenska(pitch):
|
430
|
+
s = pitch_generic(pitch, ['c', 'd', 'e', 'f', 'g', 'a', 'h'], [
|
431
|
+
'ess', 'eh', 'ih', 'iss'])
|
432
|
+
if s == 'hess':
|
433
|
+
return 'b'
|
434
|
+
return s.replace('aes', 'as').replace('ees', 'es')
|
435
|
+
|
436
|
+
|
437
|
+
def pitch_vlaams(pitch):
|
438
|
+
s = pitch_generic(pitch, ['do', 're', 'mi', 'fa', 'sol', 'la', 'si'], [
|
439
|
+
'b', 'hb', 'hk', 'k'])
|
440
|
+
return s
|
441
|
+
|
442
|
+
|
443
|
+
def set_pitch_language(language):
|
444
|
+
global pitch_generating_function
|
445
|
+
function_dict = {
|
446
|
+
"nederlands": pitch_nederlands,
|
447
|
+
"català": pitch_catalan,
|
448
|
+
"deutsch": pitch_deutsch,
|
449
|
+
"english": pitch_english,
|
450
|
+
"español": pitch_espanol,
|
451
|
+
"français": pitch_francais,
|
452
|
+
"italiano": pitch_italiano,
|
453
|
+
"norsk": pitch_norsk,
|
454
|
+
"português": pitch_portugues,
|
455
|
+
"suomi": pitch_suomi,
|
456
|
+
"svenska": pitch_svenska,
|
457
|
+
"vlaams": pitch_vlaams}
|
458
|
+
pitch_generating_function = function_dict.get(language, pitch_general)
|
459
|
+
|
460
|
+
|
461
|
+
# global variable to hold the formatting function.
|
462
|
+
pitch_generating_function = pitch_general
|
463
|
+
|
464
|
+
|
465
|
+
class Pitch:
|
466
|
+
def __init__(self):
|
467
|
+
self.alteration = 0
|
468
|
+
self.step = 0
|
469
|
+
self.octave = 0
|
470
|
+
self._force_absolute_pitch = False
|
471
|
+
|
472
|
+
def __repr__(self):
|
473
|
+
return self.ly_expression()
|
474
|
+
|
475
|
+
def transposed(self, interval):
|
476
|
+
c = self.copy()
|
477
|
+
c.alteration += interval.alteration
|
478
|
+
c.step += interval.step
|
479
|
+
c.octave += interval.octave
|
480
|
+
c.normalize()
|
481
|
+
|
482
|
+
target_st = self.semitones() + interval.semitones()
|
483
|
+
c.alteration += target_st - c.semitones()
|
484
|
+
return c
|
485
|
+
|
486
|
+
def normalize(c):
|
487
|
+
while c.step < 0:
|
488
|
+
c.step += 7
|
489
|
+
c.octave -= 1
|
490
|
+
c.octave += c.step // 7
|
491
|
+
c.step = c.step % 7
|
492
|
+
|
493
|
+
def lisp_expression(self):
|
494
|
+
return '(ly:make-pitch %d %d %d)' % (self.octave,
|
495
|
+
self.step,
|
496
|
+
self.alteration)
|
497
|
+
|
498
|
+
def copy(self):
|
499
|
+
p = Pitch()
|
500
|
+
p.alteration = self.alteration
|
501
|
+
p.step = self.step
|
502
|
+
p.octave = self.octave
|
503
|
+
p._force_absolute_pitch = self._force_absolute_pitch
|
504
|
+
return p
|
505
|
+
|
506
|
+
def steps(self):
|
507
|
+
return self.step + self.octave * 7
|
508
|
+
|
509
|
+
def semitones(self):
|
510
|
+
return self.octave * 12 + [0, 2, 4, 5, 7, 9, 11][self.step] + self.alteration
|
511
|
+
|
512
|
+
def normalize_alteration(c):
|
513
|
+
if(c.alteration < 0 and [True, False, False, True, False, False, False][c.step]):
|
514
|
+
c.alteration += 1
|
515
|
+
c.step -= 1
|
516
|
+
elif(c.alteration > 0 and [False, False, True, False, False, False, True][c.step]):
|
517
|
+
c.alteration -= 1
|
518
|
+
c.step += 1
|
519
|
+
c.normalize()
|
520
|
+
|
521
|
+
def add_semitones(self, number):
|
522
|
+
semi = number + self.alteration
|
523
|
+
self.alteration = 0
|
524
|
+
if semi == 0:
|
525
|
+
return
|
526
|
+
sign = (1, -1)[semi < 0]
|
527
|
+
prev = self.semitones()
|
528
|
+
while abs((prev + semi) - self.semitones()) > 1:
|
529
|
+
self.step += sign
|
530
|
+
self.normalize()
|
531
|
+
self.alteration += (prev + semi) - self.semitones()
|
532
|
+
self.normalize_alteration()
|
533
|
+
|
534
|
+
def ly_step_expression(self):
|
535
|
+
return pitch_generating_function(self)
|
536
|
+
|
537
|
+
def absolute_pitch(self):
|
538
|
+
if self.octave >= 0:
|
539
|
+
return "'" * (self.octave + 1)
|
540
|
+
elif self.octave < -1:
|
541
|
+
return "," * (-self.octave - 1)
|
542
|
+
else:
|
543
|
+
return ''
|
544
|
+
|
545
|
+
def relative_pitch(self):
|
546
|
+
global previous_pitch
|
547
|
+
if not previous_pitch:
|
548
|
+
previous_pitch = self
|
549
|
+
return self.absolute_pitch()
|
550
|
+
previous_pitch_steps = previous_pitch.octave * 7 + previous_pitch.step
|
551
|
+
this_pitch_steps = self.octave * 7 + self.step
|
552
|
+
pitch_diff = (this_pitch_steps - previous_pitch_steps)
|
553
|
+
previous_pitch = self
|
554
|
+
if pitch_diff > 3:
|
555
|
+
return "'" * ((pitch_diff + 3) // 7)
|
556
|
+
elif pitch_diff < -3:
|
557
|
+
return "," * ((-pitch_diff + 3) // 7)
|
558
|
+
else:
|
559
|
+
return ""
|
560
|
+
|
561
|
+
def ly_expression(self):
|
562
|
+
s = self.ly_step_expression()
|
563
|
+
if relative_pitches and not self._force_absolute_pitch:
|
564
|
+
s += self.relative_pitch()
|
565
|
+
else:
|
566
|
+
s += self.absolute_pitch()
|
567
|
+
return s
|
568
|
+
|
569
|
+
def print_ly(self, outputter):
|
570
|
+
outputter(self.ly_expression())
|
571
|
+
|
572
|
+
|
573
|
+
class Music:
|
574
|
+
def __init__(self):
|
575
|
+
self.parent = None
|
576
|
+
self.start = Fraction(0)
|
577
|
+
self.comment = ''
|
578
|
+
self.identifier = None
|
579
|
+
|
580
|
+
def get_length(self):
|
581
|
+
return Fraction(0)
|
582
|
+
|
583
|
+
def get_properties(self):
|
584
|
+
return ''
|
585
|
+
|
586
|
+
def has_children(self):
|
587
|
+
return False
|
588
|
+
|
589
|
+
def get_index(self):
|
590
|
+
if self.parent:
|
591
|
+
return self.parent.elements.index(self)
|
592
|
+
else:
|
593
|
+
return None
|
594
|
+
|
595
|
+
def name(self):
|
596
|
+
return self.__class__.__name__
|
597
|
+
|
598
|
+
def lisp_expression(self):
|
599
|
+
name = self.name()
|
600
|
+
|
601
|
+
props = self.get_properties()
|
602
|
+
|
603
|
+
return "(make-music '%s %s)" % (name, props)
|
604
|
+
|
605
|
+
def set_start(self, start):
|
606
|
+
self.start = start
|
607
|
+
|
608
|
+
def find_first(self, predicate):
|
609
|
+
if predicate(self):
|
610
|
+
return self
|
611
|
+
return None
|
612
|
+
|
613
|
+
def print_comment(self, printer, text=None):
|
614
|
+
if not text:
|
615
|
+
text = self.comment
|
616
|
+
|
617
|
+
if not text:
|
618
|
+
return
|
619
|
+
|
620
|
+
if text == '\n':
|
621
|
+
printer.newline()
|
622
|
+
return
|
623
|
+
|
624
|
+
lines = text.split('\n')
|
625
|
+
for l in lines:
|
626
|
+
if l:
|
627
|
+
printer.unformatted_output('% ' + l)
|
628
|
+
printer.newline()
|
629
|
+
|
630
|
+
def print_with_identifier(self, printer):
|
631
|
+
if self.identifier:
|
632
|
+
printer("\\%s" % self.identifier)
|
633
|
+
else:
|
634
|
+
self.print_ly(printer)
|
635
|
+
|
636
|
+
def print_ly(self, printer):
|
637
|
+
printer(self.ly_expression())
|
638
|
+
|
639
|
+
|
640
|
+
class MusicWrapper (Music):
|
641
|
+
def __init__(self):
|
642
|
+
Music.__init__(self)
|
643
|
+
self.element = None
|
644
|
+
|
645
|
+
def print_ly(self, func):
|
646
|
+
self.element.print_ly(func)
|
647
|
+
|
648
|
+
|
649
|
+
class ModeChangingMusicWrapper (MusicWrapper):
|
650
|
+
def __init__(self):
|
651
|
+
MusicWrapper.__init__(self)
|
652
|
+
self.mode = 'notemode'
|
653
|
+
|
654
|
+
def print_ly(self, func):
|
655
|
+
func('\\%s' % self.mode)
|
656
|
+
MusicWrapper.print_ly(self, func)
|
657
|
+
|
658
|
+
|
659
|
+
class RelativeMusic (MusicWrapper):
|
660
|
+
def __init__(self):
|
661
|
+
MusicWrapper.__init__(self)
|
662
|
+
self.basepitch = None
|
663
|
+
|
664
|
+
def print_ly(self, func):
|
665
|
+
global previous_pitch
|
666
|
+
global relative_pitches
|
667
|
+
prev_relative_pitches = relative_pitches
|
668
|
+
relative_pitches = True
|
669
|
+
previous_pitch = self.basepitch
|
670
|
+
if not previous_pitch:
|
671
|
+
previous_pitch = Pitch()
|
672
|
+
func('\\relative %s%s' % (pitch_generating_function(previous_pitch),
|
673
|
+
previous_pitch.absolute_pitch()))
|
674
|
+
MusicWrapper.print_ly(self, func)
|
675
|
+
relative_pitches = prev_relative_pitches
|
676
|
+
|
677
|
+
|
678
|
+
class TimeScaledMusic (MusicWrapper):
|
679
|
+
def __init__(self):
|
680
|
+
MusicWrapper.__init__(self)
|
681
|
+
self.numerator = 1
|
682
|
+
self.denominator = 1
|
683
|
+
self.display_number = "actual" # valid values "actual" | "both" | None
|
684
|
+
# Display the basic note length for the tuplet:
|
685
|
+
self.display_type = None # value values "actual" | "both" | None
|
686
|
+
self.display_bracket = "bracket" # valid values "bracket" | "curved" | None
|
687
|
+
self.actual_type = None # The actually played unit of the scaling
|
688
|
+
self.normal_type = None # The basic unit of the scaling
|
689
|
+
self.display_numerator = None
|
690
|
+
self.display_denominator = None
|
691
|
+
|
692
|
+
def print_ly(self, func):
|
693
|
+
if self.display_bracket is None:
|
694
|
+
func("\\once \\omit TupletBracket")
|
695
|
+
func.newline()
|
696
|
+
elif self.display_bracket == "curved":
|
697
|
+
ly.warning(
|
698
|
+
_("Tuplet brackets of curved shape are not correctly implemented"))
|
699
|
+
func("\\once \\override TupletBracket.stencil = #ly:slur::print")
|
700
|
+
func.newline()
|
701
|
+
|
702
|
+
base_number_function = {None: "#f",
|
703
|
+
"actual": "tuplet-number::calc-denominator-text",
|
704
|
+
"both": "tuplet-number::calc-fraction-text"}.get(self.display_number, None)
|
705
|
+
# If we have non-standard numerator/denominator, use our custom function
|
706
|
+
if self.display_number == "actual" and self.display_denominator:
|
707
|
+
base_number_function = "(tuplet-number::non-default-tuplet-denominator-text %s)" % self.display_denominator
|
708
|
+
elif self.display_number == "both" and (self.display_denominator or self.display_numerator):
|
709
|
+
if self.display_numerator:
|
710
|
+
num = self.display_numerator
|
711
|
+
else:
|
712
|
+
num = "#f"
|
713
|
+
if self.display_denominator:
|
714
|
+
den = self.display_denominator
|
715
|
+
else:
|
716
|
+
den = "#f"
|
717
|
+
base_number_function = "(tuplet-number::non-default-tuplet-fraction-text %s %s)" % (
|
718
|
+
den, num)
|
719
|
+
|
720
|
+
if self.display_type == "actual" and self.normal_type:
|
721
|
+
base_duration = self.normal_type.lisp_expression()
|
722
|
+
func("\\once \\override TupletNumber.text = #(tuplet-number::append-note-wrapper %s %s)" %
|
723
|
+
(base_number_function, base_duration))
|
724
|
+
func.newline()
|
725
|
+
elif self.display_type == "both": # TODO: Implement this using actual_type and normal_type!
|
726
|
+
if self.display_number is None:
|
727
|
+
func("\\once \\omit TupletNumber")
|
728
|
+
func.newline()
|
729
|
+
elif self.display_number == "both":
|
730
|
+
den_duration = self.normal_type.lisp_expression()
|
731
|
+
# If we don't have an actual type set, use the normal duration!
|
732
|
+
if self.actual_type:
|
733
|
+
num_duration = self.actual_type.lisp_expression()
|
734
|
+
else:
|
735
|
+
num_duration = den_duration
|
736
|
+
if (self.display_denominator or self.display_numerator):
|
737
|
+
func("\\once \\override TupletNumber.text = #(tuplet-number::non-default-fraction-with-notes %s %s %s %s)" %
|
738
|
+
(self.display_denominator, den_duration,
|
739
|
+
self.display_numerator, num_duration))
|
740
|
+
func.newline()
|
741
|
+
else:
|
742
|
+
func("\\once \\override TupletNumber.text = #(tuplet-number::fraction-with-notes %s %s)" %
|
743
|
+
(den_duration, num_duration))
|
744
|
+
func.newline()
|
745
|
+
else:
|
746
|
+
if self.display_number is None:
|
747
|
+
func("\\once \\omit TupletNumber")
|
748
|
+
func.newline()
|
749
|
+
elif self.display_number == "both":
|
750
|
+
func("\\once \\override TupletNumber.text = #%s" %
|
751
|
+
base_number_function)
|
752
|
+
func.newline()
|
753
|
+
|
754
|
+
func('\\times %d/%d ' %
|
755
|
+
(self.numerator, self.denominator))
|
756
|
+
func.add_factor(Fraction(self.numerator, self.denominator))
|
757
|
+
MusicWrapper.print_ly(self, func)
|
758
|
+
func.revert()
|
759
|
+
|
760
|
+
|
761
|
+
class NestedMusic(Music):
|
762
|
+
def __init__(self):
|
763
|
+
Music.__init__(self)
|
764
|
+
self.elements = []
|
765
|
+
|
766
|
+
def append(self, what):
|
767
|
+
if what:
|
768
|
+
self.elements.append(what)
|
769
|
+
|
770
|
+
def has_children(self):
|
771
|
+
return self.elements
|
772
|
+
|
773
|
+
def insert_around(self, succ, elt, dir):
|
774
|
+
assert elt.parent is None
|
775
|
+
assert succ is None or succ in self.elements
|
776
|
+
|
777
|
+
idx = 0
|
778
|
+
if succ:
|
779
|
+
idx = self.elements.index(succ)
|
780
|
+
if dir > 0:
|
781
|
+
idx += 1
|
782
|
+
else:
|
783
|
+
if dir < 0:
|
784
|
+
idx = 0
|
785
|
+
elif dir > 0:
|
786
|
+
idx = len(self.elements)
|
787
|
+
|
788
|
+
self.elements.insert(idx, elt)
|
789
|
+
elt.parent = self
|
790
|
+
|
791
|
+
def get_properties(self):
|
792
|
+
return ("'elements (list %s)"
|
793
|
+
% " ".join([x.lisp_expression() for x in self.elements]))
|
794
|
+
|
795
|
+
def get_subset_properties(self, predicate):
|
796
|
+
return ("'elements (list %s)"
|
797
|
+
% " ".join([x.lisp_expression() for x in list(filter(predicate, self.elements))]))
|
798
|
+
|
799
|
+
def get_neighbor(self, music, dir):
|
800
|
+
assert music.parent == self
|
801
|
+
idx = self.elements.index(music)
|
802
|
+
idx += dir
|
803
|
+
idx = min(idx, len(self.elements) - 1)
|
804
|
+
idx = max(idx, 0)
|
805
|
+
|
806
|
+
return self.elements[idx]
|
807
|
+
|
808
|
+
def delete_element(self, element):
|
809
|
+
assert element in self.elements
|
810
|
+
|
811
|
+
self.elements.remove(element)
|
812
|
+
element.parent = None
|
813
|
+
|
814
|
+
def set_start(self, start):
|
815
|
+
self.start = start
|
816
|
+
for e in self.elements:
|
817
|
+
e.set_start(start)
|
818
|
+
|
819
|
+
def find_first(self, predicate):
|
820
|
+
r = Music.find_first(self, predicate)
|
821
|
+
if r:
|
822
|
+
return r
|
823
|
+
|
824
|
+
for e in self.elements:
|
825
|
+
r = e.find_first(predicate)
|
826
|
+
if r:
|
827
|
+
return r
|
828
|
+
return None
|
829
|
+
|
830
|
+
|
831
|
+
class SequentialMusic (NestedMusic):
|
832
|
+
def get_last_event_chord(self):
|
833
|
+
value = None
|
834
|
+
at = len(self.elements) - 1
|
835
|
+
while (at >= 0 and
|
836
|
+
not isinstance(self.elements[at], ChordEvent) and
|
837
|
+
not isinstance(self.elements[at], BarLine)):
|
838
|
+
at -= 1
|
839
|
+
|
840
|
+
if (at >= 0 and isinstance(self.elements[at], ChordEvent)):
|
841
|
+
value = self.elements[at]
|
842
|
+
return value
|
843
|
+
|
844
|
+
def print_ly(self, printer, newline=True):
|
845
|
+
printer('{')
|
846
|
+
if self.comment:
|
847
|
+
self.print_comment(printer)
|
848
|
+
|
849
|
+
if newline:
|
850
|
+
printer.newline()
|
851
|
+
for e in self.elements:
|
852
|
+
e.print_ly(printer)
|
853
|
+
|
854
|
+
printer('}')
|
855
|
+
if newline:
|
856
|
+
printer.newline()
|
857
|
+
|
858
|
+
def lisp_sub_expression(self, pred):
|
859
|
+
name = self.name()
|
860
|
+
|
861
|
+
props = self.get_subset_properties(pred)
|
862
|
+
|
863
|
+
return "(make-music '%s %s)" % (name, props)
|
864
|
+
|
865
|
+
def set_start(self, start):
|
866
|
+
for e in self.elements:
|
867
|
+
e.set_start(start)
|
868
|
+
start += e.get_length()
|
869
|
+
|
870
|
+
|
871
|
+
class RepeatedMusic:
|
872
|
+
def __init__(self):
|
873
|
+
self.repeat_type = "volta"
|
874
|
+
self.repeat_count = 2
|
875
|
+
self.endings = []
|
876
|
+
self.music = None
|
877
|
+
|
878
|
+
def set_music(self, music):
|
879
|
+
if isinstance(music, Music):
|
880
|
+
self.music = music
|
881
|
+
elif isinstance(music, list):
|
882
|
+
self.music = SequentialMusic()
|
883
|
+
self.music.elements = music
|
884
|
+
else:
|
885
|
+
ly.warning(_("unable to set the music %(music)s for the repeat %(repeat)s") %
|
886
|
+
{'music': music, 'repeat': self})
|
887
|
+
|
888
|
+
def add_ending(self, music):
|
889
|
+
self.endings.append(music)
|
890
|
+
|
891
|
+
def print_ly(self, printer):
|
892
|
+
printer.dump('\\repeat %s %s' % (self.repeat_type, self.repeat_count))
|
893
|
+
if self.music:
|
894
|
+
self.music.print_ly(printer)
|
895
|
+
else:
|
896
|
+
ly.warning(_("encountered repeat without body"))
|
897
|
+
printer.dump('{}')
|
898
|
+
if self.endings:
|
899
|
+
printer.dump('\\alternative {')
|
900
|
+
for e in self.endings:
|
901
|
+
e.print_ly(printer)
|
902
|
+
printer.dump('}')
|
903
|
+
|
904
|
+
|
905
|
+
class Lyrics:
|
906
|
+
def __init__(self):
|
907
|
+
self.lyrics_syllables = []
|
908
|
+
|
909
|
+
def print_ly(self, printer):
|
910
|
+
printer.dump(self.ly_expression())
|
911
|
+
printer.newline()
|
912
|
+
printer.dump('}')
|
913
|
+
printer.newline()
|
914
|
+
|
915
|
+
def ly_expression(self):
|
916
|
+
lstr = r"\lyricmode {\set ignoreMelismata = ##t"
|
917
|
+
for l in self.lyrics_syllables:
|
918
|
+
lstr += l
|
919
|
+
#lstr += "\n}"
|
920
|
+
return lstr
|
921
|
+
|
922
|
+
|
923
|
+
class Header:
|
924
|
+
|
925
|
+
def __init__(self):
|
926
|
+
self.header_fields = {}
|
927
|
+
|
928
|
+
def set_field(self, field, value):
|
929
|
+
self.header_fields[field] = value
|
930
|
+
|
931
|
+
def format_header_strings(self, key, value, printer):
|
932
|
+
printer.dump(key + ' = ')
|
933
|
+
|
934
|
+
# If a header item contains a line break, it is segmented. The
|
935
|
+
# substrings are formatted with the help of \markup, using
|
936
|
+
# \column and \line. An exception, however, are texidoc items,
|
937
|
+
# which should not contain LilyPond formatting commands.
|
938
|
+
if (key != 'texidoc') and ('\n' in value):
|
939
|
+
value = value.replace('"', '')
|
940
|
+
printer.dump(r'\markup \column {')
|
941
|
+
substrings = value.split('\n')
|
942
|
+
for s in substrings:
|
943
|
+
printer.newline()
|
944
|
+
printer.dump(r'\line { "' + s + '"}')
|
945
|
+
printer.dump('}')
|
946
|
+
printer.newline()
|
947
|
+
else:
|
948
|
+
printer.dump(value)
|
949
|
+
printer.newline()
|
950
|
+
|
951
|
+
def print_ly(self, printer):
|
952
|
+
printer.dump(r"\header {")
|
953
|
+
printer.newline()
|
954
|
+
for (k, v) in list(self.header_fields.items()):
|
955
|
+
if v:
|
956
|
+
self.format_header_strings(k, v, printer)
|
957
|
+
# printer.newline()
|
958
|
+
printer.dump("}")
|
959
|
+
printer.newline()
|
960
|
+
printer.newline()
|
961
|
+
|
962
|
+
|
963
|
+
class Paper:
|
964
|
+
def __init__(self):
|
965
|
+
self.global_staff_size = -1
|
966
|
+
# page size
|
967
|
+
self.page_width = -1
|
968
|
+
self.page_height = -1
|
969
|
+
# page margins
|
970
|
+
self.top_margin = -1
|
971
|
+
self.bottom_margin = -1
|
972
|
+
self.left_margin = -1
|
973
|
+
self.right_margin = -1
|
974
|
+
self.system_left_margin = -1
|
975
|
+
self.system_right_margin = -1
|
976
|
+
self.system_distance = -1
|
977
|
+
self.top_system_distance = -1
|
978
|
+
self.indent = 0
|
979
|
+
self.short_indent = 0
|
980
|
+
self.instrument_names = []
|
981
|
+
|
982
|
+
def print_length_field(self, printer, field, value):
|
983
|
+
if value >= 0:
|
984
|
+
printer.dump("%s = %s\\cm" % (field, value))
|
985
|
+
printer.newline()
|
986
|
+
|
987
|
+
def get_longest_instrument_name(self):
|
988
|
+
result = ''
|
989
|
+
for name in self.instrument_names:
|
990
|
+
lines = name.split('\n')
|
991
|
+
for line in lines:
|
992
|
+
if len(line) > len(result):
|
993
|
+
result = line
|
994
|
+
return result
|
995
|
+
|
996
|
+
def print_ly(self, printer):
|
997
|
+
if self.global_staff_size > 0:
|
998
|
+
printer.dump('#(set-global-staff-size %s)' %
|
999
|
+
self.global_staff_size)
|
1000
|
+
printer.newline()
|
1001
|
+
printer.dump('\\paper {')
|
1002
|
+
printer.newline()
|
1003
|
+
printer.newline()
|
1004
|
+
self.print_length_field(printer, "paper-width", self.page_width)
|
1005
|
+
self.print_length_field(printer, "paper-height", self.page_height)
|
1006
|
+
self.print_length_field(printer, "top-margin", self.top_margin)
|
1007
|
+
self.print_length_field(printer, "bottom-margin", self.bottom_margin)
|
1008
|
+
self.print_length_field(printer, "left-margin", self.left_margin)
|
1009
|
+
# TODO: maybe set line-width instead of right-margin?
|
1010
|
+
self.print_length_field(printer, "right-margin", self.right_margin)
|
1011
|
+
# TODO: What's the corresponding setting for system_left_margin and
|
1012
|
+
# system_right_margin in LilyPond?
|
1013
|
+
self.print_length_field(
|
1014
|
+
printer, "between-system-space", self.system_distance)
|
1015
|
+
self.print_length_field(
|
1016
|
+
printer, "page-top-space", self.top_system_distance)
|
1017
|
+
# TODO: Compute the indentation with the instrument name lengths
|
1018
|
+
|
1019
|
+
# TODO: font width ?
|
1020
|
+
char_per_cm = (len(self.get_longest_instrument_name())
|
1021
|
+
* 13) / self.page_width
|
1022
|
+
if self.indent != 0:
|
1023
|
+
self.print_length_field(printer, "indent", self.indent/char_per_cm)
|
1024
|
+
if self.short_indent != 0:
|
1025
|
+
self.print_length_field(
|
1026
|
+
printer, "short-indent", self.short_indent/char_per_cm)
|
1027
|
+
|
1028
|
+
printer.dump('}')
|
1029
|
+
printer.newline()
|
1030
|
+
|
1031
|
+
|
1032
|
+
class Layout:
|
1033
|
+
def __init__(self):
|
1034
|
+
self.context_dict = {}
|
1035
|
+
|
1036
|
+
def add_context(self, context):
|
1037
|
+
if context not in self.context_dict:
|
1038
|
+
self.context_dict[context] = []
|
1039
|
+
|
1040
|
+
def set_context_item(self, context, item):
|
1041
|
+
self.add_context(context)
|
1042
|
+
if not item in self.context_dict[context]:
|
1043
|
+
self.context_dict[context].append(item)
|
1044
|
+
|
1045
|
+
def print_ly(self, printer):
|
1046
|
+
if list(self.context_dict.items()):
|
1047
|
+
printer.dump('\\layout {')
|
1048
|
+
printer.newline()
|
1049
|
+
for (context, defs) in list(self.context_dict.items()):
|
1050
|
+
printer.dump('\\context { \\%s' % context)
|
1051
|
+
printer.newline()
|
1052
|
+
for d in defs:
|
1053
|
+
printer.dump(d)
|
1054
|
+
printer.newline()
|
1055
|
+
printer.dump('}')
|
1056
|
+
printer.newline()
|
1057
|
+
printer.dump('}')
|
1058
|
+
printer.newline()
|
1059
|
+
|
1060
|
+
|
1061
|
+
class ChordEvent (NestedMusic):
|
1062
|
+
def __init__(self):
|
1063
|
+
NestedMusic.__init__(self)
|
1064
|
+
self.after_grace_elements = None
|
1065
|
+
self.grace_elements = None
|
1066
|
+
self.grace_type = None
|
1067
|
+
|
1068
|
+
def append_grace(self, element):
|
1069
|
+
if element:
|
1070
|
+
if not self.grace_elements:
|
1071
|
+
self.grace_elements = SequentialMusic()
|
1072
|
+
self.grace_elements.append(element)
|
1073
|
+
|
1074
|
+
def append_after_grace(self, element):
|
1075
|
+
if element:
|
1076
|
+
if not self.after_grace_elements:
|
1077
|
+
self.after_grace_elements = SequentialMusic()
|
1078
|
+
self.after_grace_elements.append(element)
|
1079
|
+
|
1080
|
+
def has_elements(self):
|
1081
|
+
return [e for e in self.elements if
|
1082
|
+
isinstance(e, NoteEvent) or isinstance(e, RestEvent)] != []
|
1083
|
+
|
1084
|
+
def get_length(self):
|
1085
|
+
l = Fraction(0)
|
1086
|
+
for e in self.elements:
|
1087
|
+
l = max(l, e.get_length())
|
1088
|
+
return l
|
1089
|
+
|
1090
|
+
def get_duration(self):
|
1091
|
+
note_events = [e for e in self.elements if
|
1092
|
+
isinstance(e, NoteEvent) or isinstance(e, RestEvent)]
|
1093
|
+
if note_events:
|
1094
|
+
return note_events[0].duration
|
1095
|
+
else:
|
1096
|
+
return None
|
1097
|
+
|
1098
|
+
def print_ly(self, printer):
|
1099
|
+
note_events = [e for e in self.elements if
|
1100
|
+
isinstance(e, NoteEvent)]
|
1101
|
+
|
1102
|
+
rest_events = [e for e in self.elements if
|
1103
|
+
isinstance(e, RhythmicEvent)
|
1104
|
+
and not isinstance(e, NoteEvent)]
|
1105
|
+
|
1106
|
+
other_events = [e for e in self.elements if
|
1107
|
+
not isinstance(e, RhythmicEvent)]
|
1108
|
+
|
1109
|
+
if self.after_grace_elements:
|
1110
|
+
printer('\\afterGrace {')
|
1111
|
+
|
1112
|
+
if self.grace_elements and self.elements:
|
1113
|
+
if self.grace_type:
|
1114
|
+
printer('\\%s' % self.grace_type)
|
1115
|
+
else:
|
1116
|
+
printer('\\grace')
|
1117
|
+
# don't print newlines after the { and } braces
|
1118
|
+
self.grace_elements.print_ly(printer, False)
|
1119
|
+
elif self.grace_elements: # no self.elements!
|
1120
|
+
ly.warning(_("Grace note with no following music: %s") %
|
1121
|
+
self.grace_elements)
|
1122
|
+
if self.grace_type:
|
1123
|
+
printer('\\%s' % self.grace_type)
|
1124
|
+
else:
|
1125
|
+
printer('\\grace')
|
1126
|
+
self.grace_elements.print_ly(printer, False)
|
1127
|
+
printer('{}')
|
1128
|
+
|
1129
|
+
# Print all overrides and other settings needed by the
|
1130
|
+
# articulations/ornaments before the note
|
1131
|
+
|
1132
|
+
for e in other_events:
|
1133
|
+
if not hasattr(e, 'print_before_note'):
|
1134
|
+
continue
|
1135
|
+
e.print_before_note(printer)
|
1136
|
+
|
1137
|
+
if rest_events:
|
1138
|
+
rest_events[0].print_ly(printer)
|
1139
|
+
elif len(note_events) == 1:
|
1140
|
+
note_events[0].print_ly(printer)
|
1141
|
+
elif note_events:
|
1142
|
+
global previous_pitch
|
1143
|
+
pitches = []
|
1144
|
+
basepitch = None
|
1145
|
+
stem = None
|
1146
|
+
for x in note_events:
|
1147
|
+
if x.associated_events:
|
1148
|
+
for aev in x.associated_events:
|
1149
|
+
if (isinstance(aev, StemEvent) and aev.value):
|
1150
|
+
stem = aev
|
1151
|
+
pitches.append(x.chord_element_ly())
|
1152
|
+
if not basepitch:
|
1153
|
+
basepitch = previous_pitch
|
1154
|
+
if stem:
|
1155
|
+
printer(stem.ly_expression())
|
1156
|
+
printer('<%s>' % ' '.join(pitches))
|
1157
|
+
previous_pitch = basepitch
|
1158
|
+
duration = self.get_duration()
|
1159
|
+
if duration:
|
1160
|
+
duration.print_ly(printer)
|
1161
|
+
else:
|
1162
|
+
pass
|
1163
|
+
|
1164
|
+
for e in other_events:
|
1165
|
+
e.print_ly(printer)
|
1166
|
+
|
1167
|
+
for e in other_events:
|
1168
|
+
if not hasattr(e, 'print_after_note'):
|
1169
|
+
continue
|
1170
|
+
e.print_after_note(printer)
|
1171
|
+
|
1172
|
+
if self.after_grace_elements:
|
1173
|
+
printer('}')
|
1174
|
+
self.after_grace_elements.print_ly(printer, False)
|
1175
|
+
|
1176
|
+
self.print_comment(printer)
|
1177
|
+
|
1178
|
+
|
1179
|
+
class Partial (Music):
|
1180
|
+
def __init__(self):
|
1181
|
+
Music.__init__(self)
|
1182
|
+
self.partial = None
|
1183
|
+
|
1184
|
+
def print_ly(self, printer):
|
1185
|
+
if self.partial:
|
1186
|
+
printer.dump("\\partial %s" % self.partial.ly_expression())
|
1187
|
+
|
1188
|
+
|
1189
|
+
class BarLine (Music):
|
1190
|
+
def __init__(self):
|
1191
|
+
Music.__init__(self)
|
1192
|
+
self.bar_number = 0
|
1193
|
+
self.type = None
|
1194
|
+
|
1195
|
+
def print_ly(self, printer):
|
1196
|
+
bar_symbol = {
|
1197
|
+
'dashed': '!',
|
1198
|
+
'dotted': ';',
|
1199
|
+
'heavy': '.',
|
1200
|
+
'heavy-heavy': '..',
|
1201
|
+
'heavy-light': '.|',
|
1202
|
+
'light-heavy': '|.',
|
1203
|
+
'light-light': '||',
|
1204
|
+
'none': '',
|
1205
|
+
'regular': '|',
|
1206
|
+
'short': ',',
|
1207
|
+
'tick': "'"}.get(self.type, None)
|
1208
|
+
if bar_symbol is not None:
|
1209
|
+
printer.dump('\\bar "%s"' % bar_symbol)
|
1210
|
+
else:
|
1211
|
+
printer.dump("|")
|
1212
|
+
|
1213
|
+
if self.bar_number > 0 and (self.bar_number % 10) == 0:
|
1214
|
+
printer.dump("\\barNumberCheck #%d " % self.bar_number)
|
1215
|
+
elif self.bar_number > 0:
|
1216
|
+
printer.print_verbatim(' %% %d' % self.bar_number)
|
1217
|
+
printer.newline()
|
1218
|
+
|
1219
|
+
def ly_expression(self):
|
1220
|
+
return " | "
|
1221
|
+
|
1222
|
+
|
1223
|
+
class Event(Music):
|
1224
|
+
def __init__(self):
|
1225
|
+
# strings to print before the note to which an event is attached.
|
1226
|
+
# Ignored for notes etc.
|
1227
|
+
super(Event, self).__init__()
|
1228
|
+
self.before_note = None
|
1229
|
+
self.after_note = None
|
1230
|
+
# print something before the note to which an event is attached, e.g. overrides
|
1231
|
+
|
1232
|
+
def print_before_note(self, printer):
|
1233
|
+
if self.before_note:
|
1234
|
+
printer.dump(self.before_note)
|
1235
|
+
# print something after the note to which an event is attached, e.g. resetting
|
1236
|
+
|
1237
|
+
def print_after_note(self, printer):
|
1238
|
+
if self.after_note:
|
1239
|
+
printer.dump(self.after_note)
|
1240
|
+
pass
|
1241
|
+
|
1242
|
+
|
1243
|
+
class SpanEvent (Event):
|
1244
|
+
def __init__(self):
|
1245
|
+
Event.__init__(self)
|
1246
|
+
self.span_direction = 0 # start/stop
|
1247
|
+
self.line_type = 'solid'
|
1248
|
+
self.span_type = 0 # e.g. cres/decrescendo, ottava up/down
|
1249
|
+
self.size = 0 # size of e.g. octave shift
|
1250
|
+
|
1251
|
+
def wait_for_note(self):
|
1252
|
+
return True
|
1253
|
+
|
1254
|
+
def get_properties(self):
|
1255
|
+
return "'span-direction %d" % self.span_direction
|
1256
|
+
|
1257
|
+
def set_span_type(self, type):
|
1258
|
+
self.span_type = type
|
1259
|
+
|
1260
|
+
|
1261
|
+
class BreatheEvent (Event):
|
1262
|
+
def __init__(self):
|
1263
|
+
super().__init__()
|
1264
|
+
self.after_note = "\\breathe"
|
1265
|
+
|
1266
|
+
def ly_expression(self):
|
1267
|
+
return ''
|
1268
|
+
|
1269
|
+
|
1270
|
+
class CaesuraEvent (Event):
|
1271
|
+
def __init__(self):
|
1272
|
+
super().__init__()
|
1273
|
+
self.after_note = "\\caesura"
|
1274
|
+
|
1275
|
+
def ly_expression(self):
|
1276
|
+
return ''
|
1277
|
+
|
1278
|
+
|
1279
|
+
class SlurEvent (SpanEvent):
|
1280
|
+
def print_before_note(self, printer):
|
1281
|
+
command = {'dotted': '\\slurDotted',
|
1282
|
+
'dashed': '\\slurDashed'}.get(self.line_type, '')
|
1283
|
+
if command and self.span_direction == -1:
|
1284
|
+
printer.dump(command)
|
1285
|
+
|
1286
|
+
def print_after_note(self, printer):
|
1287
|
+
# reset non-solid slur types!
|
1288
|
+
command = {'dotted': '\\slurSolid',
|
1289
|
+
'dashed': '\\slurSolid'}.get(self.line_type, '')
|
1290
|
+
if command and self.span_direction == -1:
|
1291
|
+
printer.dump(command)
|
1292
|
+
|
1293
|
+
def ly_expression(self):
|
1294
|
+
return {-1: '(', 1: ')'}.get(self.span_direction, '')
|
1295
|
+
|
1296
|
+
|
1297
|
+
class BeamEvent (SpanEvent):
|
1298
|
+
def ly_expression(self):
|
1299
|
+
return {-1: '[', 1: ']'}.get(self.span_direction, '')
|
1300
|
+
|
1301
|
+
|
1302
|
+
class PedalEvent (SpanEvent):
|
1303
|
+
def ly_expression(self):
|
1304
|
+
return {-1: '\\sustainOn',
|
1305
|
+
0: '\\sustainOff\\sustainOn',
|
1306
|
+
1: '\\sustainOff'}.get(self.span_direction, '')
|
1307
|
+
|
1308
|
+
|
1309
|
+
class TextSpannerEvent (SpanEvent):
|
1310
|
+
def print_before_note(self, printer):
|
1311
|
+
if hasattr(self, 'style') and self.style == "wave":
|
1312
|
+
printer.dump(r"\once \override TextSpanner.style = #'trill")
|
1313
|
+
if hasattr(self, 'force_direction'):
|
1314
|
+
x = {-1: '\\textSpannerDown', 0: '\\textSpannerNeutral',
|
1315
|
+
1: '\\textSpannerUp'}.get(self.force_direction, '')
|
1316
|
+
printer.dump(x)
|
1317
|
+
def print_after_note(self, printer):
|
1318
|
+
pass
|
1319
|
+
|
1320
|
+
def ly_expression(self):
|
1321
|
+
global whatOrnament
|
1322
|
+
if hasattr(self, 'style') and self.style == "ignore":
|
1323
|
+
return ""
|
1324
|
+
# if self.style=="wave":
|
1325
|
+
if whatOrnament == "wave":
|
1326
|
+
return {-1: '\\startTextSpan',
|
1327
|
+
1: '\\stopTextSpan'}.get(self.span_direction, '')
|
1328
|
+
else:
|
1329
|
+
if hasattr(self, 'style') and self.style == "stop" and whatOrnament != "trill":
|
1330
|
+
return ""
|
1331
|
+
return {-1: '\\startTrillSpan',
|
1332
|
+
1: '\\stopTrillSpan'}.get(self.span_direction, '')
|
1333
|
+
|
1334
|
+
|
1335
|
+
class BracketSpannerEvent (SpanEvent):
|
1336
|
+
# Ligature brackets use prefix-notation!!!
|
1337
|
+
def print_before_note(self, printer):
|
1338
|
+
if self.span_direction == -1:
|
1339
|
+
if self.force_direction == 1:
|
1340
|
+
printer.dump(r"\once \override LigatureBracket.direction = #UP")
|
1341
|
+
elif self.force_direction == -1:
|
1342
|
+
printer.dump(
|
1343
|
+
r"\once \override LigatureBracket.direction = #DOWN")
|
1344
|
+
printer.dump(r'\[')
|
1345
|
+
# the bracket after the last note
|
1346
|
+
|
1347
|
+
def print_after_note(self, printer):
|
1348
|
+
if self.span_direction == 1:
|
1349
|
+
printer.dump(r'\]')
|
1350
|
+
# we're printing everything in print_(before|after)_note...
|
1351
|
+
|
1352
|
+
def ly_expression(self):
|
1353
|
+
return ''
|
1354
|
+
|
1355
|
+
|
1356
|
+
class OctaveShiftEvent (SpanEvent):
|
1357
|
+
def wait_for_note(self):
|
1358
|
+
return False
|
1359
|
+
|
1360
|
+
def set_span_type(self, type):
|
1361
|
+
self.span_type = {'up': 1, 'down': -1}.get(type, 0)
|
1362
|
+
|
1363
|
+
def ly_octave_shift_indicator(self):
|
1364
|
+
# convert 8/15 to lilypond indicators (+-1/+-2)
|
1365
|
+
try:
|
1366
|
+
value = {8: 1, 15: 2}[self.size]
|
1367
|
+
except KeyError:
|
1368
|
+
ly.warning(
|
1369
|
+
_("Invalid octave shift size found: %s. Using no shift.") % self.size)
|
1370
|
+
value = 0
|
1371
|
+
# negative values go up!
|
1372
|
+
value *= -1 * self.span_type
|
1373
|
+
return value
|
1374
|
+
|
1375
|
+
def ly_expression(self):
|
1376
|
+
dir = self.ly_octave_shift_indicator()
|
1377
|
+
value = ''
|
1378
|
+
if dir:
|
1379
|
+
value = r'\ottava #%s' % dir
|
1380
|
+
return {
|
1381
|
+
- 1: value,
|
1382
|
+
1: r'\ottava #0'}.get(self.span_direction, '')
|
1383
|
+
|
1384
|
+
|
1385
|
+
class TrillSpanEvent (SpanEvent):
|
1386
|
+
def ly_expression(self):
|
1387
|
+
return {-1: '\\startTrillSpan',
|
1388
|
+
0: '', # no need to write out anything for type='continue'
|
1389
|
+
1: '\\stopTrillSpan'}.get(self.span_direction, '')
|
1390
|
+
|
1391
|
+
|
1392
|
+
class GlissandoEvent (SpanEvent):
|
1393
|
+
def print_before_note(self, printer):
|
1394
|
+
if self.span_direction == -1:
|
1395
|
+
style = {
|
1396
|
+
"dashed": "dashed-line",
|
1397
|
+
"dotted": "dotted-line",
|
1398
|
+
"wavy": "zigzag"
|
1399
|
+
}. get(self.line_type, None)
|
1400
|
+
if style:
|
1401
|
+
printer.dump(
|
1402
|
+
"\\once \\override Glissando.style = #'%s" % style)
|
1403
|
+
|
1404
|
+
def ly_expression(self):
|
1405
|
+
return {-1: '\\glissando',
|
1406
|
+
1: ''}.get(self.span_direction, '')
|
1407
|
+
|
1408
|
+
|
1409
|
+
class ArpeggioEvent(Event):
|
1410
|
+
def __init__(self):
|
1411
|
+
Event.__init__(self)
|
1412
|
+
self.direction = 0
|
1413
|
+
self.non_arpeggiate = False
|
1414
|
+
|
1415
|
+
def wait_for_note(self):
|
1416
|
+
return True
|
1417
|
+
|
1418
|
+
def print_before_note(self, printer):
|
1419
|
+
if self.non_arpeggiate:
|
1420
|
+
printer.dump("\\arpeggioBracket")
|
1421
|
+
else:
|
1422
|
+
dir = {-1: "\\arpeggioArrowDown",
|
1423
|
+
1: "\\arpeggioArrowUp"}.get(self.direction, '')
|
1424
|
+
if dir:
|
1425
|
+
printer.dump(dir)
|
1426
|
+
|
1427
|
+
def print_after_note(self, printer):
|
1428
|
+
if self.non_arpeggiate or self.direction:
|
1429
|
+
printer.dump("\\arpeggioNormal")
|
1430
|
+
|
1431
|
+
def ly_expression(self):
|
1432
|
+
return '\\arpeggio'
|
1433
|
+
|
1434
|
+
|
1435
|
+
class TieEvent(Event):
|
1436
|
+
def ly_expression(self):
|
1437
|
+
return '~'
|
1438
|
+
|
1439
|
+
|
1440
|
+
class HairpinEvent (SpanEvent):
|
1441
|
+
def set_span_type(self, type):
|
1442
|
+
self.span_type = {'crescendo': 1, 'decrescendo': -
|
1443
|
+
1, 'diminuendo': -1}.get(type, 0)
|
1444
|
+
|
1445
|
+
def hairpin_to_ly(self):
|
1446
|
+
if self.span_direction == 1:
|
1447
|
+
return r'\!'
|
1448
|
+
else:
|
1449
|
+
return {1: r'\<', -1: r'\>'}.get(self.span_type, '')
|
1450
|
+
|
1451
|
+
def direction_mod(self):
|
1452
|
+
return {1: '^', -1: '_', 0: '-'}.get(self.force_direction, '-')
|
1453
|
+
|
1454
|
+
def ly_expression(self):
|
1455
|
+
return self.hairpin_to_ly()
|
1456
|
+
|
1457
|
+
def print_ly(self, printer):
|
1458
|
+
val = self.hairpin_to_ly()
|
1459
|
+
if val:
|
1460
|
+
# printer.dump (val)
|
1461
|
+
printer.dump('%s%s' % (self.direction_mod(), val))
|
1462
|
+
|
1463
|
+
|
1464
|
+
class DynamicsEvent (Event):
|
1465
|
+
def __init__(self):
|
1466
|
+
Event.__init__(self)
|
1467
|
+
self.type = None
|
1468
|
+
self.force_direction = 0
|
1469
|
+
|
1470
|
+
def wait_for_note(self):
|
1471
|
+
return True
|
1472
|
+
|
1473
|
+
def ly_expression(self):
|
1474
|
+
if self.type:
|
1475
|
+
return r'\%s' % self.type
|
1476
|
+
else:
|
1477
|
+
return
|
1478
|
+
|
1479
|
+
def direction_mod(self):
|
1480
|
+
return {1: '^', -1: '_', 0: '-'}.get(self.force_direction, '-')
|
1481
|
+
|
1482
|
+
def print_ly(self, printer):
|
1483
|
+
if self.type:
|
1484
|
+
printer.dump('%s\\%s' % (self.direction_mod(), self.type))
|
1485
|
+
|
1486
|
+
|
1487
|
+
class MarkEvent (Event):
|
1488
|
+
def __init__(self, text="\\default"):
|
1489
|
+
Event.__init__(self)
|
1490
|
+
self.mark = text
|
1491
|
+
|
1492
|
+
def wait_for_note(self):
|
1493
|
+
return False
|
1494
|
+
|
1495
|
+
def ly_contents(self):
|
1496
|
+
if self.mark:
|
1497
|
+
return '%s' % self.mark
|
1498
|
+
else:
|
1499
|
+
return "\"ERROR\""
|
1500
|
+
|
1501
|
+
def ly_expression(self):
|
1502
|
+
return '\\mark %s' % self.ly_contents()
|
1503
|
+
|
1504
|
+
|
1505
|
+
class MusicGlyphMarkEvent (MarkEvent):
|
1506
|
+
def ly_contents(self):
|
1507
|
+
if self.mark:
|
1508
|
+
return '\\markup { \\musicglyph "scripts.%s" }' % self.mark
|
1509
|
+
else:
|
1510
|
+
return ''
|
1511
|
+
|
1512
|
+
|
1513
|
+
class TextEvent (Event):
|
1514
|
+
def __init__(self):
|
1515
|
+
Event.__init__(self)
|
1516
|
+
self.Text = None
|
1517
|
+
self.force_direction = None
|
1518
|
+
self.markup = ''
|
1519
|
+
|
1520
|
+
def wait_for_note(self):
|
1521
|
+
r""" This is problematic: the lilypond-markup ^"text"
|
1522
|
+
requires wait_for_note to be true. Otherwise the
|
1523
|
+
compilation will fail. So we are forced to set return to True.
|
1524
|
+
But in some cases this might lead to a wrong placement of the text.
|
1525
|
+
In case of words like Allegro the text should be put in a '\tempo'-command.
|
1526
|
+
In this case we don't want to wait for the next note.
|
1527
|
+
In some other cases the text is supposed to be used in a r'\mark\markup' construct.
|
1528
|
+
We would not want to wait for the next note either.
|
1529
|
+
There might be other problematic situations.
|
1530
|
+
In the long run we should differentiate between various contexts in MusicXML, e.g.
|
1531
|
+
the following markup should be interpreted as '\tempo "Allegretto"':
|
1532
|
+
<direction placement="above">
|
1533
|
+
<direction-type>
|
1534
|
+
<words>Allegretto</words>
|
1535
|
+
</direction-type>
|
1536
|
+
<sound tempo="120"/>
|
1537
|
+
</direction>
|
1538
|
+
In the mean time arising problems have to be corrected manually after the conversion.
|
1539
|
+
"""
|
1540
|
+
return True
|
1541
|
+
|
1542
|
+
def direction_mod(self):
|
1543
|
+
""" 1: placement="above"; -1: placement="below"; 0: no placement attribute.
|
1544
|
+
see musicxml_direction_to_indicator in musicxml2ly_conversion.py """
|
1545
|
+
return {1: '^', -1: '_', 0: '-'}.get(self.force_direction, '-')
|
1546
|
+
|
1547
|
+
def ly_expression(self):
|
1548
|
+
# self.text will be enclosed by quotes, and the direction
|
1549
|
+
# modifier must be separated from the opening quote by a space.
|
1550
|
+
# This is so that subsequent line breaking for the output file
|
1551
|
+
# using utilities.split_string_and_preserve_doublequoted_strings()
|
1552
|
+
# properly detects the opening quote.
|
1553
|
+
base_string = '%s \"%s\"'
|
1554
|
+
if self.markup:
|
1555
|
+
base_string = r'%s\markup{ ' + self.markup + ' {%s} }'
|
1556
|
+
return base_string % (self.direction_mod(), self.text)
|
1557
|
+
|
1558
|
+
|
1559
|
+
class ArticulationEvent (Event):
|
1560
|
+
def __init__(self):
|
1561
|
+
Event.__init__(self)
|
1562
|
+
self.type = None
|
1563
|
+
self.force_direction = None
|
1564
|
+
|
1565
|
+
def wait_for_note(self):
|
1566
|
+
return True
|
1567
|
+
|
1568
|
+
def direction_mod(self):
|
1569
|
+
return {1: '^', -1: '_', 0: '-'}.get(self.force_direction, '')
|
1570
|
+
|
1571
|
+
def ly_expression(self):
|
1572
|
+
return '%s\\%s' % (self.direction_mod(), self.type)
|
1573
|
+
|
1574
|
+
|
1575
|
+
class ShortArticulationEvent (ArticulationEvent):
|
1576
|
+
def direction_mod(self):
|
1577
|
+
# default is -
|
1578
|
+
return {1: '^', -1: '_', 0: '-'}.get(self.force_direction, '-')
|
1579
|
+
|
1580
|
+
def ly_expression(self):
|
1581
|
+
if self.type:
|
1582
|
+
return '%s%s' % (self.direction_mod(), self.type)
|
1583
|
+
else:
|
1584
|
+
return ''
|
1585
|
+
|
1586
|
+
|
1587
|
+
class NoDirectionArticulationEvent (ArticulationEvent):
|
1588
|
+
def ly_expression(self):
|
1589
|
+
if self.type:
|
1590
|
+
return '\\%s' % self.type
|
1591
|
+
else:
|
1592
|
+
return ''
|
1593
|
+
|
1594
|
+
class MarkupEvent (ShortArticulationEvent):
|
1595
|
+
def __init__(self):
|
1596
|
+
ArticulationEvent.__init__(self)
|
1597
|
+
self.contents = None
|
1598
|
+
|
1599
|
+
def ly_expression(self):
|
1600
|
+
if self.contents:
|
1601
|
+
return "%s\\markup { %s }" % (self.direction_mod(), self.contents)
|
1602
|
+
else:
|
1603
|
+
return ''
|
1604
|
+
|
1605
|
+
|
1606
|
+
class FretEvent (MarkupEvent):
|
1607
|
+
def __init__(self):
|
1608
|
+
MarkupEvent.__init__(self)
|
1609
|
+
self.force_direction = 1
|
1610
|
+
self.strings = 6
|
1611
|
+
self.frets = 4
|
1612
|
+
self.barre = None
|
1613
|
+
self.elements = []
|
1614
|
+
|
1615
|
+
def ly_expression(self):
|
1616
|
+
val = ""
|
1617
|
+
if self.strings != 6:
|
1618
|
+
val += "w:%s;" % self.strings
|
1619
|
+
if self.frets != 4:
|
1620
|
+
val += "h:%s;" % self.frets
|
1621
|
+
if self.barre and len(self.barre) >= 3:
|
1622
|
+
val += "c:%s-%s-%s;" % (self.barre[0], self.barre[1],
|
1623
|
+
self.barre[2]+get_transpose("integer"))
|
1624
|
+
have_fingering = False
|
1625
|
+
for i in self.elements:
|
1626
|
+
if len(i) > 1:
|
1627
|
+
val += "%s-%s" % (i[0], i[1]+(get_transpose("integer"),
|
1628
|
+
'')[isinstance(i[1], str)])
|
1629
|
+
if len(i) > 2:
|
1630
|
+
have_fingering = True
|
1631
|
+
val += "-%s" % i[2]
|
1632
|
+
val += ";"
|
1633
|
+
if have_fingering:
|
1634
|
+
val = "f:1;" + val
|
1635
|
+
if val:
|
1636
|
+
return "%s\\markup { \\fret-diagram #\"%s\" }" % (self.direction_mod(), val)
|
1637
|
+
else:
|
1638
|
+
return ''
|
1639
|
+
|
1640
|
+
|
1641
|
+
class FretBoardNote (Music):
|
1642
|
+
def __init__(self):
|
1643
|
+
Music.__init__(self)
|
1644
|
+
self.pitch = None
|
1645
|
+
self.string = None
|
1646
|
+
self.fingering = None
|
1647
|
+
|
1648
|
+
def ly_expression(self):
|
1649
|
+
s = self.pitch.ly_expression()
|
1650
|
+
if self.fingering:
|
1651
|
+
s += "-%s" % self.fingering
|
1652
|
+
if self.string:
|
1653
|
+
s += r"\%s" % self.string
|
1654
|
+
return s
|
1655
|
+
|
1656
|
+
|
1657
|
+
class FretBoardEvent (NestedMusic):
|
1658
|
+
def __init__(self):
|
1659
|
+
NestedMusic.__init__(self)
|
1660
|
+
self.duration = None
|
1661
|
+
|
1662
|
+
def print_ly(self, printer):
|
1663
|
+
fretboard_notes = [
|
1664
|
+
n for n in self.elements if isinstance(n, FretBoardNote)]
|
1665
|
+
if fretboard_notes:
|
1666
|
+
notes = []
|
1667
|
+
for n in fretboard_notes:
|
1668
|
+
notes.append(n.ly_expression())
|
1669
|
+
contents = ' '.join(notes)
|
1670
|
+
printer('<%s>%s' % (contents, self.duration))
|
1671
|
+
|
1672
|
+
|
1673
|
+
class FunctionWrapperEvent (Event):
|
1674
|
+
def __init__(self, function_name=None):
|
1675
|
+
Event.__init__(self)
|
1676
|
+
self.function_name = function_name
|
1677
|
+
|
1678
|
+
def pre_note_ly(self, is_chord_element):
|
1679
|
+
if self.function_name:
|
1680
|
+
return "\\%s" % self.function_name
|
1681
|
+
else:
|
1682
|
+
return ''
|
1683
|
+
|
1684
|
+
def pre_chord_ly(self):
|
1685
|
+
return ''
|
1686
|
+
|
1687
|
+
def ly_expression(self):
|
1688
|
+
if self.function_name:
|
1689
|
+
return "\\%s" % self.function_name
|
1690
|
+
else:
|
1691
|
+
return ''
|
1692
|
+
|
1693
|
+
|
1694
|
+
class ParenthesizeEvent (FunctionWrapperEvent):
|
1695
|
+
def __init__(self):
|
1696
|
+
FunctionWrapperEvent.__init__(self, "parenthesize")
|
1697
|
+
|
1698
|
+
|
1699
|
+
class StemEvent (Event):
|
1700
|
+
""""
|
1701
|
+
A class to take care of stem values (up, down, double, none)
|
1702
|
+
"""
|
1703
|
+
|
1704
|
+
def __init__(self):
|
1705
|
+
Event.__init__(self)
|
1706
|
+
self.value = None
|
1707
|
+
|
1708
|
+
def pre_chord_ly(self):
|
1709
|
+
if self.value:
|
1710
|
+
return "\\%s" % self.value
|
1711
|
+
else:
|
1712
|
+
return ''
|
1713
|
+
|
1714
|
+
def pre_note_ly(self, is_chord_element):
|
1715
|
+
return ''
|
1716
|
+
|
1717
|
+
def ly_expression(self):
|
1718
|
+
return self.pre_chord_ly()
|
1719
|
+
|
1720
|
+
|
1721
|
+
class NotestyleEvent (Event): # class changed by DaLa: additional attribute color
|
1722
|
+
def __init__(self):
|
1723
|
+
Event.__init__(self)
|
1724
|
+
self.style = None
|
1725
|
+
self.filled = None
|
1726
|
+
self.color = None
|
1727
|
+
|
1728
|
+
def pre_chord_ly(self):
|
1729
|
+
return_string = ''
|
1730
|
+
if self.style:
|
1731
|
+
return_string += " \\once \\override NoteHead.style = #%s" % self.style
|
1732
|
+
if self.color:
|
1733
|
+
return_string += " \\once \\override NoteHead.color = #(rgb-color %s %s %s)" % (
|
1734
|
+
self.color[0], self.color[1], self.color[2])
|
1735
|
+
return return_string
|
1736
|
+
|
1737
|
+
def pre_note_ly(self, is_chord_element):
|
1738
|
+
if self.style and is_chord_element:
|
1739
|
+
return "\\tweak style #%s" % self.style
|
1740
|
+
else:
|
1741
|
+
return ''
|
1742
|
+
|
1743
|
+
def ly_expression(self):
|
1744
|
+
return self.pre_chord_ly()
|
1745
|
+
|
1746
|
+
|
1747
|
+
class StemstyleEvent (Event): # class added by DaLa
|
1748
|
+
def __init__(self):
|
1749
|
+
Event.__init__(self)
|
1750
|
+
self.color = None
|
1751
|
+
|
1752
|
+
def pre_chord_ly(self):
|
1753
|
+
if self.color:
|
1754
|
+
return "\\once \\override Stem.color = #(rgb-color %s %s %s)" % (self.color[0], self.color[1], self.color[2])
|
1755
|
+
else:
|
1756
|
+
return ''
|
1757
|
+
|
1758
|
+
def pre_note_ly(self, is_chord_element):
|
1759
|
+
return ''
|
1760
|
+
|
1761
|
+
def ly_expression(self):
|
1762
|
+
return self.pre_chord_ly()
|
1763
|
+
|
1764
|
+
|
1765
|
+
class ChordPitch:
|
1766
|
+
def __init__(self):
|
1767
|
+
self.alteration = 0
|
1768
|
+
self.step = 0
|
1769
|
+
|
1770
|
+
def __repr__(self):
|
1771
|
+
return self.ly_expression()
|
1772
|
+
|
1773
|
+
def ly_expression(self):
|
1774
|
+
return pitch_generating_function(self)
|
1775
|
+
|
1776
|
+
|
1777
|
+
class ChordModification:
|
1778
|
+
def __init__(self):
|
1779
|
+
self.alteration = 0
|
1780
|
+
self.step = 0
|
1781
|
+
self.type = 0
|
1782
|
+
|
1783
|
+
def ly_expression(self):
|
1784
|
+
if self.type:
|
1785
|
+
val = {1: ".", -1: "^"}.get(self.type, "")
|
1786
|
+
val += "%s" % self.step
|
1787
|
+
val += {1: "+", -1: "-"}.get(self.alteration, "")
|
1788
|
+
return val
|
1789
|
+
else:
|
1790
|
+
return ''
|
1791
|
+
|
1792
|
+
|
1793
|
+
class ChordNameEvent (Event):
|
1794
|
+
def __init__(self):
|
1795
|
+
Event.__init__(self)
|
1796
|
+
self.root = None
|
1797
|
+
self.kind = None
|
1798
|
+
self.duration = None
|
1799
|
+
self.modifications = []
|
1800
|
+
self.bass = None
|
1801
|
+
|
1802
|
+
def add_modification(self, mod):
|
1803
|
+
self.modifications.append(mod)
|
1804
|
+
|
1805
|
+
def ly_expression(self):
|
1806
|
+
|
1807
|
+
if not self.root:
|
1808
|
+
return ''
|
1809
|
+
value = self.root.ly_expression()
|
1810
|
+
if self.duration:
|
1811
|
+
value += self.duration.ly_expression()
|
1812
|
+
if self.kind:
|
1813
|
+
value = value + self.kind
|
1814
|
+
# First print all additions/changes, and only afterwards all subtractions
|
1815
|
+
for m in self.modifications:
|
1816
|
+
if m.type == 1:
|
1817
|
+
value += m.ly_expression()
|
1818
|
+
for m in self.modifications:
|
1819
|
+
if m.type == -1:
|
1820
|
+
value += m.ly_expression()
|
1821
|
+
if self.bass:
|
1822
|
+
value += "/+%s" % self.bass.ly_expression()
|
1823
|
+
return value
|
1824
|
+
|
1825
|
+
|
1826
|
+
class TremoloEvent(ArticulationEvent):
|
1827
|
+
def __init__(self):
|
1828
|
+
Event.__init__(self)
|
1829
|
+
self.strokes = 0
|
1830
|
+
|
1831
|
+
def ly_expression(self):
|
1832
|
+
ly_str = ''
|
1833
|
+
if self.strokes and int(self.strokes) > 0:
|
1834
|
+
# ly_dur is a global variable defined in class Duration
|
1835
|
+
# ly_dur stores the value of the reciprocal values of notes
|
1836
|
+
# ly_dur is used here to check the current note duration
|
1837
|
+
# if the duration is smaller than 8, e.g.
|
1838
|
+
# quarter, half and whole notes,
|
1839
|
+
# `:(2 ** (2 + number of tremolo strokes))'
|
1840
|
+
# should be appended to the pitch and duration, e.g.
|
1841
|
+
# 1 stroke: `c4:8' or `c2:8' or `c1:8'
|
1842
|
+
# 2 strokes: `c4:16' or `c2:16' or `c1:16'
|
1843
|
+
# ...
|
1844
|
+
# else (if ly_dur is equal to or greater than 8):
|
1845
|
+
# we need to make sure that the tremolo value that is to
|
1846
|
+
# be appended to the pitch and duration is twice the
|
1847
|
+
# duration (if there is only one tremolo stroke.
|
1848
|
+
# Each additional stroke doubles the tremolo value, e.g.:
|
1849
|
+
# 1 stroke: `c8:16', `c16:32', `c32:64', ...
|
1850
|
+
# 2 strokes: `c8:32', `c16:64', `c32:128', ...
|
1851
|
+
# ...
|
1852
|
+
if ly_dur < 8:
|
1853
|
+
ly_str += ':%s' % (2 ** (2 + int(self.strokes)))
|
1854
|
+
else:
|
1855
|
+
ly_str += ':%s' % (2 **
|
1856
|
+
int((math.log(ly_dur, 2)) + int(self.strokes)))
|
1857
|
+
return ly_str
|
1858
|
+
|
1859
|
+
|
1860
|
+
class BendEvent (ArticulationEvent):
|
1861
|
+
def __init__(self):
|
1862
|
+
Event.__init__(self)
|
1863
|
+
self.alter = None
|
1864
|
+
|
1865
|
+
def ly_expression(self):
|
1866
|
+
if self.alter is not None:
|
1867
|
+
return "-\\bendAfter #%s" % self.alter
|
1868
|
+
else:
|
1869
|
+
return ''
|
1870
|
+
|
1871
|
+
|
1872
|
+
class RhythmicEvent(Event):
|
1873
|
+
def __init__(self):
|
1874
|
+
Event.__init__(self)
|
1875
|
+
self.duration = Duration()
|
1876
|
+
self.associated_events = []
|
1877
|
+
|
1878
|
+
def add_associated_event(self, ev):
|
1879
|
+
if ev:
|
1880
|
+
self.associated_events.append(ev)
|
1881
|
+
|
1882
|
+
def pre_chord_ly(self):
|
1883
|
+
return [ev.pre_chord_ly() for ev in self.associated_events]
|
1884
|
+
|
1885
|
+
def pre_note_ly(self, is_chord_element):
|
1886
|
+
return [ev.pre_note_ly(is_chord_element) for ev in self.associated_events]
|
1887
|
+
|
1888
|
+
def ly_expression_pre_note(self, is_chord_element):
|
1889
|
+
res = ' '.join(self.pre_note_ly(is_chord_element))
|
1890
|
+
if res != '':
|
1891
|
+
res = res + ' '
|
1892
|
+
return res
|
1893
|
+
|
1894
|
+
def get_length(self):
|
1895
|
+
return self.duration.get_length()
|
1896
|
+
|
1897
|
+
def get_properties(self):
|
1898
|
+
return ("'duration %s"
|
1899
|
+
% self.duration.lisp_expression())
|
1900
|
+
|
1901
|
+
|
1902
|
+
class RestEvent (RhythmicEvent):
|
1903
|
+
def __init__(self):
|
1904
|
+
RhythmicEvent.__init__(self)
|
1905
|
+
self.pitch = None
|
1906
|
+
|
1907
|
+
def ly_expression(self):
|
1908
|
+
res = self.ly_expression_pre_note(False)
|
1909
|
+
if self.pitch:
|
1910
|
+
return res + "%s%s\\rest" % (self.pitch.ly_expression(), self.duration.ly_expression())
|
1911
|
+
else:
|
1912
|
+
return 'r%s' % self.duration.ly_expression()
|
1913
|
+
|
1914
|
+
def print_ly(self, printer):
|
1915
|
+
for ev in self.associated_events:
|
1916
|
+
ev.print_ly(printer)
|
1917
|
+
# if hasattr(self, 'color'):
|
1918
|
+
# printer.print_note_color("NoteHead", self.color)
|
1919
|
+
# printer.print_note_color("Stem", self.color)
|
1920
|
+
# printer.print_note_color("Beam", self.color)
|
1921
|
+
if self.pitch:
|
1922
|
+
self.pitch.print_ly(printer)
|
1923
|
+
self.duration.print_ly(printer)
|
1924
|
+
printer('\\rest')
|
1925
|
+
else:
|
1926
|
+
printer('r')
|
1927
|
+
self.duration.print_ly(printer)
|
1928
|
+
|
1929
|
+
|
1930
|
+
class SkipEvent (RhythmicEvent):
|
1931
|
+
def ly_expression(self):
|
1932
|
+
return 's%s' % self.duration.ly_expression()
|
1933
|
+
|
1934
|
+
|
1935
|
+
class NoteEvent(RhythmicEvent):
|
1936
|
+
def __init__(self):
|
1937
|
+
RhythmicEvent.__init__(self)
|
1938
|
+
self.pitch = Pitch()
|
1939
|
+
self.cautionary = False
|
1940
|
+
self.forced_accidental = False
|
1941
|
+
|
1942
|
+
def get_properties(self):
|
1943
|
+
s = RhythmicEvent.get_properties(self)
|
1944
|
+
|
1945
|
+
if self.pitch:
|
1946
|
+
s += self.pitch.lisp_expression()
|
1947
|
+
|
1948
|
+
return s
|
1949
|
+
|
1950
|
+
def pitch_mods(self):
|
1951
|
+
excl_question = ''
|
1952
|
+
if self.cautionary:
|
1953
|
+
excl_question += '?'
|
1954
|
+
if self.forced_accidental:
|
1955
|
+
excl_question += '!'
|
1956
|
+
|
1957
|
+
return excl_question
|
1958
|
+
|
1959
|
+
def ly_expression(self):
|
1960
|
+
# obtain all stuff that needs to be printed before the note:
|
1961
|
+
res = self.ly_expression_pre_note(True)
|
1962
|
+
if self.pitch:
|
1963
|
+
return res + '%s%s%s' % (self.pitch.ly_expression(),
|
1964
|
+
self.pitch_mods(),
|
1965
|
+
self.duration.ly_expression())
|
1966
|
+
|
1967
|
+
def chord_element_ly(self):
|
1968
|
+
# obtain all stuff that needs to be printed before the note:
|
1969
|
+
res = self.ly_expression_pre_note(True)
|
1970
|
+
if self.pitch:
|
1971
|
+
return res + '%s%s' % (self.pitch.ly_expression(),
|
1972
|
+
self.pitch_mods())
|
1973
|
+
|
1974
|
+
def print_ly(self, printer):
|
1975
|
+
for ev in self.associated_events:
|
1976
|
+
ev.print_ly(printer)
|
1977
|
+
if hasattr(self, 'color'):
|
1978
|
+
printer.print_note_color("NoteHead", self.color)
|
1979
|
+
printer.print_note_color("Stem", self.color)
|
1980
|
+
printer.print_note_color("Beam", self.color)
|
1981
|
+
|
1982
|
+
if hasattr(self, "pitch"):
|
1983
|
+
self.pitch.print_ly(printer)
|
1984
|
+
printer(self.pitch_mods())
|
1985
|
+
|
1986
|
+
self.duration.print_ly(printer)
|
1987
|
+
|
1988
|
+
# if hasattr(self, 'color'):
|
1989
|
+
# printer.print_note_color("NoteHead")
|
1990
|
+
# printer.print_note_color("Stem")
|
1991
|
+
# printer.print_note_color("Beam")
|
1992
|
+
|
1993
|
+
|
1994
|
+
class KeySignatureChange (Music):
|
1995
|
+
def __init__(self):
|
1996
|
+
Music.__init__(self)
|
1997
|
+
self.tonic = None
|
1998
|
+
self.mode = 'major'
|
1999
|
+
self.non_standard_alterations = None
|
2000
|
+
|
2001
|
+
def format_non_standard_alteration(self, a):
|
2002
|
+
alter_dict = {-2: ",DOUBLE-FLAT",
|
2003
|
+
- 1.5: ",THREE-Q-FLAT",
|
2004
|
+
- 1: ",FLAT",
|
2005
|
+
- 0.5: ",SEMI-FLAT",
|
2006
|
+
0: ",NATURAL",
|
2007
|
+
0.5: ",SEMI-SHARP",
|
2008
|
+
1: ",SHARP",
|
2009
|
+
1.5: ",THREE-Q-SHARP",
|
2010
|
+
2: ",DOUBLE-SHARP"}
|
2011
|
+
try:
|
2012
|
+
accidental = alter_dict[a[1]]
|
2013
|
+
except KeyError:
|
2014
|
+
ly.warning(
|
2015
|
+
_("Unable to convert alteration %s to a lilypond expression") % a[1])
|
2016
|
+
return ''
|
2017
|
+
if len(a) == 2:
|
2018
|
+
return "( %s . %s )" % (a[0], accidental)
|
2019
|
+
elif len(a) == 3:
|
2020
|
+
return "(( %s . %s ) . %s )" % (a[2], a[0], accidental)
|
2021
|
+
else:
|
2022
|
+
return ''
|
2023
|
+
|
2024
|
+
def ly_expression(self):
|
2025
|
+
if self.tonic:
|
2026
|
+
return '\\key %s \\%s' % (self.tonic.ly_step_expression(),
|
2027
|
+
self.mode)
|
2028
|
+
elif self.non_standard_alterations:
|
2029
|
+
alterations = [self.format_non_standard_alteration(a) for
|
2030
|
+
a in self.non_standard_alterations]
|
2031
|
+
return "\\set Staff.keyAlterations = #`(%s)" % " ".join(alterations)
|
2032
|
+
else:
|
2033
|
+
return ''
|
2034
|
+
|
2035
|
+
|
2036
|
+
class ShiftDurations (MusicWrapper):
|
2037
|
+
def __init__(self):
|
2038
|
+
MusicWrapper.__init__(self)
|
2039
|
+
self.params = [0, 0]
|
2040
|
+
|
2041
|
+
def set_shift_durations_parameters(self, timeSigChange):
|
2042
|
+
self.params = timeSigChange.get_shift_durations_parameters()
|
2043
|
+
|
2044
|
+
def print_ly(self, func):
|
2045
|
+
func(' \\shiftDurations #%d #%d ' % tuple(self.params))
|
2046
|
+
MusicWrapper.print_ly(self, func)
|
2047
|
+
|
2048
|
+
|
2049
|
+
class TimeSignatureChange (Music):
|
2050
|
+
def __init__(self):
|
2051
|
+
Music.__init__(self)
|
2052
|
+
self.fractions = [4, 4]
|
2053
|
+
self.style = None
|
2054
|
+
# Used for the --time-signature option of musicxml2ly
|
2055
|
+
self.originalFractions = [4, 4]
|
2056
|
+
self.visible = True
|
2057
|
+
|
2058
|
+
def get_fractions_ratio(self):
|
2059
|
+
"""
|
2060
|
+
Calculate the ratio between the original time fraction and the new one.
|
2061
|
+
Used for the "--time-signature" option.
|
2062
|
+
|
2063
|
+
@return: The ratio between the two time fractions.
|
2064
|
+
@rtype: float
|
2065
|
+
"""
|
2066
|
+
return (float(self.originalFractions[0])/self.originalFractions[1])*(float(self.fractions[1])/self.fractions[0])
|
2067
|
+
|
2068
|
+
def get_shift_durations_parameters(self):
|
2069
|
+
dur = math.ceil(math.log(self.get_fractions_ratio(), 2))
|
2070
|
+
dots = (1/self.get_fractions_ratio())/(math.pow(2, -dur))
|
2071
|
+
dots = int(math.log(2-dots, 0.5))
|
2072
|
+
return [dur, dots]
|
2073
|
+
|
2074
|
+
def format_fraction(self, frac):
|
2075
|
+
if isinstance(frac, list):
|
2076
|
+
l = [self.format_fraction(f) for f in frac]
|
2077
|
+
return "(" + " ".join(l) + ")"
|
2078
|
+
else:
|
2079
|
+
return "%s" % frac
|
2080
|
+
|
2081
|
+
def ly_expression(self):
|
2082
|
+
st = ''
|
2083
|
+
# Print out the style if we have ome, but the '() should only be
|
2084
|
+
# forced for 2/2 or 4/4, since in all other cases we'll get numeric
|
2085
|
+
# signatures anyway despite the default 'C signature style!
|
2086
|
+
is_common_signature = self.fractions in ([2, 2], [4, 4], [4, 2])
|
2087
|
+
if self.style and self.visible:
|
2088
|
+
if self.style == "common":
|
2089
|
+
st = "\\defaultTimeSignature"
|
2090
|
+
elif self.style != "'()":
|
2091
|
+
st = "\\once \\override Staff.TimeSignature.style = #%s " % self.style
|
2092
|
+
elif (self.style != "'()") or is_common_signature:
|
2093
|
+
st = "\\numericTimeSignature"
|
2094
|
+
|
2095
|
+
if self.visible:
|
2096
|
+
omit = ''
|
2097
|
+
else:
|
2098
|
+
omit = r'\omit Staff.TimeSignature'
|
2099
|
+
|
2100
|
+
# Easy case: self.fractions = [n,d] => normal \time n/d call:
|
2101
|
+
if len(self.fractions) == 2 and isinstance(self.fractions[0], int):
|
2102
|
+
return st + '\\time %d/%d ' % tuple(self.fractions) + omit
|
2103
|
+
elif self.fractions:
|
2104
|
+
return st + "\\compoundMeter #'%s" % self.format_fraction(self.fractions) + omit
|
2105
|
+
else:
|
2106
|
+
return st + ''
|
2107
|
+
|
2108
|
+
|
2109
|
+
class ClefChange (Music):
|
2110
|
+
def __init__(self):
|
2111
|
+
Music.__init__(self)
|
2112
|
+
self.type = 'G'
|
2113
|
+
self.position = 2
|
2114
|
+
self.octave = 0
|
2115
|
+
|
2116
|
+
def octave_modifier(self):
|
2117
|
+
return {1: "^8", 2: "^15", -1: "_8", -2: "_15"}.get(self.octave, '')
|
2118
|
+
|
2119
|
+
def clef_name(self):
|
2120
|
+
return {('G', 2): "treble",
|
2121
|
+
('G', 1): "french",
|
2122
|
+
('C', 1): "soprano",
|
2123
|
+
('C', 2): "mezzosoprano",
|
2124
|
+
('C', 3): "alto",
|
2125
|
+
('C', 4): "tenor",
|
2126
|
+
('C', 5): "baritone",
|
2127
|
+
('F', 3): "varbaritone",
|
2128
|
+
('F', 4): "bass",
|
2129
|
+
('F', 5): "subbass",
|
2130
|
+
("percussion", 2): "percussion",
|
2131
|
+
# Workaround: MuseScore uses PERC instead of percussion
|
2132
|
+
("PERC", 2): "percussion",
|
2133
|
+
("TAB", 5): get_tab_clef()}.get((self.type, self.position), None)
|
2134
|
+
|
2135
|
+
def ly_expression(self):
|
2136
|
+
return '\\clef "%s%s"' % (self.clef_name(), self.octave_modifier())
|
2137
|
+
|
2138
|
+
clef_dict = {
|
2139
|
+
"G": ("clefs.G", -2, -6),
|
2140
|
+
"C": ("clefs.C", 0, 0),
|
2141
|
+
"F": ("clefs.F", 2, 6),
|
2142
|
+
}
|
2143
|
+
|
2144
|
+
def lisp_expression(self):
|
2145
|
+
try:
|
2146
|
+
(glyph, pos, c0) = self.clef_dict[self.type]
|
2147
|
+
except KeyError:
|
2148
|
+
return ""
|
2149
|
+
clefsetting = """
|
2150
|
+
(make-music 'SequentialMusic
|
2151
|
+
'elements (list
|
2152
|
+
(context-spec-music
|
2153
|
+
(make-property-set 'clefGlyph "%s") 'Staff)
|
2154
|
+
(context-spec-music
|
2155
|
+
(make-property-set 'clefPosition %d) 'Staff)
|
2156
|
+
(context-spec-music
|
2157
|
+
(make-property-set 'middleCPosition %d) 'Staff)))
|
2158
|
+
""" % (glyph, pos, c0)
|
2159
|
+
return clefsetting
|
2160
|
+
|
2161
|
+
|
2162
|
+
class Transposition (Music):
|
2163
|
+
def __init__(self):
|
2164
|
+
Music.__init__(self)
|
2165
|
+
self.pitch = None
|
2166
|
+
|
2167
|
+
def ly_expression(self):
|
2168
|
+
self.pitch._force_absolute_pitch = True
|
2169
|
+
return '\\transposition %s' % self.pitch.ly_expression()
|
2170
|
+
|
2171
|
+
|
2172
|
+
class StaffChange (Music):
|
2173
|
+
def __init__(self, staff):
|
2174
|
+
Music.__init__(self)
|
2175
|
+
self.staff = staff
|
2176
|
+
|
2177
|
+
def ly_expression(self):
|
2178
|
+
if self.staff:
|
2179
|
+
return "\\change Staff=\"%s\"" % self.staff
|
2180
|
+
else:
|
2181
|
+
return ''
|
2182
|
+
|
2183
|
+
|
2184
|
+
class SetEvent (Music):
|
2185
|
+
def __init__(self, contextprop, value):
|
2186
|
+
Music.__init__(self)
|
2187
|
+
self.context_prop = contextprop
|
2188
|
+
self.value = value
|
2189
|
+
|
2190
|
+
def ly_expression(self):
|
2191
|
+
if self.value:
|
2192
|
+
return "\\set %s = %s" % (self.context_prop, self.value)
|
2193
|
+
else:
|
2194
|
+
return ''
|
2195
|
+
|
2196
|
+
|
2197
|
+
class StaffLinesEvent (Music):
|
2198
|
+
def __init__(self, lines):
|
2199
|
+
Music.__init__(self)
|
2200
|
+
self.lines = lines
|
2201
|
+
|
2202
|
+
def ly_expression(self):
|
2203
|
+
if self.lines > 0:
|
2204
|
+
return "\\stopStaff \\override Staff.StaffSymbol.line-count = #%s \\startStaff" % self.lines
|
2205
|
+
else:
|
2206
|
+
return "\\stopStaff \\revert Staff.StaffSymbol.line-count \\startStaff"
|
2207
|
+
|
2208
|
+
|
2209
|
+
class TempoMark (Music):
|
2210
|
+
def __init__(self):
|
2211
|
+
Music.__init__(self)
|
2212
|
+
self.baseduration = None
|
2213
|
+
self.newduration = None
|
2214
|
+
self.beats = None
|
2215
|
+
self.parentheses = False
|
2216
|
+
self.text = None
|
2217
|
+
|
2218
|
+
def set_base_duration(self, dur):
|
2219
|
+
self.baseduration = dur
|
2220
|
+
|
2221
|
+
def set_new_duration(self, dur):
|
2222
|
+
self.newduration = dur
|
2223
|
+
|
2224
|
+
def set_beats_per_minute(self, beats):
|
2225
|
+
self.beats = beats
|
2226
|
+
|
2227
|
+
def set_parentheses(self, parentheses):
|
2228
|
+
self.parentheses = parentheses
|
2229
|
+
|
2230
|
+
def set_text(self, text):
|
2231
|
+
self.text = text
|
2232
|
+
|
2233
|
+
def wait_for_note(self):
|
2234
|
+
return False
|
2235
|
+
|
2236
|
+
def duration_to_markup(self, dur):
|
2237
|
+
if dur:
|
2238
|
+
# Generate the markup to print the note
|
2239
|
+
return "\\general-align #Y #DOWN \\smaller \\note {%s} #UP" % dur.ly_expression()
|
2240
|
+
else:
|
2241
|
+
return ''
|
2242
|
+
|
2243
|
+
def tempo_markup_template(self):
|
2244
|
+
return "\\mark\\markup { \\fontsize #-2 \\line { %s } }"
|
2245
|
+
|
2246
|
+
def ly_expression(self):
|
2247
|
+
res = ''
|
2248
|
+
if not self.baseduration:
|
2249
|
+
return res
|
2250
|
+
if self.beats:
|
2251
|
+
if self.parentheses or self.text:
|
2252
|
+
res += "\\tempo \"%s\" %s=%s" % (self.text or '',
|
2253
|
+
self.baseduration.ly_expression(), self.beats)
|
2254
|
+
else:
|
2255
|
+
res += "\\tempo %s=%s" % (
|
2256
|
+
self.baseduration.ly_expression(), self.beats)
|
2257
|
+
elif self.newduration:
|
2258
|
+
dm = self.duration_to_markup(self.baseduration)
|
2259
|
+
ndm = self.duration_to_markup(self.newduration)
|
2260
|
+
if self.parentheses:
|
2261
|
+
contents = "\"(\" %s = %s \")\"" % (dm, ndm)
|
2262
|
+
else:
|
2263
|
+
contents = " %s = %s " % (dm, ndm)
|
2264
|
+
res += self.tempo_markup_template() % contents
|
2265
|
+
else:
|
2266
|
+
return ''
|
2267
|
+
return res
|
2268
|
+
|
2269
|
+
|
2270
|
+
class FiguredBassNote (Music):
|
2271
|
+
def __init__(self):
|
2272
|
+
Music.__init__(self)
|
2273
|
+
self.number = ''
|
2274
|
+
self.prefix = ''
|
2275
|
+
self.suffix = ''
|
2276
|
+
|
2277
|
+
def set_prefix(self, prefix):
|
2278
|
+
self.prefix = prefix
|
2279
|
+
|
2280
|
+
def set_suffix(self, suffix):
|
2281
|
+
self.prefix = suffix
|
2282
|
+
|
2283
|
+
def set_number(self, number):
|
2284
|
+
self.number = number
|
2285
|
+
|
2286
|
+
def ly_expression(self):
|
2287
|
+
res = ''
|
2288
|
+
if self.number:
|
2289
|
+
res += self.number
|
2290
|
+
else:
|
2291
|
+
res += '_'
|
2292
|
+
if self.prefix:
|
2293
|
+
res += self.prefix
|
2294
|
+
if self.suffix:
|
2295
|
+
res += self.suffix
|
2296
|
+
return res
|
2297
|
+
|
2298
|
+
|
2299
|
+
class FiguredBassEvent (NestedMusic):
|
2300
|
+
def __init__(self):
|
2301
|
+
NestedMusic.__init__(self)
|
2302
|
+
self.duration = None
|
2303
|
+
self.real_duration = 0
|
2304
|
+
self.parentheses = False
|
2305
|
+
return
|
2306
|
+
|
2307
|
+
def set_duration(self, dur):
|
2308
|
+
self.duration = dur
|
2309
|
+
|
2310
|
+
def set_parentheses(self, par):
|
2311
|
+
self.parentheses = par
|
2312
|
+
|
2313
|
+
def set_real_duration(self, dur):
|
2314
|
+
self.real_duration = dur
|
2315
|
+
|
2316
|
+
def print_ly(self, printer):
|
2317
|
+
figured_bass_events = [e for e in self.elements if
|
2318
|
+
isinstance(e, FiguredBassNote)]
|
2319
|
+
if figured_bass_events:
|
2320
|
+
notes = []
|
2321
|
+
for x in figured_bass_events:
|
2322
|
+
notes.append(x.ly_expression())
|
2323
|
+
contents = ' '.join(notes)
|
2324
|
+
if self.parentheses:
|
2325
|
+
contents = '[%s]' % contents
|
2326
|
+
printer('<%s>' % contents)
|
2327
|
+
self.duration.print_ly(printer)
|
2328
|
+
|
2329
|
+
|
2330
|
+
class MultiMeasureRest(Music):
|
2331
|
+
|
2332
|
+
def lisp_expression(self):
|
2333
|
+
return """
|
2334
|
+
(make-music
|
2335
|
+
'MultiMeasureRestMusicGroup
|
2336
|
+
'elements
|
2337
|
+
(list (make-music (quote BarCheck))
|
2338
|
+
(make-music
|
2339
|
+
'ChordEvent
|
2340
|
+
'elements
|
2341
|
+
(list (make-music
|
2342
|
+
'MultiMeasureRestEvent
|
2343
|
+
'duration
|
2344
|
+
%s)))
|
2345
|
+
(make-music (quote BarCheck))))
|
2346
|
+
""" % self.duration.lisp_expression()
|
2347
|
+
|
2348
|
+
def ly_expression(self):
|
2349
|
+
return 'R%s' % self.duration.ly_expression()
|
2350
|
+
|
2351
|
+
|
2352
|
+
class Break (Music):
|
2353
|
+
def __init__(self, tp="break"):
|
2354
|
+
Music.__init__(self)
|
2355
|
+
self.type = tp
|
2356
|
+
|
2357
|
+
def print_ly(self, printer):
|
2358
|
+
if self.type:
|
2359
|
+
printer.dump("\\%s" % self.type)
|
2360
|
+
|
2361
|
+
|
2362
|
+
class StaffGroup:
|
2363
|
+
def __init__(self, command="StaffGroup"):
|
2364
|
+
self.stafftype = command
|
2365
|
+
self.id = None
|
2366
|
+
self.instrument_name = None
|
2367
|
+
self.sound = None
|
2368
|
+
self.short_instrument_name = None
|
2369
|
+
self.symbol = None
|
2370
|
+
self.spanbar = None
|
2371
|
+
self.children = []
|
2372
|
+
self.is_group = True
|
2373
|
+
self.context_modifications = []
|
2374
|
+
# part_information is a list with entries of the form
|
2375
|
+
# [staffid, voicelist]
|
2376
|
+
# where voicelist is a list with entries of the form
|
2377
|
+
# [voiceid1, [lyricsid11, lyricsid12,...] ]
|
2378
|
+
self.part_information = None
|
2379
|
+
|
2380
|
+
def append_staff(self, staff):
|
2381
|
+
self.children.append(staff)
|
2382
|
+
|
2383
|
+
def set_part_information(self, part_name, staves_info):
|
2384
|
+
if part_name == self.id:
|
2385
|
+
self.part_information = staves_info
|
2386
|
+
else:
|
2387
|
+
for c in self.children:
|
2388
|
+
if hasattr(c, 'set_part_information'):
|
2389
|
+
c.set_part_information(part_name, staves_info)
|
2390
|
+
|
2391
|
+
def add_context_modification(self, modification):
|
2392
|
+
self.context_modifications.append(modification)
|
2393
|
+
|
2394
|
+
def print_ly_contents(self, printer):
|
2395
|
+
for c in self.children:
|
2396
|
+
if c:
|
2397
|
+
c.print_ly(printer)
|
2398
|
+
# Intention: I want to put the content of new StaffGroup in angled brackets (<< >>)
|
2399
|
+
# printer.dump ("test")# test is printed twice at the end of a staffgroup with two staves.
|
2400
|
+
# printer ("test") # test is printed twice at the end of a staffgroup with two staves.
|
2401
|
+
|
2402
|
+
def needs_with(self):
|
2403
|
+
needs_with = False
|
2404
|
+
needs_with |= self.spanbar == "no"
|
2405
|
+
needs_with |= self.instrument_name is not None
|
2406
|
+
needs_with |= self.short_instrument_name is not None
|
2407
|
+
needs_with |= (self.symbol is not None) and (self.symbol != "bracket")
|
2408
|
+
return needs_with
|
2409
|
+
|
2410
|
+
def print_ly_context_mods(self, printer):
|
2411
|
+
if self.instrument_name or self.short_instrument_name:
|
2412
|
+
printer.dump("\\consists \"Instrument_name_engraver\"")
|
2413
|
+
if self.spanbar == "no":
|
2414
|
+
printer.dump("\\hide SpanBar")
|
2415
|
+
brack = {"brace": "SystemStartBrace",
|
2416
|
+
"none": "SystemStartBar",
|
2417
|
+
"line": "SystemStartSquare"}.get(self.symbol, None)
|
2418
|
+
if brack:
|
2419
|
+
printer.dump("systemStartDelimiter = #'%s" % brack)
|
2420
|
+
|
2421
|
+
def print_ly_overrides(self, printer):
|
2422
|
+
needs_with = self.needs_with() | (len(self.context_modifications) > 0)
|
2423
|
+
if needs_with:
|
2424
|
+
printer.dump("\\with {")
|
2425
|
+
self.print_ly_context_mods(printer)
|
2426
|
+
for m in self.context_modifications:
|
2427
|
+
printer.dump(m)
|
2428
|
+
printer.dump("}")
|
2429
|
+
printer.newline()
|
2430
|
+
# print a single << after StaffGroup only when the with-block is not needed.
|
2431
|
+
# This doesn't work. << is printed before and after StaffGroup!
|
2432
|
+
# else:
|
2433
|
+
# printer.dump (" <<")
|
2434
|
+
# prints loads off << before and after StaffGroup and before \set Staff.instrumentName
|
2435
|
+
# elif not needs_with:
|
2436
|
+
# printer.dump (" <<")
|
2437
|
+
|
2438
|
+
def print_chords(self, printer):
|
2439
|
+
try:
|
2440
|
+
for [staff_id, voices] in self.part_information:
|
2441
|
+
for [v, lyrics, figuredbass, chordnames, fretboards] in voices:
|
2442
|
+
if chordnames:
|
2443
|
+
printer(r'\context ChordNames = "%s" {%s \%s}' % (
|
2444
|
+
chordnames, get_transpose("string"), chordnames))
|
2445
|
+
printer.newline()
|
2446
|
+
except TypeError:
|
2447
|
+
return
|
2448
|
+
|
2449
|
+
def print_fretboards(self, printer):
|
2450
|
+
try:
|
2451
|
+
for [staff_id, voices] in self.part_information:
|
2452
|
+
for [v, lyrics, figuredbass, chordnames, fretboards] in voices:
|
2453
|
+
if fretboards:
|
2454
|
+
printer(r'\context FretBoards = "%s" {%s \%s}' % (
|
2455
|
+
fretboards, get_transpose("string"), fretboards))
|
2456
|
+
printer.newline()
|
2457
|
+
except TypeError:
|
2458
|
+
return
|
2459
|
+
|
2460
|
+
def print_ly(self, printer):
|
2461
|
+
self.print_chords(printer)
|
2462
|
+
self.print_fretboards(printer)
|
2463
|
+
if self.stafftype:
|
2464
|
+
printer.dump("\\new %s" % self.stafftype)
|
2465
|
+
self.print_ly_overrides(printer)
|
2466
|
+
printer.newline()
|
2467
|
+
if self.stafftype:
|
2468
|
+
printer.dump("<<")
|
2469
|
+
printer.newline()
|
2470
|
+
if self.stafftype and self.instrument_name:
|
2471
|
+
printer.dump("\\set %s.instrumentName = %s" % (self.stafftype,
|
2472
|
+
escape_instrument_string(self.instrument_name)))
|
2473
|
+
printer.newline()
|
2474
|
+
if self.stafftype and self.short_instrument_name:
|
2475
|
+
printer.dump("\\set %s.shortInstrumentName = %s" % (self.stafftype,
|
2476
|
+
escape_instrument_string(self.short_instrument_name)))
|
2477
|
+
printer.newline()
|
2478
|
+
if self.sound:
|
2479
|
+
printer.dump(r'\set %s.midiInstrument = "%s"' %
|
2480
|
+
(self.stafftype, self.sound))
|
2481
|
+
printer.newline()
|
2482
|
+
self.print_ly_contents(printer)
|
2483
|
+
printer.newline()
|
2484
|
+
if self.stafftype:
|
2485
|
+
printer.dump(">>")
|
2486
|
+
printer.newline()
|
2487
|
+
|
2488
|
+
|
2489
|
+
class Staff (StaffGroup):
|
2490
|
+
def __init__(self, command="Staff"):
|
2491
|
+
StaffGroup.__init__(self, command)
|
2492
|
+
self.is_group = False
|
2493
|
+
self.part = None
|
2494
|
+
self.voice_command = "Voice"
|
2495
|
+
self.substafftype = None
|
2496
|
+
self.sound = None
|
2497
|
+
|
2498
|
+
def needs_with(self):
|
2499
|
+
return False
|
2500
|
+
|
2501
|
+
def print_ly_context_mods(self, printer):
|
2502
|
+
# printer.dump ("test") #does nothing.
|
2503
|
+
pass
|
2504
|
+
|
2505
|
+
def print_ly_contents(self, printer):
|
2506
|
+
if not self.id or not self.part_information:
|
2507
|
+
return
|
2508
|
+
sub_staff_type = self.substafftype
|
2509
|
+
if not sub_staff_type:
|
2510
|
+
sub_staff_type = self.stafftype
|
2511
|
+
# printer.dump ("test") #prints test in each staff after the definitions of the instrument name and before the definition of the contexts.
|
2512
|
+
printer.newline()
|
2513
|
+
|
2514
|
+
for [staff_id, voices] in self.part_information:
|
2515
|
+
# now comes the real staff definition:
|
2516
|
+
if staff_id:
|
2517
|
+
printer('\\context %s = "%s" << ' % (sub_staff_type, staff_id))
|
2518
|
+
else:
|
2519
|
+
printer('\\context %s << ' % sub_staff_type)
|
2520
|
+
printer.newline()
|
2521
|
+
printer.dump(r"\mergeDifferentlyDottedOn\mergeDifferentlyHeadedOn")
|
2522
|
+
printer.newline()
|
2523
|
+
n = 0
|
2524
|
+
nr_voices = len(voices)
|
2525
|
+
for [v, lyrics, figuredbass, chordnames, fretboards] in voices:
|
2526
|
+
n += 1
|
2527
|
+
voice_count_text = ''
|
2528
|
+
if nr_voices > 1:
|
2529
|
+
"""
|
2530
|
+
The next line contains a bug: The voices might not appear in numerical order! Some voices might be missing e.g. if the xml file contains only voice one, three and four, this would result in: \voiceOne, \voiceTwo and \voiceThree. This causes wrong stem directions and collisions.
|
2531
|
+
"""
|
2532
|
+
voice_count_text = {
|
2533
|
+
1: ' \\voiceOne', 2: ' \\voiceTwo', 3: ' \\voiceThree'}.get(n, ' \\voiceFour')
|
2534
|
+
printer('\\context %s = "%s" {%s %s \\%s }' % (
|
2535
|
+
self.voice_command, v, get_transpose("string"), voice_count_text, v))
|
2536
|
+
printer.newline()
|
2537
|
+
lyrics_id = 1
|
2538
|
+
for l in lyrics:
|
2539
|
+
printer('\\new Lyrics \\lyricsto "%s" { \\set stanza = "%s." \\%s }' % (
|
2540
|
+
v, lyrics_id, l))
|
2541
|
+
lyrics_id += 1
|
2542
|
+
printer.newline()
|
2543
|
+
if figuredbass:
|
2544
|
+
printer(r'\context FiguredBass = "%s" \%s' %
|
2545
|
+
(figuredbass, figuredbass))
|
2546
|
+
printer('>>')
|
2547
|
+
# printer.dump ("test") #prints test after each definition of a context.
|
2548
|
+
#printer.newline ()
|
2549
|
+
# printer.dump ("test") #prints test after each definition of a context.
|
2550
|
+
|
2551
|
+
def print_ly(self, printer):
|
2552
|
+
if self.part_information and len(self.part_information) > 1:
|
2553
|
+
self.stafftype = "PianoStaff"
|
2554
|
+
self.substafftype = "Staff"
|
2555
|
+
#printer.dump ('test')
|
2556
|
+
StaffGroup.print_ly(self, printer)
|
2557
|
+
|
2558
|
+
|
2559
|
+
class TabStaff (Staff):
|
2560
|
+
def __init__(self, command="TabStaff"):
|
2561
|
+
Staff.__init__(self, command)
|
2562
|
+
self.string_tunings = []
|
2563
|
+
self.tablature_format = None
|
2564
|
+
self.voice_command = "TabVoice"
|
2565
|
+
|
2566
|
+
def print_ly_overrides(self, printer):
|
2567
|
+
if self.string_tunings or self.tablature_format:
|
2568
|
+
printer.dump("\\with {")
|
2569
|
+
if self.string_tunings:
|
2570
|
+
printer.dump("stringTunings = #`(")
|
2571
|
+
for i in self.string_tunings:
|
2572
|
+
printer.dump(",%s" % i.lisp_expression())
|
2573
|
+
printer.dump(")")
|
2574
|
+
if self.tablature_format:
|
2575
|
+
printer.dump("tablatureFormat = #%s" % self.tablature_format)
|
2576
|
+
printer.dump("}")
|
2577
|
+
|
2578
|
+
|
2579
|
+
class DrumStaff (Staff):
|
2580
|
+
def __init__(self, command="DrumStaff"):
|
2581
|
+
Staff.__init__(self, command)
|
2582
|
+
self.drum_style_table = None
|
2583
|
+
self.voice_command = "DrumVoice"
|
2584
|
+
|
2585
|
+
def print_ly_overrides(self, printer):
|
2586
|
+
if self.drum_style_table:
|
2587
|
+
printer.dump(r"\with {")
|
2588
|
+
printer.dump("drumStyleTable = #%s" % self.drum_style_table)
|
2589
|
+
printer.dump("}")
|
2590
|
+
|
2591
|
+
|
2592
|
+
class RhythmicStaff (Staff):
|
2593
|
+
def __init__(self, command="RhythmicStaff"):
|
2594
|
+
Staff.__init__(self, command)
|
2595
|
+
|
2596
|
+
# Test
|
2597
|
+
# def print_staffgroup_closing_brackets (self, printer): #test see class Score / class Staff
|
2598
|
+
# printer.dump ("test")
|
2599
|
+
|
2600
|
+
|
2601
|
+
class Score:
|
2602
|
+
def __init__(self):
|
2603
|
+
"""
|
2604
|
+
Constructs a new Score object.
|
2605
|
+
"""
|
2606
|
+
self.contents = None
|
2607
|
+
self.create_midi = False
|
2608
|
+
|
2609
|
+
def set_contents(self, contents):
|
2610
|
+
self.contents = contents
|
2611
|
+
|
2612
|
+
def set_part_information(self, part_id, staves_info):
|
2613
|
+
if self.contents:
|
2614
|
+
self.contents.set_part_information(part_id, staves_info)
|
2615
|
+
|
2616
|
+
def set_tempo(self, tempo):
|
2617
|
+
"""
|
2618
|
+
Set the tempo attribute of the Score.
|
2619
|
+
This attribute can be used in L{print_ly} for the midi output (see L{musicxml.Sound}).
|
2620
|
+
|
2621
|
+
@param tempo: The value of the tempo, in beats per minute.
|
2622
|
+
@type tempo: String
|
2623
|
+
"""
|
2624
|
+
self.tempo = tempo
|
2625
|
+
# Test
|
2626
|
+
# def print_staffgroup_closing_brackets (self, printer): #test see class Score / class Staff
|
2627
|
+
# printer.dump ("test")
|
2628
|
+
|
2629
|
+
def print_ly(self, printer):
|
2630
|
+
"""
|
2631
|
+
Print the content of the score to the printer, in lilypond format.
|
2632
|
+
|
2633
|
+
@param printer: A printer given to display correctly the output.
|
2634
|
+
@type printer: L{Output_printer<musicexp.Output_printer>}
|
2635
|
+
"""
|
2636
|
+
self.create_midi = get_create_midi()
|
2637
|
+
printer.dump("\\score {")
|
2638
|
+
printer.newline()
|
2639
|
+
# prints opening <<:
|
2640
|
+
printer.dump('<<')
|
2641
|
+
printer.newline()
|
2642
|
+
if self.contents:
|
2643
|
+
self.contents.print_ly(printer)
|
2644
|
+
# printer.dump ("test") prints test once before the >> of the score block, independent of the existence of a staffgroup.
|
2645
|
+
# if StaffGroup == False: # True or False: nothing happens.
|
2646
|
+
# printer.dump ('>>')
|
2647
|
+
printer.dump('>>')
|
2648
|
+
printer.newline()
|
2649
|
+
# StaffGroup.print_staffgroup_closing_brackets(self, printer) #TypeError: unbound method print_staffgroup_closing_brackets() must be called with StaffGroup instance as first argument (got Score instance instead)
|
2650
|
+
# print_staffgroup_closing_brackets(self, printer) #NameError: global name 'print_staffgroup_closing_brackets' is not defined. prints test once before the >> of the score block, independent of the existence of a staffgroup.
|
2651
|
+
printer.dump("\\layout {}")
|
2652
|
+
printer.newline()
|
2653
|
+
# If the --midi option was not passed to musicxml2ly, that comments the "midi" line
|
2654
|
+
if self.create_midi:
|
2655
|
+
printer.dump("}")
|
2656
|
+
printer.newline()
|
2657
|
+
printer.dump("\\score {")
|
2658
|
+
printer.newline()
|
2659
|
+
printer.dump("\\unfoldRepeats \\articulate {")
|
2660
|
+
printer.newline()
|
2661
|
+
self.contents.print_ly(printer)
|
2662
|
+
printer.dump("}")
|
2663
|
+
printer.newline()
|
2664
|
+
else:
|
2665
|
+
printer.dump(
|
2666
|
+
"% To create MIDI output, uncomment the following line:")
|
2667
|
+
printer.newline()
|
2668
|
+
printer.dump("% ")
|
2669
|
+
printer.dump("\\midi {\\tempo 4 = "+self.tempo+" }")
|
2670
|
+
printer.newline()
|
2671
|
+
printer.dump("}")
|
2672
|
+
printer.newline()
|
2673
|
+
|
2674
|
+
|
2675
|
+
def test_pitch():
|
2676
|
+
bflat = Pitch()
|
2677
|
+
bflat.alteration = -1
|
2678
|
+
bflat.step = 6
|
2679
|
+
bflat.octave = -1
|
2680
|
+
fifth = Pitch()
|
2681
|
+
fifth.step = 4
|
2682
|
+
down = Pitch()
|
2683
|
+
down.step = -4
|
2684
|
+
down.normalize()
|
2685
|
+
|
2686
|
+
print(bflat.semitones())
|
2687
|
+
print(bflat.transposed(fifth), bflat.transposed(fifth).transposed(fifth))
|
2688
|
+
print(bflat.transposed(fifth).transposed(fifth).transposed(fifth))
|
2689
|
+
|
2690
|
+
print(bflat.semitones(), 'down')
|
2691
|
+
print(bflat.transposed(down))
|
2692
|
+
print(bflat.transposed(down).transposed(down))
|
2693
|
+
print(bflat.transposed(down).transposed(down).transposed(down))
|
2694
|
+
|
2695
|
+
|
2696
|
+
def test_printer():
|
2697
|
+
def make_note():
|
2698
|
+
evc = ChordEvent()
|
2699
|
+
n = NoteEvent()
|
2700
|
+
evc.append(n)
|
2701
|
+
return n
|
2702
|
+
|
2703
|
+
def make_tup():
|
2704
|
+
m = SequentialMusic()
|
2705
|
+
m.append(make_note())
|
2706
|
+
m.append(make_note())
|
2707
|
+
m.append(make_note())
|
2708
|
+
|
2709
|
+
t = TimeScaledMusic()
|
2710
|
+
t.numerator = 2
|
2711
|
+
t.denominator = 3
|
2712
|
+
t.element = m
|
2713
|
+
return t
|
2714
|
+
|
2715
|
+
m = SequentialMusic()
|
2716
|
+
m.append(make_tup())
|
2717
|
+
m.append(make_tup())
|
2718
|
+
m.append(make_tup())
|
2719
|
+
|
2720
|
+
printer = Output_printer()
|
2721
|
+
m.print_ly(printer)
|
2722
|
+
printer.newline()
|
2723
|
+
|
2724
|
+
|
2725
|
+
def test_expr():
|
2726
|
+
m = SequentialMusic()
|
2727
|
+
l = 2
|
2728
|
+
evc = ChordEvent()
|
2729
|
+
n = NoteEvent()
|
2730
|
+
n.duration.duration_log = l
|
2731
|
+
n.pitch.step = 1
|
2732
|
+
evc.insert_around(None, n, 0)
|
2733
|
+
m.insert_around(None, evc, 0)
|
2734
|
+
|
2735
|
+
evc = ChordEvent()
|
2736
|
+
n = NoteEvent()
|
2737
|
+
n.duration.duration_log = l
|
2738
|
+
n.pitch.step = 3
|
2739
|
+
evc.insert_around(None, n, 0)
|
2740
|
+
m.insert_around(None, evc, 0)
|
2741
|
+
|
2742
|
+
evc = ChordEvent()
|
2743
|
+
n = NoteEvent()
|
2744
|
+
n.duration.duration_log = l
|
2745
|
+
n.pitch.step = 2
|
2746
|
+
evc.insert_around(None, n, 0)
|
2747
|
+
m.insert_around(None, evc, 0)
|
2748
|
+
|
2749
|
+
evc = ClefChange()
|
2750
|
+
evc.type = 'treble'
|
2751
|
+
m.insert_around(None, evc, 0)
|
2752
|
+
|
2753
|
+
evc = ChordEvent()
|
2754
|
+
tonic = Pitch()
|
2755
|
+
tonic.step = 2
|
2756
|
+
tonic.alteration = -2
|
2757
|
+
n = KeySignatureChange()
|
2758
|
+
n.tonic = tonic.copy()
|
2759
|
+
n.scale = [0, 0, -2, 0, 0, -2, -2]
|
2760
|
+
|
2761
|
+
evc.insert_around(None, n, 0)
|
2762
|
+
m.insert_around(None, evc, 0)
|
2763
|
+
|
2764
|
+
return m
|
2765
|
+
|
2766
|
+
|
2767
|
+
if __name__ == '__main__':
|
2768
|
+
test_printer()
|
2769
|
+
test_pitch()
|
2770
|
+
|
2771
|
+
expr = test_expr()
|
2772
|
+
expr.set_start(Fraction(0))
|
2773
|
+
expr.print_ly(Output_printer())
|
2774
|
+
start = Fraction(0, 4)
|
2775
|
+
stop = Fraction(4, 2)
|
2776
|
+
|
2777
|
+
def sub(x, start=start, stop=stop):
|
2778
|
+
ok = x.start >= start and x.start + x.get_length() <= stop
|
2779
|
+
return ok
|
2780
|
+
|
2781
|
+
print(expr.lisp_sub_expression(sub))
|