aboutsummaryrefslogtreecommitdiff
path: root/src/main.lisp
diff options
context:
space:
mode:
authorJoris2024-01-04 21:14:27 +0100
committerJoris2024-01-04 21:14:27 +0100
commit8b5a1f5b754d51147236c7a50e573d4b041497ee (patch)
treeaf5d6e6cf816535248707731ca779f746e3bfe48 /src/main.lisp
parent2e6f266948bda4d4b08c9b88e14eeaeb284f137a (diff)
Fix chord shifting with rhythms
Diffstat (limited to 'src/main.lisp')
-rw-r--r--src/main.lisp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main.lisp b/src/main.lisp
index d7dec7f..d2090e5 100644
--- a/src/main.lisp
+++ b/src/main.lisp
@@ -76,15 +76,22 @@
; Chords
+(defun chord-name (x)
+ (h "span" '(("class" "g-Chords__Name")) (list (string x))))
+
(defun rhythm (x)
- (h "img" (list '("class" "g-Chords__Rhythm") (list "src" (format nil "/rhythms/~S.png" x))) nil))
+ (h "img"
+ (list
+ '("class" "g-Chords__Rhythm")
+ (list "src" (format nil "/rhythms/~S.png" x)))
+ nil))
(defun chord-div (x)
(h "span" '(("class" "g-Chords__Chord"))
(if
(listp x)
- (cons (string (car x)) (mapcar #'rhythm (cdr x)))
- (list (string x)))))
+ (cons (chord-name (car x)) (mapcar #'rhythm (cdr x)))
+ (list (chord-name x)))))
(defun chord-cell (x)
(h "td" '(("class" "g-Chords__Cell"))