lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Make tab-note-heads and fretboards use common code. (issue186268)


From: n . puttock
Subject: Make tab-note-heads and fretboards use common code. (issue186268)
Date: Sat, 23 Jan 2010 16:42:33 +0000


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 (to_boolean (changes) &&
scm_is_pair(last_fret_notes_)
scm_is_pair (

http://codereview.appspot.com/186268/diff/1/2
File lily/fretboard-engraver.cc (right):

http://codereview.appspot.com/186268/diff/1/2#newcode96
lily/fretboard-engraver.cc:96: ly_cxx_vector_to_list
(tabstring_events_),
indent (hard tabs)

(and below in ADD_TRANSLATOR ())

http://codereview.appspot.com/186268/diff/1/3
File lily/tab-note-heads-engraver.cc (right):

http://codereview.appspot.com/186268/diff/1/3#newcode81
lily/tab-note-heads-engraver.cc:81: vector<Stream_event*> string_events;
Stream_event *

http://codereview.appspot.com/186268/diff/1/3#newcode106
lily/tab-note-heads-engraver.cc:106: a string_event is generated, so if
there was no string
string-number-event

http://codereview.appspot.com/186268/diff/1/3#newcode136
lily/tab-note-heads-engraver.cc:136: SCM pos_proc = get_property
("tablatureStaffPosition");
For normal staves, we have staffLineLayoutFunction, so something similar
would be better (though tabStaffLineLayoutFunction is a bit cumbersome).

http://codereview.appspot.com/186268/diff/1/3#newcode139
lily/tab-note-heads-engraver.cc:139: for (int i=0; i < scm_to_int
(scm_length (string_fret_finger)); i++)
(int i = 0; i < scm_ilength (string_fret_finger)); i++)

http://codereview.appspot.com/186268/diff/1/3#newcode149
lily/tab-note-heads-engraver.cc:149: context ()->self_scm ());
More a general comment, but we're lacking consistency in argument
ordering for translation functions: some start with the context, whereas
others place it last.

Since you're adding a rest arg to one of the functions, perhaps we
should settle for context first for all functions.

http://codereview.appspot.com/186268/diff/1/4
File ly/engraver-init.ly (right):

http://codereview.appspot.com/186268/diff/1/4#newcode621
ly/engraver-init.ly:621: %% One may change the string tunings as
following :
follows:

http://codereview.appspot.com/186268/diff/1/6
File scm/define-context-properties.scm (right):

http://codereview.appspot.com/186268/diff/1/6#newcode353
scm/define-context-properties.scm:353: tabstring events, a boolean
defining whether to make a fretboard,
I assume you removed the boolean arg in an earlier revision.

http://codereview.appspot.com/186268/diff/1/6#newcode460
scm/define-context-properties.scm:460: note head.  Called with two
arguments: string number and a fret number
Removing the context makes this less flexible.

http://codereview.appspot.com/186268/diff/1/7
File scm/translation-functions.scm (right):

http://codereview.appspot.com/186268/diff/1/7#newcode193
scm/translation-functions.scm:193: (acons 'string-count my-string-count
'())
If details is null, then this line is equivalent to the following line.

http://codereview.appspot.com/186268/diff/1/7#newcode218
scm/translation-functions.scm:218: (map (lambda (x) (list 'mute  (1+
x)))
'mute (1+ x)

http://codereview.appspot.com/186268/diff/1/7#newcode236
scm/translation-functions.scm:236: "Convert @var{placement-list} to
string-fret list."
indentation

http://codereview.appspot.com/186268/diff/1/7#newcode284
scm/translation-functions.scm:284: (determine-frets-and-strings
indentation

(and following lines)

http://codereview.appspot.com/186268/diff/1/7#newcode287
scm/translation-functions.scm:287: (ensure-number
Default for ly:context-property instead?

http://codereview.appspot.com/186268/diff/1/7#newcode377
scm/translation-functions.scm:377: ;;; body of
determined-frets-and-strings
determine

http://codereview.appspot.com/186268/diff/1/7#newcode419
scm/translation-functions.scm:419: ((= 0 (length labels))
Need to keep context to read fretLabels

http://codereview.appspot.com/186268/diff/1/7#newcode420
scm/translation-functions.scm:420: (string (integer->char (+ fret
(char->integer #\a)))))
fret-number

(same below)

http://codereview.appspot.com/186268/diff/1/7#newcode432
scm/translation-functions.scm:432: (format "~a" fret-number)))
indent

http://codereview.appspot.com/186268/diff/1/7#newcode442
scm/translation-functions.scm:442: (number->string (cond
indent

http://codereview.appspot.com/186268/show




reply via email to

[Prev in Thread] Current Thread [Next in Thread]