2005-06-12 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * elisp/lilypond-mode.el (LilyPond-command-alist): remove 2midi
+ (LilyPond-command-alist): use -f ps (thanks to Pal Benko)
+
+ * input/sakura-sakura.ly: add \midi.
+
+ * buildscripts/mutopia-index.py (find): use /usr/bin/find
+ iso. python find.
+
+ * ttftool/test.c (main): cosmetics.
+
* ttftool/util.c (surely_lseek): use stdio FILE's for I/O
* ttftool/test.c: new file. If compiled with -DTEST_TTFTOOL,
import stat
import sys
-_debug = 0
-_prune = ['(*)']
-
-def find (pattern, dir = os.curdir):
- lst = []
- names = os.listdir (dir)
- names.sort ()
- for name in names:
- if name in (os.curdir, os.pardir):
- continue
- fullname = os.path.join (dir, name)
- if fnmatch.fnmatch (name, pattern):
- lst.append (fullname)
- if os.path.isdir (fullname) and not os.path.islink (fullname):
- for p in _prune:
- if fnmatch.fnmatch (name, p):
- if _debug:
- print "skip", `fullname`
- break
- else:
- if _debug:
- print "descend into", `fullname`
- lst = lst + find (pattern, fullname)
- return lst
+def find (pat, dir):
+ f = os.popen ('find %s -name "%s"'% (dir, pat))
+ lst = []
+ for a in f.readlines():
+ a = a[:-1]
+ lst.append (a)
+ return lst
+
+
headertext= r"""
list.write (headertext_nopics)
for ex in inputs:
+ print ex
+
(base, ext) = os.path.splitext (ex)
(base, ext2) = os.path.splitext (base)
ext = ext2 + ext
% (type, size))
pictures = ['jpeg', 'png', 'xpm']
lst.write ('\n')
+ else:
+ print "can't find" , `file_name`
list_item (base + ext, 'The input', 'ASCII')
+
+ pages_found = 0
for page in range (1, 100):
+ pages_found += 1
f = base + '-page%d.png' % page
- if not os.path.isfile (f):
+
+ if not os.path.isfile (f):
break
list_item (f, 'See a picture of page %d' % page, 'png')
+
+ if pages_found == 0 and os.path.exists (base + '.png'):
+ list_item (base + ".png",
+ 'See a picture', 'png')
+
+
list_item (base + '.pdf', 'Print', 'PDF')
list_item (base + '.midi', 'Listen', 'MIDI')
list.write ('</ul>\n');
("LilyPond" . (,(concat LilyPond-lilypond-command " %s") "%s" "%l" "View"))
("TeX" . ("tex '\\nonstopmode\\input %t'" "%t" "%d" "ViewDVI"))
("2Dvi" . (,(concat LilyPond-lilypond-command " -b tex %s") "%s" "%d" "LaTeX"))
- ("2PS" . (,(concat LilyPond-lilypond-command "-b ps %s") "%s" "%p" "ViewPS"))
- ("2Midi" . (,(concat LilyPond-lilypond-command " -m %s") "%s" "%m" "Midi"))
+ ("2PS" . (,(concat LilyPond-lilypond-command "-f ps %s") "%s" "%p" "ViewPS"))
("2Gnome" . (,(concat LilyPond-lilypond-command " -b gnome %s")))
("Book" . ("lilypond-book %x" "%x" "%l" "LaTeX"))
\override Stem #'stroke-style = #"grace"
\longgrace d16( \endlonggrace
\revert Stem #'stroke-style }
- c8[) b16 c)]
+
+%% todo: should insert grace slur here.
+ c8[ b16 c)]
\grace {
\override Stem #'stroke-style = #"grace"
\longgrace c16 \endlonggrace
subtitle = "(Sakura, sakura)"
}
-<<
- \relative c'' {
- %% Beams are melismata, no autobeams.
- \set Staff.autoBeaming = ##f
- | a4 a b2 | a4 a b2
- | a4 b c b | a4 b8[ a] f2
- | e4 c e f | e4 e8[ c] b2
- | a'4 b c b | a4 b8[ a] f2
- | e4 c e f | e4 e8[ c] b2
- | a'4 a b2 | a4 a b2
- | d,4 e b'8[ a] f4 | e1 \bar "|."
- }
- \addlyrics {
- さ く ら さ く ら
- の や ま も さ と も
- み わ た す か ぎ り
- か す み か く も か
- あ さ ひ に に を う
- さ く ら さ く ら
- は な ざ か り
- }
->>
+\score {
+ <<
+ \relative c'' {
+ %% Beams are melismata, no autobeams.
+ \set Staff.autoBeaming = ##f
+
+ | a4 a b2 | a4 a b2
+ | a4 b c b | a4 b8[ a] f2
+ | e4 c e f | e4 e8[ c] b2
+ | a'4 b c b | a4 b8[ a] f2
+ | e4 c e f | e4 e8[ c] b2
+ | a'4 a b2 | a4 a b2
+ | d,4 e b'8[ a] f4 | e1 \bar "|."
+ }
+ \addlyrics {
+ さ く ら さ く ら
+ の や ま も さ と も
+ み わ た す か ぎ り
+ か す み か く も か
+ あ さ ひ に に を う
+ さ く ら さ く ら
+ は な ざ か り
+ }
+ >>
+ \layout { }
+ \midi { \tempo 4=120 }
+ }
+
%%% Local Variables:
%%% coding: utf-8
%%% End:
;; (string-append (basename name ".ps") "-page1.png" )))
(let ((paper-size (sanitize-command-option paper-size-name))
(verbose (ly:get-option 'verbose))
- (rename-page-1 #t))
+ (rename-page-1 #f))
(ly:message (_ "Converting to ~a...") "PNG")
(make-ps-images name resolution paper-size rename-page-1 verbose)
(ly:progress "\n")))
#include "proto.h"
#include "ttftool.h"
-#include "libc-extension.hh"
#define CHUNKSIZE 65534
FILE *in, *out;
if (argc != 3)
{
- fprintf (stderr, "test foo.ttf bar.pfa");
+ fprintf (stderr, "%s input.ttf output.pfa", argv[0]);
exit (2);
}
#include "types.h"
#include "proto.h"
-#include "libc-extension.hh"
#include "ttftool.h"