[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Singing support for LilyPond
From: |
Han-Wen Nienhuys |
Subject: |
Re: Singing support for LilyPond |
Date: |
Tue, 02 Jan 2007 18:54:29 +0100 |
User-agent: |
Thunderbird 1.5.0.9 (X11/20061219) |
Milan Zamazal escreveu:
>>>>>> "HN" == Han-Wen Nienhuys <address@hidden> writes:
>
> HN> - Do you want this to be integrated in to LilyPond?
>
> Yes, it's much easier for users to get the functionality with LilyPond.
>
> HN> AFAICT, the patch well separated from LilyPond, and quite large.
> HN> We can put it in, but you have to be prepared to maintain it
> HN> when we refactor things in Lily and cause problems to happen in
> HN> this patch.
>
> We can maintain it.
OK. The code looks very clean, but I notice that there are lots
of functions to inspect music data structures. It would be best if they
were in a separate file. Then, over time we can migrate them to the
lilypond 'core'
Also, would it be possible to define it as a module? Right now, it imports
in a .ly file, which already is a too-large namespace.
> HN> - How can we test this functionality? Over the last few
> HN> months, we have been adding more and more tests, so we can be
> HN> sure that we ship a working LilyPond version. It would be
> HN> strongly preferred if this could be tested without requiring the
> HN> presence of festival itself.
>
> This is possible. Festival is not needed, the LilyPond part ends with
> generating the Festival input file. All we need to do in LilyPond is
> checking the contents of that generated file and that should be trivial.
OK.
> BTW, if you knew about a nice short .ly file with lyrics and without
> copyright restrictions, we could use it both for testing and for making
> an example.
>
see input/simple-song.ly
> HN> - I see scripts written in bash and perl. Those must be Python
> HN> to be part of LilyPond.
>
> There's no problem to rewrite the lilysong script to Python.
>
> With the lilymidi script (it serves for selecting MIDI tracks to play in
> Emacs) it's more difficult. The only reason why it's in Perl and not in
> Python is that I couldn't find a Python MIDI parser in Debian. I'm not
> sure what to do about it.
There is a python midi parser in lilypond itself. Perhaps we should submit it to
python.org
Try
>>> import sys
>>> sys.path.insert (0, 'python/out')
>>> import midi
>>> midi.parse (open ('f.midi').read ())
((1, 1536), [[(0, (255, 3, 'control track')), (0, (255, 1, 'creator: ')), (0,
(255, 1, 'GNU LilyPond 2.11.5 ')), (0, (255, 88,
'\x04\x02\x12\x08')), (0, (255, 81, '\x0fB@')), (0, (255, 47, ''))], [(0, (255,
3, '')), (0, (145, 48, 127)), (0, (255, 89, '\x07\x00')), (384, (129, 48, 64)),
(384, (255, 47, ''))]])
>>>
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen
LilyPond Software Design
-- Code for Music Notation
http://www.lilypond-design.com