MacNeil Guitar Lessons
1260 Spears Rd. Unit 9 (Oakville ON)
905 334 5092





These are the current functions used for our guitar scores.
Click on any of the music to get the source code I used in lilypond.
All my code as well as other useful code is freely available in Guitar-current.tar

View or download guitar-current-example.pdf
Download Guitar-current.tar

Added: Arrastres function.
Usage: \Arrastres #2 fis {\stemUp c'8}

Click here for an example

New are my quarter bend markups for Tab. Quarter tone bends were possible without tab with my altered definitions.ily file called

Now with tab using my QT_BendDef.ily or QT_BendDef_M.ily
View QT_BendDef-Example.pdf
View QT_BendDef-Example_M.pdf


chordSlur and chordBend - slurs to one note in a chord and bending in a chord.
View chordSlur-chordBend.pdf

Gslide --Slides for Guitar
View Gslide-current.pdf

Functions available in Guitar-current.tar

Stem Position

Move stem when using \stemDown g2 \st g. Used in older scores such as Sor.

Dot Position

Move dot when using \dp g4. r8 r2

Tuplet Brackets\Numbers

No brackets when using
\once \nb \tuplet 2/3 {c4 c c}
No Number when using
\once \nn \tuplet 2/3 {c4 c c}

Tuplet Group

Divide the tuplet grouping with
\tuplet 3/2 {\dt 16 [e gis b e gis]}
And no number with
\tuplet 3/2 {\dt \once \nn 16 [e gis b e gis]}


A pivot marking is indicated with ^\markup \piv

The "" quotes are at the end to give pivot finger or text if you like. Well not really I just modified another function to work and never fixed it.

Cautionary Brackets

Some guitar scores use brackets around cautionary notes not parenthesis. Used
cis c? \brc c?

Moving a String(s)

Sometimes in a score it's nice to be able to move the stringnumber.
Do this like \MoveString #'(-2.5 . 3.2)

Moving a Finger(s)

Or the fingering
\MoveFinger #'(-2 . 3.2)

More Complex Example

Stings and fingers
\MoveFinger #'(# . #) \MoveString #'(# . #)

Pad some text

Just pad 2.5
\pad ^\markup \piv ""

Padded Position Markings

^\markup \pos "I"

Padded Partial Bar

^\markup \bbar "V"

Padded Full Bar

^\markup \fbar "III"

Different Bar Spanners... Why 2?

\fbarSpanB and \bbarSpanB are the default spanners that I use all the time, even when it's not breakable. \fbarSpan and \bbarSpan have a shorter end (less padding at the end). I use these when two spanners are together.

Full Bar Spanner

\fbarSpan "III" {a'-2 c-1f-1 d-4}

Full Bar Spanner Breakable

\fbarSpanB "V" { a4. a a ....}

Half Bar Spanner

\bbarSpan "III" {d-1 f-4 e-3 d-1}

Half Bar Spanner Breakable

\bbarSpanB "V" { a4. a a ....}

Picking / Strumming

I prefer the newer style, students understand it more when I teach. Picking / Strumming (in North America) is usually indicated with traditional bow indications . However a modern approach which tends to work better and one that many have adopted through the years, allows you to follow the arrow in the direction that you strum . Unlike the traditional method.

Still a work in progress works for all without brackets using \lt and \rt. With brackets \armw (whole note) \armh (half note) and \armws (smaller whole note bar) are supported.


Lots of older guitar music have tuplets as a curved mark with a 3 not a bracket.

To have the tuplet position above use
\tupslurU \tuplet 3/2 {16 }
for down use
\tupslurD \tuplet 3/2 {16 d d}

Guide / Shift Fingers

Use \gf #-.1 #5 -1 fist number is raise up or down, negative is lower so -.1 is lower .1. Second number is angle based on pixels. Then finally the finger -1


The harmonics used to demonstrate on the lilypond website are wrong for modern standard notation. Use \hamonic for whole and half notes but for the rest use \harmOn b4 \harmOff.


\HarmSpan "XII"{ <b-0\2\harmonic>1 b2\harmonic \harmOn <b>4 b b8 b8 b16 b b b b4 b \harmOff}b b <b'\harmonic-0\1>2^\markup \Harm "VII"

String Spanners

Sometimes you need a string spanner with an end (it looks nice). But other times (when using two for example) it takes up to much room. It's also nice to have them above the staff or under the staff. Or both.

Start the string spanner with ^\StSpanUe to have the end.^\StSpanUe is no end._\StSpanDe is down with an end and _\StSpanD is down with no end. End the string spanner with \endStringNum.

<<{e4^\StSpanU #2 f g a\endStringNum}\\{c,4_\StSpanD #3 d e f \endStringNum}>>


Rhythm without heads makes it easy to read. It's used in a lot of band scores and Rock lead sheets. Great for teaching!

Use \headsOff \headsON taken from


The definitions.ily file has been modified so there is no tab.

Look at the for usage.


The file contains all the swing markups. In addition the swing.scm file allows midi to be played in swing.

Look at the for usage.

Accent Dynamics:

Accent Dynamics were used often in the past to indicate an accent. Using a short diminuendo hairpin over one note. To recreate these use ^\acdy #-2.5. The Number is the length.
-\tweak bound-padding #4.0
works in some cases but has limitations.

\fing, \Over and \TabBook:

\fing and \Over are used to set certain variables in the score.\TabBook does the same but for tab. Have a look in guitar-current.ily to see if you need them.

Guitar slides:

Guitar slides in lilypond can be created using \Gslide #0 #0 #0 #0 #0 note \bendAfter #1 -- The number on bendAfter has no effect but needs it to work. Works in tab as well!

lower/raise - +, rotate, Distance-From-Note, Note-distance, length

Tab Shortcuts:

The thing with tab is that if you move positions you have to indicate this some way. Using strings is one eg. e on the second string would be e\2. to do this for every not is laborious. It also prints the strings for every note you moved. You can set \override StringNumber.stencil = ##f but then all your string indications are gone.

Alternatively you can use \set minimumFret = # but then with open strings or closed you need \set TabStaff.restrainOpenStrings = ##f and \set TabStaff.restrainOpenStrings = ##t. To much typing.

Use \tfp # instead of \set minimumFret = #
Use \tfo instead of \set TabStaff.restrainOpenStrings = ##f
Use \tfc instead of \set TabStaff.restrainOpenStrings = ##t
\PtabNote instead of \once \override TabStaff.TabNoteHead.display-cautionary = ##t

Quarter tone bends:

With QT_BendDef.ily and QT_BendDef_M.ily it allows the markup of accidentals in the staff as well as the bend indications ¼ ½ ¾ . In QT_BendDef.ily there is no need to indicate ½ bends, but you must in QT_BendDef_M.ily. The advantage of QT_BendDef_M.ily is better alignment, the disadvantage is a little more to type. Refer to the example files.

Known Issue: QT_BendDef and QT_BendDef_M are markup functions that replace the original markup. So if staff size is changed then the markup will be slightly off.

Solution: Change the offset - the README file explains where to look for changes.

Done using QT_BendDef_M.ily

chordSlur: In guitar a slur is to a specific note. However, lilypond slurs to the chord. \chordSlur fixes this.


\chordSlur is for Staff.
\chordSlur #0 #0 #0 #0 #0 #rotate-slur, #x, #y #curve #length

\chordSlurT is for Staff and TabStaff.
\chordSlurT #0 #0 #0 #0 #0 #0 #0 #0 #0 #0 #Staff-rotate-slur, #Staff-x, #Staff-y #Staff-curve #Staff-length #TabStaff-rotate-slur, #TabStaff-x, #TabStaff-y #TabStaff-curve #TabStaff-length

chordBend: for moving the bends.


\chordBend #rotate #x #y move bend.
\mvTabNote #x move Tab note left or right. Used above as well.