-
Notifications
You must be signed in to change notification settings - Fork 7
/
README
93 lines (72 loc) · 3.21 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
lyqi - LilyPond quick edit mode for GNU Emacs
This is an Emacs mode for editing LilyPond files. It focuses on fast
note entry, using the computer keyboard. There are two editing modes:
- a normal mode, where the computer keyboard is used as usual,
typically for modifiying anything that are not notes (lyrics, score
structure, scheme, etc);
- a note insertion mode, where most alphabetic keys are bound to
special note insertion/modification commands: insertion of notes,
modification of alteration, octave, duration, in one key stroke,
with instant audio feedback (only implemented on Mac OS X).
It also features (rather basic) auto-completion of LilyPond built-in
keywords and commands, shortcut from keyword to LilyPond manual,
compilation and view commands. LilyPond language and Scheme language
are distinguished, so coloring takes care of both situations, and in
theory indentation should also (even though it is currently, err,
perfectible).
/!\ \relative mode is not yet supported (because of audio feedback
issues). Generally speaking, I have only implemented features that I
actually use.
Installation
============
First, check that pre-requisites are installed and available in emacs
load-path:
- eieio <http://cedet.sourceforge.net/eieio.shtml>
After having downloaded and unpacked the archive, run:
$ make lyqi.elc
This will:
- download the LilyPond index page from the website and generate the
help code (shortcuts to documentation);
- generate the keyword/functions/commands code (for completion);
- make a single lyqi.el file;
- bytecompile it, using emacs found in PATH. To use another one type
instead e.g.:
$ make lyqi.elc EMACS="/Applications/Aquamacs\ Emacs.app/Contents/MacOS/Aquamacs\ Emacs"
Finally, change your .emacs to make use of lyqi:
;; load lyqi
(load "/path/to/lyqi") ;; path to lyqi.elc file, without .elc extension
;; automatically use lyqi mode when editing .ly and .ily files
(add-to-list 'auto-mode-alist '("\\.ly$" . lyqi-mode))
(add-to-list 'auto-mode-alist '("\\.ily$" . lyqi-mode))
On Mac OS X, the following utilities are also available:
- EmacsPointAndClick: enable point and click for emacs
(TODO: explain emacsclient in PATH, association between textedit URLs
and EmacsPointAndClick)
- MidiScript: audio feedback when entering notes
To build them, type:
$ make osx
Customization
=============
(TODO: list options)
In my .emacs:
(custom-set-variables
'(lyqi:prefered-languages '(italiano nederlands))
'(lyqi:prefered-octave-mode 'absolute)
'(lyqi:keyboard-mapping 'azerty)
'(lyqi:custom-key-map '(("w" "\\trill")
("x" (space-around . "\\appoggiatura"))
("n" "~")
("," "(")
(";" ")")
(":" "[")
("=" "]")
("\C-m" lyqi:insert-pipe-and-return)
("$" lyqi:insert-pipe-and-return)))
'(lyqi:projects-language '(("~/src/lilypond" nederlands)
("~/Documents/LilyPond" italiano)
("~/Documents/LilyPond/Haendel/Opera/GiulioCesare" nederlands)))
'(lyqi:midi-backend 'osx)
'(lyqi:pdf-command "open")
'(lyqi:midi-command "open")
;; ...
)