Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3601)

Issue 5701049: Allow music with layout instructions in output definitions. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 2 months ago by dak
Modified:
10 years, 8 months ago
Reviewers:
janek, Janek Warchol
CC:
lilypond-devel_gnu.org
Base URL:
http://git.savannah.gnu.org/gitweb/?p=lilypond.git/trunk/
Visibility:
Public.

Description

Allow music with layout instructions in output definitions. This allows things like \layout { \accidentalStyle modern } or \midi { \tempo 4 = 80 } to work as intended.

Patch Set 1 #

Patch Set 2 : Add ly:context-def-modify, move definitions to better places. #

Patch Set 3 : Fix reported problems (overrides, error message for non-existing context-def) #

Patch Set 4 : Add a convert-ly rule (and apply it) for demonstrating use for MIDI tempo #

Patch Set 5 : Remove \layout-from again. It has become redundant. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+220 lines, -247 lines) Patch
M Documentation/de/essay/engraving.itely View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M Documentation/de/notation/input.itely View 1 2 3 4 chunks +4 lines, -13 lines 0 comments Download
M Documentation/es/essay/engraving.itely View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M Documentation/es/notation/input.itely View 1 2 3 4 chunks +4 lines, -13 lines 0 comments Download
M Documentation/essay/engraving.itely View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M Documentation/fr/essay/engraving.itely View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M Documentation/fr/notation/input.itely View 1 2 3 4 chunks +4 lines, -13 lines 0 comments Download
M Documentation/ja/notation/input.itely View 1 2 3 4 chunks +4 lines, -13 lines 0 comments Download
M Documentation/ly-examples/granados.ly View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M Documentation/ly-examples/theory.ly View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M Documentation/notation/input.itely View 1 2 3 4 chunks +4 lines, -13 lines 0 comments Download
M Documentation/snippets/adding-drum-parts.ly View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M Documentation/snippets/changing-midi-output-to-one-channel-per-voice.ly View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M Documentation/snippets/new/screech-boink.ly View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M Documentation/snippets/new/staff-headword.ly View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M Documentation/snippets/screech-boink.ly View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M Documentation/snippets/staff-headword.ly View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M input/regression/baerenreiter-sarabande.ly View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M input/regression/drums.ly View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M input/regression/layout-from.ly View 1 2 3 4 1 chunk +6 lines, -6 lines 0 comments Download
M input/regression/midi-volume-equaliser.ly View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M input/regression/morgenlied.ly View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M input/regression/mozart-hrn-3.ly View 1 2 3 4 chunks +4 lines, -13 lines 0 comments Download
M input/regression/typography-demo.ly View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M lily/context-def.cc View 1 3 chunks +63 lines, -2 lines 0 comments Download
M lily/include/context-def.hh View 1 chunk +1 line, -0 lines 0 comments Download
M lily/parser.yy View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M ly/context-mods-init.ly View 1 2 3 4 2 chunks +1 line, -76 lines 0 comments Download
M ly/declarations-init.ly View 1 chunk +1 line, -0 lines 0 comments Download
M python/convertrules.py View 1 2 3 1 chunk +27 lines, -0 lines 0 comments Download
M scm/lily-library.scm View 1 2 3 1 chunk +59 lines, -0 lines 0 comments Download

Messages

Total messages: 9
janek
David, this is 300% awesome!! However, the following example doesn't work (it doesn't produce any ...
12 years, 2 months ago (2012-02-27 22:23:15 UTC) #1
dak
On 2012/02/27 22:23:15, janek wrote: > However, the following example doesn't work (it doesn't produce ...
12 years, 2 months ago (2012-02-28 01:36:14 UTC) #2
janek
On Tue, Feb 28, 2012 at 2:36 AM, <dak@gnu.org> wrote: >> \score { >> \new ...
12 years, 2 months ago (2012-02-28 07:45:17 UTC) #3
dak
Janek Warchoł <janek.lilypond@gmail.com> writes: > On Tue, Feb 28, 2012 at 2:36 AM, <dak@gnu.org> wrote: ...
12 years, 2 months ago (2012-02-28 08:28:14 UTC) #4
janek
On Tue, Feb 28, 2012 at 9:27 AM, David Kastrup <dak@gnu.org> wrote: > Janek Warchoł ...
12 years, 2 months ago (2012-02-29 07:56:19 UTC) #5
dak
Janek Warchoł <janek.lilypond@gmail.com> writes: >> Contextmodifications can be placed in variables, so you can write ...
12 years, 2 months ago (2012-02-29 08:23:07 UTC) #6
janek
On Wed, Feb 29, 2012 at 9:22 AM, David Kastrup <dak@gnu.org> wrote: > Janek Warchoł ...
12 years, 2 months ago (2012-02-29 23:12:43 UTC) #7
dak
Janek Warchoł <janek.lilypond@gmail.com> writes: > On Wed, Feb 29, 2012 at 9:22 AM, David Kastrup ...
12 years, 2 months ago (2012-02-29 23:44:20 UTC) #8
Janek Warchol
10 years, 8 months ago (2013-09-05 22:30:05 UTC) #9
Message was sent while issue was closed.
Hi,

(some archeology...)

On 2012/02/29 23:44:20, dak wrote:
> Janek Warchoł <mailto:janek.lilypond@gmail.com> writes:
> 
> > On Wed, Feb 29, 2012 at 9:22 AM, David Kastrup <mailto:dak@gnu.org> wrote:
> >> Janek Warchoł <mailto:janek.lilypond@gmail.com> writes:
> >>>
> >>> sure, i can do this. &nbsp;Nevertheless, writing these in \layout {} would
> >>> be more elegant
> >>
> >> No. &nbsp;An arbitrary number of named contexts can occur in the text, and
> >> some are implicitly named anyway. &nbsp;So you want to change _all_
contexts
> >> of a given type in \layout and/or derive a new context type (aaVoice or
> >> so) and then use \new aaVoice ... in the score.
> >>
> >>> and in my opinion easier to maintain: \layout must be placed at the
> >>> end of \score block, while variables containing context modifications
> >>> must be defined before they are used, i.e. before \score block.
&nbsp;Thus,
> >>> style decisions are spread over two places.
> >>
> >> A _style_ is something affecting _all_ contexts of a given type, not
> >> just particular contexts with a particular id.
> >
> > Hmm.  I'm not sure if i understand what you mean.  Let me give an
> > example case where i think that named context thingy would be useful:
> > i have a piece for 3 SATB choirs; the structure is
> >
> > \score { <<
> >   \new ChoirStaff = ChoirOne <<
> >     \new Staff = soprano { }
> >     \new Staff = alto { }
> >     \new Staff = tenor { }
> >     \new Staff = bass { }
> >   >>
> >   \new ChoirStaff = ChoirTwo <<
> >     \new Staff = soprano { }
> >     \new Staff = alto { }
> >     \new Staff = tenor { }
> >     \new Staff = bass { }
> >   >>
> >   \new ChoirStaff = ChoirThree <<
> >     \new Staff = soprano { }
> >     \new Staff = alto { }
> >     \new Staff = tenor { }
> >     \new Staff = bass { }
> >   >>
> >>>
> >
> > i'll print scores separately for each choir, so to save space i can
> > make two choirStaves smaller in each print.
> 
> Then make a SmallStaff context definition and use it instead of Staff.
> Take a look at engraver-init.ly for examples.  I think that
> RhythmicStaff is created from Staff, for example.

Being a more experienced LilyPond user now, i can say that you were right. 
Creating custom contexts *is* the way to do this.  The remaining question is
whether creating custom contexts can be done easily enough (i had serious
trouble last time when i attempted doing this), and whether some other
structural shortcomings can be fixed.

best,
Janek
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b