diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae1eda0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.tumblr +*.tweet \ No newline at end of file diff --git a/data/classic_rock/big_brother_and_the_holding_company-piece_of_my_heart.txt b/data/classic_rock/big_brother_and_the_holding_company-piece_of_my_heart.txt new file mode 100644 index 0000000..4408f57 --- /dev/null +++ b/data/classic_rock/big_brother_and_the_holding_company-piece_of_my_heart.txt @@ -0,0 +1,22 @@ +title Piece of My Heart +artist Big Brother and the Holding Company +artist Janis Joplin +note 1968 +url https://www.youtube.com/watch?v=iJb7cBfrxbo +tumblr 10-measure verses, plus the unexpected half-measure for the shriek in the third chorus + +i + 4 4 4 4 | + 4 4 zp 4 4 | +v 4 4 4 4 | 4 4 | 4 4 4 4 +p 4 4 +c 4 4 4 4 | 4 4 ! 4 4 +v 4 4 +v 4 4 4 4 | 4 4 | 4 4 4 4 +p 4 4 +c 4 4 4 4 | 4 4 ! 4 4 +"Guitar Solo" 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +p 4 4 +c 4 4 4 4 | 4 4 ! 4 2 +c 4 4 4 4 | 4 4 ! 4 4 +o 4 4 f 10 diff --git a/data/classic_rock/heart-barracuda.txt b/data/classic_rock/heart-barracuda.txt new file mode 100644 index 0000000..e3e57f1 --- /dev/null +++ b/data/classic_rock/heart-barracuda.txt @@ -0,0 +1,69 @@ +title Barracuda +artist Heart +url https://www.youtube.com/watch?v=p0OX_8YvFxA +tumblr While most sections are "power of two" in length (4 or 8 or 16 measures long), the verses are 6 measures (repeated twice), and the outro is extended for one extra phrase. There's also mixed meters, with each verse getting an extra beat, and the main riff dropping a beat in the last half the of the song. + +i + 4 4 4 4 | + 4 4 4 4 | +i + 4 4 4 4 | + 4 4 4 4 | +v + 4 5 | + 4 4 | + 4 4 | + 4 5 | + 4 4 | + 4 4 +c + 4 4 4 4 | + 4 4 4 4 | +i + 4 4 4 4 | + 4 4 4 4 | +v + 4 5 | + 4 4 | + 4 4 | + 4 5 | + 4 4 | + 4 4 +c + 4 4 4 4 | + 4 4 4 4 +i + 4 4 4 4 | +b + 4 4 4 4 | +zi + 4 4 4 4 | +b + 4 4 4 4 | +zi! + 4 3 | 4 3 | +"Guitar solo" +zb 4 4 4 4 | +zi! 4 3 | 4 3 | +zb 4 4 4 4 | +zi! 4 3 | 4 3 | +c + 4 4 4 4 | + 4 4 4 4 +i + 4 4 4 4 +"Guitar interlude" ze + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +""ze + 4 4 4 4 | + 4 4 4 4 +ozi! + 4 3 | + 4 3 | + 4 3 | + 4 3 | + 4 3 diff --git a/data/classic_rock/jimi_hendrix-all_along_the_watchtower.txt b/data/classic_rock/jimi_hendrix-all_along_the_watchtower.txt new file mode 100644 index 0000000..894579d --- /dev/null +++ b/data/classic_rock/jimi_hendrix-all_along_the_watchtower.txt @@ -0,0 +1,46 @@ +title All Along The Watchtower +artist Jimi Henderix +note 1968 +nohide +url https://www.youtube.com/watch?v=TLV4_xaYynY + + +i + <1 + 4 4 4 4 | +"Guitar solo" zi + 4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +"Guitar solo" + 4 4 4 4 | + 4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +"Guitar solo" + 4 4 4 4 | + 4 4 4 4 +b zv + 4 4 4 4 | + 4 4 4 4 +"Guitar solo" + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +"Guitar solo" + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + f4 4 4 4 4 4 \ No newline at end of file diff --git a/data/classic_rock/led_zeppelin-living_loving_maid.txt b/data/classic_rock/led_zeppelin-living_loving_maid.txt new file mode 100644 index 0000000..d0a2711 --- /dev/null +++ b/data/classic_rock/led_zeppelin-living_loving_maid.txt @@ -0,0 +1,48 @@ +title Living Loving Maid +artist Led Zeppelin +note 1969 +url https://www.youtube.com/watch?v=nwmCOSYUSlI#t=4m14s +twitter Verses alternate between 12 bars and 8 bars (but the latter with a 4-bar instrumental opening) + + +v < 1 + 4 4 | + !4 4 @4 4 | + `4 4 | + !4 4 @4 4 | +c + 4 4 4 4 | + 4 4 !4 4 | + #4 4 | +v + !4 4 @4 4 +v + `4 4 @4 4 | + `4 4 @4 4 | +c + 4 4 4 4 | + 4 4 !4 4 | + @4 | +v + 4 4 | + !4 4 @4 4 | + `4 4 | + !4 4 @4 4 | +c + 4 4 4 4 | + 4 4 !4 4 | + #4 4 | +v + !4 4 @4 4 +v + `4 4 @4 4 | + `4 4 @4 4 | +c + 4 4 4 4 | + 4 4 !4 4 | + @4 | + #4 4 | +v + !4 4 @4 4 | + !4 4 @4 4 | + !4 4 @4 4 | diff --git a/data/classic_rock/pink_floyd-comfortably_numb.txt b/data/classic_rock/pink_floyd-comfortably_numb.txt new file mode 100644 index 0000000..87bb97b --- /dev/null +++ b/data/classic_rock/pink_floyd-comfortably_numb.txt @@ -0,0 +1,17 @@ +title Comfortably Numb +artist Pink Floyd +note 1979 +url https://www.youtube.com/watch?v=_FrOQC-zEog + +i 4 4 +v 4 4 4 4 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 4 4 4 4 | 4 4 4 4 4 4 4 4 | 4 4 4 +"Guitar Solo" zc 4 4 4 4 4 4 4 4 | 4 4 4 +v 4 4 4 4 4 4 4 4 +c 4 4 4 4 4 4 4 4 | 4 4 4 4 4 4 4 4 | 4 4 4 4 +"Guitar Solo" zv 4 4 4 4 4 4 4 4 | + 4 4 4 4 4 4 4 4 | + 4 4 4 4 4 4 4 4 | + f 4 4 4 4 + + diff --git a/data/classic_rock/steely_dan-deacon_blues.txt b/data/classic_rock/steely_dan-deacon_blues.txt new file mode 100644 index 0000000..246519a --- /dev/null +++ b/data/classic_rock/steely_dan-deacon_blues.txt @@ -0,0 +1,77 @@ +title Deacon Blues +artist Steely Dan +note 1977 +url https://www.youtube.com/watch?v=jamkS4qoXK8 + + +i + 4 4 4 4 | + 4 4 3 6 | +v + 4 4 4 4 | + 4 4 4 4 | + !4 4 4 4 | + @4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + !4 4 4 4 | + @4 4 4 4 | +c + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 | +"Post-chorus" zi! + 4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + !4 4 4 4 | + @4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + !4 4 4 4 | + @4 4 4 4 | +c + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 | +i! + 4 4 4 4 | +b + 4 4 4 4 | + 4 4 4 4 | + 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 | +i + 4 4 4 4 | + 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + !4 4 4 4 | + @4 4 4 4 | +c + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 | +i! + 4 4 4 4 | +ozv + 4 4 4 4 | + 4 4 4 4 | + !4 4 4 4 | + @4 4 4 4 | +ozv + 4 4 4 4 | + 4 4 4 4 | ; fade starts a measure or two earlier + f!4 4 4 4 @4 4 4 4 ; | 4 4 4 4 | 4 diff --git a/data/classic_rock/the_police-every_little_thing_she_does_is_magic.txt b/data/classic_rock/the_police-every_little_thing_she_does_is_magic.txt new file mode 100644 index 0000000..15a9808 --- /dev/null +++ b/data/classic_rock/the_police-every_little_thing_she_does_is_magic.txt @@ -0,0 +1,71 @@ +title Every Little Thing She Does Is Magic +artist The Police +note 1981 +url https://www.youtube.com/watch?v=aENX1Sf3fgQ +twitter While verses are 4-square, chorus is 7 bars long, with a 6 bar transition to the verse after the frst one. + + +i + <2 + 4 4 4 4 | + 4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +c + 4 4 4 4 | + 4 4 4 | +"Post-chorus" zp + 4 4 4 | + 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +c + 4 4 4 4 | + 4 4 4 | +b + 4 4 4 4 | +b + 4 4 4 4 | + 4 4 4 4 | +b + 4 4 4 4 | + 4 4 4 4 4 4 | +c + 4 4 4 4 | + 4 4 4 4 | +c + 4 4 4 4 | + 4 4 4 | +o + 4 4 4 4 | + 4 4!4 4 | +o + 4 4 4 4 | + 4 4!4 4 | +o + 4 4 4 4 | + 4 4!4 4 | +o + 4 4 4 4 | + 4 4!4 4 | +o + 4 4 4 4 | + 4 4!4 4 | +o + 4 4 4 4 | ; 'every little thing' + 4 4!4 4 4 4 | ; 'magic, magic, magic' +o + 4 4 4 4 | + 4 4 | +oze + 4 4 4 4 | ; fadeout starts at end + 4 4 4 4 | + 4 4 4 4 | +zo + f!4 4 4 4 `4 4 4 \ No newline at end of file diff --git a/data/classic_rock/the_rolling_stones-paint_it_black.txt b/data/classic_rock/the_rolling_stones-paint_it_black.txt new file mode 100644 index 0000000..a8b8daa --- /dev/null +++ b/data/classic_rock/the_rolling_stones-paint_it_black.txt @@ -0,0 +1,29 @@ +title Paint It Black +artist The Rolling Stones +note 1966 +twitter #1 on Billboard Hot 100 for 11 weeks in 1966. +url https://www.youtube.com/watch?v=O4irXQhgMqg + + +i 4 4 +i 4 4 +izv 4 4 | +v 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 ; summer clothes +bzv 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | +v 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 | + 4 4 4 4 | 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | f4 4 4 4 4 4 +; 4 4 f 4 4 | 4 4 4 4 | 4 4 + + diff --git a/data/classic_rock/the_who-wont_get_fooled_again.txt b/data/classic_rock/the_who-wont_get_fooled_again.txt new file mode 100644 index 0000000..055c7f0 --- /dev/null +++ b/data/classic_rock/the_who-wont_get_fooled_again.txt @@ -0,0 +1,96 @@ +title Won't Get Fooled Again +artist The Who +note 1971 +url https://www.youtube.com/watch?v=zYMD_W_r3Fg + +i! + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +i + [4 4] [4 4] | + [4 4] [4 4] | +v + [4 4] [4 4] | + [4 4] ![4 4] | + `[4 4] [4 4] | + [4 4] ![4 4] | +c + [4 4] [4 4] [4 4] | + ![4 4] [4 4] 4 | + @4 4 4 4 | +i + [4 4] [4 4] | + [4 4] [4 4] | +v + [4 4] [4 4] | + [4 4] ![4 4] | + `[4 4] [4 4] | + [4 4] ![4 4] | +c + [4 4] [4 4] [4 4] | + ![4 4] [4 4] 4 | + @4 4 4 4 | +i + [4 4] [4 4] | +i + [4 4] [4 4] | + [4 4] [4 4] | + [4 4] [4 4] | + [4 4] [4 4] | +b + [4 4] [4 4] | + [4 4] [4 4] | +i + [4 4] [4 4] | + [4 4] [4 4] | +"Guitar solo" + [4 4] [4 4] | + [4 4] [4 4] | + [4 4] [4 4] | + [4 4] [4 4] | +i + [4 4] [4 4] | + [4 4] [4 4] | +v + [4 4] [4 4] | + [4 4] ![4 4] | + `[4 4] [4 4] | + [4 4] ![4 4] | +c + [4 4] [4 4] [4 4] | + ![4 4] [4 4] 4 | + @4 4 4 4 | +i + [4 4] [4 4] | + [4 4] [4 4] | +i + [4 4] [4 4] | + [4 4] [4 4] | + [4 4] [4 4] | + [4 4] [4 4] | + [4 4] [4 4] | + [4 4] [4 4] | + [4 4] [4 4] | +"Synth bridge" zi! + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + #4 4 4 4 | + #4 4 4 4 | +i + [4 4] [4 4] +v + [4 4] [4 4] | + [4 4] [4 4] | + [4 4] [4 4] | +o + [4 4] [4 4] | + 4 4 10 1 \ No newline at end of file diff --git a/data/miscellany/bel_canto-big_belly_butterflies.txt b/data/miscellany/bel_canto-big_belly_butterflies.txt new file mode 100644 index 0000000..d4da18f --- /dev/null +++ b/data/miscellany/bel_canto-big_belly_butterflies.txt @@ -0,0 +1,40 @@ +title Big Belly Butterflies +artist Bel Canto +note 1996 +url https://www.youtube.com/watch?v=PQo8Dgcd-Z8 +nohide + +i + [4 4 4] [4 4 4] | + [4 4 4] [4 4 4] | +"" + [4 4 4] [4 4 4] | + [4 4 4] [4 4 4] | +v + [4 4 4] [4 4 4] | + [4 4 4] [4 4 4] | +c + 7 7 7 7 | + 7 7 7 7 | +"" + [4 4 4] [4 4 4] | + [4 4 4] [4 4 4] | +v + [4 4 4] [4 4 4] | + [4 4 4] [4 4 4] | +c + 7 7 7 7 | + 7 7 7 7 | +"Guitar solo" + [4 4 4] [4 4 4] | + [4 4 4] [4 4 4] | +b + 7 7 7 7 | + 7 7 7 7 | +ozv + [4 4 4] [4 4 4] | + [4 4 4] [4 4 4] | + [4 4 4] [4 4 4] | + [4 4 4] [4 4 4] | + f[4 4 4] [4 4] + diff --git a/data/miscellany/bob_dylan-shelter_from_the_storm.txt b/data/miscellany/bob_dylan-shelter_from_the_storm.txt new file mode 100644 index 0000000..3315d75 --- /dev/null +++ b/data/miscellany/bob_dylan-shelter_from_the_storm.txt @@ -0,0 +1,29 @@ +title Shelter From The Storm +artist Bob Dylan +note 1975 +twitter YouTube doesn't have a proper URL of the studio version, and live versions have a different structure, so here's this weird one... +url https://www.youtube.com/watch?v=r9aN5_GNsMk + +i 4 4 4 4 +v 4 4 4 4 | 4 4 4 2 +i 4 4 4 4 +v 4 4 4 4 | 4 4 4 2 +i 4 4 2 +v 4 4 4 4 | 4 4 4 2 +i 4 4 4 4 2 +v 4 4 4 4 | 4 4 4 2 +i 4 4 4 4 +v 4 4 4 4 | 4 4 4 2 +i 4 4 4 4 +v 4 4 4 4 | 4 4 4 2 +i 4 4 4 4 +v 4 4 4 4 | 4 4 4 2 +i 4 4 4 4 +v 4 4 4 4 | 4 4 4 2 +i 4 4 4 4 +v 4 4 4 4 | 4 4 4 2 +i 4 4 4 4 +v 4 4 4 4 | 4 4 4 2 +i 4 2 +o 4 4 4 4 | 4 4 4 4 +i 4 4 4 4 | 4 4 4 4 diff --git a/data/miscellany/firewater-bourbon_and_division.txt b/data/miscellany/firewater-bourbon_and_division.txt new file mode 100644 index 0000000..49d3449 --- /dev/null +++ b/data/miscellany/firewater-bourbon_and_division.txt @@ -0,0 +1,32 @@ +title Bourbon And Division +artist Firewater +note 1996 +url https://www.youtube.com/watch?v=goWknQP0-Wo + +hscale 1.5 +i + 4 4 | +v + 4 4 4 4 | 4 4 4 4 | + 4 4 4 4 | 4 4 4 hscale 1 &4 +hscale 1 +c + `4 4 4 4 | 4 4 &4 | + `4 4 4 4 | 4 4 &4 | +v + `4 4 4 4 | 4 4 &4 | + `4 4 4 4 | 4 4 &4 | +c + `4 4 4 4 | 4 4 &4 | + `4 4 4 4 | 4 4 &4 | +c + `4 4 4 4 | 4 4 &4 | + `4 4 4 4 | 4 4 &4 | +"Guitar Solo" zc! + `4 4 4 4 | 4 4 &4 | + `4 4 4 4 | +hscale 1.5 + 4 4 | +hscale 1 +o + 4 4 4 3 diff --git a/data/miscellany/joni_mitchell-big_yellow_taxi.txt b/data/miscellany/joni_mitchell-big_yellow_taxi.txt new file mode 100644 index 0000000..5cd840a --- /dev/null +++ b/data/miscellany/joni_mitchell-big_yellow_taxi.txt @@ -0,0 +1,29 @@ +title Big Yellow Taxi +artist Joni Mitchell +note 1970 +twitter #14 Canada Top Singles +url https://www.youtube.com/watch?v=94bdMSCdw20 + +s1/4 + +i + 4 4 4 4 +v + 4 4 4 4 +c + 4 4 | 4 4 4 +v + 4 4 4 4 +c + 4 4 | 4 4 4 +v + 4 4 4 4 +c + 4 4 | 4 4 4 +v + 4 4 4 4 +c + 4 4 | 4 4 +c + 4 hscale 1.2 4 hscale 1 | 4 4 + | 4 4 | 4 4 diff --git a/data/miscellany/kate_bush-wuthering_heights.txt b/data/miscellany/kate_bush-wuthering_heights.txt new file mode 100644 index 0000000..cc64745 --- /dev/null +++ b/data/miscellany/kate_bush-wuthering_heights.txt @@ -0,0 +1,49 @@ +title Wuthering Heights +artist Kate Bush +note 1978 +url https://www.youtube.com/watch?v=BW3gKKiTvjs +twitter Many mixed meters, but structures repeat identically except extra two beats at the end of the first chorus. + +; Chorus: drums suggest a time +; signature change +; +; 1 1 1 +; 1 2 3 4 5 6 7 8 9 0 1 2 +; vV vVVVVVv vVVVVVVVVVv v <- vocals +; k S k S k k S k S k k S <- 4 + 1 + 4 + 1 + 2 +; XXXXXXX XXXXXXX XXXXXXX <- 4/4 +; F d G C F F G C F <- transposed 1 half step up +; ^ ^ ^ ^ <- where I hear strong accents +; ^ ^ <- "resolving" chord down fifth +; XXXXXXXXX XXXXXXX XXXXX <- 5 4 3 +; vV vVVVVVV vVVVvVVVVVV v <- vocals +; XXXXXXX XXXXXXX XXXXXXX <- 4/4 +; +; sheet music on scribd w/ "copyrightt 1978 Kate Bush Music Ltd" +; 4 3 2 3 +; vV vVVVVVv vVVVVVVVVVv v <- vocals +; k S k S k k S k S k k S <- 4 + 1 + 4 + 1 + 2 +; XXXXXXX XXXXX XXX XXXXX <- 4+3+2+3 +; F d G C F F G C F <- transposed 1 half step up +; ^ ^ ^ ^ <- where I hear strong accents +; | | | | <- argument for this: the two 3/4 measures are the same musically +; YY YY <- argument against this: similar vocal phrases appear here, different spots in the 3/4 measures +; XXX XXXXX XXX XXXXX XXX <- but they also occur at different places in 2 3 2 3 2 +; so, in conclusion, we accept this sheet music version + + +i 4 4 +v 4 4 4 4 | 4 4 2 +p 4 4 2 4 +c 4 3 2 3 | 4 3 2 3 2 +v 4 4 4 4 | 4 4 2 +p 4 4 2 4 +c 4 3 2 3 | 4 3 2 3 +b 4 4 | 4 4 | 4 | 2 4 +c 4 3 2 3 | 4 3 2 3 | + 4 3 2 3 | 4 3 2 3 | + 4 3 2 3 | 4 3 2 3 | + 4 3 2 3 | 4 3 2 3 | ; fadeout starts 2-3 measures earlier + f 4 3 2 3 ; | 2 3 + + diff --git a/data/miscellany/lisa_germano-sycophant.txt b/data/miscellany/lisa_germano-sycophant.txt new file mode 100644 index 0000000..0307d3e --- /dev/null +++ b/data/miscellany/lisa_germano-sycophant.txt @@ -0,0 +1,55 @@ +title Sycophant +artist Lisa Germano +note 1994 +url https://www.youtube.com/watch?v=T5KZ2RaWmFI + +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 +b + 3 3 3 3 3 3 | + 3 3 3 3 3 3 | + 3 3 3 3 +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 +b + 3 3 3 3 3 3 | + 3 3 3 3 3 3 | +c + 3 3 3 3 | + 3 3 3 3 | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 | +b + 3 3 3 3 3 3 | +c + 3 3 3 3 | + 3 3 3 3 | + 3 3 3 3 | + 3 3 3 3 | +v + 4 4 4 4 | + 4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 | +c + 3 3 3 3 | + 3 3 3 3 | + 3 3 3 3 | + 3 3 3 3 | + 3 3 3 3 | + 3 3 3 3 | ; "i'm stick of it" + 3 3 3 3 | ; fade starts halfway + 3 3 3 3 | + f3 3 3 3 ; | 3 3 3 \ No newline at end of file diff --git a/data/miscellany/miike_snow-genghis_khan.txt b/data/miscellany/miike_snow-genghis_khan.txt new file mode 100644 index 0000000..2d65a7c --- /dev/null +++ b/data/miscellany/miike_snow-genghis_khan.txt @@ -0,0 +1,18 @@ +title Genghis Khan +artist Miike Snow +note 2015 +url https://www.youtube.com/watch?v=P_SlAzsXa7E + +i 4 | 4 4 4 4 4 4 4 4 +v 4 4 4 4 4 4 4 4 | 4 4 4 4 4 4 4 4 +c 4 4 4 4 4 4 4 4 | 4 4 4 4 4 4 4 4 +i 4 4 4 4 4 4 4 4 +v 4 4 4 4 4 4 4 4 | 4 4 4 4 4 4 4 4 +c 4 4 4 4 4 4 4 4 | 4 4 4 4 4 4 4 4 +i 4 4 4 4 4 4 4 4 +b 4 4 4 4 4 4 4 4 | 4 4 4 4 4 4 4 4 + |4 4 4 4 4 4 4 4 +c 4 4 4 4 4 4 4 4 | 4 4 4 4 4 4 4 4 +o 4 4 4 4 4 4 4 4 | 4 4 4 4 4 4 4 4 + |4 4 4 4 4 4 4 4 | 4 4 4 4 4 4 4 4 + diff --git a/data/miscellany/sky_larkin-antibodies.txt b/data/miscellany/sky_larkin-antibodies.txt new file mode 100644 index 0000000..36b789e --- /dev/null +++ b/data/miscellany/sky_larkin-antibodies.txt @@ -0,0 +1,56 @@ +title Antibodies +artist Sky Larkin +note 2012 +twitter Verse&Pre-verse combined are 7x4 measures, Chorus&pre-chorus combined are 7x4 measures. +url https://www.youtube.com/watch?v=gQRwg0QLSNg + +i + 4 4 4 4 | + 4 4 2 +"" + !4 4 4 4 | + !4 4 4 4 | +v + `4 4 4 4 | + !4 4 4 4 | + `4 4 4 4 | + #4 4 4 4 | + #4 4 4 4 | +p + `4 4 4 4 | + !4 4 4 4 | + `4 4 4 4 | + !4 4 4 4 | +c + !4 4 + @4 4 | + !4 4 + @4 4 | + #4 4 4 4 +v + !4 4 4 4 | + !4 4 4 4 | +v + `4 4 4 4 | + !4 4 4 4 | + `4 4 4 4 | + #4 4 4 4 | + #4 4 4 4 | +p + `4 4 4 4 | + !4 4 4 4 | + `4 4 4 4 | + !4 4 4 4 | +c + !4 4 + @4 4 | + !4 4 + @4 4 | + #4 4 4 4 +o + 4 4 4 4 | + 4 4 4 4 | + zc! 4 4 @4 4 | + !4 4 | + zo! 4 4 | 6 + diff --git a/data/miscellany/talking_heads-nothing_but_flowers.txt b/data/miscellany/talking_heads-nothing_but_flowers.txt new file mode 100644 index 0000000..9c2fd3d --- /dev/null +++ b/data/miscellany/talking_heads-nothing_but_flowers.txt @@ -0,0 +1,63 @@ +title (Nothing But) Flowers +artist Talking Heads +note 1987 +twitter #5 Billboard Mainstream Rock +url https://www.youtube.com/watch?v=068AFYvd58E + +i + <2 + 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 +izv + 4 4 4 4 | + 4 4 4 4 +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +p + 4 4 4 4 | + 4 4 4 4 | +c + 4 4 4 4 | + 4 4 4 4 | + !4 4 4 4 | + 4 4 4 4 +v + 4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +p + 4 4 4 4 | + 4 4 4 4 | +b + 4 4 4 4 | + 4 4 4 4 +c + 4 4 4 4 | + 4 4 4 4 | + !4 4 4 4 | + 4 4 4 4 +i + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +i + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +i + 4 4 4 4 | +c + !4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 f7 diff --git a/data/miscellany/the_breeders-cannonball.txt b/data/miscellany/the_breeders-cannonball.txt new file mode 100644 index 0000000..a7cbd27 --- /dev/null +++ b/data/miscellany/the_breeders-cannonball.txt @@ -0,0 +1,46 @@ +title Cannonball +artist The Breeders +note 1993 +url https://www.youtube.com/watch?v=fxvkI9MTQw4 +twitter Verses range from 14 to 17 bars long, with additional variation on which bars are sung and which are instrumental. #44 on the U.S. Billboard Hot 100 + +i + <2 + 4 4 4 4 | + 4 11/8 +i + !4 4 +i + @4 4 +"" + 4 4 4 !4 +"" + 4 4 4 | + 4 4 4 +v + 4 4 4 !4 | + `4 4 4 4 4 | + 4 4 4 4 | + 4 4 4 !4 | +c + [4 4] [4 4] | + ![4 4] [4 4] +v + 4 4 4 !4 | + `4 4 4 4 | + 4 4 | + 4 4 4 !4 4 +c + [4 4] [4 4] | + ![4 4] [4 4] | +v + 4 4 4 !4 | + `4 4 | + 4 4 4 4 | + 4 4 4 !4 | +c + [4 4] [4 4] | + ![4 4] [4 4] | +v + 4 4 4 4 | + 4 4 4 3 diff --git a/data/miscellany/the_byrds-turn_turn_turn.txt b/data/miscellany/the_byrds-turn_turn_turn.txt new file mode 100644 index 0000000..0b1cdb5 --- /dev/null +++ b/data/miscellany/the_byrds-turn_turn_turn.txt @@ -0,0 +1,18 @@ +title Turn! Turn! Turn! +artist The Byrds +note 1965 +url https://www.youtube.com/watch?v=W4ga_M5Zdn4 +twitter 10 measure bridges, choruses have two extra half-measures. #1 on Billboard Hot 100 in 1965 for three weeks. + +i 4 4 4 4 | 4 4 4 4 +c 4 4 2 | 4 4 2 | 4 4 4 4 +b 4 4 4 4 4 4 | 4 4 4 4 +c 4 4 2 | 4 4 2 | 4 4 4 4 +b 4 4 4 4 4 4 | 4 4 4 4 +c 4 4 2 | 4 4 2 | 4 4 4 4 +b 4 4 4 4 4 4 | 4 4 4 4 +c 4 4 2 | 4 4 2 | 4 4 4 4 +b 4 4 4 4 4 4 | 4 4 4 4 +c 4 4 2 | 4 4 2 | 4 4 4 4 +b 4 4 4 4 4 4 | 4 4 4 4 +o 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | f 4 4 ; fade starts 2 bars earlier diff --git a/data/miscellany/the_cranberries-linger.txt b/data/miscellany/the_cranberries-linger.txt new file mode 100644 index 0000000..bfc00ac --- /dev/null +++ b/data/miscellany/the_cranberries-linger.txt @@ -0,0 +1,37 @@ +title Linger +artist The Cranberries +note 1993 + +twitter #8 on Billboard Hot 100 in 1993 + +hscale 0.75 + +i + `4 4 4 4 | + `4 4 4 4 | + `4 4 4 4 | + `4 4 4 4 | + `4 4 +"" + hscale 1.0 + g4 4`4 4 4 4 4 4 | +v + `4 4 4 4 4 4 4 4 | + `4 4 4 4 4 4 4 4 | +c + `4 4 4 4 4 4 4 4 | +v + `4 4 4 4 4 4 4 4| + `4 4 4 4 4 4 4 4| + `4 4 4 4 4 4 4 4| +c + `4 4 4 4 4 4 4 4 | +b + `4 4 4 4 4 4 4 4 | +c + `4 4 4 4 4 4 4 4| + `4 4 4 4 4 4 4 4| +b + !4 4 4 4 4 4 4 4| +o + `4 4 4 4 4 4 f4 diff --git a/data/number_one/adele-rolling_in_the_deep.txt b/data/number_one/adele-rolling_in_the_deep.txt new file mode 100644 index 0000000..6391e0f --- /dev/null +++ b/data/number_one/adele-rolling_in_the_deep.txt @@ -0,0 +1,22 @@ +title Rolling in the Deep +artist Adele +note 2011 +twitter #1 on Billboard Hot 100 for 7 weeks +url https://www.youtube.com/watch?v=rYEDA3JcQqw + +i 4 4 +v 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +p 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +p 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +; music stop +c!4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 | 3 + + diff --git a/data/number_one/beyonce-single_ladies.txt b/data/number_one/beyonce-single_ladies.txt new file mode 100644 index 0000000..2a542f8 --- /dev/null +++ b/data/number_one/beyonce-single_ladies.txt @@ -0,0 +1,35 @@ +title Single Ladies +artist Beyonce +note 2008 +twitter #1 on Billboard Hot 100 for 1 week in 2008 +url https://www.youtube.com/watch?v=4m1EFMoRFvY + + +"Intro "zi + <3 + 4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | +c + `4 4 4 4 | + !4 4 4 4 | + `4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | +c + `4 4 4 4 | + !4 4 4 4 | + `4 4 4 4 | + !4 4 4 4 | +b + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 +i + `4 4 4 4 | +c + !4 4 4 4 | + `4 4 4 4 | + `4 4 4 4 1 diff --git a/data/number_one/chamillionaire-ridin.txt b/data/number_one/chamillionaire-ridin.txt new file mode 100644 index 0000000..ecb7c02 --- /dev/null +++ b/data/number_one/chamillionaire-ridin.txt @@ -0,0 +1,33 @@ +title Ridin' +artist Chamillionaire +note 2005 +twitter #1 on Billboard Hot 100 for 2 weeks in 2006 + + +i + 4 4 4 4 | +c + 4 4 4 4 | + 4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 +c + 4 4 4 4 | + 4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 +c + 4 4 4 4 | + 4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 +c + 4 4 4 4 | + 4 4 4 4 + diff --git a/data/number_one/katy_perry-i_kissed_a_girl.txt b/data/number_one/katy_perry-i_kissed_a_girl.txt new file mode 100644 index 0000000..bb6dd85 --- /dev/null +++ b/data/number_one/katy_perry-i_kissed_a_girl.txt @@ -0,0 +1,40 @@ +title I Kissed A Girl +artist Katy Perry +note 2008 +twitter #1 on Billboard Hot 100 for 7 weeks in 2008 + +s3/12 + +i + 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +c + `4 4 4 4 | + `4 4 4 4 | + !4 4 4 4 | + `4 4 4 4 | +i + 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +c + `4 4 4 4 | + `4 4 4 4 | + !4 4 4 4 | + !4 4 4 4 | +b + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +c + `4 4 4 4 | + `4 4 4 4 | + !4 4 4 4 | + !4 4 4 4 f2 diff --git a/data/number_one/katy_perry-teenage_dream.txt b/data/number_one/katy_perry-teenage_dream.txt new file mode 100644 index 0000000..e44f76e --- /dev/null +++ b/data/number_one/katy_perry-teenage_dream.txt @@ -0,0 +1,18 @@ +title Teenage Dream +artist Katy Parry +note 2009 +twitter #1 on Billboard Hot 100 for 2 weeks in 2009 + + +i 4 4 +v 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +p 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +p 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +b 4 4 4 4 | 4 4 4 4 +i 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +o 4 4 4 4 | 4 4 4 4 | f 4 4 diff --git a/data/number_one/lady_gaga-poker_face.txt b/data/number_one/lady_gaga-poker_face.txt new file mode 100644 index 0000000..07882c3 --- /dev/null +++ b/data/number_one/lady_gaga-poker_face.txt @@ -0,0 +1,47 @@ +title Poker Face +artist Lady Gaga +note 2009 +twitter #1 on Billboard Hot 100 for 1 week in 2009 +url https://www.youtube.com/watch?v=bESGLojNYSo + +i + 4 4 4 4 | + 4 4 4 4 | +izv + 4 4 4 4 +v + 4 4 4 4 | + 4 4 4 4 | +p + 4 4 4 4 | + 4 4 4 4 +c + 4 4 4 4 | + 4 4 4 4 +v + 4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | +p + 4 4 4 4 | + 4 4 4 4 +c + 4 4 4 4 | + 4 4 4 4 +v + 4 4 4 4 | +v + !4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | +c + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +v + !4 4 4 4 | + 4 4 4 4 f3 + diff --git a/data/number_one/lorde-royals.txt b/data/number_one/lorde-royals.txt new file mode 100644 index 0000000..9673dfb --- /dev/null +++ b/data/number_one/lorde-royals.txt @@ -0,0 +1,17 @@ +title Royals +artist Lorde +note 2013 +twitter Every section is 8 measures, except the intro & its reprise. #1 on the Billboard Hot 100 for 9 weeks in 2013 +url https://www.youtube.com/watch?v=nlcIKh6sBtc + +i 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +p 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 +i 4 4 +v 4 4 4 4 | 4 4 4 4 +p 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 +b 4 4 4 4 | 4 4 4 zp 4 +c 4 4 4 4 | 4 4 4 4 + diff --git a/data/number_one/luis_fonsi-despacito.txt b/data/number_one/luis_fonsi-despacito.txt new file mode 100644 index 0000000..7813bc1 --- /dev/null +++ b/data/number_one/luis_fonsi-despacito.txt @@ -0,0 +1,21 @@ +title Despacito +artist Luis Fonsi +note 2017 +url https://www.youtube.com/watch?v=iJb7cBfrxbo +twitter #1 Billboard Hot 100 for 16 weeks in 2017 + +i 4 4 4 4 +i 4 4 4 4 +i 4 4 4 4 +i 4 4 4 4 + +i 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +p 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 +p 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 + diff --git a/data/number_one/macklemore_ryan_lewis-thrift_shop.txt b/data/number_one/macklemore_ryan_lewis-thrift_shop.txt new file mode 100644 index 0000000..39de9d4 --- /dev/null +++ b/data/number_one/macklemore_ryan_lewis-thrift_shop.txt @@ -0,0 +1,17 @@ +title Thrift Shop +artist Macklemore & Ryan Lewis +note 2012 +url https://www.youtube.com/watch?v=QK8mJJJvaes +twitter Billboard Hot 100: #1 for six weeks in 2013 +i 4 4 4 4 | 4 4 4 4 +i 4 4 4 4 +c 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 | 4 4 | + 4 4 4 4 | 4 4 4 4 | + 4 4 4 4 | 4 4 +c 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 +b 4 4 4 4 +c 4 4 4 4 + |4 4 4 4 | 4 4 4 4 +c 4 4 4 4 diff --git a/data/number_one/peter_gabriel-sledgehammer.txt b/data/number_one/peter_gabriel-sledgehammer.txt new file mode 100644 index 0000000..b7cc49c --- /dev/null +++ b/data/number_one/peter_gabriel-sledgehammer.txt @@ -0,0 +1,29 @@ +title Sledgehammer +artist Peter Gabriel +note 1986 +url https://www.youtube.com/watch?v=g93mz_eZ5N4 +twitter #1 on Billboard Hot 100 for 1 week in 1986 + +"Intro " zi < 2 | 4 4 4 | 4 4 | 4 4 +"" zv ! 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 | + @4 4 | +v 4 4 +v 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 +""zv ! 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | + 4 4 4 4 +c 4 4 4 4 +o zv !4 4 4 4 | +v 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +v 4 f 4 4 4 ; b 4 4 4 ; <- that much more fade-out + + + + diff --git a/data/number_one/pharrell_williams-happy.txt b/data/number_one/pharrell_williams-happy.txt new file mode 100644 index 0000000..6487382 --- /dev/null +++ b/data/number_one/pharrell_williams-happy.txt @@ -0,0 +1,17 @@ +title Happy +artist Pharrell Williams +note 2013 +url https://www.youtube.com/watch?v=y6Sxv-sUYtM +twitter #1 on Billboard Hot 100 for 10 weeks in 2014 + +i 4 +v 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +b 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +b 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 diff --git a/data/number_one/taylor_swift-blank_space.txt b/data/number_one/taylor_swift-blank_space.txt new file mode 100644 index 0000000..a7dfe5e --- /dev/null +++ b/data/number_one/taylor_swift-blank_space.txt @@ -0,0 +1,18 @@ +title Blank Space +artist Taylor Swift +note 2014 +twitter #1 on Billboard Hot 100 for 7 weeks in 2014 & 2015 + +i 4 4 +v 4 4 4 4 | 4 4 4 4 + |4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 + |4 4 4 4 | 4 4 4 4 +i 4 +v 4 4 4 4 | 4 4 4 4 + |4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 + |4 4 4 4 | 4 4 4 4 +b 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 + |4 4 4 4 | 4 4 4 4 diff --git a/data/number_one/the_archies-sugar_sugar.txt b/data/number_one/the_archies-sugar_sugar.txt new file mode 100644 index 0000000..7da81dd --- /dev/null +++ b/data/number_one/the_archies-sugar_sugar.txt @@ -0,0 +1,13 @@ +title Sugar, Sugar +artist The Archies +note 1969 +twitter #1 on the Billboard Hot 100 for 4 weeks in 1969 +url https://www.youtube.com/watch?v=h9nE2spOw_o + +i zc 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +b 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +b 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 | 4 4 4 4 | 4 4 f 4 4 \ No newline at end of file diff --git a/data/number_one/the_chainsmokers-closer.txt b/data/number_one/the_chainsmokers-closer.txt new file mode 100644 index 0000000..7ae38ab --- /dev/null +++ b/data/number_one/the_chainsmokers-closer.txt @@ -0,0 +1,19 @@ +title Closer +artist The Chainsmokers +note 2016 +url https://www.youtube.com/watch?v=PT2_F-1esPk +twitter #1 on Billboard Hot 100 for 12 weeks in 2016 + +i 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +| 4 4 4 4 | 4 4 4 4 +p 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +| 4 4 4 4 | 4 4 4 4 +p 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 +p 4 4 4 4 | 4 4 4 4 +| 4 4 4 4 | 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 +o 4 4 f 4 4 \ No newline at end of file diff --git a/data/number_one/wild_cherry-play_that_funky_music.txt b/data/number_one/wild_cherry-play_that_funky_music.txt new file mode 100644 index 0000000..6c7cfa7 --- /dev/null +++ b/data/number_one/wild_cherry-play_that_funky_music.txt @@ -0,0 +1,58 @@ +title Play That Funky Music +artist Wild Cherry +note 1976 +url https://www.youtube.com/watch?v=_pHT9yYFdZg +twitter #1 on Billboard Hot 100 for 3 weeks in 1976 + +i + 4 4 4 4 | +"" + 4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +p + 4 4 4 4 | +c + 4 4 4 4 | + 4 4!4 4 | +v + 4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +p + 4 4 4 4 | +c + 4 4 4 4 | + 4 4!4 4 | +v + 4 4 4 4 | +"Guitar solo" + 4 4 4 4 | + 4 4 4 4 | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +p + 4 4 4 4 | +c + 4 4 4 4 | + 4 4!4 4 | +v + 4 4 4 4 | +c + 4 4 4 4 | + 4 4 4 4 | +c + 4 4 4 4 | + 4 4 4 4 | +c + f4 4 4 4 4 4 4 2 + diff --git a/data/the_beatles/the_beatles-sgt_peppers_lonely_hearts_club_band.txt b/data/the_beatles/the_beatles-sgt_peppers_lonely_hearts_club_band.txt new file mode 100644 index 0000000..7a41259 --- /dev/null +++ b/data/the_beatles/the_beatles-sgt_peppers_lonely_hearts_club_band.txt @@ -0,0 +1,13 @@ +title Sgt. Pepper's Lonely Hearts Club Band +artist The Beatles +note 1967 +twitter Couldn't find it on YouTube, so I've linked to Paul McCartney doing it live. +url https://www.youtube.com/watch?v=7yAYw_EMaO8 + +i 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +p 4 4 4 4 4 +c 4 4 4 4 | 4 4 4 4 | 4 4 4 4 +b 4 4 4 4 +v 4 4 4 4 | 4 4 4 4 +p 4 4 s3/12 4 4 diff --git a/data/the_smiths/louder_than_bombs/the_smiths-19_hand_in_glove.txt b/data/the_smiths/louder_than_bombs/the_smiths-19_hand_in_glove.txt new file mode 100644 index 0000000..ca356d1 --- /dev/null +++ b/data/the_smiths/louder_than_bombs/the_smiths-19_hand_in_glove.txt @@ -0,0 +1,43 @@ +title Hand in Glove +artist The Smiths +note 1983 (single) 1984 (The Smiths) 1987 (Louder than Bombs) +url https://www.youtube.com/watch?v=hcys6BMJ5Vw +twitter The Smiths' first single, "Hand in Glove", was released 35 years ago today, on the 13th of May 1983. Over the next month we'll be posting every original song from the Smiths singles compilation, Louder Than Bombs. + +i + [4 4] [4 4] | + [4 4] [4 4] | +i + [4 4] [4 4] | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +i + [4 4] [4 4] | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +i + [4 4] [4 4] | +v + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | + 4 4 4 4 | +ozi + [4 4] [4 4] | + [4 4] [4 4] | + [4 4] [4 4] | + [4 4] [4 4] | + f[4 4] [4 4] [4 4] + diff --git a/images/classic_rock/big_brother_and_the_holding_company-piece_of_my_heart.png b/images/classic_rock/big_brother_and_the_holding_company-piece_of_my_heart.png new file mode 100644 index 0000000..d7399bf Binary files /dev/null and b/images/classic_rock/big_brother_and_the_holding_company-piece_of_my_heart.png differ diff --git a/images/classic_rock/heart-barracuda.png b/images/classic_rock/heart-barracuda.png new file mode 100644 index 0000000..2101836 Binary files /dev/null and b/images/classic_rock/heart-barracuda.png differ diff --git a/images/classic_rock/jimi_hendrix-all_along_the_watchtower.png b/images/classic_rock/jimi_hendrix-all_along_the_watchtower.png new file mode 100644 index 0000000..656da7b Binary files /dev/null and b/images/classic_rock/jimi_hendrix-all_along_the_watchtower.png differ diff --git a/images/classic_rock/led_zeppelin-living_loving_maid.png b/images/classic_rock/led_zeppelin-living_loving_maid.png new file mode 100644 index 0000000..c6f9dff Binary files /dev/null and b/images/classic_rock/led_zeppelin-living_loving_maid.png differ diff --git a/images/classic_rock/pink_floyd-comfortably_numb.png b/images/classic_rock/pink_floyd-comfortably_numb.png new file mode 100644 index 0000000..56cf7da Binary files /dev/null and b/images/classic_rock/pink_floyd-comfortably_numb.png differ diff --git a/images/classic_rock/steely_dan-deacon_blues.png b/images/classic_rock/steely_dan-deacon_blues.png new file mode 100644 index 0000000..eaf7d10 Binary files /dev/null and b/images/classic_rock/steely_dan-deacon_blues.png differ diff --git a/images/classic_rock/the_police-every_little_thing_she_does_is_magic.png b/images/classic_rock/the_police-every_little_thing_she_does_is_magic.png new file mode 100644 index 0000000..aea0a25 Binary files /dev/null and b/images/classic_rock/the_police-every_little_thing_she_does_is_magic.png differ diff --git a/images/classic_rock/the_rolling_stones-paint_it_black.png b/images/classic_rock/the_rolling_stones-paint_it_black.png new file mode 100644 index 0000000..5c94c6b Binary files /dev/null and b/images/classic_rock/the_rolling_stones-paint_it_black.png differ diff --git a/images/classic_rock/the_who-wont_get_fooled_again.png b/images/classic_rock/the_who-wont_get_fooled_again.png new file mode 100644 index 0000000..d27a1cb Binary files /dev/null and b/images/classic_rock/the_who-wont_get_fooled_again.png differ diff --git a/images/miscellany/bel_canto-big_belly_butterflies.png b/images/miscellany/bel_canto-big_belly_butterflies.png new file mode 100644 index 0000000..3b93658 Binary files /dev/null and b/images/miscellany/bel_canto-big_belly_butterflies.png differ diff --git a/images/miscellany/bob_dylan-shelter_from_the_storm.png b/images/miscellany/bob_dylan-shelter_from_the_storm.png new file mode 100644 index 0000000..32b81b7 Binary files /dev/null and b/images/miscellany/bob_dylan-shelter_from_the_storm.png differ diff --git a/images/miscellany/firewater-bourbon_and_division.png b/images/miscellany/firewater-bourbon_and_division.png new file mode 100644 index 0000000..23ac0ee Binary files /dev/null and b/images/miscellany/firewater-bourbon_and_division.png differ diff --git a/images/miscellany/joni_mitchell-big_yellow_taxi.png b/images/miscellany/joni_mitchell-big_yellow_taxi.png new file mode 100644 index 0000000..ec343ab Binary files /dev/null and b/images/miscellany/joni_mitchell-big_yellow_taxi.png differ diff --git a/images/miscellany/kate_bush-wuthering_heights.png b/images/miscellany/kate_bush-wuthering_heights.png new file mode 100644 index 0000000..030b584 Binary files /dev/null and b/images/miscellany/kate_bush-wuthering_heights.png differ diff --git a/images/miscellany/lisa_germano-sycophant.png b/images/miscellany/lisa_germano-sycophant.png new file mode 100644 index 0000000..76613c0 Binary files /dev/null and b/images/miscellany/lisa_germano-sycophant.png differ diff --git a/images/miscellany/miike_snow-genghis_khan.png b/images/miscellany/miike_snow-genghis_khan.png new file mode 100644 index 0000000..655b05c Binary files /dev/null and b/images/miscellany/miike_snow-genghis_khan.png differ diff --git a/images/miscellany/sky_larkin-antibodies.png b/images/miscellany/sky_larkin-antibodies.png new file mode 100644 index 0000000..febd3bb Binary files /dev/null and b/images/miscellany/sky_larkin-antibodies.png differ diff --git a/images/miscellany/talking_heads-nothing_but_flowers.png b/images/miscellany/talking_heads-nothing_but_flowers.png new file mode 100644 index 0000000..fcda85e Binary files /dev/null and b/images/miscellany/talking_heads-nothing_but_flowers.png differ diff --git a/images/miscellany/the_breeders-cannonball.png b/images/miscellany/the_breeders-cannonball.png new file mode 100644 index 0000000..c34bfe8 Binary files /dev/null and b/images/miscellany/the_breeders-cannonball.png differ diff --git a/images/miscellany/the_byrds-turn_turn_turn.png b/images/miscellany/the_byrds-turn_turn_turn.png new file mode 100644 index 0000000..7fd3c96 Binary files /dev/null and b/images/miscellany/the_byrds-turn_turn_turn.png differ diff --git a/images/miscellany/the_cranberries-linger.png b/images/miscellany/the_cranberries-linger.png new file mode 100644 index 0000000..a2e4b62 Binary files /dev/null and b/images/miscellany/the_cranberries-linger.png differ diff --git a/images/number_one/adele-rolling_in_the_deep.png b/images/number_one/adele-rolling_in_the_deep.png new file mode 100644 index 0000000..527f660 Binary files /dev/null and b/images/number_one/adele-rolling_in_the_deep.png differ diff --git a/images/number_one/beyonce-single_ladies.png b/images/number_one/beyonce-single_ladies.png new file mode 100644 index 0000000..701a879 Binary files /dev/null and b/images/number_one/beyonce-single_ladies.png differ diff --git a/images/number_one/chamillionaire-ridin.png b/images/number_one/chamillionaire-ridin.png new file mode 100644 index 0000000..be9db06 Binary files /dev/null and b/images/number_one/chamillionaire-ridin.png differ diff --git a/images/number_one/katy_perry-i_kissed_a_girl.png b/images/number_one/katy_perry-i_kissed_a_girl.png new file mode 100644 index 0000000..ddb3a2c Binary files /dev/null and b/images/number_one/katy_perry-i_kissed_a_girl.png differ diff --git a/images/number_one/katy_perry-teenage_dream.png b/images/number_one/katy_perry-teenage_dream.png new file mode 100644 index 0000000..8c8f71a Binary files /dev/null and b/images/number_one/katy_perry-teenage_dream.png differ diff --git a/images/number_one/lady_gaga-poker_face.png b/images/number_one/lady_gaga-poker_face.png new file mode 100644 index 0000000..75650d9 Binary files /dev/null and b/images/number_one/lady_gaga-poker_face.png differ diff --git a/images/number_one/lorde-royals.png b/images/number_one/lorde-royals.png new file mode 100644 index 0000000..e5f67b5 Binary files /dev/null and b/images/number_one/lorde-royals.png differ diff --git a/images/number_one/luis_fonsi-despacito.png b/images/number_one/luis_fonsi-despacito.png new file mode 100644 index 0000000..5f2e3d8 Binary files /dev/null and b/images/number_one/luis_fonsi-despacito.png differ diff --git a/images/number_one/macklemore_ryan_lewis-thrift_shop.png b/images/number_one/macklemore_ryan_lewis-thrift_shop.png new file mode 100644 index 0000000..96bc156 Binary files /dev/null and b/images/number_one/macklemore_ryan_lewis-thrift_shop.png differ diff --git a/images/number_one/peter_gabriel-sledgehammer.png b/images/number_one/peter_gabriel-sledgehammer.png new file mode 100644 index 0000000..590f379 Binary files /dev/null and b/images/number_one/peter_gabriel-sledgehammer.png differ diff --git a/images/number_one/pharrell_williams-happy.png b/images/number_one/pharrell_williams-happy.png new file mode 100644 index 0000000..d96ab22 Binary files /dev/null and b/images/number_one/pharrell_williams-happy.png differ diff --git a/images/number_one/taylor_swift-blank_space.png b/images/number_one/taylor_swift-blank_space.png new file mode 100644 index 0000000..c1261bd Binary files /dev/null and b/images/number_one/taylor_swift-blank_space.png differ diff --git a/images/number_one/the_archies-sugar_sugar.png b/images/number_one/the_archies-sugar_sugar.png new file mode 100644 index 0000000..1af9e62 Binary files /dev/null and b/images/number_one/the_archies-sugar_sugar.png differ diff --git a/images/number_one/the_chainsmokers-closer.png b/images/number_one/the_chainsmokers-closer.png new file mode 100644 index 0000000..461ba02 Binary files /dev/null and b/images/number_one/the_chainsmokers-closer.png differ diff --git a/images/number_one/wild_cherry-play_that_funky_music.png b/images/number_one/wild_cherry-play_that_funky_music.png new file mode 100644 index 0000000..2401957 Binary files /dev/null and b/images/number_one/wild_cherry-play_that_funky_music.png differ diff --git a/images/the_beatles/the_beatles-sgt_peppers_lonely_hearts_club_band.png b/images/the_beatles/the_beatles-sgt_peppers_lonely_hearts_club_band.png new file mode 100644 index 0000000..0dd3196 Binary files /dev/null and b/images/the_beatles/the_beatles-sgt_peppers_lonely_hearts_club_band.png differ diff --git a/images/the_smiths/louder_than_bombs/the_smiths-19_hand_in_glove.png b/images/the_smiths/louder_than_bombs/the_smiths-19_hand_in_glove.png new file mode 100644 index 0000000..159160d Binary files /dev/null and b/images/the_smiths/louder_than_bombs/the_smiths-19_hand_in_glove.png differ diff --git a/src/songstructure.c b/src/songstructure.c new file mode 100644 index 0000000..188d12d --- /dev/null +++ b/src/songstructure.c @@ -0,0 +1,726 @@ +#define STB_DEFINE +#include "stb.h" +#define STB_IMAGE_WRITE_IMPLEMENTATION +#include "stb_image_write.h" +#define STB_TRUETYPE_IMPLEMENTATION +#include "stb_truetype.h" + + +/* + v ; verse + c ; chorus + i ; intro + o ; outro + p ; pre-chorus + b ; bridge + "section 1" ; defaults to zv + zX ; color selector X is a letter a-z,A-Z + + s1/4 + + g4 + 4 4 4 4 4 4 4 4 4 4 4 3/4 + + s1/4 ; subdivision + s3/8 + + "verse" + "chorus" +*/ + +typedef struct +{ + int numerator; + int denominator; +} fraction; + +// n should be a 3-digit hex number +#define rgb(n) { 17*((n)>>8), 17*(((n)>>4)&15), 17*((n)&15) } + +uint8 white[3] = rgb(0xfff); // { 255,255,255}; + +int color_variant; +uint32 color_table[][11] = +{ + { { 'i' }, 0xA35, 0xA63, 0x838, 0xc48 }, + { { 'v' }, 0x39B, 0x14B, 0x549, 0x168, 0x68B, 0x639, 0x47D }, + { { 'c' }, 0xF26, 0xC96, 0xF98, 0xE55, 0xB55, 0xD48 }, + { { 'p' }, 0x33E, 0x51B, 0x94E, 0x55A }, + { { 'o' }, 0x665, 0x996, 0x974, }, + { { 'b' }, 0xC6F, 0xC8A, 0x78C, 0xE6C }, + { { 'a' }, 0x666, 0x999, 0x333, 0x363 }, + { { 'e' }, 0x586, 0x439, 0x637 }, +}; + +#if 0 +uint8 colors[1+26+26][3]; +{ + { 255,255,255 }, + { 0, 0, 0 }, + { 229, 111, 254 }, + { 255, 0, 86 }, // c + { 158, 0, 142 }, + { 14, 76, 161 }, // v2 + { 255, 229, 2 }, + { 0, 95, 57 }, + { 0, 255, 0 }, + { 149, 0, 58 }, + { 255, 147, 126 }, // c2 + { 164, 36, 0 }, + { 0, 21, 68 }, + { 145, 208, 203 }, // m + { 98, 14, 0 }, + { 107, 104, 130 }, // v3 + { 0, 0, 255 }, + { 0, 125, 181 }, + { 106, 130, 108 }, + { 0, 174, 126 }, + { 194, 140, 159 }, + { 190, 153, 112 }, // c3 + { 0, 143, 156 }, // v + { 95, 173, 78 }, + { 255, 0, 0 }, + { 255, 0, 246 }, + { 255, 2, 157 }, + { 104, 61, 59 }, + { 255, 116, 163 }, + { 150, 138, 232 }, + { 152, 255, 82 }, + { 167, 87, 64 }, + { 1, 255, 254 }, + { 255, 238, 232 }, + { 254, 137, 0 }, + { 189, 198, 255 }, + { 1, 208, 255 }, + { 187, 136, 0 }, + { 117, 68, 177 }, + { 165, 255, 210 }, + { 255, 166, 254 }, + { 119, 77, 0 }, + { 122, 71, 130 }, + { 38, 52, 0 }, + { 0, 71, 84 }, + { 67, 0, 44 }, + { 181, 0, 255 }, + { 255, 177, 103 }, + { 255, 219, 102 }, + { 144, 251, 146 }, + { 126, 45, 210 }, + { 189, 211, 147 }, + { 213, 255, 0 }, +}; +#endif + +fraction beat_duration; +int section_color; // letter a-z A-Z, or post-decoded color? +int left_edge; +int cursor_x, cursor_y; +int max_beat_height; +int default_denominator; +float ghost = 0; + +#define MEASURE_HORIZONTAL_SPACING 4 +#define MEASURE_VERTICAL_SPACING 4 + +#define LINE_SPACING (QUARTER_HEIGHT + MEASURE_VERTICAL_SPACING) +#define QUARTER_HEIGHT 10 + +int beat_width; + + +uint8 *pixels; +int out_w, out_h; +int max_x, max_y; + +void plot_pixel(int x, int y, uint8 *color) +{ + if (x < 0 || y < 0) + return; + if (x >= out_w || y >= out_h) { + int j; + uint8 *new_image; + int new_w = out_w, new_h = out_h; + if (out_w == 0 || out_h == 0) { + new_w = 1024; + new_h = 2048; + } + if (x >= out_w) + new_w = stb_max(x+10, new_w+200); + if (y >= out_h) + new_h = stb_max(y+10, new_h+200); + + new_image = malloc(new_w * new_h * 3); + if (new_image == NULL) + stb_fatal("Out of memory"); + memset(new_image, 255, new_w*new_h*3); + for (j=0; j < out_h; ++j) + memcpy(new_image + new_w*3*j, pixels + out_w*3*j, 3*out_w); + free(pixels); + pixels = new_image; + out_w = new_w; + out_h = new_h; + } + if (color) + memcpy(pixels + out_w*3*y + 3*x, color, 3); + max_x = stb_max(max_x, x); + max_y = stb_max(max_y, y); +} + +void plot_pixel_faded(int x, int y, uint8 *color, float a, unsigned char blend[3]) +{ + int i; + uint8 c[3]; + for (i=0; i < 3; ++i) + c[i] = (uint8) stb_lerp(a, blend[i], color[i]); + plot_pixel(x, y, c); +} + +void plot_pixel_alpha(int x, int y, uint8 *color, float a) +{ + plot_pixel_faded(x, y, color, a, pixels+x*3+y*3*out_w); +} + + +void plot_hline(int x0, int x1, int y, unsigned char color[3], float a0, float a1) +{ + int x; + for (x=x0; x < x1; ++x) + plot_pixel_alpha(x,y,color,stb_linear_remap(x,x0,x1,a0,a1)); +} + +void plot_vline(int x, int y0, int y1, unsigned char color[3], float a0, float a1) +{ + int y; + for (y=y0; y < y1; ++y) + plot_pixel_alpha(x,y,color,stb_linear_remap(y,y0,y1,a0,a1)); +} + + +stbtt_fontinfo font; +void draw_char(int codepoint, float scale, int xpos, int ypos, uint8 *color) +{ + int i,j,w,h,xoff,yoff; + uint8 *bitmap; + bitmap = stbtt_GetCodepointBitmap(&font, 0,scale, codepoint, &w, &h, &xoff,&yoff); + for (j=0; j < h; ++j) + for (i=0; i < w; ++i) { + // force pixel to exist + plot_pixel(xpos+i+xoff, ypos+j+yoff, NULL); + plot_pixel_faded(xpos + i + xoff, ypos + j + yoff, color, bitmap[j*w+i]/255.0f, pixels+(xpos+i+xoff)*3+(ypos+j+yoff)*3*out_w); + } +} + +int draw_text(char *name, float size, int xpos, int y_top_pos, int r, int g, int b, int right_justify) +{ + int ypos,ascent; + uint8 color[3] = { r,g,b }; + char *p; + float scale; + scale = stbtt_ScaleForPixelHeight(&font, size); + stbtt_GetFontVMetrics(&font, &ascent, NULL, NULL); + ypos = y_top_pos + (int) (ascent * scale); + + while (*name == ' ') ++name; + + if (right_justify) { + p = name; + while (*p) { + int advance; + stbtt_GetCodepointHMetrics(&font, *p, &advance, NULL); + xpos -= (int) (advance * scale); + ++p; + } + } + + p = name; + while (*p) { + int advance; + draw_char(*p, scale, xpos, ypos, color); + stbtt_GetCodepointHMetrics(&font, *p, &advance, NULL); + xpos += (int) (advance * scale); + ++p; + } + // if right_justify == 0, left-justify + return y_top_pos + (int) size + 10; +} + +void endline(void) +{ + cursor_x = left_edge; + cursor_y += max_beat_height + MEASURE_VERTICAL_SPACING; + max_beat_height = 0; +} + +char *draw_text_line(char *text, float size, int r, int g, int b) +{ + char *p = text, c; + while (*p && *p != '\n' && *p != '\r') + ++p; + c = *p; + *p = 0; + cursor_y = draw_text(text, size, cursor_x, cursor_y, r,g,b, 0); + *p = c; + return p; +} + +char *text_line(char **text) +{ + char *start = *text; + char *p = start; + while (*p && *p != '\n' && *p != '\r') + ++p; + if (*p) + *p++=0; + *text = p; + while (*start && *start == ' ') + ++start; + return start; +} + + +int pickup; +int delay; +int hide_measure; // like delay, but arbitrary measure spacing +float beat_vscale; +int bracket; + +unsigned char internal_line_color[3] = { 255,255,255 }; +unsigned char border_line_color[3] = { 255,255,255 }; +unsigned char bracket_line_color[3] = { 0,0,0 }; +//unsigned char internal_line_color[3] = { 0,0,0 }; +//unsigned char border_line_color[3] = { 0,0,0 }; + +int prev_measure_left, prev_measure_right, prev_beat_height; +float bracket_alpha = 0.35f; +float bracket_alpha_end = 0.0f; +float bracket_start; +int spacing = 0; + +// (a/b) +// ----- => (a/b) * (d/c) +// (c/d) +int draw_measure(int x, int y, fraction m) +{ + uint8 c[3] = rgb(color_table[section_color][color_variant]); + float alpha_for_height[256]; + int i,j,k, xpos=0; + int full_b; + float beat_rescale = (float) beat_duration.numerator / beat_duration.denominator; + int beat_height = (int) (QUARTER_HEIGHT * 4.0 * stb_linear_remap(beat_rescale, 0.25,0.33f, 0.25,0.30f) * beat_vscale); + int BEAT_WIDTH = (beat_width * 4 * beat_duration.numerator / beat_duration.denominator); + float frac_b; + float beats = ( m.numerator / (float) m.denominator) * + (beat_duration.denominator / (float) beat_duration.numerator ) ; + full_b = (int) floor(beats); + frac_b = beats - full_b; + + if (ghost) { + c[0] = (int) stb_lerp(ghost, c[0], 255); + c[1] = (int) stb_lerp(ghost, c[1], 255); + c[2] = (int) stb_lerp(ghost, c[2], 255); + } + if (pickup) { + xpos -= BEAT_WIDTH * (full_b + (frac_b ? 1 : 0)) + MEASURE_HORIZONTAL_SPACING + 1; + pickup = 0; + } + if (delay) { + // skip space for extra beats at beginning -- like a pickup, but not left-aligned + xpos += BEAT_WIDTH * delay; + } + + if (bracket) { + // if bracket is 1, we need to draw the left border as well + if (bracket == 1) { + //xpos += 2; + //plot_vline(cursor_x+xpos, cursor_y-1, cursor_y+1, bracket_line_color, bracket_start, bracket_alpha); + //plot_vline(cursor_x+xpos, cursor_y+beat_height-1, cursor_y+beat_height+1, bracket_line_color, bracket_start, bracket_alpha); + //plot_vline(cursor_x+xpos-2, cursor_y-2, cursor_y+beat_height+2, bracket_line_color, bracket_alpha); + //plot_hline(cursor_x+xpos-2, cursor_x, cursor_y-2, bracket_line_color, bracket_alpha); + //plot_hline(cursor_x+xpos-2, cursor_x, cursor_y+beat_height+1, bracket_line_color, bracket_alpha); + } else { + //plot_hline(prev_measure_right, cursor_x, cursor_y+1*beat_height/5, bracket_line_color, bracket_alpha, bracket_alpha); + //plot_hline(prev_measure_right, cursor_x, cursor_y+4*beat_height/5-1, bracket_line_color, bracket_alpha, bracket_alpha); + plot_hline(prev_measure_left, cursor_x, cursor_y-spacing, bracket_line_color, bracket_start, bracket_alpha); + plot_hline(prev_measure_left, cursor_x, cursor_y+beat_height-1+spacing, bracket_line_color, bracket_start, bracket_alpha); + bracket_start = bracket_alpha; + } + bracket = 2; + } + + assert(beat_height < 256); + for (j=0; j < beat_height; ++j) + alpha_for_height[j] = 1.0; + for (j=1; j < beat_duration.numerator; ++j) { + int y = (int) stb_linear_remap(j, 0, beat_duration.numerator, 0,beat_height); + alpha_for_height[y] = 0.90f; + } + + if (!hide_measure) { + for (j=0; j < beat_height; ++j) + plot_pixel_faded(cursor_x + xpos, cursor_y+j, c, 0.66f, border_line_color); + } + xpos += 1; + + // draw the full beats + for (k=0; k < full_b; ++k) { + if (!hide_measure) { + for (j=0; j < beat_height; ++j) + for (i=0; i < BEAT_WIDTH-1; ++i) + plot_pixel_faded(cursor_x+i + xpos, cursor_y+j, c, alpha_for_height[j], internal_line_color); + for (j=0; j < beat_height; ++j) + plot_pixel_faded(cursor_x+i + xpos, cursor_y+j, c, 0.80f, internal_line_color); + } + xpos += BEAT_WIDTH; + } + + if (frac_b) { + if (!hide_measure) { + for (j=0; j < beat_height * frac_b; ++j) + for (i=0; i < BEAT_WIDTH-1; ++i) + plot_pixel_faded(cursor_x+i + xpos, cursor_y+j, c, alpha_for_height[j], internal_line_color); + } + xpos += BEAT_WIDTH; + } + + prev_beat_height = beat_height; + max_beat_height = stb_max(max_beat_height, beat_height); + delay = 0; + + return xpos; +} + +void add_measure(fraction m) +{ + int width = draw_measure(cursor_x, cursor_y, m); + prev_measure_left = cursor_x; + prev_measure_right = cursor_x + width; + cursor_x += width + MEASURE_HORIZONTAL_SPACING; +} + +int color_letter; +void set_section_color(int letter) +{ + int i; + color_letter = letter; + section_color = -1; + ghost = 0; + for (i=0; i < sizeof(color_table)/sizeof(color_table[0]); ++i) + if ((int) color_table[i][0] == letter) + section_color = i; + if (section_color < 0) + stb_fatal("Error, unknown color '%c' (%d)", letter, letter); + color_variant = 1; +} + +int y_bottom; +void section(char *name, int color) +{ + if (cursor_x != left_edge) + endline(); + endline(); + + #define MIN_TEXT_VERTICAL_SPACING 6 + if (cursor_y < y_bottom) + cursor_y = y_bottom; + + //draw_text(name,16.0, left_edge-100,cursor_y, 0,0,0, 0); + if (name[0]) + y_bottom = draw_text(name,16.0, left_edge-25,cursor_y-2, 0,0,0, 1); + + set_section_color(color); +} + +int hide=1; +unsigned char shown[256]; +void section1(char *name, int color) +{ + if (hide && shown[color]) + name = ""; + section(name, color); + shown[color] = 1; +} + + +// @TODO pickups + +int fade_start_x; +int fade_start_y; + +void start_fade_out(void) +{ + fade_start_x = cursor_x; + fade_start_y = cursor_y; +} + +void process_fade_out(void) +{ + int i,j; + // @TODO handle multiple lines + + for (i=fade_start_x; i < cursor_x; ++i) { + float a = (float) stb_linear_remap(i, fade_start_x, cursor_x, 0.0, 1.0); + for (j=fade_start_y; j < cursor_y + max_beat_height; ++j) { + uint8 *c = &pixels[j*out_w*3 + i*3]; + c[0] = (uint8) stb_lerp(a, c[0], 255); + c[1] = (uint8) stb_lerp(a, c[1], 255); + c[2] = (uint8) stb_lerp(a, c[2], 255); + } + } +} + +char *parse_meter(char *ptr, int default_denominator, fraction *output) +{ + output->numerator = strtol(ptr, &ptr, 10); + if (*ptr == '/') + output->denominator = strtol(ptr+1, &ptr, 10); + else + output->denominator = default_denominator; + return ptr; +} + +void init_font(void) +{ + int len; + uint8 *data = stb_fileu("c:/windows/fonts/times.ttf", &len); + if (data == NULL) + stb_fatal("Can't find font file (bad Sean for hard-coding it"); + stbtt_InitFont(&font, data, stbtt_GetFontOffsetForIndex(data,0)); +} + +int bracket; +void set_bracket(int br) +{ + bracket_start = 0; + if (br == 0) { + if (bracket == 0) { + // @TODO: if we try to turn off the bracket when it's already off + // ']' without a '[' puts + // a special mode that draws a dangling end brack on the *next* + // measure, to allow pickups/incomplete measures to show implicit + // grouping. + } else if (bracket == 1) { + // empty grouping, do nothing + } else if (bracket == 2) { + //plot_vline(prev_measure_right+1, cursor_y-2, cursor_y+prev_beat_height+2, bracket_line_color, bracket_alpha); + //plot_vline(prev_measure_right-1, cursor_y-1, cursor_y, bracket_line_color, bracket_alpha); + //plot_vline(prev_measure_right-1, cursor_y+prev_beat_height, cursor_y+prev_beat_height+1, bracket_line_color, bracket_alpha); + plot_hline(prev_measure_left, prev_measure_right, cursor_y-spacing, bracket_line_color, bracket_alpha, 0); + plot_hline(prev_measure_left, prev_measure_right, cursor_y+prev_beat_height-1+spacing, bracket_line_color, bracket_alpha, 0); + //cursor_x += 2; + } + } + bracket = br; +} + +int line_number; +int main(int argc, char **argv) +{ + int i; + if (argc <= 1) { + printf("Usage: songstructure +\n" + "Creates image representing song structure, output as PNG with same name."); + return 0; + } + + init_font(); + + for (i=1; i < argc; ++i) { + char *p, *base, *url = NULL, *tweet=0, *tumblr=0, *title=0, *artist=0; + char filename[1024]; + stb_splitpath(filename, argv[i], STB_PATH_FILE); + + pixels = NULL; + out_w = out_h = 0; + max_x = max_y = 0; + memset(shown, 0, sizeof(shown)); + fade_start_x = fade_start_y = 0; + + beat_duration.numerator = 2; + beat_duration.denominator = 8; + default_denominator = 4; + left_edge = 120; + cursor_x = left_edge; + cursor_y = 20; + section_color = 'v' - 'a' + 1; + ghost = 0; + y_bottom = 0; + max_beat_height = 0; + hide = 1; + beat_width=8; + beat_vscale=1.0; + bracket = 0; + + base = stb_file(argv[i], NULL); + if (!base) { + fprintf(stderr, "Error: couldn't open file '%s'\n", argv[i]); + exit(1); + } + line_number = 1; + + p = base; + while (*p) { + switch (*p++) { + case ';': + // skip to end of line + while (*p && *p != '\n' && *p != '\r') + ++p; + break; + case '\n': case '\r': + if (p[-1] + p[0] == '\n' + '\r') + ++p; + ++line_number; + break; + case 'f': start_fade_out(); break; + case 'v': section1("Verse" , 'v'); break; + case 'c': section1("Chorus" , 'c'); break; + case 'b': section1("Bridge" , 'b'); break; + case 'i': section1("Intro" , 'i'); break; + case 'o': section1("Outro" , 'o'); break; + case 'p': section1("Pre-chorus", 'p'); break; + case 'z': set_section_color(*p); if (*p) ++p; break; + case 'd': default_denominator = strtol(p, &p, 10); break; + case '<': pickup = 1; break; + case '>': delay += 1; break; + case '(': hide_measure = 1; break; + case ')': hide_measure = 0; break; + case '[': set_bracket(1); break; + case ']': set_bracket(0); break; + case '`': color_variant = 1; ghost=0; break; + case '!': color_variant = 2; ghost=0; break; + case '@': color_variant = 3; ghost=0; break; + case '#': color_variant = 4; ghost=0; break; + case '$': color_variant = 5; ghost=0; break; + case '%': color_variant = 6; ghost=0; break; + case '^': color_variant = 7; ghost=0; break; + case '&': color_variant = 8; ghost=0; break; + case '"': { + char buffer[1024]; + int i; + for (i=0; i < sizeof(buffer); ++i) { + if (*p == 0 || *p == '"') + break; + buffer[i] = *p++; + } + if (*p == '"') ++p; + if (i == sizeof(buffer)) + stb_fatal("Unterminated \" in %s", argv[i]); + buffer[i++] = 0; + section(buffer, 'v'); + break; + } + case 's': p = parse_meter(p, 4, &beat_duration); + if (beat_duration.numerator == 0 || beat_duration.denominator == 0) + stb_fatal("Error: bad measure length in file '%s' line %d\n", argv[i], line_number); + break; + case '-': endline(); + break; + case '|': if (cursor_x != left_edge) + endline(); + break; + case 'g': ghost = 0.75; + break; + #if 0 + case 'g': measure_grouping = strtol(p, &p, 10); + if (measure_grouping == 0) + stb_fatal("Bad grouping after 'g' in '%s' line %d\n", argv[i], line_number); + break; + #endif + + case 'h': if (0==strnicmp(p, "scale",5)) { + float scale = (float) strtod(p+5, &p); + beat_width = (int) (scale * 8 + 0.5); + beat_width = stb_max(beat_width,2); + break; + } + if (0==strnicmp(p, "eight",5)) { + beat_vscale = (float) strtod(p+5, &p); + break; + } + stb_fatal("Unknown command beginning with 'h' in file '%s' line %d", argv[i], line_number); + + case 'u': if (0==strnicmp(p, "rl ", 3)) { + p += 3; + url = text_line(&p); + } + break; + + case 'T': + case 't': if (0==strnicmp(p, "itle", 4)) { + p += 4; + title = text_line(&p); + draw_text_line(title, 30.0, 0,0,0); + break; + } + if (0==strnicmp(p, "witter", 6)) { + p += 6; + tweet = text_line(&p); + break; + } + if (0==strnicmp(p, "umblr", 5)) { + p += 6; + tumblr = text_line(&p); + break; + } + stb_fatal("Unknown command beginning with 't' in file '%s' line %d", argv[i], line_number); + case 'A': + case 'a': if (0==strnicmp(p, "rtist", 5)) { + p += 5; + artist = text_line(&p); + draw_text_line(artist, 24.0, 0,0,0); + break; + } + stb_fatal("Unknown command beginning with 'a' in file '%s' line %d", argv[i], line_number); + case 'N': + case 'n': if (0==strnicmp(p, "ote", 3)) { + p = draw_text_line(p+4, 18.0, 0,0,0); + break; + } + if (0 == strnicmp(p, "ohide", 5)) { + hide = 0; + p += 5; + break; + } + stb_fatal("Unknown command beginning with 'n' in file '%s' line %d", argv[i], line_number); + + default: + if (isdigit(p[-1])) { + fraction f; + char *q = p-1; + p = parse_meter(p-1, default_denominator, &f); + if (f.numerator == 0 || f.denominator == 0) + stb_fatal("Error: bad measure length in file '%s'\n", argv[i]); + add_measure(f); + } else if (isspace(p[-1])) { + // do nothing + } else + stb_fatal("Error: unknown character '%c'(%d) in file '%s' line %d", p[-1],p[-1], argv[i], line_number); + break; + } + } + + if (fade_start_y != 0) + process_fade_out(); + + plot_pixel(max_x + left_edge - 50, max_y+100, white); + stbi_write_png(stb_sprintf("%s.png", filename), max_x, max_y, 3, pixels, 3*out_w); + free(pixels); + + if (tweet || tumblr || url) { + FILE *f; + if (!tumblr) + tumblr = tweet; + f = fopen(stb_sprintf("%s.tweet", filename), "w"); + if (tweet) fprintf(f, "%s ", tweet); + if (url) fprintf(f, "%s", url); + fclose(f); + + f = fopen(stb_sprintf("%s.tumblr", filename), "w"); + if (tumblr) fprintf(f, "

%s

", tumblr); + if (url) fprintf(f, "

%s on YouTube

", url, title); + fclose(f); + } + free(base); + } + + return 0; +}