The full list is available in an appendix to the notation reference and
as far as I can remember, it hasn't changed since the MIDI support
was implemented some 10 years ago, so it should be fairly safe to
include a hard-coded list in your application as well. Actually, the
list can be found also on many MIDI related sites all over the web
and is not specific to LilyPond in any way.

Having written this, I couldn't resist the temptation to try my very
rusty Scheme knowledge and managed to come up with

\version "2.10.0"
#(ly:load "midi.scm")
#(map (lambda (entry) (ly:message (car entry))) instrument-names-alist)

which produces the list on stderr.

  /Mats

Wilbert Berendsen wrote:
Hi,

I'm looking for a stable way to get the list of supported MIDI instrument names from LilyPond, by running lilypond -e with a scheme expression to do just that (and not print a regular ps/pdf file).

It's for my plugin that could offer a nice help window to quickly assign a midi instrument to a staff.

Of course I could just include the list verbatim in my plugin, or even try to parse midi.scm myself :-O but I just wonder if there would be an elegant way to get the list...

best regards!
Wilbert Berendsen


--
=============================================
        Mats Bengtsson
        Signal Processing
        School of Electrical Engineering
        Royal Institute of Technology (KTH)
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: [EMAIL PROTECTED]
        WWW: http://www.s3.kth.se/~mabe
=============================================



_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to