/songmachine

Songsheet syntax documentation

MIT LicenseMIT

Songsheet

This project highlights all important aspects about the .st format and how to write a file like it.

Version: 1.3.0

Overview

Tutorial

A *.st file defines the structure of a song. Typically a song consist of different segments, we call them blocks.

Define a block like this:

[Block : Verse 1]

You can call them whatever you want, but the way you call them they will be displayed in the final pdf.

In this Block we will add some lyrics with chords as follows:

[Block : Verse 1]
[Em7] Today is [G]gonna be the day
That they're [Dsus4]gonna throw it back to [A7sus4]you

Each Chord is added in [ ] and will be align with the succeeding character.

Ok, now let's add some blocks:

[Block : Verse 1]
[Em7] Today is [G]gonna be the day
That they're [Dsus4]gonna throw it back to [A7sus4]you
    
[Block : Verse 2]
[Em7] Back beat, the [G]word is on the street
That the [Dsus4]fire in your heart is [A7sus4]out,
    
[Block : Intro]
[Em7] [G] [Dsus4] [A7sus4]

To use some blocks a few times add an order:

[Order: Intro, Verse 1, Verse 2, Verse 1]
    
[Block : Verse 1]
[Em7] Today is [G]gonna be the day
That they're [Dsus4]gonna throw it back to [A7sus4]you
    
[Block : Verse 2]
[Em7] Back beat, the [G]word is on the street
That the [Dsus4]fire in your heart is [A7sus4]out,
    
[Block : Intro]
[Em7] [G] [Dsus4] [A7sus4]

Of course it would be nice to have a headline with the title of the song.

[Title: Wonderwall - Oasis]
    
[Order: Intro, Verse 1, Verse 2, Verse 1]
    
[Block : Verse 1]
[Em7] Today is [G]gonna be the day
That they're [Dsus4]gonna throw it back to [A7sus4]you
    
[Block : Verse 2]
[Em7] Back beat, the [G]word is on the street
That the [Dsus4]fire in your heart is [A7sus4]out,
    
[Block : Intro]
[Em7] [G] [Dsus4] [A7sus4]

Annotate your sheet

 [Title: Wonderwall - Oasis]
    
[Order: Intro, Verse 1, Verse 2, Verse 1]
    
[Block : Verse 1]
[Em7] Today is [G]gonna be the day      | soft sounds | Alice solo
That they're [Dsus4]gonna throw it back to [A7sus4]you
    
[Block : Verse 2]
[Em7] Back beat, the [G]word is on the street
That the [Dsus4]fire in your heart is [A7sus4]out,
    
[Block : Intro]
[Em7] [G] [Dsus4] [A7sus4]

If you want different annotations for each appearance seperate each annotation in the order of appearance by ; like this:

[Em7] Today is [G]gonna be the day      | soft sounds ; acapella ; rock it | Alice solo

Now you need three lines of code to create your PDF:

from songsheet import SongsheetGen

if __name__ == '__main__':
    gen = SongsheetGen('Wonderwall', 'Wonderwall.pdf')
    gen.gen()

Done!

Elements

All available elements are documented here briefly.

Title, Artist, BPM, Bookreferences

All informations can be written in one block. They are separated by ;. Books can be listed with ,.

[title: Wonderwall; bpm: 100; artist: Oasis; books: songbook 1-40, songbook2 no.4]

Order

[order: block1, block2, block1]

Block

[block: ID]
block_content

Chord

Songtext blabla[Em] asfadfljk

Annotation

fooooo | annotation_cell | another annotation_cell

kind of Markdown support

to highlight specific parts following command are supported:

  • *text* : text
  • **text** : text
  • <r>text<r> : red text
  • <g>text<g> : green text
  • <b>text<b> : blue text

Goals for future Versions

  • other layouts and fonts
  • annotation-cells title
  • band logo support

Please contact me for further Ideas ;).