Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
LilyPond wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Creating guitar scales on fretboards
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
This snippet creates fretboards with guitar scales. The syntax is \scale-diagramm #'( (string1 fret1) (string2 fret2) ... ) #notesinscale #size For example for a c pentatonic scale (first six notes) \scale-diagramm #'((5 3) (5 5 ) (4 3) (4 5) (3 2) (3 5)) #5 #1.5 you can wrap this up in a markup command for building up a list of scales cpenta = \markup \scale-diagramm #'((5 3) (5 5 ) (4 3) (4 5) (3 2) (3 5)) #5 #1.5 and use it like this c^\cpenta d f g a c The snippet doesn't show it, but the (1) position of the scale is inverted <lilypond version="2.24.0" full> %% http://lsr.di.unimi.it/LSR/Item?id=790 \paper { tagline = ##f } %here starts the snippet: % Helper function to invert first elements of scales #(define (inverted num mod) (if (zero? (modulo num mod)) (list '1 'inverted) (list (1+ (modulo num mod))))) % Expand the (string fret) pairs to valid lilypond syntax #(define (fret-from-list l1 l2 n1) (if (null? l1) l2 (fret-from-list (cdr l1) (append l2 (list (append '(place-fret) (car l1) (inverted (length l2) n1)))) n1))) % arg1 is the list of (string fret) pairs making up the scale % arg2 is the number of unique tones in the scale (i.e. 7 for major scale, 5 for pentatonic) % arg3 is a scale factor used to enlarge the fret diagram #(define-markup-command (scale-diagramm layout props arg1 arg2 arg3) (list? integer? number?) (interpret-markup layout props (markup (#:override (cons 'size arg3 ) (#:override '(fret-diagram-details . ( (finger-code . in-dot) (number-type . arabic) (label-dir . -1) (orientation . landscape) (dot-radius . 0.4) (fret-count . 8) (top-fret-thickness . 7))) #:fret-diagram-verbose (fret-from-list arg1 '() arg2)))))) cmajor=\markup\scale-diagramm #'((5 3) (5 5) (4 2) (4 3) (4 5) (3 2) (3 4) (3 5) (2 3) (2 5) (2 6) (1 3) (1 5) (1 7) (1 8)) #7 #1.0 dmajor=\markup\scale-diagramm #'((5 5) (5 7) (4 4) (4 5) (4 7) (3 4) (3 6) (3 7) (2 5) (2 7) (2 8) (1 5) (1 7) (1 9) (1 10)) #7 #1.35 cpenta=\markup\scale-diagramm #'((5 3) (5 5) (4 3) (4 5) (3 2) (3 5) (2 3) (2 6) (1 3) (1 5) (1 8)) #5 #1.7 \layout { indent = 0 } \relative c' { c d^\cmajor e f g^"c Ionic" a b c d e f g a b c r | \break d,, e^\dmajor f g a^"d Ionic" b c d e f g a b c d r | \break c,, d^\cpenta f g a^"c pentatonic" a c d f g a c | } </lilypond> [[Category:Fretted strings]] [[Category:Fretted strings]] [[Category:Scheme]] [[Category:Pitches]]
Summary:
Please note that all contributions to LilyPond wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Meta:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Creating guitar scales on fretboards
Add topic