lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LilyPond processing mode


From: Peter Leschev
Subject: Re: LilyPond processing mode
Date: Sat, 3 Dec 2005 09:15:07 +1100

Hi,

               I'm having problems trying to get processing mode up and
running using the Windows version of Lilypond (I'm unable to test with other
versions). I've tried versions 2.7.18 & 2.7.19.

               I'm able to run it in guile, but it doesn't work in
lilypond.

$ /cygdrive/c/Program\ Files/LilyPond/usr/bin/guile -s socket-setup.scm
Listening for clients in pid: 832
Got new client connection: #(2 2130706433 1714)
Client address: #("localhost" () 2 4 (2130706433))

       Killing the above process and trying:

$ /cygdrive/c/Program\ Files/LilyPond/usr/bin/lilypond.exe socket-setup.ly
GNU LilyPond 2.7.19
Processing `socket-setup.ly'
Parsing...ERROR: In procedure socket:
ERROR: No such file or directory

I get the same symptoms from a DOS prompt. Could it be that it can't find some required libraries?

Cheers,
Peter

----- Original Message ----- From: "Han-Wen Nienhuys" <address@hidden>
To: "Graham Percival" <address@hidden>
Cc: "lily-devel" <address@hidden>
Sent: Sunday, November 06, 2005 12:11 PM
Subject: Re: LilyPond processing mode


Graham Percivalwrote:

So, would it be possible to add a mode to lilypond, where you load
lilypond, and keep it sitting there on standby. Then, when you want a
score typeset, you tell lilypond the file to use (or drag it into the
window). Lilypond then processes the file as normal, but stays
'alive' after that. This might be a useful feature to have,
especially when doing tweaks.

This is quite easy to add, since the LilyPond mainloop is also coded
in Scheme, but why do you need it? It would only save 1 second or so
on a run, typically much less than the time you spend dragging the file.


Seriously?!  Please please please!

see attached; the file will listne on port 2904 for a quoted string, and
process that as .ly; of course, this is one of many options.

I had to apply a small fix, so use with CVS.

muurbloem:~/src/lilypond$ lilypond foo &
[1] 30388
muurbloem:~/src/lilypond$ GNU LilyPond 2.7.16
Processing `foo.ly'
Parsing...Listening for clients in pid: 30388

muurbloem:~/src/lilypond$
muurbloem:~/src/lilypond$  telnet localhost 2904
Trying 127.0.0.1...
Got new client connection: #(2 2130706433 57450)
Client address: #("localhost.localdomain" ("muurbloem" "localhost") 2 4
(2130706433))
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
hello LilyPond 2.7.16
" \\relative { f g a } "

Interpreting music... [1]
Preprocessing graphical objects...
Calculating line breaks... [2]
Calculating page breaks...
Layout output to `foo.ps'...
Converting to `foo.pdf'...Connection closed by foreign host.

Interpreting music... [1]
Preprocessing graphical objects...
Calculating line breaks... [2]
Calculating page breaks...
Layout output to `foo-1.ps'...muurbloem:~/src/lilypond$
Converting to `foo-1.pdf'...Finished. Time elapsed: 6.93

I think I can avoid the latency issues by creating the music one system
in advance... but still, saving 1 second for each run would be great!
Especially if I wanted to try having one computer displaying parts for
two (or even four) people.

Cool project; I suspect it will be a lot of work to glue together all
the parts.

--
 Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen



--------------------------------------------------------------------------------




#(if #t
 (let ((s (socket PF_INET SOCK_STREAM 0)))
      (setsockopt s SOL_SOCKET SO_REUSEADDR 1)
      (bind s AF_INET INADDR_ANY 2904)
      (listen s 5)

      (simple-format #t "Listening for clients in pid: ~S" (getpid))
      (newline)

      (while #t
             (let* ((client-connection (accept s))
                    (start-time (get-internal-real-time))
                    (client-details (cdr client-connection))
                    (client (car client-connection)))
               (simple-format #t "Got new client connection: ~S"
                              client-details)
               (newline)
               (simple-format #t "Client address: ~S"
                              (gethostbyaddr
                               (sockaddr:addr client-details)))
               (newline)
               ;; Send back the greeting to the client port
               (display (format
                         "hello LilyPond ~a\n"
                         (lilypond-version))
                         client)

              (let* ((question (read client))
      (result (ly:parse-string-result
       (format " \\notemode {  ~a } " question)
       (ly:clone-parser parser))))

(print-music-as-book parser result)
               (close client)

(print-music-as-book parser result)
               (display (format "Finished. Time elapsed: ~a\n"
                         (/ (- (get-internal-real-time) start-time)
   (* 1.0 internal-time-units-per-second))

                       ))
               (gc) ; do GC while app is refreshing the screen.
             )))))




--------------------------------------------------------------------------------


_______________________________________________
lilypond-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Attachment: socket-setup.scm
Description: Text Data

Attachment: socket-setup.ly
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]