Laudetur Jesus Christus +

Good evening Aaron, and everyone,

There has been a update with gregorio-mode.el. Aaron requested a transpose 
function on region, and there is an elementary function now in place for this.

To transpose a region upwards a diatonic step, simply press: C-c u
To transpose a region downwards a diatonic step, simply press: C-c d

The function does not alter the region, so you can press these keys several 
times in a row. Later I will add a wrapper function that will allow a numerical 
prefix if it is necessary, but it seems to me that most transpositions in 
gregorio would only be a few diatonic steps.

Note that the function only moves the notes on the staff, and so do not expect 
the relative distance between the notes to stay the same! Gregorio doesn't 
print chromatic intervals from what I can see, so the preserving of all 
relative distances would be difficult to typeset in Gregorio. However maybe 
there is some 'secret' way of printing sharps in gregorio that I do not know of 
yet.

These functions are very useful for correcting errors, or even for copying a 
neume such as a porrectus that has the same shape but different notes.

For the moment I am not very happy with the code, as it is not very elegant. 
However it does work, and I would appreciate some extensive testing to make 
sure it works reliably and properly.

You can see some pictures in the simple documentation here:

http://christusrex.pl:8080

In the section "Some Useful tricks", at the bottom of the webpage you can see 
how the functions work. You can click the images for a larger view of the 
screenshot.

You can of course map the functions to any key you would like, however for 
LaTeX documents the prefix C-c is often used, so these keys seemed the most 
logical for gregorio functions.

Hope it is useful to all those who use Emacs and Gregorio !

x. JJ +

P.S. : Reminder that gregorio-mode.el is hosted at github where you can 
download it:

https://github.com/cajetanus/gregorio-mode.el


On Jun 16, 2013, at 4:56 AM, Aaron Macks <[email protected]> wrote:

> comments inline:
> 
> On 6/14/13 3:19 AM, John Jenkins wrote:
>> Laudetur Jesus Christus +
>> 
>> Aaron - this feature I will be adding this weekend, after I return from 
>> Warsaw. It shouldn't be too difficult to implement. I was thinking of 
>> providing a simple keybind C-c t which would take an argument either 
>> positive or negative to move the score up or down the scale.
> That sounds perfect
>> 
>> Transposing is not so difficult actually in gregorio, just simply mapping 
>> the note letters and doing a regexp-replace.
>> 
>> Would you want the clef to move as well during this transpose? It would seem 
>> for just transposing the notes higher or lower the clef should stay where it 
>> is.
> For the issues I'm thinking about, just shifting the notes and not
> moving the clef would be ideal.
> 
>> What you might think would be the best practice for when the user wants to 
>> transpose to a note not supported by gregorio, for instance below 'a' or 
>> above 'm'. I was thinking of two possibilities:
>> 
>> 1/ ignore the keypress altogether, so that nothing happens
>> 2/ replace the notes that go above or below to '%' so that syntax coloring 
>> will show the error automatically.
>> 3/ alert the user by some sort of message.
> For this I'd prefer option #2, but maybe generate a beep and/or
> minibuffer alert as well, to alert the user something's not quite right.
> Particularly on a long document you might not see the red
>> 
>> In my opinion the 2nd option (automatic commenting out notes that are out of 
>> range) as the most useful. However you might have a better idea. A message 
>> could be added in the minibuffer as an alert.
>> 
>> I would also think that the transpose-function shouldn't change the region 
>> marks, to allow for multiple presses of the transpose key and also allow 
>> undo-region.
>> 
>> Of course you could bind the functions to other keypresses, for instance C-c 
>> u for up the scale, C-c d for down, but the most emacs way of doing this is 
>> to prefix the function with an argument (M 3 C-c t would be a third up for 
>> instance).
>> 
>> Btw, the fact that gregorio-mode is based on TeX-mode, you can do 
>> comment-region just as in LaTeX documents to comment out a bunch of code. 
>> (C-c ;) Very useful!
>> 
>> JJ +
>> 
>>> Thanks for the great work!  If I might suggest a feature, one thing that
>>> I've always wanted from an editor is a "transpose" feature.  Like an
>>> emacs "comment-region", I'd like to be able to select a chunk of gabc
>>> text and shift the music up or down en masse
>>> 
>>> A
>> 
>> _______________________________________________
>> Gregorio-users mailing list
>> [email protected]
>> https://mail.gna.org/listinfo/gregorio-users
>> 
> 
> -- 
> _______________________________________________________
> Aaron Macks([email protected]) [http://www.wiglaf.org/~aaronm ]
> My sheep has seven gall bladders, that makes me the King of the Universe!
> 


_______________________________________________
Gregorio-users mailing list
[email protected]
https://mail.gna.org/listinfo/gregorio-users

Reply via email to