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

Issue 42600043: Cleanup and generalization: get rid of Audio_column.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 4 months ago by Devon Schudy
Modified:
10 years, 4 months ago
Reviewers:
pkx166h, dak
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Cleanup and generalization: get rid of Audio_column. The engraving columns exist to keep grobs aligned during layout, but there's no layout step in audio, so Audio_column has no purpose. Each Audio_item now knows its moment instead. This means performers can generate Audio_items at times other than the current moment. This makes more flexible MIDI output hooks possible — in particular, ones that change note times, or generate additional notes for ornaments. Control_track_performer now creates its Audio_texts at the first timestep rather than during initialization, so they'll have a valid moment. Previously they were created at no timestep, but Score_performer::acknowledge_audio_elements saw them after the first timestep (even though they weren't part of that timestep) and added them to the first Audio_column.

Patch Set 1 #

Patch Set 2 : Removed an unrelated commit that was accidentally included. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -198 lines) Patch
D lily/audio-column.cc View 1 chunk +0 lines, -53 lines 0 comments Download
M lily/audio-item.cc View 5 chunks +40 lines, -21 lines 2 comments Download
M lily/beam-performer.cc View 1 chunk +0 lines, -1 line 0 comments Download
M lily/control-track-performer.cc View 2 chunks +5 lines, -4 lines 1 comment Download
M lily/drum-note-performer.cc View 2 chunks +1 line, -2 lines 0 comments Download
M lily/dynamic-performer.cc View 2 chunks +2 lines, -2 lines 0 comments Download
D lily/include/audio-column.hh View 1 chunk +0 lines, -49 lines 0 comments Download
M lily/include/audio-item.hh View 10 chunks +16 lines, -12 lines 0 comments Download
M lily/include/lily-proto.hh View 1 chunk +0 lines, -1 line 1 comment Download
M lily/include/score-performer.hh View 1 chunk +0 lines, -1 line 0 comments Download
M lily/key-performer.cc View 1 chunk +1 line, -1 line 0 comments Download
M lily/lyric-performer.cc View 1 chunk +1 line, -1 line 0 comments Download
M lily/midi-control-function-performer.cc View 1 chunk +2 lines, -1 line 0 comments Download
M lily/midi-walker.cc View 7 chunks +6 lines, -8 lines 0 comments Download
M lily/note-performer.cc View 4 chunks +3 lines, -4 lines 0 comments Download
M lily/performance.cc View 1 chunk +0 lines, -1 line 0 comments Download
M lily/piano-pedal-performer.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M lily/score-performer.cc View 6 chunks +6 lines, -25 lines 0 comments Download
M lily/slur-performer.cc View 1 chunk +0 lines, -1 line 0 comments Download
M lily/staff-performer.cc View 5 chunks +5 lines, -6 lines 0 comments Download
M lily/tempo-performer.cc View 1 chunk +1 line, -1 line 0 comments Download
M lily/time-signature-performer.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9
Devon Schudy
Removed an unrelated commit that was accidentally included.
10 years, 4 months ago (2013-12-16 04:21:01 UTC) #1
dak
https://codereview.appspot.com/42600043/diff/20001/lily/audio-item.cc File lily/audio-item.cc (right): https://codereview.appspot.com/42600043/diff/20001/lily/audio-item.cc#newcode44 lily/audio-item.cc:44: return int (moment_to_ticks (when_)); Why cast to int here? ...
10 years, 4 months ago (2013-12-20 16:46:19 UTC) #2
Devon Schudy
dak@gnu.org wrote: > Ok, here is a filthy bad thing: in issue 2392 I finally ...
10 years, 4 months ago (2013-12-21 02:58:05 UTC) #3
dak
On 2013/12/21 02:58:05, Devon Schudy wrote: > OK: Issue 3744 fixes that for all score-level ...
10 years, 4 months ago (2013-12-21 05:59:17 UTC) #4
Devon Schudy
dak wrote: > > AFAICT it's never valid to explicitly create a score context (and ...
10 years, 4 months ago (2013-12-21 21:29:13 UTC) #5
dak
On 2013/12/21 21:29:13, Devon Schudy wrote: > dak wrote: > > Doing start_translation_timestep in mid-timestep ...
10 years, 4 months ago (2013-12-21 21:43:15 UTC) #6
pkx166h
On 21/12/13 21:28, Devon Schudy wrote: > dak wrote: >>> AFAICT it's never valid to ...
10 years, 4 months ago (2013-12-22 00:03:13 UTC) #7
dak
James <pkx166h@gmail.com> writes: > On 21/12/13 21:28, Devon Schudy wrote: >> dak wrote: >>>> AFAICT ...
10 years, 4 months ago (2013-12-22 00:09:28 UTC) #8
Devon Schudy
10 years, 4 months ago (2013-12-23 00:09:02 UTC) #9
I wrote:
> I was imagining it. [...] it never actually says it *can't* be
> explicitly created.

It's in engraver-init.ly: “You cannot explicitly instantiate a
@code{Score} context”.

David Kastrup wrote:
> > Doing start_translation_timestep in mid-timestep is unclean, though,
> > and may confuse translators that expect it to be called at the
> > beginning.
>
> How would they know the difference?  There is nothing sent to an
> implicit context before it is created.  If it did not miss any piece
> of the action, where is the problem?

They could miss earlier events from that timestep — but if no
translators care about events from before their context was created,
that doesn't matter. If a translator announces something in
start_translation_timestep (is this allowed?), other translators would
hear it in mid-timestep.

> Part of the reason to use events for about anything is the ability to
> _record_ them and reply them, like the quote iterator does.

Does it replay (or even see) timestep boundaries?

> I think I find the "start_translation_timestep will occur before
> process_music" invariant pretty important

Yeah. The CG even says so, in the engraver tutorial:
“`start_translation_timestep ()' is called before any user information
enters the translators, i.e., no property operations (\set, \override,
etc.) or events have been processed yet.”
Sign in to reply to this message.

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