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 Tunetime-signature: 4/4swing: /---
C/ D/ E/ F/ G/ A/ B/ ^C/Swing Options
| Value | Effect |
|---|---|
/ | 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 swingC/ D/ E/ F/ G/ A/ B/ ^C/Swing Examples
---title: Blues Rifftime-signature: 4/4key-signature: Fswing: /---
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 Saintstime-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 Fifthtime-signature: 2/4---
@pickup [G G G]3/Ebp*@pickup [F F F]3/Dp*---title: Star-Spangled Bannertime-signature: 3/4key-signature: Bb---
@pickup F/ D/Bbp D F^Bbp* ^A/ ^GWhere to Place @pickup
Put @pickup at the beginning of the measure:
@pickup D/ E/ # CorrectD/ E/ @pickup # Wrong - parser may not recognize itForce 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 %
- Canceling key signature accidentals:
---key-signature: F # B is flat---
B C D E # B is automatically BbB% C D E # B natural- 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
Fbgives 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 naturalFb= F flat (rare, but valid)
Combining Features
You can combine these features:
---title: Jazz Pickuptime-signature: 4/4key-signature: Bbswing: /---
@pickup [D/ E/ F/]3Gp* F/ E/Dp* C/ Bb/F%/ G/ A/ Bb/ A/ G/ F/ E/Summary
| Feature | Syntax | Purpose |
|---|---|---|
| Swing eighths | swing: / | Jazz feel on eighth notes |
| Swing sixteenths | swing: // | Funk feel on sixteenth notes |
| Pickup measure | @pickup | Incomplete first measure |
| Force natural | % | Cancel key signature accidental |
Next Steps
- Examples — See these features in complete scores
- Metadata Reference — All metadata options
- Compiler Reference — Technical details