lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Work on Issue 1320


From: Marc Hohl
Subject: Re: Work on Issue 1320
Date: Sat, 07 Apr 2012 16:06:30 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20

Am 07.04.2012 01:03, schrieb Thomas Morley:
Am 6. April 2012 23:04 schrieb Carl Sorensen<address@hidden>:
On 4/5/12 12:51 PM, "Marc Hohl"<address@hidden>  wrote:


Does it make sense to replace the definitions in bar-line.cc/span-bar.cc
with the scheme equivalents? If yes, I'd draw a patch and would include
one example for integrating user-defined bar lines with the new approach
as a snippet (once I get the dashed bar line right in place ...)
It seems to me that it makes sense to put the stencil building functions
in Guile instead of in c++.  No sense adding the extra interface layer for
scheme calls from c++.

I would suggest that you make custom-bar-print-alist and
custom-bar-glyph-alist context properties, so they will be documented and
available for modification.

Whenever I see Scheme code that says something like

(do ((
    ...
     (set!  foo bar)))

I cringe a bit. This looks like a direct statement-by-statement
translation from c++, rather than an implementation in native Scheme
idioms.  set! creates a side effect for the procedure, and the Scheme
gurus like to avoid side effects as much as possible (at least they did 25
years ago ... am I really that old?).  I haven't looked carefully at your
code to write an alternative, but it's likely that this code can be
rewritten either as a recursive function or as a map, fold, or apply
function, all of which are more native Scheme idioms.

Anyway, overall this looks like great work, and I think we ought to get it
into the code base.

Thanks,

Carl
I'm working on a very similiar stuff. But I didn' try to rewrite
lily/bar-line.cc etc.
I tried another approach, defining only drawing-functions for glyphs
of string-length = 1
Putting them together with a recursive function.

Please note:
This is work in progress. You may recognize many fragments of your and
Nicolas' work. Thanks to you both.
Currently there are a lot of inconsequences and small issues. And I
didn't work on the line-break and the span-bar so far.
That's on my todo-list. :)

Nevertheless, I'm able to print very curious custom-barlines.
Perhaps you may get some ideas for your own work.
Hey, looks good! The idea of building the bar lines by parsing the string argument
is very clever!

How shall we proceed? I am short of time now (I have to move with my familiy into another house by the end of april, perhaps even one or two weeks earlier), but ... do you think we can work together on this issue? Perhaps we both could bring the
stuff in a shape suitable for being included in lilys code base.

Regards,

Marc
-Harm




reply via email to

[Prev in Thread] Current Thread [Next in Thread]