Re: Instrumental Group Names in Score
Hi Kieren, On Jan 3, 2008, at 12:39 PM, Kieren MacMillan wrote: I have easily spent 10 times the amount of time studying Lilypond and understand only 1/10th of what I can do in LaTeX. This may be because LaTeX includes *significantly* more (and more complex) macros which sit on top of (Plain) TeX -- i.e., you don't have to hand-code as much in LaTeX as you do in Lilypond. I *understand* LaTeX; I am *baffled* by Lilypond. Yes, but you're comparing apples to oranges in a way... You should compare a Lilypond file to a (Plain) TeX file where you need to define your own stylesheet -- I think you'd find that Lilypond compares (more) favourably there. Thank you for this comparison. Yes! I want the LaTeX equivalent in Lilypond. LaTeX stills permits a great deal of tweaking within a structure. This is not to say that Lilypond shouldn't be easier (the way LaTeX is *MUCH* easier than Plain TeX). I'm just pointing out that LaTeX is much more mature that way. I imagine you might be in the same situation if you needed to edit a real (low-level) TeX stylesheet file, e.g. \def\plaincases#1{\left\{\,\vcenter{\normalbaselines \mathsurround=0pt\relax \ialign{$##\hfil$\quad##\hfil\crcr#1\crcr}}\right.} \def\plainmatrix#1{\null\,\vcenter{\normalbaselines\mathsurround=0pt\re lax \ialign{\hfil$##$\hfil\quad\hfil$##$\hfil\crcr \mathstrut\crcr\noalign{\kern-\baselineskip} #1\crcr\mathstrut\crcr\noalign{\kern-\baselineskip}}}\,} \def\pplainmatrix#1{\left(\plainmatrix{#1}\right)} \let\plainpmatrix\pplainmatrix The benefit of LaTeX, coupled with whatever documentclass and packages you use, is that you don't NEED to access the code at that level. Lilypond just doesn't have those abstracted stylesheets. Yikes! This is exactly what I spend time doing in Lilypond which I want to reduce. And, I am very glad that I don't have to resort to this level of coding in LaTeX. Today I found an example of Lilypond coding which illustrates my bafflement in Lilypond which goes beyond the TeX/LaTeX comparison. I wanted to fill-out a two page orchestral part and Lilypond insisted on filling only 1.7 pages leaving several inches blank on page 2. (You may have already reviewed my comments in another thread.) I treated my problem as a vertical spacing problem. Consulting the Lilypond manual I was directed to section 5.5.1 (http://lilypond.org/doc/v2.11/Documentation/user/lilypond/Vertical- spacing-inside-a-system#Vertical-spacing-inside-a-system) which suggested code like \override VerticalAlignment #'max-stretch = #ly:align-interface::calc-max-stretch inside a Score context. Nothing I tried solved my problem. After posting to the user's group, I got several replies along the line of ragged-last-bottom = ##f raggedbottom = ##f raggedbottomlast = ##f Here's where I get baffled. (A priori) I don't know that these settings exist and when I search on vertical spacing (within a system) in the documentation, I am not directed to these settings. I certainly do understand why these settings are relevant and why setting the desired value solves my problem. It is just not easy to find the appropriate settings in the documentation. This kind of problem is very typical for me. (Perhaps it is the way I think?) Cheerios, Jeremiah ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
Le 3 janv. 08 à 21:31, Valentin Villenave a écrit : [...] Mmm... I'll still wait for a few days and see if the author has anything to say on this topic :) Plus, it would be great to add a few actual notes to demonstrate its use (I'd be happy to use the 'real_music' tag just once more :) I was recently thinking about cleaning up and reorganizing these things, for I have several versions in different projects and it's starting to be a mess. I'll put this task higher on my todo list, and make the result public on lsr. nicolas ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
On Thu, 3 Jan 2008 13:50:14 -0500 Kieren MacMillan [EMAIL PROTECTED] wrote: And you don't need explanations. I disagree! 1. If these are meant in any way to be instructive (like most, if not all, of the LSR!), then there *must* be internal documentation. They're not. They're supposed to be useful. Do normal LaTeX users ever look at the details of packages? I do... but then again, I'm not normal. I don't. As long as \usepackage{setspacing} ... \doublespacing and \usepackage{amsmath} do their job, I don't care how they get \weird-math-symbol to work. Do normal C++ programmers ever look at the source code of the libraries they use? Ok, in occasional circumstances yes, but generally not. All programmers *should* look more at the packages/libraries they use... especially in C++, which is one of the cruftiest languages I've ever seen. I've used Qt a whole lot in the past year, but I've never glanced at the source cde. Whoops. Come to think of it, I've never looked at the libc source code. Or the kernel source code. Oops. Unless you're programming the kernel or libc, *some* level of abstraction is necessary. Now, we could quibble about at which point one should draw the line -- maybe we shouldn't look at libc, but we _should_ look at Qt... but this is getting away from the main point. At laest, not for what I'm thinking. What *are* you thinking? ;-) See attached files. They worked in 2.4 or something like that. I make no claims that they work now, since I'm not a composer any more I haven't kept them up-to-date. And I just noticed that \flegato is defined twice. Now, init-defs.ly should be split up. A lot of it are dynamic (well, expressive-dynamic) marks. They don't belong in lilypond proper, but I could imagine them working well as a package in LSR -- ie the \flegato \mpdolce \niente I think that some of the \setTextDecr has made its way into lilypond. Or maybe not. Somebody would need to investigate this. Clearly the \tempoMark command does *not* belong in the expresive dynamics package. So that would be moved to somewhere else. All these commands might have nicer versions. Again, I haven't touched these files in years. A normal user can then \include expressive-dynamics.ly in his .ly file and use (or not use) any of those commands. Sure, adding the \include probably makes the compiling 0.01 seconds longer, but IMO it's worth it. Now, init-layout.ly is a more personal style -- I hate the silly C time signature instead of 4/4, when I use glissandi they tend to be only one or two semitones, so I make them thicker to be more visible. And maybe one or two other changes. Users can't \include init-layout.ly without changing their own scores, unlike init-defs.ly. But such style sheets might still be useful. If somebody wants to investigate this, I could send you all my stuff privately. I think it *would* be useful to collect this stuff, and have a bunch of users contribute to the same packages. But I'm not doing this myself. Cheers, - Graham init-defs.ly Description: Binary data init-layout.ly Description: Binary data ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
Hi Graham, They're not. They're supposed to be useful. Because instruction isn't useful? For future reference, I don't read or respond to posts which begin with such ludicrous and intentionally irritating statements... Regards, Kieren. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
On Fri, 4 Jan 2008 15:18:07 -0500 Kieren MacMillan [EMAIL PROTECTED] wrote: Hi Graham, They're not. They're supposed to be useful. Because instruction isn't useful? For future reference, I don't read or respond to posts which begin with such ludicrous and intentionally irritating statements... For future reference, replace any supposed in any of my emails with the primary intention. - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
2008/1/4, Kieren MacMillan [EMAIL PROTECTED]: For future reference, I don't read or respond to posts which begin with such ludicrous and intentionally irritating statements... Hi everybody, hi Kieren, I think there's some kind of a misunderstanding here... I thought everybody on this list was used to Graham's strong and definitive statements (I should find, for instance, the mail he answered me a year ago, when I first suggested to categorize LSR snippets by tags instead of directories :) The point is, everybody (that goes especially for open-source) is here with a different approach in mind. We all come from different worlds, countries, cultural and musical backgrounds (not to mention Operating systems, programmins languages etc). What LilyPond has always tried to achieve is to give each of all these people what they're looking for: a completely newbie can use LilyPond to produce simple scores, while a composer like you or myself can produce complicated large scores, while a developer such as Nicolas can write huge pieces of code to achieve wonderful magical things... Some people want explanations, others just don't. None is right or wrong here: motivations and people are just different, and we're all fine with it (we have to) -- as long as users don't go ranting against contributors and volunteers, like it happens sometimes on the list (not quite often, I might add -- Graham would say still far too often I guess). Sometimes, explanations are not necessarily a good thing. They can confuse newbies, or unexperienced users. But as you pointed out, the lack of explanations is to absolutely avoid as well. The solution is simple: clearly make the difference between the primary intention ((c)Graham Percival) of a piece of documentation, and its possible followups, more documented but also more technical. e.g. first tell the user what he just needs to know to be able to use a program (or a macro), and only then, provide him with some more details ; this way he'll only read at advanced explanations if he chooses to, be it out of curiosity, or to look for a specific thing, etc. The Notation Reference vs Internals Reference division is a very good example of what i'm talking about, but in the NR itself, each section first introduces the most simple commands, and only then the Commonly tweaked properties, etc. It's a great Documentation Editor thinking, and no wonder Graham just put it this way again in the macro-related discussion. As for me, I use LATeX without ever looking at the code, because I just find it boring, and I don't like its syntax at all. However, in LilyPond, I could spend hours (as a matter of fact, I often do) looking at the code, because I basically felt in love with it -- in a very nerd-way, I give you that :-) That's sometimes a matter of taste, too ;-) Best Regards, Valentin PS. Graham's statements are *always* intentionally irritating. This is what he does best, and if he ever were to deny it, just don't believe him :) ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
Kieren, Once again (and again), thank you for your advice. On Sunday, December 30, 2007, at 12:47 PM, Kieren MacMillan wrote: How can I figure out new code to solve new problems when I don't know the code exists? I have learned essentially everything I know by looking at the examples which pepper the WWW. You might not find the *exact* code you need (e.g., to add an instrument name to the InnerStaffGroup context) but you're likely to find something similar -- for example, in the documentation for Instrument Names (http://lilypond.org/doc/v2.10/Documentation/user/lilypond/ Instrument-names), about half-way down you'll find the following: _ To add instrument names to other contexts (such as GrandStaff, ChoirStaff, or StaffGroup), the engraver must be added to that context. \layout{ \context {\GrandStaff \consists Instrument_name_engraver} } More information about adding and removing engravers can be found in Modifying context plug-ins. _ The only difference between my code (i.e., the solution to your problem) and the example code in the documentation is that I've replaced \GrandStaff with \InnerStaffGroup (because that's where you wanted the instrument name engraver added). I agree with your approach to learning Lilypond. This is how I have solved most of my problems engraving music with Lilypond. In the particular instance above, however, I am not sure how I would *know* to replace \GrandStaff with \InnerStaffGroup. See next paragrraph below. There is something about Lilypond structure (or Scheme structure) which continues to elude me. It's actually pretty simple to grasp, once the fundamentals are clear: 1. Every \book block is a separate output file (e.g., PDF) -- if you haven't explicitly added one, Lilypond wraps your entire code block in a \book (implicitly). 2. Every \score block is a separate chunk of music in a \book. 3. Every \layout block affects the \score or \book block in which it appears -- i.e., a \layout inside a \score will affect only that \score, but a \layout outside of a \score (and thus in a \book, either explicitly or implicitly) will affect every \score in that \book. 4. Every \context block will affect the named context (e.g., \InnerStaffGroup) throughout the block (e.g., \score or \book) in which it appears. Any questions? (For more info, see the docs.) I appreciate your concise summary of Lilypond structure. I am casting about for simple examples of something I don't understand. In the meantime, I have two general illustrations. (1) Last year I had to learn LaTeX and a corollary TeX based technical drawing package called mfpic in order to typeset mathematical expressions and illustrations. In three weeks I was up and running in LaTeX and mfpic and could produce *professional* quality work. I have easily spent 10 times the amount of time studying Lilypond and understand only 1/10th of what I can do in LaTeX. As crude as my comparison is, the difference is a factor of 100 fold or more. This is why I say I am frustrated with Lilypond. I *understand* LaTeX; I am *baffled* by Lilypond. (2) A recent thread raised the issue of engraving title pages in Lilypond books, an issue I have been grappling with. Nicolas Sceaux replied to this issue with a link to his book (Note to Nicolas: Beautiful engraving!). I followed his link and looked at his code (here is a small excerpt): oddFooterMarkup = \markup \column { \fill-line { %% put copyright only on pagenr. 1 \on-the-fly #(lambda (layout props arg) (if (and (= 1 (chain-assoc-get 'page:page-number props -1)) (not (chain-assoc-get 'page:last? props #f))) (interpret-markup layout props arg) empty-stencil)) \fromproperty #'header:longcopyright } I am *completely* lost. I have no idea of the what this code is for. (In fact, I can read the French at Nicolas's website better than I understand the Lilypond code.) I do not want to decipher Nicolas's code in this thread. Rather, I am using his code to illustrate the kinds of situations or the kinds of Lilypond code where I get lost. I think part of my bafflement with Lilypond is the *looseness* of the structure. If you don't do something, Lilypond creates it for you (Book, Score, Staff). You can tweak the engraving at the Staff level, score level, layout level, paper level...). In LaTeX, if you don't code the input right, LaTeX doesn't work. Period. cheers, Jeremiah___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
1. Look at the GDP docs: http://web.uvic.ca/~gperciva/ 2. Specifically, the Learning Manual 3 Fundamental concepts. Probably 4 Tweaking output as well. Trevor Daniels has spent dozens of hours working on these chapters. 3. If you have any improvements, please send them. Cheers, - Graham On Thu, 3 Jan 2008 11:55:27 -0500 Jeremiah Reilly [EMAIL PROTECTED] wrote: I appreciate your concise summary of Lilypond structure. I am casting about for simple examples of something I don't understand. In the meantime, I have two general illustrations. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
Hi Jeremiah, Once again (and again), thank you for your advice. =) In the particular instance above, however, I am not sure how I would *know* to replace \GrandStaff with \InnerStaffGroup. See next paragrraph below. Okay... I think I'm beginning to understand your issue(s). (1) Last year I had to learn LaTeX and a corollary TeX based technical drawing package called mfpic in order to typeset mathematical expressions and illustrations. I *love* LaTeX: I use it almost daily, to typeset my mathematical papers (number theory, mostly). [Not coincidentally, I discovered LaTeX through Lilypond, since Lilypond was originally based heavily in LaTeX...] In three weeks I was up and running in LaTeX and mfpic and could produce *professional* quality work. But could you create your own .sty file, with environment definitions? [see below] I have easily spent 10 times the amount of time studying Lilypond and understand only 1/10th of what I can do in LaTeX. This may be because LaTeX includes *significantly* more (and more complex) macros which sit on top of (Plain) TeX -- i.e., you don't have to hand-code as much in LaTeX as you do in Lilypond. I *understand* LaTeX; I am *baffled* by Lilypond. Yes, but you're comparing apples to oranges in a way... You should compare a Lilypond file to a (Plain) TeX file where you need to define your own stylesheet -- I think you'd find that Lilypond compares (more) favourably there. This is not to say that Lilypond shouldn't be easier (the way LaTeX is *MUCH* easier than Plain TeX). I'm just pointing out that LaTeX is much more mature that way. (2) A recent thread raised the issue of engraving title pages in Lilypond books oddFooterMarkup = \markup \column { \fill-line { %% put copyright only on pagenr. 1 \on-the-fly #(lambda (layout props arg) (if (and (= 1 (chain-assoc-get 'page:page-number props -1)) (not (chain-assoc-get 'page:last? props #f))) (interpret-markup layout props arg) empty-stencil)) \fromproperty #'header:longcopyright } I am *completely* lost. I have no idea of the what this code is for. I imagine you might be in the same situation if you needed to edit a real (low-level) TeX stylesheet file, e.g. \def\plaincases#1{\left\{\,\vcenter{\normalbaselines \mathsurround=0pt\relax \ialign{$##\hfil$\quad##\hfil\crcr#1\crcr}}\right.} \def\plainmatrix#1{\null\,\vcenter{\normalbaselines \mathsurround=0pt\relax \ialign{\hfil$##$\hfil\quad\hfil$##$\hfil\crcr \mathstrut\crcr\noalign{\kern-\baselineskip} #1\crcr\mathstrut\crcr\noalign{\kern-\baselineskip}}}\,} \def\pplainmatrix#1{\left(\plainmatrix{#1}\right)} \let\plainpmatrix\pplainmatrix The benefit of LaTeX, coupled with whatever documentclass and packages you use, is that you don't NEED to access the code at that level. Lilypond just doesn't have those abstracted stylesheets. If you don't do something, Lilypond creates it for you (Book, Score, Staff). I, too, have mixed feelings about this generosity. Then again, I think HTML should never have been so generous -- but we probably wouldn't have a WWW if I had been in charge to begin with! ;-) In LaTeX, if you don't code the input right, LaTeX doesn't work. Period. Not true -- I can show you a math file which is improperly coded and LaTeX will put it out -- it just looks like crap. Hope this helps! Kieren. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
On Thu, 3 Jan 2008 12:39:58 -0500 Kieren MacMillan [EMAIL PROTECTED] wrote: The benefit of LaTeX, coupled with whatever documentclass and packages you use, is that you don't NEED to access the code at that level. Lilypond just doesn't have those abstracted stylesheets. I'll add that this lack of stylesheets is due to users not creating them, not a lack of technical support. In LilyPond, you could potentially do \include helpful-user's-stylesheet.ly ... \bold-rightjustify-header #'This is my title #'This is my name It just requires a helpful user to create the stylesheet. We also now have the perfect place for these stylesheets: LSR. If there's any interest in this, we'll add a tag specifically for stylesheets (or modules or packages or whatever we want to call them). These snippets would be just like LaTeX packages: a collection of commands/tweaks/new layout, which users could include at their option. Cheers, - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
2008/1/3, Graham Percival [EMAIL PROTECTED]: We also now have the perfect place for these stylesheets: LSR. If there's any interest in this, we'll add a tag specifically for stylesheets (or modules or packages or whatever we want to call them). These snippets would be just like LaTeX packages: a collection of commands/tweaks/new layout, which users could include at their option. ... and THAT is why we still need Graham around here... :) Nicolas' framework is simply amazing, to begin with. I don't know if it could be disassembled into small LSR-convenient slices, but I'd be happy to give it a try. He had started writing a lot of explanations about how it's done; let's just invite him to post his explanations on the LSR... Nicolas? Regards, Valentin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
Hi y'all: I'll add that this lack of stylesheets is due to users not creating them, not a lack of technical support. I figured that was the case, but it's nice to get official confirmation! =) It just requires a helpful user to create the stylesheet. Coincidentally, I've recently been breaking up my house format stylesheets for just such a purpose! I'll move this up the list of priorities -- which, unfortunately, is very long right now -- and get something up there ASAP. If there's any interest in this, we'll add a tag specifically for stylesheets YES! Thanks, Kieren. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
Hi Graham, Don't split it up. I partially agree. And you don't need explanations. I disagree! 1. If these are meant in any way to be instructive (like most, if not all, of the LSR!), then there *must* be internal documentation. 2. If these are meant to be combined, then they need documentation, and they should be as modular as possible (e.g., I want to use the Barenreiter page formatting, Nicolas's titling, and Kieren's fancy floating-time-signature hack). At laest, not for what I'm thinking. What *are* you thinking? ;-) Do normal LaTeX users ever look at the details of packages? I do... but then again, I'm not normal. Do normal C++ programmers ever look at the source code of the libraries they use? Ok, in occasional circumstances yes, but generally not. All programmers *should* look more at the packages/libraries they use... especially in C++, which is one of the cruftiest languages I've ever seen. but don't delay this project That I agree with, 100%. Cheers, Kieren. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
2008/1/3, Graham Percival [EMAIL PROTECTED]: No, no! Don't split it up. And you don't need explanations. At laest, not for what I'm thinking. (NB: I haven't even glanced at whatever we're talking about) Err... IIRC we're talking about maybe 5000 lines of code here. Nicolas himself has splitted these into a lot of .ily files (common.ily, titling.ily, etc). Not to mention that his framework is more or less extensible (for instance, he added a bunch of very nice new functions when typesetting textbooks, librettos etc.). Let's say that Nicolas has a file which he \includes. This file sets up \instrumentName \tempoMark (V: you just added this to LSR) \pageNumber \OldFrenchStyleOfAccidentalsOrSomething ... and also automatically sets up (in \layout) number for time signatures, increases the thickness of glissandi, and makes all fingerings two font-sizes larger than normal. It is actually much more than a set of formating macros. It's a whole new way to automatically and recursively include separate parts, text, and everything. In other words, using it implies to dramatically change the syntax of your files itself. Just dump the whole thing in LSR. As the comment, say This package provides these commands \instrumentName #'NAME \tempoMark #NUMBER #'NAME for example, call \tempoMark #90 #'Allegro \pageNumber #NUMBER \OldFrench... It also automatically does blah blah. (we probably want to discourage the automatic blah blah stuff) Now users just download the whole .ly file and include that in their own scores. They never need to look at the details, and they never need to know exactly how \rightJustifyTitle works. If they *want* to, they can easily look at the source... but don't delay this project by trying to write documentation for the internals of these packages. Mmm... I'll still wait for a few days and see if the author has anything to say on this topic :) Plus, it would be great to add a few actual notes to demonstrate its use (I'd be happy to use the 'real_music' tag just once more :) Cheers, Valentin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
On 03.01.2008 (13:50), Kieren MacMillan wrote: Hi Graham, And you don't need explanations. I disagree! Me too. For the reasons Kieren gives, and - Do normal LaTeX users ever look at the details of packages? I do... but then again, I'm not normal. - the follow-up question: ARE there any normal users? Which in a Lilypond context also translates to: are there any normal user situations? OK, quite a few guitar scores have more or less the same basic requirements as compared to a piano score, but there are also almost always individual differences which would make it difficult to make a ly file comparable to a sty file which you can just include and use. Besides, the most useful LaTeX packages are the ones that are thoroughly documented, and in any case, I don't think I've ever used a sty file without issuing some \renewcommand or \setlength. Eyolf -- We can't schedule an orgy, it might be construed as fighting --Stanley Sutton ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
Hi Jeremiah, Thank you TWICE over for your help. You're twice-over welcome! =) Your code worked perfectly. I try my best... Very frustrating! (This is a rhetorical question; no response necessary.) Decided to respond anyway! How can I figure out new code to solve new problems when I don't know the code exists? I have learned essentially everything I know by looking at the examples which pepper the WWW. You might not find the *exact* code you need (e.g., to add an instrument name to the InnerStaffGroup context) but you're likely to find something similar -- for example, in the documentation for Instrument Names (http://lilypond.org/doc/ v2.10/Documentation/user/lilypond/Instrument-names), about half-way down you'll find the following: _ To add instrument names to other contexts (such as GrandStaff, ChoirStaff, or StaffGroup), the engraver must be added to that context. \layout{ \context {\GrandStaff \consists Instrument_name_engraver} } More information about adding and removing engravers can be found in Modifying context plug-ins. _ The only difference between my code (i.e., the solution to your problem) and the example code in the documentation is that I've replaced \GrandStaff with \InnerStaffGroup (because that's where you wanted the instrument name engraver added). There is something about Lilypond structure (or Scheme structure) which continues to elude me. It's actually pretty simple to grasp, once the fundamentals are clear: 1. Every \book block is a separate output file (e.g., PDF) -- if you haven't explicitly added one, Lilypond wraps your entire code block in a \book (implicitly). 2. Every \score block is a separate chunk of music in a \book. 3. Every \layout block affects the \score or \book block in which it appears -- i.e., a \layout inside a \score will affect only that \score, but a \layout outside of a \score (and thus in a \book, either explicitly or implicitly) will affect every \score in that \book. 4. Every \context block will affect the named context (e.g., \InnerStaffGroup) throughout the block (e.g., \score or \book) in which it appears. Any questions? (For more info, see the docs.) Best wishes, Kieren. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
Kieren, Thank you TWICE over for your help. Your code worked perfectly. I compared it to my trial code and this is what you added: On Dec 27, 2007, at 9:34 PM, Kieren MacMillan wrote: \context { \InnerStaffGroup \consists Instrument_name_engraver } I had tried something very similar which did not work because it evidently had coding errors (no braces, \StaffGroup instead of \InnerStaffGroup): \context \StaffGroup \consists Instrument_name_engraver In retrospect, your solution seems so simple and direct. However, your solution leaves me with my usual perplexity in using Lilypond: How can I figure out new code to solve new problems when I don't know the code exists? There is something about Lilypond structure (or Scheme structure) which continues to elude me. Very frustrating! (This is a rhetorical question; no response necessary.) THANKS, again. Jeremiah ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
Hi Jeremiah, Thank you for your advice (and ALL your many helpful comments in the Lilypond archive). My pleasure! I have been able to Start my systems exactly the way I want to Excellent. How do I name InnerStaffGroup s? Hopefully the example code (below) will help. Best wishes, Kieren. _ \version 2.11.33 \layout { ragged-right = ##t } notes = \new Voice \relative c'' { c1 } \score { \new StaffGroup \new InnerStaffGroup \set InnerStaffGroup.systemStartDelimiterHierarchy = #'( SystemStartSquare ) \set InnerStaffGroup.instrumentName = \markup { Violin \hspace #1 } \new Staff \set Staff.instrumentName = I \notes \new Staff \set Staff.instrumentName = II \notes \new Staff \set Staff.instrumentName = Viola \clef alto \transpose c c, \notes \new Staff \set Staff.instrumentName = Cello \clef bass \transpose c c, \notes \new Staff \set Staff.instrumentName = Bass \clef bass \transpose c c,, \notes \layout { \context { \InnerStaffGroup \consists Instrument_name_engraver } } } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
Kieran, Thank you for your advice (and ALL your many helpful comments in the Lilypond archive). On Dec 22, 2007, at 6:46 PM, Kieren MacMillan wrote: Hey there! Questions: Is there a better, easier, more logical, more consistent solution with better layout? Have I missed a staff-group command for nestled groups (but using the system start delimiters of my choice)? I'm assuming you know about InnerStaffGroup? Certainly that's what I would be using (from what I understand of your needs). You can tweak anything that you don't want to have on such groups (such as connected bar lines, system start delimiters, etc.) to the point where they no longer *LOOKED* like groups -- which I am inferring you see as the principal disadvantage -- and yet *PERFORMED* like groups (e.g., had a centred group name). If you need more information, just ask. If you've already considered (and rejected) ISGs, then I'm sorry for this spurious response. I do know about InnerStaffGroup, but was unable to get it to work. Your email helped me clarify where I am stuck. I now realize that my original problem is two different problems: (a) to Start (bracket, square, brace) various staff groupings (b) to Name various staff groupings After a few more hours of work, I have solved problem (a); that is, I have been able to Start my systems exactly the way I want to (without or with using InnerStaffGroup). However, I am completely unable to assign a name to any type of staff group without resorting to icky kludges. If you run either code below, you should see a typical contemporary staff arrangement for string orchestra. I want to add Violin on the top violin staff group, which is barred in my score. The group name should appear centered between the staves and pushed somewhat to the left of the I and II. Here's my code: %BEGIN Snippet String Orchestra withOUT InnerStaffGroup notes = \new Voice \relative c'' { c1 } \score { \new StaffGroup \set StaffGroup.systemStartDelimiterHierarchy = #'(SystemStartBracket (SystemStartSquare a b )) \new Staff \set Staff.instrumentName = I \notes \new Staff \set Staff.instrumentName = II \notes \new Staff \set Staff.instrumentName = Viola \clef alto \transpose c c, \notes \new Staff \set Staff.instrumentName = Cello \clef bass \transpose c c, \notes \new Staff \set Staff.instrumentName = Bass \clef bass \transpose c c,, \notes \layout { ragged-right = ##t } } %END Snippet String Orchestra withOUT InnerStaffGroup %BEGIN Snippet String Orchestra WITH InnerStaffGroup notes = \new Voice \relative c'' { c1 } \score { \new StaffGroup \new InnerStaffGroup \set InnerStaffGroup.systemStartDelimiterHierarchy = #'( SystemStartSquare ) \set InnerStaffGroup.instrumentName = Violin \new Staff \set Staff.instrumentName = I \notes \new Staff \set Staff.instrumentName = II \notes \new Staff \set Staff.instrumentName = Viola \clef alto \transpose c c, \notes \new Staff \set Staff.instrumentName = Cello \clef bass \transpose c c, \notes \new Staff \set Staff.instrumentName = Bass \clef bass \transpose c c,, \notes \layout { ragged-right = ##t } %END Snippet String Orchestra WITH InnerStaffGroup So, I guess my question is: How do I name InnerStaffGroup s? I tried various naming commands, adding engravers to contexts, etc. Nothing I tried worked. Actually, if you (or someone else) would kindly write the correct code to name InnerStaffGroup (I don't think it would take more than a line or two), I'd be most appreciative. gratefully yours, Jeremiah ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Instrumental Group Names in Score
Foremost, a BIG thank-you to everyone who has written, developed, tweaked, and improved Lilypond and to everyone who has answered questions on the Lilypond Users Group. I am preparing a score in Lilypond for full orchestra and want to use my customary layout (system starts, naming, etc.). In particular I want to name groups of instruments by family, say Clarinets in Bb, and then individually name each staff (vertically) 1 and 2. I want to be able to freely assign a family-group-instrument-name to any number of staves (say 5 percussion staves). I do not want to create staff groups for each family. I have succeeded in making a tweak using various markup commands. But, I am very dissatisfied with the process and the result. 1. My entire tweak is a kludge. 2. The tweak is not logical. I am using text commands to create a familyGroupStaffScoreInstrumentName. 3. The layout is imperfect despite my best efforts to tweak positioning by eye. 4. The layout must be modified if I change the line-width (which I often do in making final layout decisions). 5. I must tag and filter the tweak for score and parts. 6. I had to create a fictitious spacing (s1*0) to use the markup text commands. (The rests are necessary in the Ur-piece.) Questions: Is there a better, easier, more logical, more consistent solution with better layout? Have I missed a staff-group command for nestled groups (but using the system start delimiters of my choice)? I am enclosing a minimal excerpt from my score (just woodwinds and two strings). I am a pencil and paper composer trying to make the transition to digital engraving. I don't really understand Lilypond or Scheme --- I usually solve my problems by perspiration and reading the archives --- so please be simple and detailed in any replies. Much obliged. %snippet begins (Six woodwinds and Two strings in two StaffGroup s) \version 2.11.35 fluteOne = \new Voice { \relative c'' { \set Staff.instrumentName = 1 \tag #'score { s1*0_\markup { \translate #'(-19 . -6) \lower #1.5 Flutes } R1 } \tag #'part R1 R1*3 \bar |. }} fluteTwo = \new Voice { \relative c'' { \set Staff.instrumentName = 2 R1*4 \bar |. }} oboe = \new Voice { \relative c' { \set Staff.instrumentName = Oboe R1*4 \bar |. }} clarinetOne = \new Voice { \transpose bes c' \relative c' { \set Staff.instrumentName = 1 \tag #'score { s1*0_\markup { \translate #'(-28 . -2) Clarinets in B \lower #1.5 \flat } R1 } \tag #'part R1 R1*3 \bar |. }} clarinetTwo = \new Voice { \transpose bes c' \relative c' { \set Staff.instrumentName = 2 R1*4 \bar |. }} bassoon = \new Voice { \relative c' { \set Staff.instrumentName = Bassoon \clef bass R1*4 \bar |. }} violincello = \new Voice { \relative c { \set Staff.instrumentName = Violincello \clef bass { s1*4 } \\ { \tiny d4.\pp^\markup { Bass soli, pizz. } d8 a4 a4 d4. d8 a4 a4 d4. d8 a4 a4 d4 a'8 bes a g f e} \normalsize \bar |. }} bass = \new Voice { \relative c { \set Staff.instrumentName = Contrabass \clef bass d4.\pp^pizz. d8 a4 a4 d4. d8 a4 a4 d4. d8 a4 a4 d4 a'8 bes a g f e \bar |. }} \paper { indent = 20.0\mm line-width=170.0\mm } \score { \new StaffGroup \set StaffGroup.systemStartDelimiterHierarchy = #'(SystemStartBracket (SystemStartSquare a b ) c (SystemStartSquare d e )) \new Staff \removeWithTag #'part \keepWithTag #'score \fluteOne \new Staff \removeWithTag #'part \keepWithTag #'score \fluteTwo \new Staff \removeWithTag #'part \keepWithTag #'score \oboe \new Staff \removeWithTag #'part \keepWithTag #'score \clarinetOne \new Staff \removeWithTag #'part \keepWithTag #'score \clarinetTwo \new Staff \removeWithTag #'part \keepWithTag #'score \bassoon \new StaffGroup \new Staff \removeWithTag #'part \keepWithTag #'score \violincello \new Staff \removeWithTag #'part \keepWithTag #'score \bass \layout { \context { \Staff \override TimeSignature #'style = #'numbered } % closes context } %closes layout } %closes score %snippet ends___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Instrumental Group Names in Score
Hey there! Questions: Is there a better, easier, more logical, more consistent solution with better layout? Have I missed a staff-group command for nestled groups (but using the system start delimiters of my choice)? I'm assuming you know about InnerStaffGroup? Certainly that's what I would be using (from what I understand of your needs). You can tweak anything that you don't want to have on such groups (such as connected bar lines, system start delimiters, etc.) to the point where they no longer *LOOKED* like groups -- which I am inferring you see as the principal disadvantage -- and yet *PERFORMED* like groups (e.g., had a centred group name). If you need more information, just ask. If you've already considered (and rejected) ISGs, then I'm sorry for this spurious response. Best wishes, Kieren. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user