     riffmuse em p   (E minor pentatonic)
     riffmuse x      (chromatic)
     riffmuse r      (scale chosen at random)
-    
+
 Or, if you'd prefer, you can type out the full name of the scale, for instance,
 
     riffmuse Bb minor

    riffmuse g major pentatonic
    riffmuse random
    etc.
    
Running 'riffmuse help' or 'riffmuse h' will display this help text.
")


   If no arguments are given, displays the help text."
  ([] (-main "help"))
  ([& args]
    (let [args-string (str/join \space args)]
      (cond
        (re-find #"(?i)help|^h" args-string)       (println help)
        (re-find #"(?i)rand(om)?|^r$" args-string) (-main (rand-nth scale-choices))
        :else (try
                (let [scale (parse-scale args-string)
                      riff  (generate-riff (notes scale))]
                  (println (format "\nScale:\n\n%s\n" (indent (scale-name scale))))
                  (println (format "Notes:\n\n%s\n"   (indent (ascii/notes riff))))
                  (println (format "Guitar:\n\n%s\n"  (indent (ascii/guitar riff)))))
                (catch IllegalArgumentException e
                  (println (format "\nInvalid scale specified.\n\n%s\n\n" help))))))))
