Am Sa., 14. März 2020 um 13:44 Uhr schrieb David Kastrup <[email protected]>:
>
> Thomas Morley <[email protected]> writes:
>
> > http://lsr.di.unimi.it/LSR/Snippet?id=785
> > "Custom tuning and MIDI"
> > seems broken as well, due to the use of:
> > #(ly:load "define-note-names.scm")
> > returning
> > Unbound variable: define-session-public
> >
> > No clue how to fix.
> > Hints?
>
> (re-)loading internal files seems awfully broken.  You could try
> switching to module (lily) temporarily but it seems like stacking one
> terribly bad idea on another.
>
> --
> David Kastrup

The snippet's reason to reload "define-note-names.scm" is to have the
code there evaluated _after_ some custom-definitions for SHARP, FLAT
etc are done.

I resorted to redefine language-pitch-names using the customized SHARP, etc

#(define language-pitch-names
  (map
    (lambda (language)
      (cons
        (car language)
        (map
          (lambda (pitch)
            (cons
              (car pitch)
              (ly:make-pitch
                (ly:pitch-octave (cdr pitch))
                (ly:pitch-notename (cdr pitch))
                (let ((alt (ly:pitch-alteration (cdr pitch))))
                  (case alt
                    ((-1/2) FLAT)
                    ((1/2) SHARP)
                    ((1) DOUBLE-SHARP)
                    ((-1) DOUBLE-FLAT)
                    (else alt))))))
          (cdr language))))
    language-pitch-names))

Then selecting the wished languge seems to work.


Thanks,
  Harm

Reply via email to