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

Issue 186268: Make tab-note-heads and fretboards use common code. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 3 months ago by Carl
Modified:
14 years, 2 months ago
Reviewers:
Neil Puttock
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Make tab-note-heads and fretboards use common code. This combines the string and fret assigning code of the tab-note-heads engraver and the fret-boards engraver. Both will use scheme procedures defined in scm/translation-functions.scm and specified by context properties initialized in ly/engraver-init.ly * Modify the calling sequence of noteToFretFunction so that it takes a context, a note-list, a string-list, and an optional grob. If grob is included, noteToFretFunction will add the fretboard to the grob. If grob is not included, noteToFretFunction will return a list of (string fret finger) tuples. * Refactor the code in scm/translation-functions.scm to support this separation of function. * predefinedDiagramTable is now a context property for TabStaff as well as for FretBoards. This means that if a chord is present in TabStaff, and predefinedDiagramTable for that TabStaff is not #f, and a predefined diagram for the chord exists, the TabStaff will display the notes of the predefined diagram. * Change tab-note-heads-engraver so that it calls noteToFretFunction instead of having the fret calculation code inside the engraver. * Change the noteToFretFunction calling sequence in fretboard-engraver to match the new definition

Patch Set 1 #

Total comments: 41

Patch Set 2 : Respond to Neil's comments and fix bugs #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+268 lines, -238 lines) Patch
M lily/context-scheme.cc View 4 chunks +9 lines, -6 lines 1 comment Download
M lily/fretboard-engraver.cc View 1 4 chunks +15 lines, -16 lines 0 comments Download
M lily/note-heads-engraver.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M lily/tab-note-heads-engraver.cc View 1 3 chunks +56 lines, -51 lines 0 comments Download
M ly/engraver-init.ly View 1 2 chunks +4 lines, -2 lines 0 comments Download
M ly/property-init.ly View 1 chunk +2 lines, -2 lines 0 comments Download
M scm/define-context-properties.scm View 1 2 chunks +9 lines, -4 lines 0 comments Download
M scm/translation-functions.scm View 1 7 chunks +170 lines, -154 lines 0 comments Download

Messages

Total messages: 10
Neil Puttock
http://codereview.appspot.com/186268/diff/1/2 File lily/fretboard-engraver.cc (left): http://codereview.appspot.com/186268/diff/1/2#oldcode100 lily/fretboard-engraver.cc:100: SCM changes = get_property("chordChanges"); get_property ( http://codereview.appspot.com/186268/diff/1/2#oldcode101 lily/fretboard-engraver.cc:101: if ...
14 years, 3 months ago (2010-01-23 16:42:33 UTC) #1
Carl
Neil, Thanks for the careful review. I think I've dealt with everything, but there is ...
14 years, 3 months ago (2010-01-24 01:36:35 UTC) #2
Neil Puttock
On 2010/01/24 01:36:35, Carl wrote: > I think I've dealt with everything, but there is ...
14 years, 3 months ago (2010-01-26 01:59:04 UTC) #3
c_sorensen
On 1/25/10 6:59 PM, "n.puttock@gmail.com" <n.puttock@gmail.com> wrote: > On 2010/01/24 01:36:35, Carl wrote: > >> ...
14 years, 3 months ago (2010-01-26 13:05:42 UTC) #4
Carl
OK, so I added the optional default to ly:context-property, and fixed the indentation. make check ...
14 years, 3 months ago (2010-01-28 04:42:34 UTC) #5
Carl
I've found a bug in this code that showed up with the latest changes in ...
14 years, 3 months ago (2010-01-28 06:12:56 UTC) #6
Carl
I've found a bug in this code that showed up with the latest changes in ...
14 years, 3 months ago (2010-01-28 06:13:27 UTC) #7
Carl
The patch set now seems to be complete. I've responded to Neil's comments, and regression ...
14 years, 3 months ago (2010-01-29 06:26:04 UTC) #8
Neil Puttock
Hi Carl, I've just tested this, and it breaks two regtests: 1) dead-notes.ly The \deadNote ...
14 years, 3 months ago (2010-01-30 18:44:15 UTC) #9
c_sorensen
14 years, 3 months ago (2010-01-30 18:52:58 UTC) #10


On 1/30/10 11:44 AM, "n.puttock@gmail.com" <n.puttock@gmail.com> wrote:

> Hi Carl,
> 
> I've just tested this, and it breaks two regtests:
> 
> 1) dead-notes.ly
> 
> The \deadNote command inside a chord is ignored (i.e., the tabs appear
> as numbers rather than crosses).  Replacing \deadNote with \tweak also
> fails.

I saw this earlier, but my last regtest check didn't show it up.  I wonder
what I'm doing wrong with my regtest running.

I never fixed the deadNote error; when the regtest run came back clean I
forgot about it.

> 
> 2) tablature-harmonic.ly
> 
> The harmonic brackets have disappeared.  Weirdly, if you move the
> \harmonic command between the notes in the chord, both heads get
> harmonics.

I'll check it out.

> 
> Regards,
> Neil
> 
> 
> http://codereview.appspot.com/186268/diff/3011/3012
> File lily/context-scheme.cc (right):
> 
> http://codereview.appspot.com/186268/diff/3011/3012#newcode97
> lily/context-scheme.cc:97: " If @var{def} is given, and property value
> is SCM_EOL,"
> SCM_EOL will be unfamiliar to most users

Thanks, I'll fix it.

Carl

Sign in to reply to this message.

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