Re: Trying to Convert MIDI to Lilypond

2016-12-26 Thread David Kastrup
Graham Percival  writes:

> On Sun, Dec 25, 2016 at 09:58:39AM +0100, David Kastrup wrote:
>> 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.
>
> I completely entirely agree with the rewrite, but I'm curious
> about why a C compiler causes problems, compared to the C++
> compiler required for the main lilypond binary?

Overkill.  Midi2ly is a single little utility.  Keeping GCC operative
for midi2ly is just not the same priority as keeping G++ operative for
LilyPond.

But the actual problem is more that of making sure that midi2ly.py is
able to find and execute the midi.lo (or whatever it is called) library
and that it has the right kind of interface and architecture.

This is what is currently causing the trouble.  We'll likely still need
GCC for the bootstrapping so my above argument is a bit flaky.  But it's
the only time we need a C compiler _natively_ in the build procedure, so
there is some complexity associated with the respective build recipes.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Trying to Convert MIDI to Lilypond

2016-12-26 Thread Graham Percival
On Sun, Dec 25, 2016 at 09:58:39AM +0100, David Kastrup wrote:
> 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.

I completely entirely agree with the rewrite, but I'm curious
about why a C compiler causes problems, compared to the C++
compiler required for the main lilypond binary?

Cheers,
- Graham

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Trying to Convert MIDI to Lilypond

2016-12-25 Thread Federico Bruni
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-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Trying to Convert MIDI to Lilypond

2016-12-25 Thread David Kastrup
Joseph Austin  writes:

> I tried to run Lilypond's midi2ly on my mac and got the following error:
> Seems to be a Python problem:
>
> joemacbook:midi josephaustin$
> /Applications/LilyPond-2-19-45.app/Contents/Resources/bin/midi2ly
> HotCrossBuns.mid
> Traceback (most recent call last):
>   File "/Applications/LilyPond-2-19-45.app/Contents/Resources/bin/midi2ly", 
> line
> 1214, in 
> main ()
>   File "/Applications/LilyPond-2-19-45.app/Contents/Resources/bin/midi2ly", 
> line
> 1211, in main
> convert_midi (f, o)
>   File "/Applications/LilyPond-2-19-45.app/Contents/Resources/bin/midi2ly", 
> line
> 945, in convert_midi
> import midi
> 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.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Trying to Convert MIDI to Lilypond

2016-12-24 Thread Br. Samuel Springuel
I can confirm the error on my Mac (Early 2009 iMac running 10.11.6) with 
LilyPond 2.19.53


Interestingly lipo -info tells me that file is for an i386 architecture, 
which is the same as what uname -p tells me my machine in fact has.


--
✝
Br. Samuel, OSB
St. Anselm’s Abbey
Washington, DC
(R. Padraic Springuel)

PAX ☧ ΧΡΙΣΤΟΣ

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Trying to Convert MIDI to Lilypond

2016-12-24 Thread Joseph Austin
I tried to run Lilypond's midi2ly on my mac and got the following error:Seems to be a Python problem:joemacbook:midi josephaustin$ /Applications/LilyPond-2-19-45.app/Contents/Resources/bin/midi2ly HotCrossBuns.midTraceback (most recent call last):  File "/Applications/LilyPond-2-19-45.app/Contents/Resources/bin/midi2ly", line 1214, in     main ()  File "/Applications/LilyPond-2-19-45.app/Contents/Resources/bin/midi2ly", line 1211, in main    convert_midi (f, o)  File "/Applications/LilyPond-2-19-45.app/Contents/Resources/bin/midi2ly", line 945, in convert_midi    import midiImportError: 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 architecturejoemacbook: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.Lilypond v 2.19.45Mac OSX 10.11.6 El CapitanHotCrossBunsG.mid:

HotCrossBuns.mid
Description: MIDI audio
Merry ChristmasThanks for your helpJoe Austin___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user