|
From: | Carl Sorensen |
Subject: | Re: alternate fretboard table |
Date: | Tue, 28 Sep 2021 16:47:02 +0000 |
User-agent: | Microsoft-MacOutlook/10.10.1b.201012 |
From:
lilypond-user <lilypond-user-bounces+carl.d.sorensen=gmail.com@gnu.org> on behalf of Gary Brookman <GaryBrookman@outlook.com> I'm a complete Lilypond neophyte, so please excuse me if I'm missing the basics.
Welcome! We love to have new people getting into LilyPond! And as one who was responsible for much of the fretboard architecture and implementation, I’m always happy to see others using this work. I am learning to play rhythm to jazz standards. A friend is an expert on voicings used in big band and swing settings, and none of these are in the predefined fretboard
table. After some reading, what makes sense to me is to create an alternative fretboard table with just the voicings I want. To that end I tried: % Make a blank new fretboard table
#(define swing-fretboard-table (make-fretboard-table)) % Add a new chord shape \addChordShape #'sixthstring #guitar-tuning #"8-2;7-1;9-3;x;x;x;" % add a three note c with root on the sixth string \storePredefinedDiagram #swing-fretboard-table \chordmode { c } #guitar-tuning #(chord-shape 'sixthstring guitar-tuning) mychords = \chordmode { c c' c'' } << \context ChordNames
{ \mychords } \context FretBoards
{ \mychords } >> Not successful.
1.
is this a good approach to the problem? This is a good general approach, but the specifics aren’t right.
2.
Even if not, why doesn't this approach work for this one chord?
3.
What's the best way to get up to speed on LilyPond? The best way to get up to speed, in my opinion, is to do the following:
In this particular case, going to the Notation Reference fretted strings section, and following the links from the See Also got me to this snippet: This shows how to add a new fretboard table and use it. \include "predefined-guitar-fretboards.ly" % Make a blank new fretboard table #(define custom-fretboard-table-one (make-fretboard-table)) % Make a new fretboard table as a copy of default-fret-table #(define custom-fretboard-table-two (make-fretboard-table default-fret-table)) % Add a chord to custom-fretboard-table-one \storePredefinedDiagram #custom-fretboard-table-one \chordmode {c} #guitar-tuning "3-(;3;5;5;5;3-);" % Add a chord to custom-fretboard-table-two \storePredefinedDiagram #custom-fretboard-table-two \chordmode {c} #guitar-tuning "x;3;5;5;5;o;" << \chords { c1 | d1 | c1 | d1 | c1 | d1 | } \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 | } } \new Staff { \clef "treble_8" << \chordmode { c1 | d1 | c1 | d1 | c1 | d1 | } { s1_\markup "Default table" | s1 | s1_\markup \column {"New table" "from empty"} | s1 | s1_\markup \column {"New table" "from default"} | s1 | } >> } >> I know #3 isn't necessarily straight forward, but this is what I've experienced so far. There is a wealth of information available, but not in a form I'm used to digesting.
I'm a retired programmer and late in my career I picked up python. I could search for any aspect of the language and find all sorts of help. I'm not finding that with Lilypond. For instance, the learning manual and Youtube videos show the syntax for only the
most basic of use cases. But when I see I need addChordShape and search for it I find the definition: \addChordShape [void] - key-symbol (symbol) tuning (pair) shape-definition (string or pair) and a use case: \addChordShape #'powerf #guitar-tuning "1-1;3-3;3-4;x;x;x;" But what does symbol refer to? what's the # and ' for?
Symbol is a Scheme variable. The # puts you from lilypond mode into Scheme mode. The
' is how you get the name of the symbol, rather than evaluating the symbol, in Scheme. These are discussed in the Learning Manual. (# is discussed at
http://lilypond.org/doc/v2.22/Documentation/learning/tweaking-methods#the-override-command
; ' is discussed at http://lilypond.org/doc/v2.22/Documentation/learning/properties-found-in-interfaces
). This is why you need to read the Learning Manual. I think I know now, but that's from tons of searching and reading. I would expect that to be an introduction article. I'm sure it's out there and I just missed it. Is there
a tutorial or article that provides the glue that ties together all the components that comprise this environment and how they interface?
The Learning Manual. Note that \chordmode{c} and \chordmode{c’} produce the same set of pitches, for historical reasons that I’m not sure I completely understand. So c and c’ will produce the same fretboard in your example, but
c’’ will not. Putting this all together with your code, we do the following: \version "2.20" % Make a blank new fretboard table
#(define swing-fretboard-table (make-fretboard-table)) % Add a new chord shape \addChordShape #'sixthstring #guitar-tuning #"8-2;7-1;9-3;x;x;x;" % add a three note c with root on the sixth string \storePredefinedDiagram #swing-fretboard-table \chordmode { c } #guitar-tuning #(chord-shape 'sixthstring guitar-tuning) % add a three-note d with root on the sixth string \storePredefinedDiagram #swing-fretboard-table \chordmode { d } #guitar-tuning #(offset-fret 2
(chord-shape 'sixthstring guitar-tuning)) % add a three-note b with root on the sixth string \storePredefinedDiagram #swing-fretboard-table \chordmode { b } #guitar-tuning #(offset-fret -2
(chord-shape 'sixthstring guitar-tuning)) mychords = \chordmode { c c' c'' d b } << \context ChordNames
{ \mychords } \context FretBoards % you can use the \with syntax by uncommenting the next line % \with {predefinedDiagramTable = \swing-fretboard-table} { % Set the new fretboard table to be the default table % or you can use the \set format by uncommenting the next line %\set predefinedDiagramTable = #swing-fretboard-table \mychords
} >> Hope this has been helpful, Carl |
[Prev in Thread] | Current Thread | [Next in Thread] |