Skip to content

fourstringmate/strum-pattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

strum-pattern

Utility to generate common strumming diagrams for both guitars and ukuleles.

System Requirements

Usage

Invoke the following command to generate its strumming diagram:

$ strum-pattern D-DU-_U-DU

You will get D-DU-_U-DU.png in your working directory.

Strumming Notation

The notation is intentionally lightweight and focuses on playing intent rather than strict musical representation.

Basic Symbols

  • D — downward strum
  • U — upward strum
  • R — rest (no sound)
  • _ — continuation (sustain the previous sounding note)

Structure

  • - separates rhythm cells within a measure
  • Each cell has equal metrical weight
  • The number of characters inside a cell determines its subdivision:
    • D → quarter note
    • DU → eighth notes
    • DUU → triplets
    • DUDU → sixteenth notes
    • etc.

In other words, a cell defines how a beat is subdivided, not just a single note.

Examples

  • D-D-D-D
  • D-D-DU-DU
  • RU-RU-RU-RU (rest)
  • D-D-D-_ (sustained note, equivalent to a longer duration)
  • D_DU-DU-D_DU-DU (sixteenth feel)
  • D-DU-_U-DU (tie-like continuation)
  • D_U-D_U-D_U-D_U (swing feel)

About _ (Continuation)

The _ symbol indicates that the previous sounding note continues.

The exact musical representation is inferred automatically:

  • If the continuation can be expressed as a single longer note, it will be merged
  • Otherwise, it will be rendered as tied notes

This means users do not need to explicitly specify ties or note durations —
the program derives them from the pattern.

Command-Line Parameters

  • -v or --version to show version info and exit
  • -h or --help to show help message and exit
  • -o or --output to specify the output file name
  • -s or --size to specify the size of a fretboard diagram
  • -ly or --lilypond to generate the corresponding LilyPond code instead

Limitation

To keep the notation compact and the evaluator easy to understand, the current design intentionally focuses on common strumming patterns.

Some trade-offs come with that choice:

  • Rhythm is inferred from the length of each cell rather than from a fully explicit grammar
  • _ represents continuation, and its exact rendering (merge vs. tie) is inferred automatically
  • Only common merge cases are modeled explicitly; uncommon rhythmic combinations may fall back to tied notes
  • Sextuplet subdivision (6-way subdivision) is not supported
  • Time signature inference is simplified and currently assumes a /4-based result
  • The evaluator renders directly to LilyPond instead of using a separate intermediate representation

For more complex rhythms or precise control, you can generate the LilyPond code and refine it manually.

Contribute

Welcome to package the program into some installable format like a Chocolatey package or a Homebrew package.

Other contributions are welcome as well.

Copyright

The program itself is licensed under MIT.

You keep your own strumming diagrams or LilyPond code generated by the program in any license you prefer.

About

Generate Common Strumming Diagrams for Guitars and Ukuleles

Topics

Resources

License

Stars

Watchers

Forks

Contributors