lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

proposed Patch: \define-scheme-function


From: David Kastrup
Subject: proposed Patch: \define-scheme-function
Date: Wed, 07 Sep 2011 19:20:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

The recent \contextStringTunings fixes were dissatisfactory to me
because I found the user interface awkward anyway.

Employing <URL:http://codereview.appspot.com/4969062>, one can code a
new command and the respective regtest as follows:

%% A scheme function for converting a chord to a string tuning
stringTuning =
#(define-scheme-function (parser location chord) (ly:music?)
  (let* ((ev-chord (car (extract-named-music chord 'EventChord))))
   (reverse (event-chord-pitches ev-chord))))

\header {

  texidoc = "For other tunings, it is sufficient to set
    @code{stringTunings}. The number of staff lines is adjusted
    accordingly."

}

\new TabStaff {
  \set TabStaff.stringTunings = \stringTuning <f' ais' dis'' gis''>

  \relative c''  { c4 d e f }
}


This is more obvious and nicer as either using #`(,(ly:make-pitch ...) ...)
(and, by the way, I have never seen such a strange tuning, so I consider
it likely that the respective arguments were simply wrong) or
contextStringTunings.

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]