Re: Offer to help development: Convert MIDI to Lilypond
Graham: > On Wed, Dec 28, 2016 at 08:21:58PM +0100, k...@aspodata.se wrote: > > > At that point, an interested person -- perhaps yourself? -- could > > > offer further patches which improved the quality of the lilypond > > > code. > > > > Well, I'm working on theese: > > http://turkos.aspodata.se/git/musik/bin/miditoly.pl > > http://turkos.aspodata.se/git/musik/bin/midi_to_lilypond.tex > > Hmm. At the moment, there is no perl used in user scripts in > lilypond, and thus we do not distribute a perl interpreter as part > of our application bundle. Adding perl would be a significant > complication. Yes, I know, that is why I haven't offered it for inclusion. > That said, I'm quite willing to believe that your experience with > miditoly.pl could help inform the conversion process in midi2ly.py > -- what types of quantization work best, or how to decide which > accidental to use, etc. Once we have the basics working, Joe may > want to investigate more advanced techniques. That is why I started on the tex file, so that someone else could grasp the issues and implementation choises. Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Offer to help development: Convert MIDI to Lilypond
On Wed, Dec 28, 2016 at 08:21:58PM +0100, k...@aspodata.se wrote: > > At that point, an interested person -- perhaps yourself? -- could > > offer further patches which improved the quality of the lilypond > > code. > > Well, I'm working on theese: > http://turkos.aspodata.se/git/musik/bin/miditoly.pl > http://turkos.aspodata.se/git/musik/bin/midi_to_lilypond.tex Hmm. At the moment, there is no perl used in user scripts in lilypond, and thus we do not distribute a perl interpreter as part of our application bundle. Adding perl would be a significant complication. That said, I'm quite willing to believe that your experience with miditoly.pl could help inform the conversion process in midi2ly.py -- what types of quantization work best, or how to decide which accidental to use, etc. Once we have the basics working, Joe may want to investigate more advanced techniques. Cheers, - Graham ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Offer to help development: Convert MIDI to Lilypond
Graham: ... > At that point, an interested person -- perhaps yourself? -- could > offer further patches which improved the quality of the lilypond > code. Well, I'm working on theese: http://turkos.aspodata.se/git/musik/bin/miditoly.pl http://turkos.aspodata.se/git/musik/bin/midi_to_lilypond.tex Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Offer to help development: Convert MIDI to Lilypond
On Tue, Dec 27, 2016 at 08:43:34AM +0100, k...@aspodata.se wrote: > Graham: > > That is correct; the python midi2ly conversion is quite > > independent of the rest of LilyPond. As a result, it is an > > excellent place to begin! :) > > So I propose that a better course of action would be to research Thank you for the suggestion. At the moment, it appears that midi.c is broken on at least one architecture. Fixing it would be a pain, and would do nothing to reduce the problem it poses. Moving to a completely python solution would represent a solid step forward, both in terms of reducing technical debt, and also in terms of a new contributor getting familiar with our development process. At that point, an interested person -- perhaps yourself? -- could offer further patches which improved the quality of the lilypond code. Cheers, - Graham ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Offer to help development: Convert MIDI to Lilypond
Graham: > On Mon, Dec 26, 2016 at 11:44:15AM -0500, Joseph Austin wrote: > > I am offering to help with the project of converting midi2ly > > from C to Python, or more generally converting MIDI to Lilypond. > > Excellent! I'd be delighted to serve as your mentor. > > > I'm not sure if this is a good place for someone new to Lilypond > > internals to start, but it seems this should be a relatively > > independent utility so I shouldn't need a significant background > > in the internals. > > That is correct; the python midi2ly conversion is quite > independent of the rest of LilyPond. As a result, it is an > excellent place to begin! :) If you want it as an exercise, that's fine, but if you want a better midi to lilypond converter you better start looking at what kind of output you want since the output that midi2ly produces could be much better than what it is today. So I propose that a better course of action would be to research . what kind of lilypond code output you want to produce . the net for a suitable lowlevel midi lib . the net for alternative converters that are presently availble and let that steer your direction. Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Offer to help development: Convert MIDI to Lilypond
David Pirotte writes: > Hello, > >> On Mon, Dec 26, 2016 at 11:44:15AM -0500, Joseph Austin wrote: >> > I am offering to help with the project of converting midi2ly >> > from C to Python, or more generally converting MIDI to Lilypond. > > Joseph, did you consider using Guile Scheme instead? One can argue > about the power, > flexibility ... Guile is just unbeatable :), it is used by lilypond > itself, so in the > end you'll be better prepared to help other lily devs (which I'm not) > ... my 2c I don't think we have any utilities written in Guile/Scheme. So the likelihood of him being able to be better prepared to help other lily devs is more than dubious. For better or worse, the use of Guile in LilyPond is very much constricted to LilyPond proper (in the form of libguile) rather than general programming. I think there is not much other than lilypond-invoke-editor.scm actually written as a utility program in Guile. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Offer to help development: Convert MIDI to Lilypond
Hello, > On Mon, Dec 26, 2016 at 11:44:15AM -0500, Joseph Austin wrote: > > I am offering to help with the project of converting midi2ly > > from C to Python, or more generally converting MIDI to Lilypond. Joseph, did you consider using Guile Scheme instead? One can argue about the power, flexibility ... Guile is just unbeatable :), it is used by lilypond itself, so in the end you'll be better prepared to help other lily devs (which I'm not) ... my 2c I'm saying this because you mentioned earlier you do not know Python, which means you are going to learn a new programming language, so, unless you have other criteria along the line, I strongly recommend Guile (and geiser, the emacs inferior mode that we all (guilers) use, which really rocks! and makes hacking just fun! Cheers, David https://www.gnu.org/software/guile/ http://www.nongnu.org/geiser/ you can ask quiz on irc channel #guile This might be of interest as well, though I personally really don't like the 'none parens' syntax, it is worth reading, no matter wha your choice is/will be...: http://www.draketo.de/proj/py2guile/ pgp2yOum3NGqF.pgp Description: OpenPGP digital signature ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Offer to help development: Convert MIDI to Lilypond
On Mon, Dec 26, 2016 at 11:44:15AM -0500, Joseph Austin wrote: > I am offering to help with the project of converting midi2ly > from C to Python, or more generally converting MIDI to Lilypond. Excellent! I'd be delighted to serve as your mentor. > I'm not sure if this is a good place for someone new to Lilypond > internals to start, but it seems this should be a relatively > independent utility so I shouldn't need a significant background > in the internals. That is correct; the python midi2ly conversion is quite independent of the rest of LilyPond. As a result, it is an excellent place to begin! :) Cheers, - Graham ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Offer to help development: Convert MIDI to Lilypond
Joseph Austin writes: > Lilypond Developers: > > I am offering to help with the project of converting midi2ly from C to > Python, or more generally converting MIDI to Lilypond. > > Per attached, I understand an initial conversion attempt has been > started and is awaiting completion and testing. > > I'm not sure if this is a good place for someone new to Lilypond > internals to start, > but it seems this should be a relatively independent utility so I > shouldn't need a significant background in the internals. > > I may need a "mentor" to help get started with the nuts and bolts of > Lilypond development. > > I've done programming for a living in C++, Java, PHP, and a few > others, but not Python [too new] or C [too old], > though I am somewhat familiar with both, and also somewhat familiar > with the structure of MIDI. You'd need to look at what the midi module (in the LilyPond source tree at python/midi.c) does and redo it in Python. I haven't looked at the code or its quality, but on the surface the task would seem to be well-confined and should yield to someone with a bit of willingness to muddle through and make himself more acquainted with Python again. It is well possible that there already exist suitably licensed modules (GPLv3+ or compatible) capable of reading Midi files in Python, but matching them to the current midi.c interface might be more work than it seems worth at first glance. One challenge will be setting up a suitable developing environment for working on this problem and being able to build and test results. You'd likely want to get a suitable version of the LilyDev virtual environment for that: ask on the developer list for details and/or look up the available information in the "Contributor's Guide" to LilyPond (part of its documentation). You also might want to ask on the developer list whether or not somebody will specifically act as a mentor to get you started on the development. All the best! -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Offer to help development: Convert MIDI to Lilypond
Hi Joseph, welcome to the LilyPond community. It is great to see someone volunteering for such a task. It is a good idea to ask for a mentor, although that person would probably be mostly a mediator between you and the developers. Personally I don't think I could be that mentor but I wanted to give you immediate feedback, in case too many devs are in holiday mode. It may be interesting for you that there are several current plans and ideas around regarding import and export to various formats. Best wishes Urs Am 26. Dezember 2016 17:44:15 MEZ, schrieb Joseph Austin : >Lilypond Developers: > >I am offering to help with the project of converting midi2ly from C to >Python, or more generally converting MIDI to Lilypond. > >Per attached, I understand an initial conversion attempt has been >started and is awaiting completion and testing. > >I'm not sure if this is a good place for someone new to Lilypond >internals to start, >but it seems this should be a relatively independent utility so I >shouldn't need a significant background in the internals. > >I may need a "mentor" to help get started with the nuts and bolts of >Lilypond development. > >I've done programming for a living in C++, Java, PHP, and a few others, >but not Python [too new] or C [too old], >though I am somewhat familiar with both, and also somewhat familiar >with the structure of MIDI. > >Joe Austin > >>> On Dec 25, 2016, at 4:05 AM, Federico Bruni >wrote: >>> >>> Il giorno dom 25 dic 2016 alle 9:58, David Kastrup ha >scritto: > ImportError: dlopen > >(/Applications/LilyPond-2-19-45.app/Contents/Resources/lib/lilypond/current/python/midi.so, > 2): no suitable image found. Did find: > >/Applications/LilyPond-2-19-45.app/Contents/Resources/lib/lilypond/current/python/midi.so: > mach-o, but wrong architecture > joemacbook:midi josephaustin$ > I get a similar problem trying to do the convert from within >Frescobaldi. > This is my first attempt at MIDI-to-Lilypond conversion, > so I may be making some elementary error. This is the only file in the whole LilyPond distribution that needs >a C compiler to compile. It also makes for a whole lot of trouble. >What it does can likely be rewritten in Python without much of a >performance impact for the application as a whole. So rewriting this module in Python proper would be very much >desirable. I think that somebody™ should really do this. In other words: raise an issue report about this problem, and I >think the suggestion to solve this problem area once and for all by not >using a C module in the first place should be high on the list of >desirable solutions for the issue. >>> >>> I think that there's already an issue for this (and also an >abandoned patch): >>> https://sourceforge.net/p/testlilyissues/issues/3067/ >>> >> > > >___ >lilypond-devel mailing list >lilypond-devel@gnu.org >https://lists.gnu.org/mailman/listinfo/lilypond-devel -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Offer to help development: Convert MIDI to Lilypond
Joe Austin: > I am offering to help with the project of converting midi2ly from > C to Python, or more generally converting MIDI to Lilypond. ... midi2ly is part python and part c, you can find them in git repo.: scripts/midi2ly.py python/midi.c midi2ly has been in the repository since 2001 according to logs. If external dependances are ok, you can find midi support for python below the header "MIDI Mania" in https://wiki.python.org/moin/PythonInMusic https://github.com/vishnubob/python-midi can possible be of help. /// Midi file spec. are available at: http://www.music.mcgill.ca/~ich/classes/mumt306/midiformat.pdf https://www.midi.org/specifications/item/standard-midi-files-smf The midi-file spec. and RP-017 could be of help. /// If you are interested, I'm working on a similar tool, in perl though: http://turkos.aspodata.se/git/musik/bin/miditoly.pl I'm using perls midi module https://metacpan.org/pod/MIDI, a simple midi dump program is available at http://turkos.aspodata.se/git/musik/bin/midi.pl /// I have just started writing a paper to discuss implementions and huristics in the conversion: http://turkos.aspodata.se/git/musik/bin/midi_to_lilypond.tex I'd be happy if you want to contribute to that paper and any possible developments around midi -> lilypond in any programming language. From the top of my head, on my wishful agenda is: collect midi files generated from different notation programs together with pdf outputs from same programs examine and establish huristics how to identify lyrics character encodings try to reserach and define a few conventions on how the lilypond code should be written and structured and write a output module/function for each convention e.g. relative and absolute pich output, names of music variables to match the users preferences research how polyfonic settings are written to midi file, how do you identify voices from a track with multiple voices research and define huristics to guess voice and instrument names support note scaling, i.e. duble, half note values and such among other things. Regards, /Karl Hammar --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Offer to help development: Convert MIDI to Lilypond
Lilypond Developers: I am offering to help with the project of converting midi2ly from C to Python, or more generally converting MIDI to Lilypond. Per attached, I understand an initial conversion attempt has been started and is awaiting completion and testing. I'm not sure if this is a good place for someone new to Lilypond internals to start, but it seems this should be a relatively independent utility so I shouldn't need a significant background in the internals. I may need a "mentor" to help get started with the nuts and bolts of Lilypond development. I've done programming for a living in C++, Java, PHP, and a few others, but not Python [too new] or C [too old], though I am somewhat familiar with both, and also somewhat familiar with the structure of MIDI. Joe Austin >> On Dec 25, 2016, at 4:05 AM, Federico Bruni wrote: >> >> Il giorno dom 25 dic 2016 alle 9:58, David Kastrup ha scritto: ImportError: dlopen (/Applications/LilyPond-2-19-45.app/Contents/Resources/lib/lilypond/current/python/midi.so, 2): no suitable image found. Did find: /Applications/LilyPond-2-19-45.app/Contents/Resources/lib/lilypond/current/python/midi.so: mach-o, but wrong architecture joemacbook:midi josephaustin$ I get a similar problem trying to do the convert from within Frescobaldi. This is my first attempt at MIDI-to-Lilypond conversion, so I may be making some elementary error. >>> This is the only file in the whole LilyPond distribution that needs a C >>> compiler to compile. It also makes for a whole lot of trouble. What it >>> does can likely be rewritten in Python without much of a performance >>> impact for the application as a whole. >>> So rewriting this module in Python proper would be very much desirable. >>> I think that somebody™ should really do this. >>> In other words: raise an issue report about this problem, and I think >>> the suggestion to solve this problem area once and for all by not using >>> a C module in the first place should be high on the list of desirable >>> solutions for the issue. >> >> I think that there's already an issue for this (and also an abandoned patch): >> https://sourceforge.net/p/testlilyissues/issues/3067/ >> > ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel