]> khamidou — GitHub mirrors - tablature.git/commitdiff
forgot actual code master
authorkhamidou <khamidou@gmail.com>
Wed, 19 Jan 2011 18:57:37 +0000 (19:57 +0100)
committerkhamidou <khamidou@gmail.com>
Wed, 19 Jan 2011 18:57:37 +0000 (19:57 +0100)
tablature.el [new file with mode: 0644]

diff --git a/tablature.el b/tablature.el
new file mode 100644 (file)
index 0000000..269b1d3
--- /dev/null
@@ -0,0 +1,22 @@
+(defun draw-tablature-head ()
+  (save-excursion
+    (insert-rectangle '("e|" "B|" "G|" "D|" "A|" "E|")))
+  (forward-char))
+
+(defun insert-tab-column (ncols)
+  (interactive "ncolumn number :")
+  (save-excursion
+    (dotimes (i ncols)
+      (save-excursion
+           (insert-rectangle '("-" "-" "-" "-" "-" "-")))))
+  (forward-char))
+
+(defun draw-tablature-end ()
+  (save-excursion
+    (insert-rectangle '("|" "|" "|" "|" "|" "|"))))
+
+(defun draw-tablature ()
+  (interactive)
+  (draw-tablature-head)
+  (insert-tab-column 30)
+  (draw-tablature-end))