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