Fwd: Change beam grouping
On 14 September 2011 23:49, Peekay Ex pkx1...@gmail.com wrote: Hello, On Wed, Sep 14, 2011 at 7:46 PM, Sven Axelsson sven.axels...@gmail.com wrote: Hi list. This is probably in the manual, http://lilypond.org/doc/v2.14/Documentation/notation/beams#setting-automatic-beam-behavior Yes, thanks, I have looked at that page. That's where I figured out how to produce the example by manipulating the stemLeftBeamCount and stemRightBeamCount properties. But I need it done automatically and it is not clear (at least to me) how to do that. -- Sven Axelsson ++[+ -].+..+.+.-.+... +++.-.++..++.++.... -- Sven Axelsson ++[+ -].+..+.+.-.+... +++.-.++..++.++.... ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Fwd: Change beam grouping
Sven Axelsson-3 wrote: On 14 September 2011 23:49, Peekay Ex pkx1...@gmail.com wrote: Hello, On Wed, Sep 14, 2011 at 7:46 PM, Sven Axelsson sven.axels...@gmail.com wrote: Hi list. This is probably in the manual, http://lilypond.org/doc/v2.14/Documentation/notation/beams#setting-automatic-beam-behavior Yes, thanks, I have looked at that page. That's where I figured out how to produce the example by manipulating the stemLeftBeamCount and stemRightBeamCount properties. But I need it done automatically and it is not clear (at least to me) how to do that. it's there - see subdividing beams \set subdivideBeams = ##t \set baseMoment = #(ly:make-moment 1 8) \set beatStructure = #'(2 2 2 2) should work for your example! cheers Eluze -- View this message in context: http://old.nabble.com/Change-beam-grouping-tp32466108p32470904.html Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Fwd: Change beam grouping
On 15 September 2011 13:37, -Eluze elu...@gmail.com wrote: it's there - see subdividing beams \set subdivideBeams = ##t \set baseMoment = #(ly:make-moment 1 8) \set beatStructure = #'(2 2 2 2) should work for your example! The result is not exactly the same. With subdivideBeams you have only one beam in the middle between the two rhythms, whereas there are two beams (16th notes) in the image sent by Sven. I would be interested to know if it is possible to get Sven's result with LilyPond's automatic beaming rules. Maybe Carl (who is the master of beaming) could give an answer? Cheers, Xavier -- Xavier Scheuer x.sche...@gmail.com ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Basic LilyPond Cheat Sheet
On Mon, Sep 12, 2011 at 8:39 AM, Reinhold Kainhofer reinh...@kainhofer.comwrote: Attached you can find the PDF version of this cheat sheet: http://www.fam.tuwien.ac.at/~reinhold/temp/2011-08-24_LilyPond_CheatSheet_Basic.pdf Thanks, Reinhold! I, also, was unable to print the cheat sheet (Win XP) until I used the link provided by Robert Schaus to the online pdf converter : http://docupub.com/pdfconvert/ PS: I'm also planning to write a cheat sheet with basic tweaks/overrides and the various paper/header fields. But that might take a while. I would love to see it if and when you write it. Paper and header have been major problems for me. Ralph -- Ralph Palmer Brattleboro, VT USA palmer.r.vio...@gmail.com ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Parsing lyrics in a music function
I've written some music functions I use frequently to operate on lyrics. For example, there's one call lacc that allows me to intermix lyrics and notation by accumulating the lyrics into a list I can instantiate later in the \score block. Very nice and convenient, but the usage is a little messy: \lacc \lyricmode { This is a ly -- ric line. } c4 d e f | g a \lacc \lyricmode { Here is the next. } b c | d c2. | Normally, I deal with the messiness by defining a keystroke macro in my editor that wraps a line of bare text in the necessary commands and braces. I now find myself (skipping a long story) needing to work in an environment where keystroke macros will not be available. Is it possible to define a music function that will do the work of my keystroke macro? Ideally I'd like to be able to write in an input file something like \lyr This is a lyric line and have LilyPond do the rest, but none of my attempts thus far have worked. Thanks, Mike ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: ubuntu lyx lilypond latex
I have some further feedback to give you. Indeed, there's no need to reconfigure, as you've said. However, I notice this: Each time I open a document with lilypond code in it which has previously previewed well, I get the code in document font. There's nothing wrong with the code, since it worked previously AND can outputs correctly as PDF. But if I then change something -- e.g. pressing ENTER at the end, or by adding a blank space there, or by flattening a note, c -- the code previews correctly. If I then change it back to what it was before, the preview doesn't work again. Now, if I SAVE the file with the code that previews correctly, then open it again, the previews don't work again, so I have to make new changes to make it work. So the gist seems to be this: whatever is in the file, or whatever is some background memory does not preview. Only new changes preview. Now here's something interesting: If I just open a file with code and wait for the preview, I get the code in document font. HOWEVER, if I open the same file and immediately Alt-Tab into another program previously opened (such as Firefox, c) and THEN Alt-Tab back to Lyx, the previews come up instantly and perfectly. I have absolutely no idea why all of this consistently happen, but I hope this feedback is useful. Julien Rioux-2 wrote: On 13/09/2011 10:38 PM, Pablo Zumarán wrote: Thank you! I've got it running now! There's only a little snag, though. Some times, the preview doesn't work; it just shows the code in the default document font (not the code font). However, all I have to do is select ToolsReconfigure again and restart. It's not much bother, and I wouldn't have mention it if you hadn't asked for feedback some time ago. Thanks again! Julien Rioux-2 wrote: On 13/09/2011 7:43 PM, Josiah Boothby wrote: When I experimented with this, it seemed that LyX required a sufficiently recent minimum version of Lilypond. If the version of Ubuntu you're using has an outdated version of Lilypond, LyX won't use it. Make sure you have lilypond version 2.14.x or greater as well as Lyx 2.0.x. --Josiah That's right, you will need version 2.14 of lilypond. Once you have it installed, run LyX and select the menu Tools Reconfigure, then restart LyX. Also have a look at the example file lilypond.lyx in the menu File Open, click the Examples button, and you will see the file lilypond.lyx among other example files. Open it and see. Do File Save as... and then do some modifications if you would like. Cheers, Julien ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user You won't need to do ToolsReconfigure each time. This is only when you install a new external tool, and you want LyX to detect it. As in: after installing a newer version of lilypond. When playing around with lilypond in LyX, I also sometimes got previews showing the code in the document font. This occurred each time I had made a mistake in the lilypond code. The bad code is then not replaced by an image, since lilypond failed to produce any image. Instead the code is interpreted as text by latex. I hope it is not too much of a bother. I though we were already catching lilypond errors and interrupting the preview process in such case, but it seems not. Anyway, good luck with your book project. Cheers, Julien ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user -- View this message in context: http://old.nabble.com/ubuntu-lyx-lilypond-latex-tp32452039p32473789.html Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Parsing lyrics in a music function
Michael Ellis michael.f.el...@gmail.com writes: I've written some music functions I use frequently to operate on lyrics. For example, there's one call lacc that allows me to intermix lyrics and notation by accumulating the lyrics into a list I can instantiate later in the \score block. Very nice and convenient, but the usage is a little messy: \lacc \lyricmode { This is a ly -- ric line. } c4 d e f | g a \lacc \lyricmode { Here is the next. } b c | d c2. | Normally, I deal with the messiness by defining a keystroke macro in my editor that wraps a line of bare text in the necessary commands and braces. I now find myself (skipping a long story) needing to work in an environment where keystroke macros will not be available. Is it possible to define a music function that will do the work of my keystroke macro? Ideally I'd like to be able to write in an input file something like \lyr This is a lyric line and have LilyPond do the rest, but none of my attempts thus far have worked. The arguments of a music function are parsed before it is called, so no. However, if you already are in lyrics mode, you can pick up the music in that manner. You may also think about doing \lacc This is a lyric line and then using ly:parser-parse-string to pick up lyricmode expressions. It might be nice at one point of time to be able to call #{ \lyricmode \somefunction-taking-a-music-argument #} or similar trickery, but this kind of closure is not available yet. Make a feature request and offer a bounty... Perhaps someone will take it up. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Parsing lyrics in a music function
On Thu, Sep 15, 2011 at 3:16 PM, David Kastrup d...@gnu.org wrote: Michael Ellis michael.f.el...@gmail.com writes: I've written some music functions I use frequently to operate on lyrics. For example, there's one call lacc that allows me to intermix lyrics and notation by accumulating the lyrics into a list I can instantiate later in the \score block. Very nice and convenient, but the usage is a little messy: \lacc \lyricmode { This is a ly -- ric line. } c4 d e f | g a \lacc \lyricmode { Here is the next. } b c | d c2. | Normally, I deal with the messiness by defining a keystroke macro in my editor that wraps a line of bare text in the necessary commands and braces. I now find myself (skipping a long story) needing to work in an environment where keystroke macros will not be available. Is it possible to define a music function that will do the work of my keystroke macro? Ideally I'd like to be able to write in an input file something like \lyr This is a lyric line and have LilyPond do the rest, but none of my attempts thus far have worked. The arguments of a music function are parsed before it is called, so no. However, if you already are in lyrics mode, you can pick up the music in that manner. You may also think about doing \lacc This is a lyric line and then using ly:parser-parse-string to pick up lyricmode expressions. It might be nice at one point of time to be able to call #{ \lyricmode \somefunction-taking-a-music-argument #} or similar trickery, but this kind of closure is not available yet. Thanks, David. I figured it must be a parsing issue so it's nice to have it clarified by someone knowledgable. I like the ly:parser-parse-string idea. Does that function return a music object if the parsing is successful? Would it work to have my \lacc function massage the string so that it becomes \lyricmode { This is a lyric line } and then call ly:parser-parse-string to return the result? For reference (and in case someone else might find it useful) here is the complete set of functions I currently have: %% #(define (make-music-accumulator) (define acc '()) (define (add lyr) (set! acc (append acc lyr))) (define (get) acc) (define (interface op . rest) (cond ((eq? op 'add) (add (car rest))) ((eq? op 'get) (get)) (else (error Undefined operation interface) #(define defaultLyricAccumulator (make-music-accumulator)) lacc = #(define-music-function (parser location music) (ly:music?) For accumulating lyrics mixed with notation (defaultLyricAccumulator 'add (ly:music-property music 'elements)) (make-music 'SequentialMusic 'void #t)) getLyrics = #(define-music-function (parser location) () for retrieving accumulated lyrics. (make-music 'SequentialMusic 'elements (defaultLyricAccumulator 'get))) %% ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: automatic indentation of long instrument names?
Am Thursday, 15. September 2011, 22:08:04 schrieb Patrick Schmidt: in previews long instrument names seem to be indented automatically (see preview.png) Actually, preview simply crops the image where the instrument name starts, which in this case is more to the left than the page start. So you get a preview image that is actually larger than the page! whereas on the first full page of the same score they get lost in the left margin (see page1.png). Is there an option for the automatic calculation of the level of indentation in relation to the length of instrument names? No, unfortunately, not. It would be great to have it, though. Cheers, Reinhold -- -- Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/ * Financial Actuarial Math., Vienna Univ. of Technology, Austria * http://www.fam.tuwien.ac.at/, DVR: 0005886 * LilyPond, Music typesetting, http://www.lilypond.org ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: automatic indentation of long instrument names?
Am 15.09.2011 um 22:10 schrieb Reinhold Kainhofer: Am Thursday, 15. September 2011, 22:08:04 schrieb Patrick Schmidt: in previews long instrument names seem to be indented automatically (see preview.png) Actually, preview simply crops the image where the instrument name starts, which in this case is more to the left than the page start. So you get a preview image that is actually larger than the page! That's what I suspected... whereas on the first full page of the same score they get lost in the left margin (see page1.png). Is there an option for the automatic calculation of the level of indentation in relation to the length of instrument names? No, unfortunately, not. It would be great to have it, though. Thanks patrick Cheers, Reinhold -- -- Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/ * Financial Actuarial Math., Vienna Univ. of Technology, Austria * http://www.fam.tuwien.ac.at/, DVR: 0005886 * LilyPond, Music typesetting, http://www.lilypond.org ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: automatic indentation of long instrument names?
Hello, On Thu, Sep 15, 2011 at 9:23 PM, Patrick Schmidt p.l.schm...@gmx.de wrote: Am 15.09.2011 um 22:10 schrieb Reinhold Kainhofer: ...snip.. whereas on the first full page of the same score they get lost in the left margin (see page1.png). Is there an option for the automatic calculation of the level of indentation in relation to the length of instrument names? No, unfortunately, not. It would be great to have it, though. http://code.google.com/p/lilypond/issues/detail?id=766 -- -- James ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Parsing lyrics in a music function
Michael Ellis michael.f.el...@gmail.com writes: Thanks, David. I figured it must be a parsing issue so it's nice to have it clarified by someone knowledgable. I like the ly:parser-parse-string idea. Does that function return a music object if the parsing is successful? No. ly:parse-string-expression does, so that would be the smarter idea. Would it work to have my \lacc function massage the string so that it becomes \lyricmode { This is a lyric line } and then call ly:parser-parse-string to return the result? Yes. With parser-parse-string, you'd do something like parseStringResult = \lyricmode { ... } and then look up the parser variable parseStringResult. ly:parse-string-expression is, of course, much more suitable. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: automatic indentation of long instrument names?
On 15 Sep 2011, at 22:08, Patrick Schmidt wrote: in previews long instrument names seem to be indented automatically (see preview.png) whereas on the first full page of the same score they get lost in the left margin (see page1.png). Is there an option for the automatic calculation of the level of indentation in relation to the length of instrument names? Some engravers make it more compact: In my edition of the same music, only the first, indented part has the instrument names, the latter which further are broken into lines. For example Violoncello e Cembalo. (actually with an ending .). In an orchestral score (Carmina Burana) with a higher number of instruments (taking up the whole page), all staff systems have names, but they are abbreviated and broken into lines as well. For example Clar.bosso Sib Interestingly skipping space after the .. Hans ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Parsing lyrics in a music function
On Thu, Sep 15, 2011 at 4:46 PM, David Kastrup d...@gnu.org wrote: Michael Ellis michael.f.el...@gmail.com writes: Thanks, David. I figured it must be a parsing issue so it's nice to have it clarified by someone knowledgable. I like the ly:parser-parse-string idea. Does that function return a music object if the parsing is successful? No. ly:parse-string-expression does, so that would be the smarter idea. Would it work to have my \lacc function massage the string so that it becomes \lyricmode { This is a lyric line } and then call ly:parser-parse-string to return the result? Yes. With parser-parse-string, you'd do something like parseStringResult = \lyricmode { ... } and then look up the parser variable parseStringResult. ly:parse-string-expression is, of course, much more suitable. Did ly:parse-string-expression go away in 2.14.1? I get an undefined variable error if I try something like: \version 2.14.1 abc = #(define-music-function (parser loc) () (ly:parse-string-expression parser { a b c' }) ) \displayMusic \abc %lilypond %args /Users/mellis/Desktop/AudioTranscriptions/parsertest.ly Processing `/Users/mellis/Desktop/AudioTranscriptions/parsertest.ly' Parsing...ERROR: Unbound variable: ly:parse-string-expression I don't get that error with other ly:parse-xxx functions. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Parsing lyrics in a music function
Michael Ellis michael.f.el...@gmail.com writes: Did ly:parse-string-expression go away in 2.14.1? I get an undefined variable error if I try something like: It became available later than that. Something like three weeks ago or so. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: centering text on a measure
David Nalesnik-2 wrote: In the meantime, I've generalized the 'extra-offset approach so that you can center a grob of your choice between two others. of which centering between barlines is just one option. I've attached it in case it's useful to someone, or anyone has any feedback on how to improve it (or what it might be good for!) Hi David, I tested your definitions with a longer example using StaffGroup and commented the not used parts with %{ ... %}. (see code below) The log states: ERROR: Wrong type (expecting pair): () And now the strangest thing: If I uncomment two it works!! (two is a copy of one and not called in the active StaffGroup!!!) If I completely delete two out of the file it doesn't work. If I comment eyery line of two with % it works!! Some other combinations of commenting in/out parts of the code gives the same result. I've never heard of such a strange behaviour. \centerGrobBetween is great code, but I'm sorry to have no idea to fix or even locate the problem. Best, Harm http://old.nabble.com/file/p32475696/centerTest-1.ly centerTest-1.ly -- View this message in context: http://old.nabble.com/centering-text-on-a-measure-tp32377202p32475696.html Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: centering text on a measure
Hi, Harm -- On Thu, Sep 15, 2011 at 6:18 PM, harm6 thomasmorle...@googlemail.comwrote: I tested your definitions with a longer example using StaffGroup and commented the not used parts with %{ ... %}. (see code below) The log states: ERROR: Wrong type (expecting pair): () And now the strangest thing: If I uncomment two it works!! (two is a copy of one and not called in the active StaffGroup!!!) If I completely delete two out of the file it doesn't work. If I comment eyery line of two with % it works!! Some other combinations of commenting in/out parts of the code gives the same result. I've never heard of such a strange behaviour. Neither have I ... Is the file as you send it supposed to create an error? Running it exactly as you sent it, I get none! I've tried every combination of uncommenting this and that block, and I get no errors. But I have noticed what you're talking about, where the same ly code works in one version of the file, but not another; or, ly code that causes an error works after, say, adding an extra note at the end of the example, then removing it. Maddeningly, I can't come up with an example that causes the error for you or someone else to try! Anyway, thank you for testing this out :) David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user