Skip to content

Advanced Features

This guide covers advanced Gen features: swing feel, pickup measures, and special accidentals.

Swing Feel

Add swing to your score with the swing metadata field:

---
title: Jazz Tune
time-signature: 4/4
swing: /
---
C/ D/ E/ F/ G/ A/ B/ ^C/

Swing Options

ValueEffect
/Swing eighth notes (standard jazz swing)
//Swing sixteenth notes (funk/fusion style)

How Swing Works

With eighth note swing (/), pairs of eighth notes are played with a long-short feel instead of evenly:

  • Straight: ta-ta ta-ta ta-ta ta-ta
  • Swing: ta--ta ta--ta ta--ta ta--ta (triplet feel)
---
swing: /
---
# These eighth notes will swing
C/ D/ E/ F/ G/ A/ B/ ^C/

Swing Examples

---
title: Blues Riff
time-signature: 4/4
key-signature: F
swing: /
---
F/ A/ ^C/ A/ F/ A/ ^C/ A/
Bb/ D/ F/ D/ Bb/ D/ F/ D/
F/ A/ ^C/ ^Eb/ ^D/ ^C/ A/ F/

Pickup Measures

Pickup measures (anacrusis) are incomplete measures at the beginning of a piece. Mark them with @pickup:

---
title: Oh When The Saints
time-signature: 4/4
---
@pickup C/ D/ E/ F/
Go $ E/ D/
Co $ $ $

The @pickup annotation tells the compiler to skip duration validation for that measure.

Pickup Examples

---
title: Beethoven's Fifth
time-signature: 2/4
---
@pickup [G G G]3/
Ebp*
@pickup [F F F]3/
Dp*
---
title: Star-Spangled Banner
time-signature: 3/4
key-signature: Bb
---
@pickup F/ D/
Bbp D F
^Bbp* ^A/ ^G

Where to Place @pickup

Put @pickup at the beginning of the measure:

@pickup D/ E/ # Correct
D/ E/ @pickup # Wrong - parser may not recognize it

Force Natural Accidental

Use % to force a natural sign, overriding the key signature:

---
key-signature: G # F is sharp
---
F G A B # F is automatically F#
F% G A B # F is forced natural (F♮)

When to Use %

  1. Canceling key signature accidentals:
---
key-signature: F # B is flat
---
B C D E # B is automatically Bb
B% C D E # B natural
  1. Courtesy accidentals: Even if a note would be natural anyway, % explicitly shows it:
---
key-signature: C
---
F# G A B% # B% is courtesy natural after F#

Natural vs. Flat/Sharp

  • Fb gives you F flat (enharmonic to E)
  • F% gives you F natural (cancels key signature)

In G major (where F is sharp):

  • F = F# (follows key signature)
  • F% = F natural
  • Fb = F flat (rare, but valid)

Combining Features

You can combine these features:

---
title: Jazz Pickup
time-signature: 4/4
key-signature: Bb
swing: /
---
@pickup [D/ E/ F/]3
Gp* F/ E/
Dp* C/ Bb/
F%/ G/ A/ Bb/ A/ G/ F/ E/

Summary

FeatureSyntaxPurpose
Swing eighthsswing: /Jazz feel on eighth notes
Swing sixteenthsswing: //Funk feel on sixteenth notes
Pickup measure@pickupIncomplete first measure
Force natural%Cancel key signature accidental

Next Steps