Re: anchors in the music stream?

2009-08-04 Thread Valentin Villenave
2009/8/4 Han-Wen Nienhuys hanw...@gmail.com:
 I can imagine how this would be implemented, but it would be a lot of
 work.  If anyone is up for a challenge, I can give some pointers. :)

OK, now there's no way I'm gonna let you get away with such a promise :-)
http://code.google.com/p/lilypond/issues/detail?id=824

Regards,
Valentin


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: anchors in the music stream?

2009-08-04 Thread Mark Polesky

Jay Anderson wrote:
 global =
 {
  \time 4/4 s4*4*10
  \time 3/4 s4*3*5
  \time 7/4 s4*7
  \time 4/4 \anchor #'coda s4*4*10
  \bar |.
 }

 \addAt #'coda \global {\tempo \markup Extremely slow}


IIUC, one interesting advantage of this is that scheme symbols
have less restrictions than parser identifiers:

\anchor #'m.32
\anchor #'flute2-entrance

- Mark



  


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: anchors in the music stream?

2009-08-04 Thread Werner LEMBERG
 IIUC, one interesting advantage of this is that scheme symbols
 have less restrictions than parser identifiers:
 
 \anchor #'m.32
 \anchor #'flute2-entrance

Mhmm, this is not something we should advertize loudly...


 Werner


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: anchors in the music stream?

2009-08-04 Thread Mark Polesky

Werner LEMBERG wrote:

  IIUC, one interesting advantage of this is that scheme symbols
  have less restrictions than parser identifiers:
  
  \anchor #'m.32
  \anchor #'flute2-entrance
 
 Mhmm, this is not something we should advertize loudly...

Why not?
- Mark



  


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: anchors in the music stream?

2009-08-04 Thread Werner LEMBERG
  IIUC, one interesting advantage of this is that scheme symbols
  have less restrictions than parser identifiers:
 
  \anchor #'m.32
  \anchor #'flute2-entrance

 Mhmm, this is not something we should advertize loudly...

 Why not?

I believe it confuses users that Scheme code allows more symbols
compared to LilyPond code.  It should be mentioned in the docs, of
course.


Werner


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: anchors in the music stream?

2009-08-03 Thread Mats Bengtsson



Werner LEMBERG wrote:

Would it be technically feasible/possible to establish a system of
anchors instead?



This would be indeed a great feature!
  

Reminds me of the GOTO command in BASIC! ;-)

Seriously, I seem to recall that I proposed this feature some 11-12 
years ago and at that Han-Wen at that time answered with a No!!! (I 
don't remember any details and this was long before we started using 
mailing list archives).


One alternative way to achieve the same thing is to simply do a
global =
{
 \time 4/4 s4*4*10
 \time 3/4 s4*3*5
 \time 7/4 s4*7
 { \time 4/4
 \bar |. }
 \anchoredStuff 
}

   /Mats


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: anchors in the music stream?

2009-08-03 Thread Kieren MacMillan

Hi Mats,


Reminds me of the GOTO command in BASIC! ;-)


An *extremely* underrated and powerful command.  ;-p


One alternative way to achieve the same thing is to simply do a
global =
{
 \time 4/4 s4*4*10
 \time 3/4 s4*3*5
 \time 7/4 s4*7
 { \time 4/4
 \bar |. }
 \anchoredStuff 
}


Nope: that is *not* an alternative way to achieve the same thing...  
that's a way of doing something that *appears* to be the same thing.  =)


Cheers,
Kieren.


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: anchors in the music stream?

2009-08-03 Thread Han-Wen Nienhuys
On Mon, Aug 3, 2009 at 2:58 PM, Mats Bengtssonmats.bengts...@ee.kth.se wrote:

 Reminds me of the GOTO command in BASIC! ;-)

 Seriously, I seem to recall that I proposed this feature some 11-12 years
 ago and at that Han-Wen at that time answered with a No!!! (I don't
 remember any details and this was long before we started using mailing list
 archives).

I can imagine how this would be implemented, but it would be a lot of
work.  If anyone is up for a challenge, I can give some pointers. :)

-- 
Han-Wen Nienhuys - han...@xs4all.nl - http://www.xs4all.nl/~hanwen


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: anchors in the music stream?

2009-07-23 Thread Werner LEMBERG

 Would it be technically feasible/possible to establish a system of
 anchors instead?

This would be indeed a great feature!


 Werner


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: anchors in the music stream?

2009-07-22 Thread Mark Polesky

Kieren MacMillan wrote:
 Like many Lilyponders, I break down my code into variables, e.g.
 global (for time signature changes, etc.), notes, dynamics, etc.
 The main irritation with this (IMO) is that each variable
 requires a complete set of skips in order to keep the timing
 accurate.

 Would it be technically feasible/possible to establish a system
 of anchors instead? That is, could we declare an anchor point
 in the global setup, and then refer to it in other code?

Have you tried using the \tag command?
http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Different-editions-from-one-source#Using-tags

- Mark


  


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: anchors in the music stream?

2009-07-22 Thread Kieren MacMillan

Hi Mark,


Have you tried using the \tag command?
http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Different- 
editions-from-one-source#Using-tags


Certainly I've used \tag for filtering content, but I don't  
understand how \tag could help with the problem I'm describing...  
could you elaborate on what you're thinking?


Thanks,
Kieren.



___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: anchors in the music stream?

2009-07-22 Thread Jay Anderson
On Wed, Jul 22, 2009 at 9:05 AM, Kieren
MacMillankieren_macmil...@sympatico.ca wrote:
 Hello all,

 Like many Lilyponders, I break down my code into variables, e.g. global (for
 time signature changes, etc.), notes, dynamics, etc. The main irritation
 with this (IMO) is that each variable requires a complete set of skips in
 order to keep the timing accurate.

 Would it be technically feasible/possible to establish a system of anchors
 instead? That is, could we declare an anchor point in the global setup, and
 then refer to it in other code? e.g.

 global =
 {
  \time 4/4 s4*4*10
  \time 3/4 s4*3*5
  \time 7/4 s4*7
  \time 4/4 \anchor #'coda s4*4*10
  \bar |.
 }

 tempoChanges =
 {
  \tempo \markup Opening tempo
  \anchorTo #'coda \tempo \markup Extremely slow
 }

 ??

 Just a brainstorm from someone who doesn't understand the internals enough
 to immediately see the stupidity of this idea...  =)


That's a neat idea. It might be easier to do something like:

global =
{
 \time 4/4 s4*4*10
 \time 3/4 s4*3*5
 \time 7/4 s4*7
 \time 4/4 \anchor #'coda s4*4*10
 \bar |.
}

\addAt #'coda \global {\tempo \markup Extremely slow}

Then the addAt function could weave the tempo in at the correct point.
Though I'm not sure how easy this would be either.

=

I've thought about something similar before and I think anchors would
be a good syntax (I don't know about the internals) to make it work:

global = {s1*4 \anchor #'place s1*4}
part = \relative c' {c1 c c c \assertAt #'place c c c c \assertEnd}
anotherPart = \relative c' {e1 e e \assertAt #'place e e e e \assertEnd} %Error
\score {  \new Staff{  \global \part  } \new Staff{  \global
\anotherPart  }   }

This would work similar to bar checks. Errors would be thrown when the
anchor and assertion don't line up. I think this might be more
complicated than the above use.

In any case I think anchors could be very useful for a variety of purposes.

-Jay


___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user