[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-user
Subject: Re: midi2ly
From: Kees van den Doel <kvdoel () gmail ! com>
Date: 2021-06-18 2:00:54
Message-ID: CAEzB7u9T40OnVW4wiYGy5RBmLgw2st+ik9VpxxE=u+k9D=V-mw () mail ! gmail ! com
[Download RAW message or body]
Hi again David,
I didn't understand what you wrote, but I did a bunch of things to make it
work. I think this will solve the convert-ly problem as well, though I
haven't checked. This is in mintty shell using Cygwin on Windows 10.
$ ls -l /cygdrive/d/Program\ Files\ \(x86\)/LilyPond/usr/bin/midi2ly
-rwxrwx---+ 1 Administrators None 39034 Apr 24 07:05 '/cygdrive/d/Program
Files (x86)/LilyPond/usr/bin/midi2ly'
$ which python3
which: no python3 in ...
$ which python
/cygdrive/d/ProgramData/Anaconda2/python
$ python --version
Python 2.7.15 :: Anaconda, Inc.
$ /cygdrive/d/Program\ Files\ \(x86\)/LilyPond/usr/bin/python --version
Python 3.7.4
$ /cygdrive/d/Program\ Files\ \(x86\)/LilyPond/usr/bin/python
/cygdrive/d/Program\ Files\ \(x86\)/LilyPond/usr/bin/midi2ly --version
D:\Program Files (x86)\LilyPond\usr\bin\python.exe: can't open file
'/cygdrive/d/Program Files (x86)/LilyPond/usr/bin/midi2ly': [Errno 2] No
such file or directory
$ cp /cygdrive/d/Program\ Files\ \(x86\)/LilyPond/usr/bin/midi2ly .
$ mv midi2ly midi2ly.py
$ /cygdrive/d/Program\ Files\ \(x86\)/LilyPond/usr/bin/python midi2ly.py
--version
midi2ly (LilyPond) 2.22.1
$ /cygdrive/d/Program\ Files\ \(x86\)/LilyPond/usr/bin/python midi2ly.py
bwv0026_04.mid
LY output to `bwv0026_04-midi.ly'...
$ echo works!
works!
Cheers,
Kees
On Thu, Jun 17, 2021 at 6:17 PM David Wright <lilylis@lionunicorn.co.uk>
wrote:
> On Thu 17 Jun 2021 at 17:06:22 (-0700), Kees van den Doel wrote:
> > Thanks David, I have followed the convert-ly posts but my take-away was
> > that convert-ly is not usable for Windows users as no solution was
> offered.
> > I guess it's the same with this midi2ly.
>
> [Please keep the discussion on-list where others might see it,
> particularly Windows-users.]
>
> Have you tried just invoking python3 itself, placing the name of the
> script next, and then whatever arguments you were using, ie:
>
> $ path-to-midi2ly arguments …
>
> ↓
>
> $ python3 path-to-midi2ly arguments …
>
> This is effectively all that a shebang does: you can execute a script
> by name without having to care about which interpreter it needs.
> (You may need path-to-python3 as well.)
>
> Cheers,
> David.
>
[Attachment #3 (text/html)]
<div dir="ltr">Hi again David,<div><br><div>I didn't understand what you wrote, \
but I did a bunch of things to make it work. I think this will solve the convert-ly \
problem as well, though I haven't checked. This is in mintty shell using Cygwin \
on Windows 10.</div></div><div><br></div><div>$ ls -l /cygdrive/d/Program\ Files\ \
\(x86\)/LilyPond/usr/bin/midi2ly<br><br>-rwxrwx---+ 1 Administrators None 39034 Apr \
24 07:05 '/cygdrive/d/Program Files (x86)/LilyPond/usr/bin/midi2ly'<br><br>$ \
which python3<br><br>which: no python3 in ...<br><br>$ which \
python<br>/cygdrive/d/ProgramData/Anaconda2/python<br><br>$ python \
--version<br>Python 2.7.15 :: Anaconda, Inc.<br><br>$ /cygdrive/d/Program\ Files\ \
\(x86\)/LilyPond/usr/bin/python --version<br><br>Python 3.7.4<br><br>$ \
/cygdrive/d/Program\ Files\ \(x86\)/LilyPond/usr/bin/python /cygdrive/d/Program\ \
Files\ \(x86\)/LilyPond/usr/bin/midi2ly --version<br><br>D:\Program Files \
(x86)\LilyPond\usr\bin\python.exe: can't open file '/cygdrive/d/Program Files \
(x86)/LilyPond/usr/bin/midi2ly': [Errno 2] No such file or directory<br><br>$ cp \
/cygdrive/d/Program\ Files\ \(x86\)/LilyPond/usr/bin/midi2ly . <br>$ mv midi2ly \
midi2ly.py<br>$ /cygdrive/d/Program\ Files\ \(x86\)/LilyPond/usr/bin/python \
midi2ly.py --version<br><br>midi2ly (LilyPond) 2.22.1<br><br>$ /cygdrive/d/Program\ \
Files\ \(x86\)/LilyPond/usr/bin/python midi2ly.py bwv0026_04.mid<br><br>LY output to \
`<a href="http://bwv0026_04-midi.ly">bwv0026_04-midi.ly</a>'...<br><br>$ echo \
works!<br><br>works!<br><br>Cheers,</div><div>Kees</div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 17, 2021 at 6:17 PM \
David Wright <<a href="mailto:lilylis@lionunicorn.co.uk">lilylis@lionunicorn.co.uk</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu 17 Jun 2021 at \
17:06:22 (-0700), Kees van den Doel wrote:<br> > Thanks David, I have followed the \
convert-ly posts but my take-away was<br> > that convert-ly is not usable for \
Windows users as no solution was offered.<br> > I guess it's the same with \
this midi2ly.<br> <br>
[Please keep the discussion on-list where others might see it,<br>
particularly Windows-users.]<br>
<br>
Have you tried just invoking python3 itself, placing the name of the<br>
script next, and then whatever arguments you were using, ie:<br>
<br>
$ path-to-midi2ly arguments …<br>
<br>
↓<br>
<br>
$ python3 path-to-midi2ly arguments …<br>
<br>
This is effectively all that a shebang does: you can execute a script<br>
by name without having to care about which interpreter it needs.<br>
(You may need path-to-python3 as well.)<br>
<br>
Cheers,<br>
David.<br>
</blockquote></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic