Re: How to develop Emacs mode?
On Sat, 2010-06-19 at 12:00 -0400, lilypond-devel-requ...@gnu.org wrote: From: Laura Conrad lcon...@laymusic.org Subject: Re: How to develop Emacs mode? To: Nicolas Sceaux nicolas.sce...@gmail.com Cc: David Kastrup d...@gnu.org, lilypond-devel@gnu.org Message-ID: 87wrtvazky@laymusic.org Content-Type: text/plain; charset=us-ascii Nicolas == Nicolas Sceaux nicolas.sce...@gmail.com writes: Nicolas Several years ago, I used a midi keyboard to enter the notes: one hand Nicolas on the midi keyboard, and one hand on the computer keyboard, to set Nicolas durations, because I'm a lame keyboard player. But it turned out that Nicolas (in my case) that method was not quicker (or practical) than full computer Nicolas keyboard entry. I do use that method still. I find it's not a lot quicker, FWIW: What *is* a lot quicker is playing in the rhythm of the piece using the computer keyboard and then playing the notes over the top, using the MIDI keyboard. You get to leverage your sight-reading ability, and can enter music in the time it takes you to play it thru twice. This is *not* trying to guess the rhythm from your timing, but entering the rhythm via the LilyPond names 0, 1, 1., 2, 2. etc which appear as a kind of drum track. So you can slow down a bit if it gets too quick, but you can follow the music because you naturally enter the durations rhythmically as you read the music. Of course, you need Denemo to do this:) In the upcoming version 0.8.18 this will be possible out-of-the-box, without setting any modes and so on. I realize this won't be much use to those with a lot of skills built up using other entry methods, but there are always newcomers. Richard Shann but is a bit less error prone, for my purposes. When I do relative entry from the computer keyboard, I make a lot of octavation errors. But I agree with David that it needs better intelligence about enharmonic notes -- if I weren't doing Renaissance music, which has a lot higher percentage of white notes than later styles, I might well decide that fixing the enharmonics was taking as much time as I was saving on the octavation errors. Another thing I'd really like added to this input method is a way to hear the MIDI notes. -- Laura (mailto:lcon...@laymusic.org) (617) 661-8097 233 Broadway, Cambridge, MA 02139 http://www.laymusic.org/ http://www.serpentpublications.org ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: How to develop Emacs mode?
Le 17 juin 2010 à 17:31, David Kastrup a écrit : Carl Sorensen c_soren...@byu.edu writes: On 6/17/10 8:59 AM, David Kastrup d...@gnu.org wrote: Hi, I have a question about developing Emacs input and major modes for Lilypond. What would be the right way to go forward for me? I want to make use of current Emacs features (like semantic parsing and similar). I also want to create input methods for inputting on the keyboard in chromatic button keyboard layout, but also in parallel for inputting via midi (I already checked that make-serial-process can be used for opening and accessing a midi device on GNU/Linux). Are you familiar with lyqi? http://nicolas.sceaux.free.fr/lilypond/lyqi.html Not chromatic button accordion layout, and I should think that a regular input method might be cleaner. I think I checked it out at one time, and the payback for the installation trouble seemed not convincing to me. In particular, French note names were not interesting to me. I should think that the canonical input method should be Dutch. Err, I should do something about this link which is totaly outdated. But, for the record, Dutch input method was of course the default, not French. I've been writing a new version with a home made parser (see http://github.com/nsceaux/lyqi) because I was under the impression that semantics (http://cedet.sourceforge.net/semantic.shtml) was not responsive enough with respect to incremental parsing, but I may well be wrong[1]. Indentation is not good yet, but at least the parser as knowledged of lilypond/scheme/lilypond embedding. Anyway, it seems that I've reinvented the wheel (badly). On the other hand my note typing as never been so quick. Several years ago, I used a midi keyboard to enter the notes: one hand on the midi keyboard, and one hand on the computer keyboard, to set durations, because I'm a lame keyboard player. But it turned out that (in my case) that method was not quicker (or practical) than full computer keyboard entry. Nicolas [1] Its documentation says that parsing happens mainly in idle time, whereas I needed that it happens as soon as a typing command is done (so that the next command can immediately know what the previous note duration, alteration, etc, is, to modify it). ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: How to develop Emacs mode?
Nicolas Sceaux nicolas.sce...@gmail.com writes: Le 17 juin 2010 à 17:31, David Kastrup a écrit : Carl Sorensen c_soren...@byu.edu writes: On 6/17/10 8:59 AM, David Kastrup d...@gnu.org wrote: I have a question about developing Emacs input and major modes for Lilypond. What would be the right way to go forward for me? I want to make use of current Emacs features (like semantic parsing and similar). I also want to create input methods for inputting on the keyboard in chromatic button keyboard layout, but also in parallel for inputting via midi (I already checked that make-serial-process can be used for opening and accessing a midi device on GNU/Linux). Are you familiar with lyqi? http://nicolas.sceaux.free.fr/lilypond/lyqi.html Not chromatic button accordion layout, and I should think that a regular input method might be cleaner. I think I checked it out at one time, and the payback for the installation trouble seemed not convincing to me. In particular, French note names were not interesting to me. I should think that the canonical input method should be Dutch. Err, I should do something about this link which is totaly outdated. But, for the record, Dutch input method was of course the default, not French. Yes, I mentioned in a followup that I apparently have been quite careless in rereading the lyqi information. I think the first time I gave up on lyqi could possibly have been because of running out of steam satisfying the dependencies, contrasted with the expected return of investment. I've been writing a new version with a home made parser (see http://github.com/nsceaux/lyqi) because I was under the impression that semantics (http://cedet.sourceforge.net/semantic.shtml) was not responsive enough with respect to incremental parsing, but I may well be wrong[1]. Indentation is not good yet, but at least the parser as knowledged of lilypond/scheme/lilypond embedding. Anyway, it seems that I've reinvented the wheel (badly). On the other hand my note typing as never been so quick. Well, being used to your tools is always helpful. Several years ago, I used a midi keyboard to enter the notes: one hand on the midi keyboard, and one hand on the computer keyboard, to set durations, because I'm a lame keyboard player. But it turned out that (in my case) that method was not quicker (or practical) than full computer keyboard entry. I should think so. I am not a good keyboard player either. But I think that recording with complete timing, and placing the bar lines manually afterwards should allow for an excellent return of invested time. Managing reasonably timed keyboard input for a bar at a time should be doable. And if you mess up one bar completely, you can still relabel all of it manually. [1] Its documentation says that parsing happens mainly in idle time, whereas I needed that it happens as soon as a typing command is done (so that the next command can immediately know what the previous note duration, alteration, etc, is, to modify it). I think that semantic does idle time parsing mostly for cross reference information and similar. It would appear pretty nonsensical for me to ignore your work on lyqi (which, in turn, appears to be slated to replace most of the existing lilypond-mode functionality). If it is compatible with your plans (which may include copyright assignment) to have a full-featured Lilypond mode eventually appear upstream in Emacs, I'd just try joining forces with you. It would appear that you work on MacOSX or so. Can you check whether some variation of the Midi test code using make-serial-process I posted recently could be made to work on your setup? If it did, this would be much preferable to having to use external applications like rumor. Thanks -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: How to develop Emacs mode?
Le 19 juin 2010 à 14:23, David Kastrup a écrit : It would appear pretty nonsensical for me to ignore your work on lyqi (which, in turn, appears to be slated to replace most of the existing lilypond-mode functionality). Indeed, I do not use LilyPond-mode anymore. If it is compatible with your plans (which may include copyright assignment) to have a full-featured Lilypond mode eventually appear upstream in Emacs, I'd just try joining forces with you. I'm not protective about this emacs mode. Just interested in having something as effective as possible wrt note entry, because I type a lot of music. It would appear that you work on MacOSX or so. Can you check whether some variation of the Midi test code using make-serial-process I posted recently could be made to work on your setup? If it did, this would be much preferable to having to use external applications like rumor. My machine does not have a serial port, and I don't have a midi keyboard anymore. ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: How to develop Emacs mode?
Nicolas == Nicolas Sceaux nicolas.sce...@gmail.com writes: Nicolas Several years ago, I used a midi keyboard to enter the notes: one hand Nicolas on the midi keyboard, and one hand on the computer keyboard, to set Nicolas durations, because I'm a lame keyboard player. But it turned out that Nicolas (in my case) that method was not quicker (or practical) than full computer Nicolas keyboard entry. I do use that method still. I find it's not a lot quicker, but is a bit less error prone, for my purposes. When I do relative entry from the computer keyboard, I make a lot of octavation errors. But I agree with David that it needs better intelligence about enharmonic notes -- if I weren't doing Renaissance music, which has a lot higher percentage of white notes than later styles, I might well decide that fixing the enharmonics was taking as much time as I was saving on the octavation errors. Another thing I'd really like added to this input method is a way to hear the MIDI notes. -- Laura (mailto:lcon...@laymusic.org) (617) 661-8097 233 Broadway, Cambridge, MA 02139 http://www.laymusic.org/ http://www.serpentpublications.org Copyright law has abandoned its reason for being: to encourage learning and the creation of new works. Instead, its principal functions now are to preserve existing failed business models, to suppress new business models and technologies, and to obtain, if possible, enormous windfall profits from activity that not only causes no harm, but which is beneficial to copyright owners. William Patry, in his farewell post on The Patry Copyright Blog. ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: How to develop Emacs mode?
Nicolas Sceaux nicolas.sce...@gmail.com writes: Le 19 juin 2010 à 14:23, David Kastrup a écrit : It would appear that you work on MacOSX or so. Can you check whether some variation of the Midi test code using make-serial-process I posted recently could be made to work on your setup? If it did, this would be much preferable to having to use external applications like rumor. My machine does not have a serial port, Neither has mine. I just use make-serial-process's ability to actually work with any character device for attaching it to a midi port. The actual Midi connection happens to be a USB Midi converter. and I don't have a midi keyboard anymore. It should work with any application providing a midi device. For example, under GNU/Linux you'll find virtual Midi keyboards which deliver Midi events for mouse clicks on the screen image of a piano keyboard. If you could find anything like that for MacOSX, it should be fine for testing. But of course, if you would not make use of that functionality yourself, you can just wait until somebody else using MacOSX provides relevant feedback with regard to that particular item. It is not like you don't have anything else to do... Oh, by the way. I have a 49-key USB Midi master keyboard (M-Audio eKeys 49) sitting around here, standard-compliant (just PlugPlay with Linux) and of rather low weight (something like 3kg or so) and moderate size (49 keys are 49 keys, but there is not much else). If you port the stuff I am planning to do over to the MacOSX side and seriously test what makes and what does not make it work well for you for a while, it's yours. You have to provide your own stand or table for it, though. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: How to develop Emacs mode?
Le 19 juin 2010 à 16:15, David Kastrup a écrit : Nicolas Sceaux nicolas.sce...@gmail.com writes: Le 19 juin 2010 à 14:23, David Kastrup a écrit : It would appear that you work on MacOSX or so. Can you check whether some variation of the Midi test code using make-serial-process I posted recently could be made to work on your setup? If it did, this would be much preferable to having to use external applications like rumor. My machine does not have a serial port, Neither has mine. I just use make-serial-process's ability to actually work with any character device for attaching it to a midi port. The actual Midi connection happens to be a USB Midi converter. Ah OK, good to know. I'm trying to use a virtual midi keyboard and the make-serial-process function. ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: How to develop Emacs mode?
Nicolas Sceaux nicolas.sce...@gmail.com writes: Le 19 juin 2010 à 16:15, David Kastrup a écrit : Nicolas Sceaux nicolas.sce...@gmail.com writes: Le 19 juin 2010 à 14:23, David Kastrup a écrit : It would appear that you work on MacOSX or so. Can you check whether some variation of the Midi test code using make-serial-process I posted recently could be made to work on your setup? If it did, this would be much preferable to having to use external applications like rumor. My machine does not have a serial port, Neither has mine. I just use make-serial-process's ability to actually work with any character device for attaching it to a midi port. The actual Midi connection happens to be a USB Midi converter. Ah OK, good to know. I'm trying to use a virtual midi keyboard and the make-serial-process function. Well, here is what works for me (:speed nil is necessary to trick make-serial-process into not trying to set a speed on the serial port) for letting Emacs display data arriving on the Midi interface. On GNU/Linux. But it is not unlikely that a character device like that would be available under OS/X as well. (make-serial-process :port /dev/midi1 :speed nil :buffer *lily-midi* :coding 'binary :noquery t :filter (lambda (process string) (message (mapconcat (lambda(x) (format %02x x)) string -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
How to develop Emacs mode?
Hi, I have a question about developing Emacs input and major modes for Lilypond. What would be the right way to go forward for me? I want to make use of current Emacs features (like semantic parsing and similar). I also want to create input methods for inputting on the keyboard in chromatic button keyboard layout, but also in parallel for inputting via midi (I already checked that make-serial-process can be used for opening and accessing a midi device on GNU/Linux). I don't think I'll be able to track on what Emacs versions (let alone XEmacs) the code will run. So the idea would be to provide it within Emacs (Emacs has quite a regular release schedule right now) and just there, and leave XEmacs users in the cold until someone decided to port the stuff over: I really don't have time and energy for staying with an Emacs 21.1 codebase (what XEmacs is mostly, except when it is completely different). That's been a total resource drain on other projects of mine, and I don't want to go there. Moving existing Lilypond mode stuff into Emacs upstream will require copyright assignments to the FSF. A fast hunch whether authors of the current Lilypond mode can be determined with sufficient precision (for legal accountability) and would be sympathetic to that, or whether I should rather have to start from scratch? Any suggestions, pointers, ideas? -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: How to develop Emacs mode?
On 6/17/10 8:59 AM, David Kastrup d...@gnu.org wrote: Hi, I have a question about developing Emacs input and major modes for Lilypond. What would be the right way to go forward for me? I want to make use of current Emacs features (like semantic parsing and similar). I also want to create input methods for inputting on the keyboard in chromatic button keyboard layout, but also in parallel for inputting via midi (I already checked that make-serial-process can be used for opening and accessing a midi device on GNU/Linux). Are you familiar with lyqi? http://nicolas.sceaux.free.fr/lilypond/lyqi.html and rumor? http://www.volny.cz/smilauer/rumor/rumor.html I don't think I'll be able to track on what Emacs versions (let alone XEmacs) the code will run. So the idea would be to provide it within Emacs (Emacs has quite a regular release schedule right now) and just there, and leave XEmacs users in the cold until someone decided to port the stuff over: I really don't have time and energy for staying with an Emacs 21.1 codebase (what XEmacs is mostly, except when it is completely different). That's been a total resource drain on other projects of mine, and I don't want to go there. Moving existing Lilypond mode stuff into Emacs upstream will require copyright assignments to the FSF. A fast hunch whether authors of the current Lilypond mode can be determined with sufficient precision (for legal accountability) and would be sympathetic to that, or whether I should rather have to start from scratch? Any suggestions, pointers, ideas? I would guess that authors can be determined, and that they would be sympathetic. Thanks, Carl ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: How to develop Emacs mode?
Carl Sorensen c_soren...@byu.edu writes: On 6/17/10 8:59 AM, David Kastrup d...@gnu.org wrote: Hi, I have a question about developing Emacs input and major modes for Lilypond. What would be the right way to go forward for me? I want to make use of current Emacs features (like semantic parsing and similar). I also want to create input methods for inputting on the keyboard in chromatic button keyboard layout, but also in parallel for inputting via midi (I already checked that make-serial-process can be used for opening and accessing a midi device on GNU/Linux). Are you familiar with lyqi? http://nicolas.sceaux.free.fr/lilypond/lyqi.html Not chromatic button accordion layout, and I should think that a regular input method might be cleaner. I think I checked it out at one time, and the payback for the installation trouble seemed not convincing to me. In particular, French note names were not interesting to me. I should think that the canonical input method should be Dutch. and rumor? http://www.volny.cz/smilauer/rumor/rumor.html Separate program, own timing, similar timing problems to midi2ly (basically unusable), no sane treatment of enharmonic equalities. A separate program is not necessary, the following works fine for demonstrating getting at Midi data from /dev/midi1: (make-serial-process :port /dev/midi1 :speed nil :buffer *lily-midi* :coding 'binary :noquery t :filter (lambda (process string) (message (mapconcat (lambda(x) (format %02x x)) string Not having to install and/or compile binaries definitely is going to make this more attractive. One point of using something midi-based (and also using a single-keystroke input method) would be to record the key press and release times in text properties. When inserting bar lines afterwards, the durations can be quantized and inserted bar-by-bar, making for a much better hit rate. I don't trust myself to input anything useful all in batch mode. But resynchronizing bar by bar, I have a chance to get somewhere. That's something I'll want integrated with my editor in an interactive manner rather than as a batch process. I would guess that authors can be determined, and that they would be sympathetic. Sounds good. At some point of time I'll have to make the decision just how much material is going to be worth reusing, and then I might get in contact with them. Thanks, -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: How to develop Emacs mode?
On Thu, Jun 17, 2010 at 09:08:35AM -0600, Carl Sorensen wrote: On 6/17/10 8:59 AM, David Kastrup d...@gnu.org wrote: Moving existing Lilypond mode stuff into Emacs upstream will require copyright assignments to the FSF. A fast hunch whether authors of the current Lilypond mode can be determined with sufficient precision (for legal accountability) and would be sympathetic to that, or whether I should rather have to start from scratch? I would guess that authors can be determined, and that they would be sympathetic. My hunch is that authors can be determined, and the ones you can contact would be sympathetic. However, my guess is that half the authors of our Emacs stuff will not be contactable for various reasons. I don't know how picky the FSF is about this, nor how important the existing work is. I personally would allocate 30 minutes for looking through git history, and try to figure out how many authors are still active with lilypond. I really don't know how it works if A and C are both active, but B did a lot of work (and is not contactable), but if B's lines of code are no longer present because of patches from A-B-C... it's a messy area. Frankly, if it would take me less than 5 hours to re-implement everything from scratch, I'd probably do that. Cheers, - Graham ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: How to develop Emacs mode?
Graham Percival gra...@percival-music.ca writes: On Thu, Jun 17, 2010 at 09:08:35AM -0600, Carl Sorensen wrote: On 6/17/10 8:59 AM, David Kastrup d...@gnu.org wrote: Moving existing Lilypond mode stuff into Emacs upstream will require copyright assignments to the FSF. A fast hunch whether authors of the current Lilypond mode can be determined with sufficient precision (for legal accountability) and would be sympathetic to that, or whether I should rather have to start from scratch? I would guess that authors can be determined, and that they would be sympathetic. My hunch is that authors can be determined, and the ones you can contact would be sympathetic. However, my guess is that half the authors of our Emacs stuff will not be contactable for various reasons. I don't know how picky the FSF is about this, Picky, if I want to get it into upstream Emacs. They've just set up a package repository for third-party stuff. Would be another option. nor how important the existing work is. No good idea yet. The whole syntactic stuff I'd likely redo using newer facilities in order to get sane combined Scheme/Lilypond indentation and highlighting. Redoing compiling/viewing/keybindings might be somewhat pointless, in contrast. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel