Hi everybody, here's a patch that should allow users to stop worrying about whether to ...
14 years, 6 months ago
(2010-10-28 11:33:10 UTC)
#1
Hi everybody,
here's a patch that should allow users to stop worrying about whether to include
fretboard diagrams before or after choosing the note names language.
I've updated the docs accordingly; hopefully there are no other .ly optional
init files that rely on hardcoded note names (bagpipe.ly is basically a language
file of its own). Please let me know if there are other caveats I overlooked.
Cheers!
Valentin.
Valentin, This looks good to me, but I haven't run make check on it yet. ...
14 years, 6 months ago
(2010-10-28 13:11:06 UTC)
#2
Valentin,
This looks good to me, but I haven't run make check on it yet. It certainly
shouldn't be pushed without make check being run.
The technique of saving the language at the top of a file to be included and
restoring it at the bottom should be documented, so people know to do it. It
would be nice if we could write a music function to do so, but that would delay
the evaluation of the #(set! ), so I don't think we can.
Thanks,
Carl
On Thu, Oct 28, 2010 at 3:11 PM, <Carl.D.Sorensen@gmail.com> wrote: > This looks good to ...
14 years, 6 months ago
(2010-10-28 15:46:58 UTC)
#3
On Thu, Oct 28, 2010 at 3:11 PM, <Carl.D.Sorensen@gmail.com> wrote:
> This looks good to me, but I haven't run make check on it yet. It
> certainly shouldn't be pushed without make check being run.
You're quite right.
***testing...***
OK, make check doesn't complain, and there's no difference with the
baseline (only test-output-distance is changed, which is the expected
behavior).
> The technique of saving the language at the top of a file to be included
> and restoring it at the bottom should be documented, so people know to
> do it. It would be nice if we could write a music function to do so,
> but that would delay the evaluation of the #(set! ), so I don't think we
> can.
Indeed. I tried to modify the storePredefinedDiagram macro instead,
but setting and unsetting pitchnames for every single diagram was
overkill in comparison.
I think this solution is the simplest and the most straightforward one.
Cheers,
Valentin.
LGTM. (for clarity: none of the comments made so far will force a second draft, ...
14 years, 6 months ago
(2010-10-29 06:17:52 UTC)
#5
LGTM.
(for clarity: none of the comments made so far will force a second draft, so if
nobody has a complaint in the next 5 hours, you're good to push it)
http://codereview.appspot.com/2791041/diff/1/ly/predefined-guitar-fretboards.ly
File ly/predefined-guitar-fretboards.ly (right):
http://codereview.appspot.com/2791041/diff/1/ly/predefined-guitar-fretboards....
ly/predefined-guitar-fretboards.ly:20: #(set! pitchnames default-language)
Cool! Is there any way to make this easy for normal users to use? (then again,
can we think of any case where a composer would want to be switching input
languages? not in normal circumstances, but would anybody ever want to define
some music to be used in a \include file ? ... hmm, that seems a bit
far-fetched. ok, ignore this idea)
OK, will push. http://codereview.appspot.com/2791041/diff/1/ly/predefined-guitar-fretboards.ly File ly/predefined-guitar-fretboards.ly (right): http://codereview.appspot.com/2791041/diff/1/ly/predefined-guitar-fretboards.ly#newcode20 ly/predefined-guitar-fretboards.ly:20: #(set! pitchnames default-language) On 2010/10/29 06:17:52, ...
14 years, 6 months ago
(2010-10-29 08:11:00 UTC)
#6
OK, will push.
http://codereview.appspot.com/2791041/diff/1/ly/predefined-guitar-fretboards.ly
File ly/predefined-guitar-fretboards.ly (right):
http://codereview.appspot.com/2791041/diff/1/ly/predefined-guitar-fretboards....
ly/predefined-guitar-fretboards.ly:20: #(set! pitchnames default-language)
On 2010/10/29 06:17:52, Graham Percival wrote:
> Cool! Is there any way to make this easy for normal users to use? (then
again,
> can we think of any case where a composer would want to be switching input
> languages? not in normal circumstances, but would anybody ever want to define
> some music to be used in a \include file ? ... hmm, that seems a bit
> far-fetched. ok, ignore this idea)
Hmm. At most, we could just document that in order to include a file with
another language, one has to do:
\language "newlanguage"
\include "my_included_file.ly"
\language "previouslanguage"
Also note that unlike \include "blah.ly", \language may even be used inside a
music expression!
(BTW: In these fretboard files, I'm not actually using \language since I don't
need to change the parser's note names, but merely the pitchnames definition
that's used by chordmode.)
14 years, 6 months ago
(2010-10-29 08:54:54 UTC)
#7
http://codereview.appspot.com/2791041/diff/1/ly/predefined-guitar-fretboards.ly
File ly/predefined-guitar-fretboards.ly (right):
http://codereview.appspot.com/2791041/diff/1/ly/predefined-guitar-fretboards....
ly/predefined-guitar-fretboards.ly:20: #(set! pitchnames default-language)
On 2010/10/29 08:11:00, Valentin Villenave wrote:
> (BTW: In these fretboard files, I'm not actually using \language since I
> don't need to change the parser's note names, but merely the pitchnames
> definition that's used by chordmode.)
I think you should add a comment to this effect for these files, just in case
somebody looks at them and wonders why.
Issue 2791041: Allow predefined diagrams regardless of note names language.
(Closed)
Created 14 years, 6 months ago by Valentin Villenave
Modified 14 years, 6 months ago
Reviewers: carl.d.sorensen_gmail.com, Trevor Daniels, Graham Percival (old account), Neil Puttock
Base URL:
Comments: 3