Documentation of Architecture / Design?
[EMAIL PROTECTED] writes: > All, > > I've recently gotten involved in the lilypond cause (2 bug fixes submitted, a > couple of features underway). My problem is I don't have a firm understanding > of how everything comes together. I've read through the Programmer's Reference > (PR), but it isn't what I'm looking for. this document should be renamed. Any ideas for a better name? Maybe "Program definitions"? -- Han-Wen Nienhuys | [EMAIL PROTECTED] | http://www.xs4all.nl/~hanwen ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: reading material?
[EMAIL PROTECTED] writes: > > lacks a lot of features that I consider necessary for comfortable > > programming, like garbage collection, reflection and built-in strings, > > lists, dictionaries, vectors, and first-class functions. > > > > C++ does have built in strings, lists, dictionaries, and vectors. They are all > part of the standard template library, and string is used as: We're going off-topic here, but I'm pretty sure that you know as well as I that "Hi" and "there" are (char const*). The STL is better than nothing, but to me a library does not qualify as built-in. > I'm not exactly sure what you mean by first-class function, but if you mean > functors, or function objects (an object that is a function - better than a > function pointer), C++ has those, too. First-class means first-class citizens, that is, objects of that type can be used in all language constructs just like other objects. For example, a function that returns a function in Scheme is natural, (define (iterate func k) "Produce the function x -> FUNC(FUNC .. (x) .. ) " (if (> k 0) (lambda (x) (func ((iterate func (1- k)) x))) (lambda (x) x))) (define to-6th-power (iterate sqr 3)) If you're suitably masochistic, then you could come up with a C++ solution, but I doubt it would be natural or elegant. Besides, I don't appreciate masochism when it comes to programming. > I'm not exactly sure what you mean by reflection, so I cannot comment. As far > as size, yes it's large, but I believe there are compiler settings to reduce the > size by dropping some unnecessary libraries (like error handling). I'm not referring to code size. Quality of software is measured by its simplicity, and the 2000-page thick C++ standard is a bad omen in this regard. -- Han-Wen Nienhuys | [EMAIL PROTECTED] | http://www.xs4all.nl/~hanwen ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: reading material?
>>* Han-Wen Nienhuys ([EMAIL PROTECTED]) wrote: >> >>>We have actually gotten to the point that we have a slight dislike for >>>C++ as an implementation language. I recommend to learn Scheme and >> >>I'm learning C++ to use in sound synthesis programs and to be able to >>hack lilypond. Could you share a litte more about your dislikes? > > > I remember having had longish slashdot flamewar about it, see > also > > http://www.xs4all.nl/~hanwen/public/ramblings/stroustrup > > I think that it is too large, too complex, and carries to much > historical baggage that sacrifices correctness for speed. Also it > lacks a lot of features that I consider necessary for comfortable > programming, like garbage collection, reflection and built-in strings, > lists, dictionaries, vectors, and first-class functions. > C++ does have built in strings, lists, dictionaries, and vectors. They are all part of the standard template library, and string is used as: string x = "Hi "; string y = "there."; cout << x + y << endl; // concatenation I'm not exactly sure what you mean by first-class function, but if you mean functors, or function objects (an object that is a function - better than a function pointer), C++ has those, too. There are hooks in the memory allocation libraries that would allow for the you to replace the default memory allocation library with a garbage collection library. There are probably open-source versions of such libraries (although I have not looked for one). I'm not exactly sure what you mean by reflection, so I cannot comment. As far as size, yes it's large, but I believe there are compiler settings to reduce the size by dropping some unnecessary libraries (like error handling). The rest are personal opinions that I happen to not share. That's what makes individuality great! But as long as you are controlling the Lilypond source, it's your opinions that matter here. I just wanted the capabilites of C++ to be represented properly. Long live Scheme!! ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: Rectangle around the note head
On Friday March 19 2004 15:25, Matevz Jekovec wrote: > I was searching the documentation a bit for a feature which draws a > rectangle around the certain note head (or streched around 2 notes when > punctuated over the bar). We use this kind of arrangement, to mark a > note that is the highest in the line (the melody climax) in our > contrapunkt class and I think this has become a standard for all the > contrapunkt classes around. Can anyone help me out? > I'm sure you're way too busy with other lilypond features, so if this > marginal feature is not already possible or there is too much work to > implement it, I really apologize for your time. The development version has balloon help: http://lilypond.org/doc/v2.1/Documentation/user/out-www/lilypond/Balloon-help.html#Balloon% 20help which his sounds like what you wanted for a single notehead. I think that using this feature as it stands would require the two notes be marked separately if there are two of them that you want to mark. Otherwise, if using balloon help as it is, you could see if it is acceptable to just mark the first. ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: Documentation of Architecture / Design?
Han-Wen, On 3/19/2004 4:43 PM, Han-Wen Nienhuys wrote: > [EMAIL PROTECTED] writes: > >> (iterator-ctor . ,Percent_repeat_iterator::constructor) >> >>I'm really confused. When macro arguments are concatenated to form new tokens, >>there should be, at minimum, some comments describing what's being created. And >>having an outside reference that talks about it would give a developer a hint of >>what lies ahead. > > > Point taken, > > (but I've added a comment in CVS anyway) > > Nothing wrong with good comments. I've never used CVS, so I assume I will be able to get this in 2.1.32? >>I like the freedom of coding without worrying about comments, too. But with a >>project this size with multiple volunteer developers in multiple time zones, >>some sort of umbrella design document would not be a bad idea. > > > I appreciate that - and I think that "multiple volunteer developers in > multiple time zones" would in itself be a very good idea. > Maybe I'm just jumping to conclusions here. I've seen patches come in on this list, and I've seen the list of contributors somewhere, but maybe it's a much more intimate group than I imagined. I will continue to plug away on developing constructs for handbell music, and I plan to be a regular contributor at least up to that point, so for the forseeable future, ++intimateGroupSize. After the handbell notation is finished, I'll just play it by ear. But as summer comes, time will be at more of a premium. Baseball season approaches, and I've got my son's team to coach :) ! > FWIW, the design has evolved, and still is. I find it very difficult > to document bad design, and prefer to fix it. What typically happens, > is that I am forced to write down how stuff works in the the > manual. At that point, I realize how broken it is, and dive into the > source to fix the design. For example, the distinction between Context > and Translator is only one month old. > > I'll start small with basic unfrastructure stuff that shouldn't change a lot and go from there. Oops. 5:00. Time to go home. I've got to spend more time at work doing work and less time communicating to the developer list :( Doug ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: info problems
Yes that's maybe the best option, I'll do that. It's just that we list all program names at top level, and `lilypond' is the name of a program too... Right. So, the rule in my mind is not "all programs", it's "all programs that are not also manual names" :). As you probably know, this very topic (in a different guise) is being discussed on emacs-devel right now ... ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: info problems
> * lilypond: (lilypond/lilypond)Invoking LilyPond. Titling LilyPond scores. How about simply not including that entry, and just have the top-level entry? After all, there's no point in having it if it goes to the wrong place. I removed the "dvips" entry leading to "dvips invocation" from my sample dir file some time ago. This ties into another topic, handling different types of entries. For instance, there's both a function and a command named printf. Man handles this nicely, with man 1 vs. man 3. Info has never had a graceful way to deal with it. (I don't have any brilliant ideas, either.) k ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: Documentation of Architecture / Design?
[EMAIL PROTECTED] writes: > > (iterator-ctor . ,Percent_repeat_iterator::constructor) > > I'm really confused. When macro arguments are concatenated to form new tokens, > there should be, at minimum, some comments describing what's being created. And > having an outside reference that talks about it would give a developer a hint of > what lies ahead. Point taken, (but I've added a comment in CVS anyway) > I like the freedom of coding without worrying about comments, too. But with a > project this size with multiple volunteer developers in multiple time zones, > some sort of umbrella design document would not be a bad idea. I appreciate that - and I think that "multiple volunteer developers in multiple time zones" would in itself be a very good idea. FWIW, the design has evolved, and still is. I find it very difficult to document bad design, and prefer to fix it. What typically happens, is that I am forced to write down how stuff works in the the manual. At that point, I realize how broken it is, and dive into the source to fix the design. For example, the distinction between Context and Translator is only one month old. -- Han-Wen Nienhuys | [EMAIL PROTECTED] | http://www.xs4all.nl/~hanwen ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: reading material?
[EMAIL PROTECTED] writes: > * Han-Wen Nienhuys ([EMAIL PROTECTED]) wrote: > > We have actually gotten to the point that we have a slight dislike for > > C++ as an implementation language. I recommend to learn Scheme and > > I'm learning C++ to use in sound synthesis programs and to be able to > hack lilypond. Could you share a litte more about your dislikes? I remember having had longish slashdot flamewar about it, see also http://www.xs4all.nl/~hanwen/public/ramblings/stroustrup I think that it is too large, too complex, and carries to much historical baggage that sacrifices correctness for speed. Also it lacks a lot of features that I consider necessary for comfortable programming, like garbage collection, reflection and built-in strings, lists, dictionaries, vectors, and first-class functions. If I have made a resolution for myself that I will learn Objective Caml for my next large project (if there will ever be one). -- Han-Wen Nienhuys | [EMAIL PROTECTED] | http://www.xs4all.nl/~hanwen ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Rectangle around the note head
I was searching the documentation a bit for a feature which draws a rectangle around the certain note head (or streched around 2 notes when punctuated over the bar). We use this kind of arrangement, to mark a note that is the highest in the line (the melody climax) in our contrapunkt class and I think this has become a standard for all the contrapunkt classes around. Can anyone help me out? I'm sure you're way too busy with other lilypond features, so if this marginal feature is not already possible or there is too much work to implement it, I really apologize for your time. Best regards! - Matevz Jekovec a Slovenian music student ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: Documentation of Architecture / Design?
Han-Wen, It wouldn't hurt. But that's not really what I'm approaching. My point wasn't so much that the code needs to be cleaned up, but that there should be a web page / document / something that a developer can refer to to know where to look. In this example, I couldn't immendiately find VIRTUAL_COPY_CONSTRUCTOR(). It took me a couple of minutes to remember that there is a /flower directory, and I found it there. I'm not suggesting that /flower be removed. This is just a minor annoyance that a newbie (I) will learn from. But it shows that more direction can be made available to developers. When you start getting into the macros like (lily-guile.hh): #define DECLARE_SCHEME_CALLBACK(NAME,ARGS) \ static SCM NAME ARGS; \ static SCM NAME ## _proc that things really start getting confusing. When I see the following snippet of code: == Percent_repeat_iterator::constructor_proc I have a function that hasn't declared (sort of). And when I see the following snippet of Scheme code: (iterator-ctor . ,Percent_repeat_iterator::constructor) I'm really confused. When macro arguments are concatenated to form new tokens, there should be, at minimum, some comments describing what's being created. And having an outside reference that talks about it would give a developer a hint of what lies ahead. I like the freedom of coding without worrying about comments, too. But with a project this size with multiple volunteer developers in multiple time zones, some sort of umbrella design document would not be a bad idea. Doug On 3/19/2004 3:09 PM, Han-Wen Nienhuys wrote: > [EMAIL PROTECTED] writes: > >>Probably the biggest things that threw me are the C++ member functions that are >>declared/defined through macros. It's really annoying when a member function is > > > would it help if we changed VIRTUAL_COPY_CONSTRUCTOR() , ie going from > >VIRTUAL_COPY_CONSTRUCTOR(Base, Name) > > to > >Base *clone () const { return new Name (*this); } > > ? > ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: reading material?
* Han-Wen Nienhuys ([EMAIL PROTECTED]) wrote: > We have actually gotten to the point that we have a slight dislike for > C++ as an implementation language. I recommend to learn Scheme and I'm learning C++ to use in sound synthesis programs and to be able to hack lilypond. Could you share a litte more about your dislikes? Pedro ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: reading material?
* Han-Wen Nienhuys ([EMAIL PROTECTED]) wrote: > * Structure & Interpretation of Computer Programs by Abelson and > Sussman (this book has a very wide scope, and contains way more > information than you need for LilyPond hacking, but it's a wonderful > book) The full book is available here: http://mitpress.mit.edu/sicp/full-text/book/book.html and this site: http://www.swiss.ai.mit.edu/classes/6.001/abelson-sussman-lectures/ has twenty video lectures by Hal Abelson and Gerald Jay Sussman). The videos are from 1986 but are still valid. I'm learning a lot from these videos (yah, I'm also learning scheme to hack lilypond :-)) Pedro ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: Documentation of Architecture / Design?
On Fri, Mar 19, 2004 at 02:21:49PM -0600, Douglas A Linhardt wrote: > Thanks for your response. Your answers clarified some things and confirmed > other things that I had come across. I will take your input and organize it a > little better than my original questions and create some HTML pages together > that can be put on the lilypond website (with your permission, of course). ... > The problem isn't necessarily that I can't find the answers to my > questions, but that it can take hours of searching through code to > find a particular design-level fact. And by that time, I've pushed > and popped so many elements on my mental stack, that I can't remember > how I got there and what I already dismissed as dead ends. A roadmap > would direct a developer's search for appropriate code and reduce the > learning curve. I'd like to de-lurk to say that this is great news to me, as I went through pretty much the same thing, and though I have some (now obsolete) changes that I've been sitting on for a while, the effort involved was sufficiently exhausting that I never completely finished. I however was too stupid to just ask my questions on the list, though. Not that I think lilypond is badly structured, as I have had to do plenty of maintenance of much worse in the past. It's just that it isn't trivial to dive into, and some developer documentation, or at least a periodically updated set of links to mailing list discussions such as this one would be of great benefit. Maybe a section on the wiki? Cheers. -- Julian Squires ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: Documentation of Architecture / Design?
[EMAIL PROTECTED] writes: > > Probably the biggest things that threw me are the C++ member functions that are > declared/defined through macros. It's really annoying when a member function is would it help if we changed VIRTUAL_COPY_CONSTRUCTOR() , ie going from VIRTUAL_COPY_CONSTRUCTOR(Base, Name) to Base *clone () const { return new Name (*this); } ? -- Han-Wen Nienhuys | [EMAIL PROTECTED] | http://www.xs4all.nl/~hanwen ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: Documentation of Architecture / Design?
[EMAIL PROTECTED] writes: > First, let me say that I consider myself a pretty good programmer (I survived > the layoffs at Lucent over the last few years ;) ). I am very well versed in > C++, so of course, that's where I gravitate first when I look at Lilypond code. > I am able to follow the Scheme code after reading the R5R, and I have been able > to successfully implement some Scheme hacks as I investigate my autochange > tuning feature. I have yet to look at Python, but I may have to learn that too, > if that's the way the project is headed (although I'm not looking forward to it). We're not headed to Python, but I can recommend learning it anyway. Programming in Python is a very enjoyable pastime. > The problem isn't necessarily that I can't find the answers to my questions, but > that it can take hours of searching through code to find a particular > design-level fact. And by that time, I've pushed and popped so many elements on > my mental stack, that I can't remember how I got there and what I already > dismissed as dead ends. A roadmap would direct a developer's search for > appropriate code and reduce the learning curve. OK. (I hope you do know about etags or ctags?) > Probably the biggest things that threw me are the C++ member functions that are > declared/defined through macros. It's really annoying when a member function is > not directly declared in the class or one of its ancestors, but in a macro in > some other file completely. Some documentation of these macros and the "for > free" functions that we get would be nice. I've rewritten the comment of smobs.hh in CVS. Hope that it helps. > Also, I get lost figuring out what environment the code I'm looking at is in > when it executes. I found both the C++ and Scheme autochange code. Then I was > trying to figure out where the code got called from. I finally figured out that > the Scheme procedure was called before the C++ iterator code, but it took me a > while to figure that out, and I still didn't know who did the calling in the > first place. I only know a little bit about Flex and Bison, so reading those > files helped only a little bit. GDB can be of help here. Set a breakpoint in C++, and run. When you hit the breakpoint, do a backtrace. You can inspect Scheme objects along the way by doing p ly_display_scm(obj) this will display OBJ through GUILE. -- Han-Wen Nienhuys | [EMAIL PROTECTED] | http://www.xs4all.nl/~hanwen ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
[Tiffany Weisman] explanation
About chords. From: Tiffany Weisman Subject: explanation To: janneke Here is a discussion that explains the difference, and perhaps why in Lilypond there should be a distinction made between sus2, add2, and add9. http://lists.shsu.edu/pipermail/finale/2001-October/034970.html http://lists.shsu.edu/pipermail/finale/2001-October/034979.html http://lists.shsu.edu/pipermail/finale/2001-October/034986.html -- Jan Nieuwenhuizen <[EMAIL PROTECTED]> | GNU LilyPond - The music typesetter http://www.xs4all.nl/~jantien | http://www.lilypond.org ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: Documentation of Architecture / Design?
Han-Wen, > > That would be most welcome! > > I must admit that when I want to know how a program works, I use grep > and emacs and dive into the source code. The comments and the code > itself are usually more revealing than technical documents. > > Can you tell me where you started looking and where you lost it? > > Thanks for your response. Your answers clarified some things and confirmed other things that I had come across. I will take your input and organize it a little better than my original questions and create some HTML pages together that can be put on the lilypond website (with your permission, of course). First, let me say that I consider myself a pretty good programmer (I survived the layoffs at Lucent over the last few years ;) ). I am very well versed in C++, so of course, that's where I gravitate first when I look at Lilypond code. I am able to follow the Scheme code after reading the R5R, and I have been able to successfully implement some Scheme hacks as I investigate my autochange tuning feature. I have yet to look at Python, but I may have to learn that too, if that's the way the project is headed (although I'm not looking forward to it). The problem isn't necessarily that I can't find the answers to my questions, but that it can take hours of searching through code to find a particular design-level fact. And by that time, I've pushed and popped so many elements on my mental stack, that I can't remember how I got there and what I already dismissed as dead ends. A roadmap would direct a developer's search for appropriate code and reduce the learning curve. Probably the biggest things that threw me are the C++ member functions that are declared/defined through macros. It's really annoying when a member function is not directly declared in the class or one of its ancestors, but in a macro in some other file completely. Some documentation of these macros and the "for free" functions that we get would be nice. Also, I get lost figuring out what environment the code I'm looking at is in when it executes. I found both the C++ and Scheme autochange code. Then I was trying to figure out where the code got called from. I finally figured out that the Scheme procedure was called before the C++ iterator code, but it took me a while to figure that out, and I still didn't know who did the calling in the first place. I only know a little bit about Flex and Bison, so reading those files helped only a little bit. I started my feature by hacking the C++ code, and I was able to use a context property there. However, It took me a while to figure out what the split-list was and where it was created. I traced down the Scheme file, and I had to tweak the Scheme code to make sure that 0's weren't being dropped, but I was able to get my hack to work. Then I decided that there might be a way to streamline the split-list (I think), so I decided to try a hack in the Scheme procedure, instead. But I found out that I don't have context properties to read there, so I was lost. How do I get a user-defined property into the autochange Scheme procedure? I was going to use a music property next, but it didn't feel right. It has taken hours to get to this point, and I still have this issue to solve. >>Is anybody interested in helping out on this if I get the ball rolling? > > > Yes! I'll gladly supply answers. I'll start off with your current > batch of questions. I'm going to give very brief, compact answers, but > do not hesitate to point out what you don't understand, and ask more, > so I know where to expand. > > Let me spend some time with what you gave me, and I'll send follow-up questions when I'm finished with these. It will probably be a week or so, but I don't think the information will go out-of-date too quickly ;) Thanks. Doug ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
RE: Documentation of Architecture / Design?
Doug, I've also been trying to get involved with a new feature, and spent a lot of hours trying to understand code just to answer these types of questions. I'd like to see such a reference as well. I'd be willing to dump whatever knowledge I have into the Lilypond Architecture Manual (LAR?), but I clearly have no inside information to contribute -- just what I can deduce from the code. Anyway, such an animal would be very helpful for me. Carl Sorensen -Original Message- From: Douglas A Linhardt [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:39 AM To: [EMAIL PROTECTED] Subject: Documentation of Architecture / Design? All, I've recently gotten involved in the lilypond cause (2 bug fixes submitted, a couple of features underway). My problem is I don't have a firm understanding of how everything comes together. I've read through the Programmer's Reference (PR), but it isn't what I'm looking for. I think what's needed is a document describing the following things: - What's a grob, and how is one used? - What's a smob, and how is one used? ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: reading material
[EMAIL PROTECTED] writes: > About a year ago, I decided to learn Scheme in order to understand > more about Lilypond.SICP was widely recommended and I shelled out > almost $100US for it and a lab manual. I can imagine that. Also, I must admit I learned as much Scheme as I needed to implement parts of Lily; I still have only a dim understanding of more esoteric Scheme topics like call/cc and hygienic macros. If you have properly learned Scheme, you are already in a position to rewrite parts of Lily, as my idiom is most likely rather strange. Luckily, Nicolas has been helping us out by sanitizing parts of the code. -- Han-Wen Nienhuys | [EMAIL PROTECTED] | http://www.xs4all.nl/~hanwen ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Documentation of Architecture / Design?
[EMAIL PROTECTED] writes: > All, > > I've recently gotten involved in the lilypond cause (2 bug fixes submitted, a > couple of features underway). My problem is I don't have a firm understanding > of how everything comes together. I've read through the Programmer's Reference > (PR), but it isn't what I'm looking for. > > I don't know the system well enough to answer even half of these questions. I > could start a document by filling in what I've learned so far, but my answers > would have to be checked, and there are lots of things that would need to be > filled in by others. That would be most welcome! I must admit that when I want to know how a program works, I use grep and emacs and dive into the source code. The comments and the code itself are usually more revealing than technical documents. Can you tell me where you started looking and where you lost it? > Is anybody interested in helping out on this if I get the ball rolling? Yes! I'll gladly supply answers. I'll start off with your current batch of questions. I'm going to give very brief, compact answers, but do not hesitate to point out what you don't understand, and ask more, so I know where to expand. > I think what's needed is a document describing the following things: > > - What's a grob, and how is one used? Graphical object - they are created from within engravers, either as Spanners (derived class) -slurs, beams- or Items (also a derived class) -notes, clefs, etc. There are two other derived classes System (derived from Spanner, contaning a "line of music") and Paper_column (derived from Item, it contains all items that happen at the same moment). They are separate classes because they play a special role in the linebreaking process. > - What's a smob, and how is one used? A C(++) object that is encapsulated so it can be used as a Scheme object. See GUILE info, "19.3 Defining New Types (Smobs)" > - When is each C++ class constructed and used (sort of in the PR) > Music classes In the parser.yy see the macro calls MAKE_MUSIC_BY_NAME(). > Contexts Constructed during "interpreting" phase. > Engravers Executive branch of Contexts, plugins that create grobs, usually one engraver per grob type. Created together with context. > Layout Objects = grobs > Grob Interfaces These are not C++ classes per se. The idea of a Grob interface hasn't crystallized well. ATM, an interface is a symbol, with a bunch of grob properties. They are not objects that are created or destroyed. > Iterators (hven't found them at all in the PR) > (Others ?) Objects that walk through different music classes, and deliver events in a synchronized way, so that notes that play together are processed at the same moment and (as a result) end up on the same horizontal position. Created during interpreting phase. BTW, the entry point for interpreting is ly:run-translator (ly_run_translator on the C++ side) > - How do the classes interact with each other > A UML diagram would be nice) > - Which properties are accessible from the class types > Can you get to Context properties from a Music object? You can create music object with a Scheme function that reads context properties (the \applycontext syntax). However, that function is executed during Interpreting, so you can not really get Context properties from Music objects, since music objects are not directly connected to Contexts. That connection is made by the Music_iterators > Can you get to Music properties from a Context object? Yes, if you are given the music object within a Context object. Normally, the music objects enter Contexts in synchronized fashion, and the synchronization is done by Music_iterators. > - What is the relationship between C++ classes and Scheme objects? Smobs are C++ objects in Scheme. Scheme objects (lists, functions) are manipulated from C++ as well using the GUILE C function interface (prefixes: gh_ and scm_) > - How do Scheme procedures get called from C++ functions? scm_call_0, scm_call_1. Also scm_c_eval_string (), scm_eval () > - How do C++ functions get called from Scheme procedures? Export a C++ function to Scheme with LY_DEFINE. > - What is the flow of control in the program? Good question. Things used to be clear and cut, but we have Scheme and SMOBs now, which means that interactions do not follow a very rigid format anymore. See below for an overview, though. > Does the parser make Scheme procedure calls or C++ function > calls? Both. And the Scheme calls can call C++ and vice versa. It's nested, with the SCM datatype as lubrication between the interactions (I think the word "lubrication" describes the process better than the traditional word "glue") > How do the front-end and back-end get started? Front-end: a file is parsed, the rest follows from that. Specifically, Parsing leads to a Music + Music_output_def object (see parser.yy, definition of toplevel_expression )
Re: reading material
I don't think the "Structure and Interpretation of Computer Programs" is a particularly good place to learn Scheme.And I don't agree that it's as good a book as many people think it is. About a year ago, I decided to learn Scheme in order to understand more about Lilypond.SICP was widely recommended and I shelled out almost $100US for it and a lab manual. After quite a lot of work on it--I've completed most of the exercises in the the first 150 or so pages--I remain unimpressed. So far it is difficult without being correspondingly enlightening. If you want to test your wits against its main audience--i.e., computer science majors at the Massachusetts Institute of Technology--then go for it. Otherwise, look elsewhere. I've gotten more practical help from the online tutorial "Teach Yourself Scheme in Fixnum Days" at http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme.html The Guile tutorials are okay too. I also don't care for "The Little Schemer." It's kind of silly in it's faux-dialog approach, and it's hard to review what you've already been through. And of what practical value is something called "applicative order Y-combinator"? ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: info problems
Werner LEMBERG writes: >> > I get e.g. `Easier Music Entry: No such file or directory'. >> > >> > So there are many dead links. Probably a bug in `info'? >> >> Probably someone needs/needen to run texinfo-all-menu-update. Is >> this fixed now? > > No, it isn't (CVS 2004-03-19 09:10 MET). Hmm, then maybe some guru should look at this? Jan. -- Jan Nieuwenhuizen <[EMAIL PROTECTED]> | GNU LilyPond - The music typesetter http://www.xs4all.nl/~jantien | http://www.lilypond.org ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: info problems
Karl Berry writes: >> * lilypond: (lilypond/lilypond)Invoking LilyPond. Titling LilyPond scores. > How about simply not including that entry, and just have the top-level > entry? After all, there's no point in having it if it goes to the wrong > place. Yes that's maybe the best option, I'll do that. It's just that we list all program names at top level, and `lilypond' is the name of a program too... Jan. -- Jan Nieuwenhuizen <[EMAIL PROTECTED]> | GNU LilyPond - The music typesetter http://www.xs4all.nl/~jantien | http://www.lilypond.org ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Documentation of Architecture / Design?
All, I've recently gotten involved in the lilypond cause (2 bug fixes submitted, a couple of features underway). My problem is I don't have a firm understanding of how everything comes together. I've read through the Programmer's Reference (PR), but it isn't what I'm looking for. I think what's needed is a document describing the following things: - What's a grob, and how is one used? - What's a smob, and how is one used? - When is each C++ class constructed and used (sort of in the PR) Music classes Contexts Engravers Layout Objects Grob Interfaces Iterators (hven't found them at all in the PR) (Others ?) - How do the classes interact with each other A UML diagram would be nice) - Which properties are accessible from the class types Can you get to Context properties from a Music object? Can you get to Music properties from a Context object? - What is the relationship between C++ classes and Scheme objects? - How do Scheme procedures get called from C++ functions? - How do C++ functions get called from Scheme procedures? - What is the flow of control in the program? Does the parser make Scheme procedure calls or C++ function calls? How do the front-end and back-end get started? How do the front-end and back-end communicate? - Where is the functionality associated with KEYWORDs? What Contexts/Properties/Music/etc. are available when they are processed? \override \stemDown \relative \notes \autochange (etc.) - How do you decide if something is a Music, Context, or Grob property? Why is part-combine-status a Music property when it seems (IMHO) to be related to the Staff context? I'm adding a property to affect how \autochange works. It seems to me that it should be a context property, but the Scheme autochange procecure has a Music argument. Does this mean I should use a Music property? I can (and have) searched the code for this kind of information, but with limited (almost non-existent) comments, it's VERY difficult to get a foothold. Also, the PR sometimes doesn't add much clarity: — Function: Context_specced_music_iterator::constructor Construct a Context_specced_music_iterator music iterator I would not be surprised if some eager potential developers turned away because of these deficiencies. I don't know the system well enough to answer even half of these questions. I could start a document by filling in what I've learned so far, but my answers would have to be checked, and there are lots of things that would need to be filled in by others. I think most of this could be discussed at the Context/Music/Grob level without drilling down to the individual classes, so maintenance of the document would be minimal unless major re-architecture occurs. Is anybody interested in helping out on this if I get the ball rolling? Doug ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: info problems
> > Hmm. If I now say `info lilypond', I don't see the top lilypond > > page but `5 Invoking LilyPond', one level too deep. > > That is because that node name is an exact match: > > * lilypond: (lilypond/lilypond)Invoking LilyPond. Titling LilyPond scores. > > If you type `info GNU LilyPond', you get the top page. If the > Invoking LilyPond node is renamed to something that matches worse, > you get the top page. Do we want that. Suggestions for a name? The name is OK -- there is no better name. Other info files like that for dvips have the same problem. I suggest to add a new command to texinfo which maps certain command line arguments to certain nodes, e.g. @commandlineargtonode lilypond,top or @commandlineargtonode dvips,top An alternative is to say `info -f lilypond', but this is non-intuitive IMHO. > > I get e.g. `Easier Music Entry: No such file or directory'. > > > > So there are many dead links. Probably a bug in `info'? > > Probably someone needs/needen to run texinfo-all-menu-update. Is > this fixed now? No, it isn't (CVS 2004-03-19 09:10 MET). Werner ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Re: CVS problems (savannah down?)
On Fri, Mar 19, 2004 at 01:29:47AM +0100, Han-Wen Nienhuys wrote: > > is it only me who can't access the CVS server at savannah.gnu.org for > > the last three days? [...] > For me, it's been up again since this morning. Thanks. I can access it again, too. Ciao, Kili -- Könn't man kyrillisch, wär's echt idyllisch. ["hwicht" in de.rec.motorrad] ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel
Problems with convert-ly
I have quite a lot of lilypond source that I did back in the 1.3 and 1.6.6 days. I have almost nothing that convert-ly will process, since it usually produces errors like those below. (By the way, this is lilypond 2.1.0, running on a Debian woody system with some later versions of, e.g., guile.) I discovered from the man page that you can use convert-ly to change things only up to a particular version of lilypond. Using this I have been able to convert things up to 1.7.28, but there things stop; not a single piece of music will convert from 1.7.28 to 1.9.0 or later. Is there no way to get round this? Must all music be reentered from scratch, or is it possible to get convert-ly to do _something_? -- Owen [EMAIL PROTECTED] /usr/bin/convert-ly:1254: SyntaxWarning: local name 'slur_strs' in 'sub_chord' shadows use of 'slur_strs' as global in nested scope 'sub_tremolos' def sub_chord (m): /usr/bin/convert-ly:1254: SyntaxWarning: local name 'durs' in 'sub_chord' shadows use of 'durs' as global in nested scope 'sub_durs' def sub_chord (m): /usr/bin/convert-ly:1254: SyntaxWarning: local name 'dyns' in 'sub_chord' shadows use of 'dyns' as global in nested scope 'sub_dyn_end' def sub_chord (m): convert-ly (GNU LilyPond) 2.1.0 Processing `buzzer.ly' ... Applying conversions: 1.9.0, Traceback (most recent call last): File "/usr/bin/convert-ly", line 1751, in ? do_one_file (f) File "/usr/bin/convert-ly", line 1690, in do_one_file touched = do_conversion (infile, from_version, outfile, to_version) File "/usr/bin/convert-ly", line 1636, in do_conversion str = x[1] (str) File "/usr/bin/convert-ly", line 1423, in conv str = sub_chords (str) File "/usr/bin/convert-ly", line 1385, in sub_chords str = re.sub (r'<([^<>{}]+)>', sub_chord, str) File "/usr/lib/python2.1/sre.py", line 63, in sub return _compile(pattern, 0).sub(repl, string, count) File "/usr/lib/python2.1/sre.py", line 164, in _sub return _subn(pattern, template, string, count)[0] File "/usr/lib/python2.1/sre.py", line 185, in _subn append(filter(m)) File "/usr/bin/convert-ly", line 1272, in sub_chord str = re.sub ("([a-z]+[,'!? ]*)([0-9.]+)", sub_durs, str) File "/usr/lib/python2.1/sre.py", line 63, in sub return _compile(pattern, 0).sub(repl, string, count) File "/usr/lib/python2.1/sre.py", line 164, in _sub return _subn(pattern, template, string, count)[0] File "/usr/lib/python2.1/sre.py", line 185, in _subn append(filter(m)) File "/usr/bin/convert-ly", line 1269, in sub_durs durs.append(m.group(2)) NameError: global name 'durs' is not defined ___ Lilypond-devel mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-devel