Browse Source

Ajout d'exemples

pull/3/head
Louis 11 years ago
parent
commit
0c4aa8b2a7
  1. 3
      examples/README
  2. 16
      examples/example.sb
  3. 3
      examples/img/README
  4. BIN
      examples/img/treble_a.png
  5. 1
      examples/latex/README
  6. 1
      examples/songs/README
  7. 26
      examples/songs/_lilypond/header
  8. 70
      examples/songs/chevaliers_de_la_table_ronde.sg
  9. 6
      examples/songs/example-en.sg
  10. 10
      examples/songs/example-fr.sg
  11. 21
      examples/songs/greensleeves.ly
  12. 150
      examples/songs/greensleeves.sg
  13. BIN
      examples/songs/traditionnel.jpg
  14. 19
      examples/songs/vent_frais.sg
  15. 1
      examples/templates/README
  16. 154
      examples/templates/default.tmpl

3
examples/README

@ -0,0 +1,3 @@
Run the following command to build an example song book.
$ PATH/TO/songbook.py example.sb

16
examples/example.sb

@ -0,0 +1,16 @@
{
"template" : "default.tmpl",
"bookoptions" : [
"importantdiagramonly",
"repeatchords",
"lilypond",
"pictures"
],
"booktype" : "chorded",
"lang" : "french",
"songs" : "all",
"authwords" : {
"sep" : ["and", "et"]
},
"datadir" : "."
}

3
examples/img/README

@ -0,0 +1,3 @@
This repository is automatically included as LaTeX graphics path. That is, any
image in this directory can be included in your LaTeX document specifying only
its base name.

BIN
examples/img/treble_a.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

1
examples/latex/README

@ -0,0 +1 @@
This directory is automatically included in LaTeX path. Thus you can add custom modules in it.

1
examples/songs/README

@ -0,0 +1 @@
Songs, as .sg files, are expected to be in this directory.

26
examples/songs/_lilypond/header

@ -0,0 +1,26 @@
#(use-modules (guile-user))
\version "2.14.2"
\paper
{
make-header=##f
%make-footer=##f
oddFooterMarkup = \markup { \fill-line {} }
page-top-space = 0\cm
head-separation = 0\cm
foot-separation = 0\cm
left-margin = 0\cm
top-margin = 0\cm
bottom-margin = 0\cm
indent = 0\cm
between-system-padding = 0\cm
paper-width = 7.5\cm
line-width = 7\cm
paper-height = 1\cm
}
#(set-global-staff-size 12)

70
examples/songs/chevaliers_de_la_table_ronde.sg

@ -0,0 +1,70 @@
\selectlanguage{french}
\songcolumns{2}
\beginsong{Chevaliers de la table ronde}
[by={Traditionnel},cov={traditionnel},album={France}]
\cover
\gtab{C}{X32010}
\gtab{G7}{320001}
\gtab{F}{1:022100}
\begin{verse}
Cheva\[C]liers de la Table Ronde
Goûtons \[G7]voir si le vin est \[C]bon
\rep{2}
\end{verse}
\begin{chorus}
Goûtons \[F]voir, \echo{oui, oui, oui}
Goûtons \[C]voir, \echo{non, non, non}
Goûtons \[G7]voir si le vin est bon
\rep{2}
\end{chorus}
\begin{verse}
S'il est bon, s'il est agréable
J'en boirai jusqu'à mon plaisir
\end{verse}
\begin{verse}
J'en boirai cinq à six bouteilles
Et encore, ce n'est pas beaucoup
\end{verse}
\begin{verse}
Si je meurs, je veux qu'on m'enterre
Dans une cave où il y a du bon vin
\end{verse}
\begin{verse}
Les deux pieds contre la muraille
Et la tête sous le robinet
\end{verse}
\begin{verse}
Et les quatre plus grands ivrognes
Porteront les quatre coins du drap
\end{verse}
\begin{verse}
Pour donner le discours d'usage
On prendra le bistrot du coin
\end{verse}
\begin{verse}
Et si le tonneau se débouche
J'en boirai jusqu'à mon plaisir
\end{verse}
\begin{verse}
Et s'il en reste quelques gouttes
Ce sera pour nous rafraîchir
\end{verse}
\begin{verse}
Sur ma tombe, je veux qu'on inscrive
\emph{Ici gît le roi des buveurs}
\end{verse}
\endsong

6
examples/example-en.sg → examples/songs/example-en.sg

@ -21,10 +21,10 @@
% Sad robot: the song's title
% Pornophonique : the artist's name
% 8-bit-lagerfeuer : the file "8-bit-lagerfeuer.jpg" that corresponds to the album art
% traditionnel : the file "8-bit-lagerfeuer.jpg" that corresponds to the album art
% 8 bit lagerfeuer : the album whose song is extracted from
\beginsong{Sad robot}
[by={Pornophonique},cov={8-bit-lagerfeuer},album={8 bit lagerfeuer}]
[by={Pornophonique},cov={traditionnel},album={8 bit lagerfeuer}]
% inserts the album art (8-bit-lagerfeuer.jpg)
\cover
@ -45,7 +45,7 @@
% use the \rep{n} macro for a sentence repeated n times
% use the \echo{text} macro for background singing lyrics
\lilypond{Sad_robot} % inserts the music sheet corresponding to the Sad_robot.ly file in the same directory as this .sg file.
%\lilypond{Sad_robot} % inserts the music sheet corresponding to the Sad_robot.ly file in the same directory as this .sg file.
% verse environments are automatically numbered
\begin{verse}

10
examples/example-fr.sg → examples/songs/example-fr.sg

@ -23,10 +23,10 @@
% Sad robot: le titre de la chanson
% Pornophonique : le nom de l'artiste
% 8-bit-lagerfeuer : le fichier "8-bit-lagerfeuer.jpg" correspondant à la pochette de l'album
% traditionnel : le fichier "8-bit-lagerfeuer.jpg" correspondant à la pochette de l'album
% 8 bit lagerfeuer : le nom de l'album dont la chanson est extraite
\beginsong{Sad robot}
[by={Pornophonique},cov={8-bit-lagerfeuer},album={8 bit lagerfeuer}]
[by={Pornophonique},cov={traditionnel},album={8 bit lagerfeuer}]
% insère la pochette de l'album (8-bit-lagerfeuer.jpg)
\cover
@ -47,7 +47,7 @@
% utilisez la macro \rep{n} pour une phrase répétée n fois
% utilisez la macro \echo{text} pour les phrases chantées en arrière plan
\lilypond{Sad_robot} % insère la partition correspondant au fichier Sad_robot.ly du répertoire de ce fichier .sg
%\lilypond{Sad_robot} % insère la partition correspondant au fichier Sad_robot.ly du répertoire de ce fichier .sg
\begin{verse}
His \[Dm]steely skin is covered
@ -64,14 +64,14 @@
\[F]Can you feel the pain
Of the \[C]sad, sad robot
And it's \[Dm]driving him insane
\end{verse}
\end{verse*}
\begin{verse*}
He can't \[Dm]turn back time nor history
So his \[F]life became a misery
He \[C]has to face the destiny
Nobody \[Dm]cares anymore
\end{verse}
\end{verse*}
\end{repeatedchords}
\begin{chorus}

21
examples/songs/greensleeves.ly

@ -0,0 +1,21 @@
\include "_lilypond/header"
\paper{paper-height = 6.5\cm}
%\new \songbookstaff
{
\key a \minor
\time 6/8
\partial 8 a'8
\relative c''{
c4 d8 e8. (f16) e8 d4 b8 g8. (a16) b8
c4 a8 a8. (gis16) a8 b4 gis8 e4 a8
c4 d8 e8. (f16 e8) d4 b8 g8. (a16) b8
c8. (b16) a8 gis8. (fis16) gis8 a4 a8 a4.
g'4. g8. (fis16) e8 d4 b8 g8. (a16) b8
c4 (a8) a8. (gis16) a8 b4 gis8 e4.
g'4. g8. (fis16) e8 d4 b8 g8. (a16) b8
c8. (b16) a8 gis8. (fis16) gis8 a4. a4.
}
}

150
examples/songs/greensleeves.sg

@ -0,0 +1,150 @@
\selectlanguage{english}
\songcolumns{2}
\beginsong{Greensleeves}
[by={Traditionnel},cov={traditionnel},album={Angleterre}]
\cover
\gtab{Am}{X02210}
\gtab{G}{320003}
\gtab{E}{022100}
\gtab{C}{X32010}
\lilypond{greensleeves}
\begin{verse}
A\[Am]las, my love, ye \[G]do me wrong
To \[Am]cast me oft dis\[E]curteously
And \[Am]{I have} loved \[G]you so long
De\[Am]lighting \[E]in your \[Am]companie
\end{verse}
\begin{chorus}
\[C]Greensleeves was \[G]all my joy
\[Am]Greensleeves was \[E]my delight
\[C]Greensleeves was my \[G]heart of gold
And \[Am]who but \[E]Ladie \[Am]Greensleeves
\end{chorus}
\begin{repeatedchords}
\begin{verse}
I \[Am]have been readie \[G]at your hand
To \[Am]grant what ever \[E]you would crave
I \[Am]have both waged \[G]life and land
Your \[Am]love and \[E]good will \[Am]for to have
\end{verse}
\begin{verse}
I \[Am]bought thee kerchers \[G]to thy head
That \[Am]were wrought fine and \[E]gallantly
I \[Am]kept thee both at \[G]boord and bed
Which \[Am]cost my \[E]purse well \[Am]favouredly
\end{verse}
\begin{verse}
I \[Am]bought thee peticotes \[G]of the best
The \[Am]cloth so fine as \[E]fine might be
I \[Am]gave thee jewels \[G]for thy chest
And \[Am]all this \[E]cost I \[Am]spent on thee
\end{verse}
\begin{verse}
Thy \[Am]smock of silke, both \[G]faire and white
With \[Am]gold embrodered \[E]gorgeously
Thy \[Am]peticote of \[G]sendall right
And \[Am]this I \[E]bought thee \[Am]gladly
\end{verse}
\begin{verse}
Thy \[Am]girdle of gold \[G]so red
With \[Am]pearles bed\[E]ecked sumtuously
The \[Am]like no other \[G]lasses had
And \[Am]yet thou \[E]wouldest not \[Am]love me
\end{verse}
\begin{verse}
Thy \[Am]purse, and eke thy gay \[G]guilt knives
Thy \[Am]pincase, gallant \[E]to the eie
No \[Am]better wore the \[G]burgesse wives
And \[Am]yet thou \[E]wouldst not \[Am]love me
\end{verse}
\begin{verse}
Thy \[Am]crimson stockings, \[G]all of silk
With \[Am]golde all \[E]wrought above the knee
Thy \[Am]pumps, as white as \[G]was the milk
And \[Am]yet thou \[E]wouldst not \[Am]love me
\end{verse}
\begin{verse}
Thy \[Am]gown was of the \[G]grassie green
Thy \[Am]sleeves of satten \[E]hanging by
Which \[Am]made thee be our \[G]harvest queen
And \[Am]yet thou \[E]wouldst not \[Am]love me
\end{verse}
\begin{verse}
Thy \[Am]garters fringed \[G]with the golde
And \[Am]silver aglets \[E]hanging by
Which \[Am]made thee blithe for \[G]to beholde
And \[Am]yet thou \[E]wouldst not \[Am]love me
\end{verse}
\begin{verse}
My gayest gelding I thee gave
To ride where ever liked thee
No ladie ever was so brave
And \[Am]yet thou \[E]wouldst not \[Am]love me
And yet thou wouldst not love me
\end{verse}
\begin{verse}
My \[Am]men were clothed \[G]all in green
And \[Am]they did ever \[E]wait on thee
All \[Am]this was gallant \[G]to be seen
And \[Am]yet thou \[E]wouldst not \[Am]love me
\end{verse}
\begin{verse}
They \[Am]set thee up, they \[G]took thee downe
They \[Am]served thee with hu\[E]militie
Thy \[Am]foote might not once \[G]touch the ground
And \[Am]yet thou \[E]wouldst not \[Am]love me
\end{verse}
\begin{verse}
For \[Am]everie morning, \[G]when thou rose
I \[Am]sent thee dainties, \[E]orderly
To \[Am]cheare thy stomack from \[G]all woes
And \[Am]yet thou \[E]wouldst not \[Am]love me
\end{verse}
\begin{verse}
Thou \[Am]couldst desire no \[G]earthly thing
But \[Am]stil thou hadst it \[E]readily
Thy \[Am]musicke still to \[G]play and sing
And \[Am]yet thou \[E]wouldst not \[Am]love me
\end{verse}
\begin{verse}
And \[Am]who did pay for \[G]all this geare
That \[Am]thou didst spend when \[E]pleased thee?
Even \[Am]{I that} am re\[G]jected here
And \[Am]thou dis\[E]dainst to \[Am]love me
\end{verse}
\begin{verse}
Wei, \[Am]{I wil} pray to \[G]God on hie
That \[Am]thou my constancie \[E]maist see
And \[Am]that yet once be\[G]fore I die
Thou \[Am]will vouch\[E]safe to \[Am]love me
\end{verse}
\begin{chorus}
\[C]Greensleeves, now \[G]farewel, adue!
\[Am]God I pray to \[E]prosper thee
\[C]For I am stil thy \[G]lover true
Come \[Am]once a\[E]gaine, and \[Am]love me!
\end{chorus}
\end{repeatedchords}
\endsong

BIN
examples/songs/traditionnel.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

19
examples/songs/vent_frais.sg

@ -0,0 +1,19 @@
\selectlanguage{french}
\songcolumns{2}
\beginsong{Vent frais}
[by={Traditionnel},cov={traditionnel},album={France}]
\cover
\gtab{Dm}{XX0231}
\gtab{Am}{X02210}
\begin{verse}
\[Dm]Vent \[Am]frais
\[Dm]Vent du ma\[Am]tin
\[Dm]Vent qui \[Am]souffle
Au \[Dm]sommet des grands \[Am]pins
\[Dm]Joie du \[Am]vent qui \[Dm]souffle
A\[Am]llons dans le grand \dots
\end{verse}
\endsong

1
examples/templates/README

@ -0,0 +1 @@
Templates are looked for in this directory.

154
examples/templates/default.tmpl

@ -0,0 +1,154 @@
% Copyright (C) 2009-2010 Romain Goffe, Alexandre Dupas
% Copyright (C) 2008 Kevin W. Hamlen
%
% This program is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License
% as published by the Free Software Foundation; either version 2
% of the License, or (at your option) any later nersion.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
% MA 02110-1301, USA.
%
% The latest version of this program can be obtained from
% http://songs.sourceforge.net.
%
% Modified to serve personnal purposes. Newer versions can be
% obtained from http://www.lohrun.net.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Template parameters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%:[
%%: {"name":"title", "description":"Title", "default":"Song book example", "mandatory":true},
%%: {"name":"author", "description":"Author", "default":"The Songbook team (Crep (R. Goffe), Lohrun (A. Dupas), et al.)", "mandatory":true},
%%: {"name":"booktype", "description":"Type", "type":"enum", "values":["chorded","lyric"], "default":"chorded", "mandatory":true},
%%: {"name":"lang", "description":"Language", "default":"english"},
%%: {"name":"instruments", "description":"Instruments", "type":"flag", "values":["guitar","ukulele"], "join":",", "mandatory":true, "default":["guitar"]},
%%: {"name":"bookoptions", "description":"Options", "type":"flag", "values":["diagram","importantdiagramonly","lilypond","pictures","tabs","repeatchords","onesongperpage"], "join":",", "mandatory":true, "default":["diagram","pictures"]},
%%: {"name":"version", "description":"Version", "default":"unknown"},
%%: {"name":"subtitle", "description":"Subtitle"},
%%: {"name":"web", "description":"Web", "default":"http://www.patacrep.com"},
%%: {"name":"mail", "description":"Email", "default":"crep@team-on-fire.com"},
%%: {"name":"picture", "description":"Picture", "type":"file", "default":"treble_a"},
%%: {"name":"picturecopyright", "description":"Copyright", "default":"Dbolton \\url{http://commons.wikimedia.org/wiki/User:Dbolton}"},
%%: {"name":"footer", "description":"Footer", "default":""},
%%: {"name":"mainfontsize", "description":"Font Size", "type":"font", "default":"10"},
%%: {"name":"songnumberbgcolor", "description":"Number Shade", "type":"color", "default":"#D1E4AE"},
%%: {"name":"notebgcolor", "description":"Note Shade", "type":"color", "default":"#D1E4AE"},
%%: {"name":"indexbgcolor", "description":"Index Shade", "type":"color", "default":"#D1E4AE"},
%%: {"name":"titleprefixwords", "description":"Ignore some words in the beginning of song titles"},
%%: {"name":"authwords", "descriptipn":"Set of options to process author string (LaTeX commands authsepword, authignoreword, authbyword)"},
%%: {"name":"languages", "description":"List of languages used by songs", "default":""}
%%:]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% begin document
\makeatletter\def\input@path{{tex/}}
\documentclass[\getbooktype,\getinstruments,\getbookoptions,\getmainfontsize]{crepbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\PassOptionsToPackage{\getlanguages}{babel}
\PassOptionsToPackage{\getlang}{babel}
\usepackage{babel}
\title{\gettitle}
\author{\getauthor}
\subtitle{\getsubtitle}
\version{\getversion}
\mail{\getmail}
\web{\getweb}
\picture{\getpicture}
\picturecopyright{\getpicturecopyright}
\footer{\getfooter}
\lang{\getlang}
\newindex{titleidx}{\getname_title}
\newauthorindex{authidx}{\getname_auth}
\graphicspath{\getDataImgDirectory}
\definecolor{SongNumberBgColor}{HTML}{\getsongnumberbgcolor}
\definecolor{NoteBgColor}{HTML}{\getnotebgcolor}
\definecolor{IndexBgColor}{HTML}{\getindexbgcolor}
\renewcommand{\snumbgcolor}{SongNumberBgColor}
\renewcommand{\notebgcolor}{NoteBgColor}
\renewcommand{\idxbgcolor}{IndexBgColor}
\gettitleprefixwords
\getauthwords
\pagestyle{empty}
% Customization of the page appearance
\usepackage[
a4paper % paper size
,includeheadfoot % include header and footer into text size
,hmarginratio=1:1 % ratio between inner and outer margin (default)
,outer=1.8cm % outer margin (right)
,vmarginratio=1:1 % ratio between top and bottom margin
,bmargin=1.3cm % bottom margin
% ,bindingoffset=1.7cm % space reserved to bound pages together
]{geometry}
\usepackage{chords}
\begin{document}
% translate default title
\IfStrEq{\gettitle}{Recueil de chansons pour guitare}{
\IfStrEq{\getlang}{english}{\title{Patacrep songbook}}{}
}{}
\maketitle
% indexes
\IfStrEq{\getlang}{english}{
\showindex{Songs Index}{titleidx}
}{
\showindex{Index des chansons}{titleidx}
}
\IfStrEq{\getlang}{english}{
\showindex{Authors Index}{authidx}
}{
\showindex{Index des auteurs}{authidx}
}
% chords notation
\IfStrEq{\getlang}{french}{
\notenamesin{A}{B}{C}{D}{E}{F}{G}
\notenamesout{La}{Si}{Do}{Ré}{Mi}{Fa}{Sol}
}{}
% list of chords
\ifchorded
\phantomsection
\IfStrEq{\getlang}{english}{
\addcontentsline{toc}{section}{Chords list}
}{
\addcontentsline{toc}{section}{Liste des accords}
}
\chords
\fi
% songs
\phantomsection
\IfStrEq{\getlang}{english}{
\addcontentsline{toc}{section}{Songs list}
}{
\addcontentsline{toc}{section}{Liste des chansons}
}
\begin{songs}{titleidx,authidx}
\getsongslist
\end{songs}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% end document
Loading…
Cancel
Save