Novation controllers meet Overtone
Ovation is a thin abstraction layer between Overtone and Novation controllers. It leverages Component to help you build modular music apps with as little delving into MIDI specs as possible. Still very much a work in progress though.
[ovation "0.1.1"]
Plug in your Launchpad, then start a REPL session. Define a simple event handler:
(require '[ovation.launchpad.core :as launchpad]
'[ovation.launchpad.events :as events]
'[ovation.launchpad.utils :as utils])
=> nil
(events/defevent echo-repl [:midi :note-on]
[_]
(fn [e]
(let [n (:note e)]
(println (format "cell %s, midi %s" (utils/note->xy n) n)))))
=> #'user/echo-repl
Define a config for the Launchpad component with :session
as its default mode
and bind your event handler to it:
(def config
{:default-mode :session
:modes {:session {:handlers [echo-repl]}}})
=> #'user/config
Start the component:
(require '[com.stuartsierra.component :as component])
=> nil
(component/start (launchpad/new-launchpad config))
=> ...
Try pattering on the Launchpad grid. The REPL should inform you of all the pressed buttons' coordinates and their corresponding MIDI values.
Coming right up.
- better docs;
- add support for all sorts of controllers!
Copyright © 2015 Lyosha Kuleshov
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.