New Songbook
[songbook.git] / web / songbook.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2    "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4 <head>
5   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6   <meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; U) [Netscape]">
7   <title>Songbook</title>
8   <link rel="stylesheet" type="text/css" media="screen" href="/css/Plain.css">
9   <link rel="stylesheet" type="text/css" media="print" href="/css/Print.css">
10   <link rel="SHORTCUT ICON" href="http://defaria.com/favicon.ico" type="image/png">
11 </head>
12
13 <body>
14
15 <div class="heading">
16   <h1 class="centered">Songbook/OnSong and chordpro (.pro) files</h1>
17 </div>
18
19 <div id="content">
20
21 <p>Rather than carry around sheets of paper for everybody, fumbling
22 and trying to find the right song sheet etc., you can use your
23 computer to help automate this process.</p>
24
25 <p>A chordpro file (signified by a .pro extension) is not a fancy file
26 format, but it gets the job done and is easy to edit with any editor
27 like notepad. You can google "chordpro" and read all about the format
28 if you like.</p>
29
30 <p>If you have a iPad or a Android tablet you can have all of your
31 songs with you wherever you go. Linked
32 with <a href="https://www.dropbox.com/">DropBox</a> and everybody can
33 be on the same page. Worst case you have all of the music you know at
34 your fingertips. There are two apps, one for iPads
35 (<a href="https://itunes.apple.com/us/app/onsong/id502344938?mt=8">OnSong</a>)
36 and the other for Android and PCs
37 (<a href="http://linkesoft.com/songbook/windows.html">Songbook</a>)
38 that will work with .pro file to render them nicely on your iPad or
39 Android tablet. And Songbook also works on your Windows PC where
40 you can print out copies of the songs if you inist on dealing with
41 paper.</p>
42
43 <p>Finally, you could go to my website and render any of the songs in
44 my Songbook using the web (described below).</p>
45
46 <h2>Chordpro file format</h2>
47
48 <p>You can go
49 to <a href="http://defaria.com/songbook/Songs">http://defaria.com/songbook/Songs</a>
50 and you'll see a list of all the files in that directory, the .pro
51 files of the songs I have. You can click on any of them but what you
52 will get is an unrendered version of the .pro file. For example: If
53 you click on Brown Eyed Girl.pro you'll see:</p>
54
55 <blockquote><pre>
56     {t:Brown Eyed Girl}
57     {st:Van Morrison}
58     {key:G}
59
60     [G]Hey, where did [C]we go, da[G]ys when the ra[D]ins came
61     [G]Down in the holl[C]ow, [G]playin' a ne[D]w game
62     [G]Laughin' and a-s[C]ingin' hey-hey, [G]skippin' and a-j[D]umpin'
63     [G]In the misty mor[C]ning fog, with o[G]ur he[D]arts thumpin and yo[C]u[D]
64     My Brown-eyed gi[G]rl[Em], yo[C]u my[D] brown eyed [G]girl [D]
65
66     [G]Hey whatever [C]happened, [G]Tuesday went [D]so slow
67     [G]Goin down the [C]old mine with a [G]transistor [D]radio
68     [G]Standin' in the [C]sunlight laughin', [G]hide behind the [D]rainbow's wall
69     [G]Slippin' and a-[C]slidin', [G]all along the [D]waterfall with [G]you
70     My Brown-eyed gi[G]rl[Em], yo[C]u my[D] brown eyed [G]girl [D]
71
72     {soc}
73     [D]Do you remember when we used to [G]sing
74     Sha-la-la [C]la-la la-la [G]la-la la-la [D]de-da
75     [G]Sha-la-la [C]la-la la-la [G]la-la la-la [D]de-da
76     La-de-[G]da[D]
77     {eoc}
78
79     [G][Em][C][D][G][D]
80
81     So hard to find my way, now that I'm all on my own
82     Saw you just the other day, my how you have grown
83     Cast my memory back there lord, sometimes I'm overcome, thinkin'bout
84     Making love in the green grass, behind the stadium with you
85     My brown eyed girl, you my brown eyed girl
86
87     {soc}
88     [D]Do you remember when we used to [G]sing
89     Sha-la-la [C]la-la la-la [G]la-la la-la [D]de-da
90     [G]Sha-la-la [C]la-la la-la [G]la-la la-la [D]de-da
91     La-de-[G]da
92     {eoc}
93 </pre></blockquote>
94
95 <p>You see things like {t:Brown Eyed Girl} (title) and {key:G} as well
96 as embedded tags for the chords ([G], [C], etc). Doesn't look as
97 pretty right? But when you include the webchord.cgi portion you are
98 running a script named webchord.cgi which reads the file from the
99 parameter chordpro (that's why you need the chordpro=song.pro portion)
100 and then reformats stuff into HTML that looks pretty, centering the
101 title of the song, putting the chords over the words and bolding the
102 text between {soc} and {eoc} (start of chorus, end of chorus). So
103 given the above SongTitle="Brown Eyed Girl" we can formulate the URL
104 to render it thusly:</p>
105
106 <blockquote><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Brown Eyed Girl.pro">http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Brown Eyed Girl.pro</a></blockquote>
107
108 <p>You can do the same thing for the other songs there too.</p>
109
110 <p>I should just write a quick script that gets all of the .pro files
111 in the directory songbook/Songs and then formulates a page of links
112 that have the webchord.cgi links to render them like:</p>
113
114 <ul>
115   <li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Across the Universe.pro">Across the Universe</a></li>
116   <li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/American Pie.pro">American Pie</a></li>
117   <li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Amie.pro">Amie</a></li>
118   <li><a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Back in the USSR.pro">Back in the USSR</a></li>
119   <li>...</li>
120 </ul>
121
122 <p>You have to fill in the &lt;SongTitle&gt; portion of the link. So, for
123 example, you take:</p>
124
125 <blockquote>
126 http://defaria.com/songbook/Songs/webchord.cgi?chordpro=&lt;SongTitle&gt;.pro
127 </blockquote>
128
129 <p>pop it into the address bar of your browser then change &lt;SongTitle&gt;
130 to the title of the song you want to render:</p>
131
132 <blockquote>
133 <a href="http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Amie.pro">http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Amie.pro</a>
134 </blockquote>
135
136 <p><b>Note:</b></p>
137
138 <ul>
139   <li>URLs are case sensitive! ...chordpro=amie.pro is not the same as ...chordpro=Amie.pro</li>
140   <li>Browsers tend to change spaces in a URL to %20. %20 is the octal representation for a space character. So if you see %20 in a URL like http://defaria.com/songbook/webchord.cgi?chordpro=/web/songbook/Songs/Back%20in%20the%20USSR.pro. Don't fear - they're merely spaces.</li>
141 </ul>
142
143 <h2>Songbook for PC</h2>
144
145 <p>You can get a Windows PC version of Songbook
146 at <a href="http://linkesoft.com/songbook/windows.html">http://linkesoft.com/songbook/windows.html</a>. It
147 will run on your PC and render songs like:</p>
148
149 <img src="songbook.jpg">
150
151 <p>It's $20 and you can even print out your stuff if you still use
152 paper or need paper for other people.</p>
153
154 </div>
155
156 </body>
157 </html>