Re: lilypond ChangeLog Documentation/user/examples....

2006-09-20 Thread Erik Sandberg
On Wednesday 20 September 2006 19:13, Han-Wen Nienhuys wrote:
> Erik Sandberg wrote:
> > Similarly, why can't
> >   \withoutput \layout {} \music
> > just be a function that returns a Score object (such as the one described
> > above)?
>
> It sure can, I thought that people wanted to have a sane way to set the
> default tempo in the midi block.

OK; I just don't understand what in your proposed syntax change that would 
make midi \tempo more natural.

-- 
Erik


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


Re: lilypond ChangeLog Documentation/user/examples....

2006-09-20 Thread Han-Wen Nienhuys

Erik Sandberg wrote:

Similarly, why can't
  \withoutput \layout {} \music 
just be a function that returns a Score object (such as the one described 
above)?


It sure can, I thought that people wanted to have a sane way to set the 
default tempo in the midi block.


--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



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


Re: lilypond ChangeLog Documentation/user/examples....

2006-09-20 Thread Erik Sandberg
On Monday 18 September 2006 12:44, Han-Wen Nienhuys wrote:
> Erik Sandberg wrote:
> > How about
> > \score {
> >  { c d e }
> >  \midi{ pre = \tempo 4. = 70 }
> > }
> > ?
> >
> > (I.e., \tempo is a music expression => it's not a grammatical exception)
> >
> > Semantics: If pre is set, then embed main input in a SequentialMusic when
> > interpreting music for midi. So instead of interpreting { c d e } above,
> > we interpret the expression:
> > { \tempo 4.=70 { c d e } }
>
> This is a smart idea. Syntactically, I'm not a big fan of this (the
> double = is a little strange). However, it would be easy to encapsulate
> this with a Scheme expression,
>
>
>#(set-midi-tempo "4." 70)
>
> however, we would need to have a separate music expression for each
> output block.

in that case, why not stick with the following, which already works?
\score { {\tempo 4.=70 \music} \midi {}}
\score { \music \layout {}}

> That would nicely match with a syntax change along the lines of
>
>
>\withoutput \layout { .. } {music expression}
>
>\withoutput \midi { .. } {music expression}
>
> This implies that music functions are definitely allowed to have side
> effects, so it's a syntax change that has some serious repercussions.

Similarly, why can't
  \withoutput \layout {} \music 
just be a function that returns a Score object (such as the one described 
above)?

-- 
Erik


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


Re: lilypond ChangeLog Documentation/user/examples....

2006-09-18 Thread Han-Wen Nienhuys

Erik Sandberg wrote:

On Sunday 27 August 2006 17:41, Han-Wen Nienhuys wrote:

Graham Percival wrote:

I'm sure that there's some reason why "\tempo x = y" is a horrible
construct and must be replaced, but
\context {
  \Score
  tempoWholesPerMinute = #(ly:make-moment y x)
  }
looks unnecessarily complicated.  If that's the way it's going to be,
I'll document it, but... why this?  Do we want to allow users to have
different tempo in different Staff contexts?

we can hvae something like

  #(set-tempo "4" 70)

or maybe

   tempo = #70

\tempo has to go, because it is strange exception to the general syntax.


How about
\score {
 { c d e }
 \midi{ pre = \tempo 4. = 70 }
}
?

(I.e., \tempo is a music expression => it's not a grammatical exception)

Semantics: If pre is set, then embed main input in a SequentialMusic when 
interpreting music for midi. So instead of interpreting { c d e } above, we 
interpret the expression:
{ \tempo 4.=70 { c d e } } 


This is a smart idea. Syntactically, I'm not a big fan of this (the 
double = is a little strange). However, it would be easy to encapsulate 
this with a Scheme expression,



  #(set-midi-tempo "4." 70)

however, we would need to have a separate music expression for each 
output block.


That would nicely match with a syntax change along the lines of


  \withoutput \layout { .. } {music expression}

  \withoutput \midi { .. } {music expression}

This implies that music functions are definitely allowed to have side 
effects, so it's a syntax change that has some serious repercussions.


ideas, comments?


--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



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


Re: lilypond ChangeLog Documentation/user/examples....

2006-08-31 Thread Han-Wen Nienhuys

Mats Bengtsson wrote:

Great! However, according to 
http://lists.gnu.org/archive/html/bug-lilypond/2003-10/msg00069.html

it's maybe not the correct solution.


This is now fixed in CVS. However, I expect some more MIDI related 
problems to turn up in relation to this cleanup.



--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



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


Re: lilypond ChangeLog Documentation/user/examples....

2006-08-30 Thread Mats Bengtsson

Han-Wen Nienhuys wrote:


Mats Bengtsson wrote:

Note that it's a severe limitation if the MIDI tempo can only be set 
in the \midi{...} block, since then you cannot change the tempo on 
the middle of a piece. Previously, the MIDI tempo has

been taken both from settings in the \midi block as well as from
all \tempo commands throughout the piece (even though the generated
MIDI code doesn't work well with all MIDI interpreters). Based on the 
syntax of the new construct, it seems that it's still

possible to change the tempo in the middle of a score, but I haven't
looked under the hood or tried any example to verify if it really works.



Even better, since  Score.tempoWholesPerMinutes, is inherited by each 
stave, tempo changes will happen on each track, which should fix 
problems with QuickTime playback.


Great! However, according to 
http://lists.gnu.org/archive/html/bug-lilypond/2003-10/msg00069.html

it's maybe not the correct solution.

  /Mats


--
=
Mats Bengtsson
Signal Processing
Signals, Sensors and Systems
Royal Institute of Technology
SE-100 44  STOCKHOLM
Sweden
Phone: (+46) 8 790 8463 
   Fax:   (+46) 8 790 7260
Email: [EMAIL PROTECTED]
WWW: http://www.s3.kth.se/~mabe
=



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


Re: lilypond ChangeLog Documentation/user/examples....

2006-08-29 Thread Erik Sandberg
On Sunday 27 August 2006 17:41, Han-Wen Nienhuys wrote:
> Graham Percival wrote:
> > I'm sure that there's some reason why "\tempo x = y" is a horrible
> > construct and must be replaced, but
> > \context {
> >   \Score
> >   tempoWholesPerMinute = #(ly:make-moment y x)
> >   }
> > looks unnecessarily complicated.  If that's the way it's going to be,
> > I'll document it, but... why this?  Do we want to allow users to have
> > different tempo in different Staff contexts?
>
> we can hvae something like
>
>   #(set-tempo "4" 70)
>
> or maybe
>
>tempo = #70
>
> \tempo has to go, because it is strange exception to the general syntax.

How about
\score {
 { c d e }
 \midi{ pre = \tempo 4. = 70 }
}
?

(I.e., \tempo is a music expression => it's not a grammatical exception)

Semantics: If pre is set, then embed main input in a SequentialMusic when 
interpreting music for midi. So instead of interpreting { c d e } above, we 
interpret the expression:
{ \tempo 4.=70 { c d e } } 

-- 
Erik


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


Re: lilypond ChangeLog Documentation/user/examples....

2006-08-28 Thread Han-Wen Nienhuys

Mats Bengtsson wrote:
Note that it's a severe limitation if the MIDI tempo can only be set in 
the \midi{...} block, since then you cannot change the tempo on the 
middle of a piece. Previously, the MIDI tempo has

been taken both from settings in the \midi block as well as from
all \tempo commands throughout the piece (even though the generated
MIDI code doesn't work well with all MIDI interpreters). Based on the 
syntax of the new construct, it seems that it's still

possible to change the tempo in the middle of a score, but I haven't
looked under the hood or tried any example to verify if it really works.



Even better, since  Score.tempoWholesPerMinutes, is inherited by each 
stave, tempo changes will happen on each track, which should fix 
problems with QuickTime playback.


--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



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


Re: lilypond ChangeLog Documentation/user/examples....

2006-08-28 Thread Mats Bengtsson
Note that it's a severe limitation if the MIDI tempo can only be set in 
the \midi{...} block, since then you cannot change the tempo on the 
middle of a piece. Previously, the MIDI tempo has

been taken both from settings in the \midi block as well as from
all \tempo commands throughout the piece (even though the generated
MIDI code doesn't work well with all MIDI interpreters). Based on the 
syntax of the new construct, it seems that it's still

possible to change the tempo in the middle of a score, but I haven't
looked under the hood or tried any example to verify if it really works.

  /Mats

Quoting Graham Percival <[EMAIL PROTECTED]>:


Han-Wen Nienhuys wrote:


we can hvae something like

 #(set-tempo "4" 70)

or maybe

  tempo = #70


But not
  \midi{
tempo = 4. 60
  }
?

I'll leave this issue for other people to work out; when it's been 
finalized, I'll update the manual.  IMO the tempo should be set 
inside the \midi{} instead of as a #(...), but I don't know enough 
about lilypond internals  (numbers, durations, music function 
arguments, etc)  to give useful suggestions about the exact syntax.


- Graham


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







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


Re: lilypond ChangeLog Documentation/user/examples....

2006-08-27 Thread Graham Percival

Han-Wen Nienhuys wrote:


we can hvae something like

 #(set-tempo "4" 70)

or maybe

  tempo = #70


But not
  \midi{
tempo = 4. 60
  }
?

I'll leave this issue for other people to work out; when it's been 
finalized, I'll update the manual.  IMO the tempo should be set inside 
the \midi{} instead of as a #(...), but I don't know enough about 
lilypond internals  (numbers, durations, music function arguments, etc) 
 to give useful suggestions about the exact syntax.


- Graham


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


Re: lilypond ChangeLog Documentation/user/examples....

2006-08-27 Thread Han-Wen Nienhuys

Graham Percival wrote:
I'm sure that there's some reason why "\tempo x = y" is a horrible 
construct and must be replaced, but

\context {
  \Score
  tempoWholesPerMinute = #(ly:make-moment y x)
  }
looks unnecessarily complicated.  If that's the way it's going to be, 
I'll document it, but... why this?  Do we want to allow users to have 
different tempo in different Staff contexts?


we can hvae something like

 #(set-tempo "4" 70)

or maybe

  tempo = #70

\tempo has to go, because it is strange exception to the general syntax.


--

Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



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


Re: lilypond ChangeLog Documentation/user/examples....

2006-08-26 Thread Mats Bengtsson

Quoting Graham Percival <[EMAIL PROTECTED]>:


Han-Wen Nienhuys wrote:

-A number followed by a period is interpreted as a real number, so
-for setting the tempo for dotted notes, an extra space should be
-inserted, for example
-
[EMAIL PROTECTED]
-\midi @{ \tempo 4 . = 120 @}
[EMAIL PROTECTED] example


Is this really the new way to do it?

  \midi {
\context {
  \Score
  tempoWholesPerMinute = #(ly:make-moment 120 4)
  }
}

I'm sure that there's some reason why "\tempo x = y" is a horrible 
construct and must be replaced, but

\context {
  \Score
  tempoWholesPerMinute = #(ly:make-moment y x)
  }
looks unnecessarily complicated.  If that's the way it's going to be, 
I'll document it, but... why this?  Do we want to allow users to have 
different tempo in different Staff contexts?


Apart from looking complicated, I find it directly confusing. If you 
told me that the property name was "tempoWholesPerMinute", I would 
intuitively expect the value to be a real number. Here it seems that we 
(mis)use ly:make-moment to represent a rational number. Of course, 
that's convenient as long as the beat isn't a dotted note, since you 
can just set x as the

duration of the beat, but it still requires quite some amount of
thinking the first time you see it.

  /Mats



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


Re: lilypond ChangeLog Documentation/user/examples....

2006-08-26 Thread Graham Percival

Han-Wen Nienhuys wrote:

-A number followed by a period is interpreted as a real number, so
-for setting the tempo for dotted notes, an extra space should be
-inserted, for example
-
[EMAIL PROTECTED]
-\midi @{ \tempo 4 . = 120 @}
[EMAIL PROTECTED] example


Is this really the new way to do it?

  \midi {
\context {
  \Score
  tempoWholesPerMinute = #(ly:make-moment 120 4)
  }
}

I'm sure that there's some reason why "\tempo x = y" is a horrible 
construct and must be replaced, but

\context {
  \Score
  tempoWholesPerMinute = #(ly:make-moment y x)
  }
looks unnecessarily complicated.  If that's the way it's going to be, 
I'll document it, but... why this?  Do we want to allow users to have 
different tempo in different Staff contexts?


- Graham


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


Re: lilypond ChangeLog Documentation/user/examples....

2006-08-25 Thread Mats Bengtsson

Quoting Han-Wen Nienhuys <[EMAIL PROTECTED]>:

Index: Documentation/user/examples.itely
===
RCS file: /cvsroot/lilypond/lilypond/Documentation/user/examples.itely,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -b -r1.64 -r1.65
--- Documentation/user/examples.itely   10 Aug 2006 05:53:53 -  1.64
+++ Documentation/user/examples.itely   25 Aug 2006 12:00:10 -  1.65
@@ -39,7 +39,7 @@
\score {
   \new Staff \melody
   \layout { }
-   \midi { \tempo 4=60 }
+   \midi o}
}
@end lilypond


I happened to notice that this looks like a typo!
I don't have easy access to CVS here, otherwise I would
have fixed it myself.

  /Mats




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