[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Geting the list of MIDI instrument names
From: |
Han-Wen Nienhuys |
Subject: |
Re: Geting the list of MIDI instrument names |
Date: |
Thu, 21 Feb 2008 12:05:30 -0300 |
2008/2/21, Reinhold Kainhofer <address@hidden>:
> Don't ask me how it is done, but at least that's how it works in lilypond:
>
> lilypond -e '(display (string->list (format "abc~sdef" "ffff")))'
be careful with format; there are 2 routines: simple-format (the
default, implemented in C; format is aliased to it), which requires
the port argument, and the one from the (ice-9 format) module, which
has all sorts of bells and whistles. It is slow and generates
ridiculous amounts of garbage memory.
There is also a ly:format routine, written in C++ which is slightly
more featureful for use int the backend. It has support for
specifying precision in floating point numbers.
lily.scm defines:
(define-public fancy-format format)
(define-public (ergonomic-simple-format dest . rest)
"Like ice-9 format, but without the memory consumption."
(if (string? dest)
(apply simple-format (cons #f (cons dest rest)))
(apply simple-format (cons dest rest))))
(define format ergonomic-simple-format)
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen
- Geting the list of MIDI instrument names, Wilbert Berendsen, 2008/02/19
- 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 <=
- Re: Geting the list of MIDI instrument names, Valentin Villenave, 2008/02/21
- Re: Geting the list of MIDI instrument names, Reinhold Kainhofer, 2008/02/21
- Re: Geting the list of MIDI instrument names, Graham Percival, 2008/02/22
- Re: Geting the list of MIDI instrument names, Reinhold Kainhofer, 2008/02/22