author | Dan Fuhry <dan@enanocms.org> |
Sun, 02 Sep 2012 23:48:00 -0400 | |
changeset 5 | c36fbf04faac |
parent 0 | 16db14829751 |
permissions | -rw-r--r-- |
0 | 1 |
chords2halftone.php is a completely standalone (non-Enano dependent) quick php |
2 |
script which turns ascii monospace chord sheets into halftone markup. You may |
|
3 |
or may not find it useful. |
|
4 |
||
5 |
Halftone markup example: |
|
6 |
||
7 |
<halftone title="Don't Stop Believing"> |
|
5
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
8 |
= Intro = |
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
9 |
(E) (B) (C#m) (A) (E) (B) (G#m) (A) |
0 | 10 |
|
5
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
11 |
= Verse 1 = |
0 | 12 |
(E)Just a (B)small town girl |
13 |
(C#m)Living in a (A)lonely world, |
|
14 |
(E)She took the (B)midnight train going |
|
15 |
(G#m)any - (A)where |
|
16 |
</halftone> |
|
17 |
||
18 |
You get the picture. |
|
19 |
||
20 |
Halftone will position the chords exactly in the right position above the text. |
|
21 |
You also (and this was the main reason I wrote this plugin) get automatic |
|
22 |
transposition with ajaxy-smooth sexiness. |
|
23 |
||
24 |
Note that the positioning-chords-above-text trick sometimes makes for overlaps |
|
25 |
if you put chords so close to each other. An example would be using |
|
26 |
"(G#m)any(A)where" in the sample verse above - depending on your theme/font |
|
27 |
G#m would be directly adjacent to A (confusing) or A would even overlap. So |
|
5
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
28 |
be sure to space out your lyrics accordingly. You can use HTML entities (like |
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
29 |
" " or so) to space things out. |
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
30 |
|
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
31 |
You may also find it beneficial, if the key detection algorithm goofs up, to |
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
32 |
prepend a "!" to the beginning of a chord expression which does not fit into |
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
33 |
the consonant chords for a given key. Consider the following passage, taken |
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
34 |
from a song in the key of A (this is the pre-chorus): |
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
35 |
|
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
36 |
(E)And together we (B)sing (D) |
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
37 |
Everyone (B)sing (D) |
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
38 |
|
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
39 |
The key detection actually caused Halftone to think this song was in D. You can |
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
40 |
rewrite this as, |
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
41 |
|
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
42 |
(E)And together we (!B)sing (D) |
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
43 |
Everyone (!B)sing (D) |
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
44 |
|
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
45 |
...which causes the key detection algorithm to ignore that random B, which is |
c36fbf04faac
Added "!" trick to give hints to the key detection algorithm. It's all Chris Tomlin's fault.
Dan Fuhry <dan@enanocms.org>
parents:
0
diff
changeset
|
46 |
considered to be dissonant to the key of A. |