lilypond-user
[Top][All Lists]
Advanced

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

transposing in emacs


From: Nicolas Sceaux
Subject: transposing in emacs
Date: 05 Apr 2003 18:16:07 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Hi,

I have written a little transpose function in emacs lisp. It is far
from prefect, but quite usable I think. It comes with a
lilypond-quick-insert-mode I wrote:
http://nicolas.sceaux.free.fr/lilypond/lyqi.html

When visiting a file in lilypond-quick-insert-mode, the user selects a
region and types `C-c C-t' or `M-x lyqi-transpose-region' to call the
transposition function. Then, to transpose the notes from, say, C to A
(below), the user type "a," at the prompt, and the notes found in the
region are transposed a minor third below. To transpose from C to F
(above), the user would have typed "f" at the prompt. To transpose the
region an octave below, "c," would do the job.

It supports both relative and absolute octaves.
If the notes to be transposed use relative octaves, switch to relative
octave editing by typing `C-c o' (the current state is usually written
in the minibuffer) before using lyqi-transpose-region. `C-c o' again
to fall back to absolute octave editing.

It also supports several languages : dutsch, italian, etc.
If the user choses italian notes, (s)he will have to enter an italian
note at the transposition prompt, for instance "sib," to transpose
from do to si bemol.

I tried it against `les-nereides.ly' which comes with LilyPond (at
least 1.6.6). It worked *almost* well, actually three problems appeared:
- the parsing function is quite rudimentary, when it finds something
that looks like a note but which is not (within a double-quoted string
for instance), it tranposes it anyway...
- when transposing notes with relative octaves, the transposed notes
may be wrongly octaviated, and thus an extra manual editing is needed in
order to set the first note octave;
- reminder and cautionary accidentals (! and ?) are not yet supported,
so the transposed region is not correct where those commands
appear. This is on my todo list.


I am interested in comments about that, and other possible similar
operations on notes.

best regards,
NS





reply via email to

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