[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Geting the list of MIDI instrument names
From: |
Mats Bengtsson |
Subject: |
Re: Geting the list of MIDI instrument names |
Date: |
Tue, 19 Feb 2008 17:29:12 +0100 |
User-agent: |
Thunderbird 2.0.0.5 (X11/20070716) |
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: address@hidden
WWW: http://www.s3.kth.se/~mabe
=============================================
- Geting the list of MIDI instrument names, Wilbert Berendsen, 2008/02/19
- Re: Geting the list of MIDI instrument names,
Mats Bengtsson <=
- Re: Geting the list of MIDI instrument names, Reinhold Kainhofer, 2008/02/19
- Re: Geting the list of MIDI instrument names, Ralf Mattes, 2008/02/19
- Re: Geting the list of MIDI instrument names, Reinhold Kainhofer, 2008/02/20
- Re: Geting the list of MIDI instrument names, Ralf Mattes, 2008/02/21
- Re: Geting the list of MIDI instrument names, Reinhold Kainhofer, 2008/02/21
- Re: Geting the list of MIDI instrument names, Han-Wen Nienhuys, 2008/02/21
- Re: Geting the list of MIDI instrument names, Valentin Villenave, 2008/02/21