user-defined predefined fretboard hash-table
Hi all, the following example doesn't compile with version 2.13.38: \version 2.13.38 \include predefined-guitar-fretboards.ly #(define custom-fretboard-table-one (make-fretboard-table)) #(define custom-fretboard-table-two (make-fretboard-table default-fret-table)) \storePredefinedDiagram #custom-fretboard-table-one \chordmode { c } #guitar-tuning 3-(;3;5;5;5;3-); \storePredefinedDiagram #custom-fretboard-table-two \chordmode { c } #guitar-tuning x;3;5;5;5;o; \chords { c1 | d1 | c1 | d1 | c1 | d1 | c1 } \new Fretboards { \chordmode { \set predefinedDiagramTable = #default-fret-table c1 | d1 | \set predefinedDiagramTable = #custom-fretboard-table-one c1 | d1 | \set predefinedDiagramTable = #custom-fretboard-table-two c1 | d1 | } \set predefinedDiagramTable = #default-fret-table c e g c'1 } \new Staff { \clef treble_8 \chordmode { c1 | d1 | c1 | d1 | c1 | d1 | c1 } { s1_\markup Default table | s1 | s1_\markup \column {New table from empty} | s1 | s1_\markup \column {New table from default} | s1 | } } I compared the files in the patch on Rietveld (issue 2208048) with the files in 2.13.38 and found differences: declarations-init.ly Rietveld: #(define default-fret-table (make-hash-table 101)) #(define chord-shape-table (make-hash-table 29)) 2.13.38 #(define default-fret-table (make-hash-table 100)) #(define chord-shape-table (make-hash-table 100)) predefined-fretboards-init.ly Rietveld % scheme function for copying/creating fretboard tables #(define (make-fretboard-table . rest) Create a new fretboard table. @code{rest} is an optional table name. If present, the new fretboard table starts as a copy of the fretboard table @code{rest}. (if (null? rest) (make-hash-table 101) (let ((source-table (car rest))) (hash-fold (lambda (key value tab) (hash-set! tab key value) tab) (make-hash-table 101) source-table 2.13.38 -- [There is no such function defined] With these two changes the example compiles with 2.13.38 but I get some strange results (no fretboards and weird chord names). See file attached. Is this a bug or did I do anything wrong? Thanks for your help patrick inline: fretboards-alternate-tables.png ___ bug-lilypond mailing list bug-lilypond@gnu.org http://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: user-defined predefined fretboard hash-table
On 11/12/10 5:32 AM, Patrick Schmidt p.l.schm...@gmx.de wrote: Hi all, the following example doesn't compile with version 2.13.38: [...] With these two changes the example compiles with 2.13.38 but I get some strange results (no fretboards and weird chord names). See file attached. Is this a bug or did I do anything wrong? This looks like a bug. I will track it down today. Thanks for the report. Carl ___ bug-lilypond mailing list bug-lilypond@gnu.org http://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: Doc: NR 2.1.2 Lyrics and repeats, improvement proposals
Bernard Hurley wrote: It may well be an accident, but it is an incredibly helpful trick. I wish I had known it earlier. I think it should be officially part of lily i.e. it should be documented and maybe there should be a regression test for it. It should be noted, though, that there's a problem if you try to use the same trick several times on the same score line, see the example below. If there's a line break in between, no such problems appear. This is related to Issue 127 (perhaps also to the recently discussed Issue 1309, though I haven't followed that thread in detail). In practical scores, it seems fairly unlikely that these problems show up. \score { \new Staff { \new Voice = melody { \relative c'' { a4 a a a \repeat volta 2 { b4 b b b } a4 a a a \repeat volta 2 { b4 b b b } } } } \new Lyrics \lyricsto melody { Not re -- peat -- ed. { The first time words. } \new Lyrics { \set associatedVoice = melody Sec -- ond time words. } Not re -- peat -- ed. { The first time words. } \new Lyrics { \set associatedVoice = melody Sec -- ond time words. } } } /Mats ___ bug-lilypond mailing list bug-lilypond@gnu.org http://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: user-defined predefined fretboard hash-table
On 11/12/10 5:32 AM, Patrick Schmidt p.l.schm...@gmx.de wrote: With these two changes the example compiles with 2.13.38 but I get some strange results (no fretboards and weird chord names). See file attached. Apparently I pushed the wrong commit when I added the custom fretboards. I'm in the midst of a make doc before I push the correct commit. It should be fixed in 2.39. The missing fretboards comes from a typo in your code. It should be \new FretBoards not \new Fretboards. There was a warning message that pointed this out. HTH, Carl ___ bug-lilypond mailing list bug-lilypond@gnu.org http://lists.gnu.org/mailman/listinfo/bug-lilypond
Re: user-defined predefined fretboard hash-table
It's now pushed to git, and it works properly for me. Thanks for checking, Carl ___ bug-lilypond mailing list bug-lilypond@gnu.org http://lists.gnu.org/mailman/listinfo/bug-lilypond