Skip to content

Instantly share code, notes, and snippets.

@hastebrot hastebrot/hastebrot_show.clj Secret
Created Feb 12, 2016

Embed
What would you like to do?
;; Skip namespace definition in order to use functions without requiring them first.
;(ns hastebrot-show)
(require '[afterglow.controllers.launchpad-mk2 :as mk2])
(require '[com.evocomputing.colors :refer [create-color]])
;; List midi devices.
;(afterglow.midi/open-inputs-if-needed!)
;; Set *show* and make cues.
(use-sample-show)
(make-cues)
(def mk2-watcher (mk2/auto-bind *show*))
(def mk2-controller (mk2-watcher :controller))
;; Trying to set colors throws NullPointerException.
(def maroon (create-color 128 0 0))
;(mk2/show-round-buttons mk2-controller maroon)
;(mk2/set-pad-color mk2-controller 1 2 maroon)
;; Deactivate.
;(mk2/deactivate mk2-watcher)
;(afterglow.core/start-web-server 16000 true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.