denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] Allow Line/Page Break in Middle of measure


From: Joe Wilkinson
Subject: Re: [Denemo-devel] Allow Line/Page Break in Middle of measure
Date: Thu, 9 Feb 2017 10:57:44 +0000
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1

Thanks,

I was sure that when I inserted them from the Directives>>Typesetter menu they had to be in the specific order AllowLineBreak before LineBreak (and this is how I started to query the whole matter). Now it seems it does not matter. I have deliberately (by putting the two directives on adjacent notes and then deleting the intervening note) tried both orders and the Measure is divided correctly in each case.

Joe


On 09/02/2017 10:08, Richard Shann wrote:
On Thu, 2017-02-09 at 09:41 +0000, Joe Wilkinson wrote:
OK
The context for this I'll paste here:

Incidentally, in either case, If I scroll forwards from the
PREVIOUS
note the first directive that is found is the Line Break, followed
by
the Allow Line/Page Break. Which doesn't make much sense to me.
I can't get this to happen - it is the behavior you get when the
x-position of the objects has been calculated wrongly, which used to
happen a lot when the calculations were a side-effect of drawing the
staff. But I fixed that a few years back.
Can you work out exactly how to get it to happen (starting with
File->New ...)?

So you are stepping forwards from the PREVIOUS note and finding the
order of the objects the reverse of the order of insertion in the
script ...


Open Denemo
New
Add 3 bars of crotchets
Edit button to use code:

(d-AllowLineBreak 'non-interactive)
(d-LineBreak 'non-interactive)

move to 7th crotchet and press button
2 screens (just 2!) about layout and specificity

What is produced is attached as barBreak.denemo.
Despite the Line Break being before the AllowLineBreak.... the typeset
window shows that the measure is broken halfway through bar 2.
The order of the objects of bar 2 is indeed
1/4 note, 1/4 note, LineBreak directive, AllowLineBreak directive, 1/4
note, 1/4 note.

The reason for that order is that the first line of your script inserts
the AllowLineBreak directive while the cursor is on the third 1/4 note
of the bar, and so it is inserted before the third 1/4 note, then the
second line inserts the LineBreak directive while the cursor is on the
AllowLineBreak directive and so this is inserted before the
AllowLineBreak directive. (Insert is *always* before the object that the
cursor is on, unless the cursor is in the appending position).

As far as LilyPond is concerned the order is immaterial, because both
occur at the same "moment", that is, the same time in the music. The
upshot is that LilyPond typesets a line break after the second and
before the third 1/4 note because it has an invisible barline there and
a request to break the line on that invisible barline.

Intriguing or just frustrating??
just a consequence of the semantics of "Insert" in Denemo (and text
editors, of course, on which it is modelled). Insert means insert before
the object that the cursor is currently on.

Richard






reply via email to

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