--- /dev/null
+#!/usr/bin/env bash
+
+SCRIPT=a2cho
+
+START_OF='
+ /^\[.*\]/,$ {
+ /^\[.*\]/ i{end_of_x}\n
+ $ a {end_of_x}
+ }
+ s/^\[\(Chorus\|Pre-chorus\|Post-chorus\)[,.: ]*\(.*\)\].*/\{start_of_chorus: \2\}/
+ s/^\[\(Verse\)[,.: ]*\(.*\)\].*/\{start_of_verse: \2\}/
+ s/^\[\(Bridge\|Intro\|Outro\|Break\)[,.: ]*\(.*\)\].*/\{start_of_bridge: \2\}/
+ s/^\[\(.*\)\].*/{comment: \1}/
+'
+END_OF='
+ 1,/^{end_of_x/ {
+ /^{end_of_x/ {N; d}
+ }
+ /^{start_of_chorus/,/^{end_of_x/ { s/{end_of_x/{end_of_chorus/}
+ /^{start_of_verse/,/^{end_of_x/ { s/{end_of_x/{end_of_verse/}
+ /^{start_of_bridge/,/^{end_of_x/ { s/{end_of_x/{end_of_bridge/}
+ /^{comment/,/^{end_of_x/ {/^{end_of_x/ {N; d}}
+ s/:}/}/
+'
+VSPC='
+ /^$/ {
+ N
+ /{start/ {N; s/\n$//}
+ /{end/ {s/^\n//}
+ }
+'
+
+function a2cho {
+ cat - |\
+ sed -e "$START_OF" | sed -e "$END_OF" | sed -e "$VSPC" |\
+ a2crd
+}
+
+if [ ${0##*/} == $SCRIPT ]; then
+ cat - | a2cho
+fi
--- /dev/null
+#!/usr/bin/env bash
+
+SCRIPT=cho2tex
+
+SYMBOLS='
+ s/\/\/:/\\leftrepeat/g
+ s/:\/\//\\rightrepeat/g
+'
+FIXES='
+ s/\]$/\]\{\}/
+ s/\]\[/\]\\quad[/g
+'
+
+DIRECTIVES='
+ s/{start_of_\([a-z]*\): \(.*\)}/\\begin{\1}[\2]/
+ s/{start_of_\([a-z]*\)}/\\begin{\1}/
+ s/{end_of_\([a-z]*\)}/\\end{\1}/
+'
+
+other='
+ s/comment:/\\em /
+ s/title:/\\em /
+ 1 i \\\\begin\{guitar\}
+ $ a \\\\end\{guitar\}
+'
+
+function cho2tex {
+ cat - |\
+ sed -e "$SYMBOLS" -e "$FIXES" -e "$DIRECTIVES"
+}
+
+if [ ${0##*/} == $SCRIPT ]; then
+ cat - | cho2tex
+fi
+
+SED_1='
+ s/\][ ~]*\[/] ~ [/g
+ s/\]$/]\n/
+ /^{/ d
+'
+
+SED_2='
+ s/\]\(rivig\|katt,*\)/|]{\1}/g
+ s/\]\([rs]p*e-\)/|]{\1}/g
+'