getting going with launchpad

96 views
Skip to first unread message

Jon

unread,
Mar 24, 2012, 5:43:13 PM3/24/12
to over...@googlegroups.com
I just got my new Launchpad in the mail and I am trying to get running with Grid but I am having a couple issues. 

the read me on github has a short example

(def grid (make-launchpad))
(led-on grid 1 2)
(on-press grid (fn [x y s] (my-instrument x y)))

make-launchpad requires a function to be passed to it and I can't find the namespace where led-on and on-press live. I can pass make-launchpad a dummy function and define a Grid but I can do any updates to it. If anyone could give me some tips or ideally an example, I would really appreciate it.

thanks

-- 
Jon

Philip Potter

unread,
Mar 25, 2012, 7:32:19 AM3/25/12
to over...@googlegroups.com
Hi there,

I'm sorry, this is my fault. I've been playing with the grid interface
but not updating the docs to reflect it. I'll try to fix it later
today so that make-launchpad doesn't need an argument anymore.

In the meantime for a quick fix, you can do:

(def grid (make-launchpad nil))
(led-set grid 1 2 1) ; red
(led-set grid 1 2 2) ; green
(led-set grid 1 2 3) ; yellow
(led-set grid 1 2 0) ; off
(on-action grid (fn [event x y] (println event x y)))

Yes, this is entirely different from the README. I'll update that too.
Once I've made the fix you'll just need to change (make-launchpad nil)
back into (make-launchpad).

Grid is a very new project and the protocol will be in flux for a
while, because none of use really knows the ideal shape it should
take. I'd like to cut a 0.0.1 release just so there's a stationary
target people can develop against -- would you (or anyone else) be
interested in that, rather than developing against master?

Phil

Jon

unread,
Mar 25, 2012, 12:41:28 PM3/25/12
to over...@googlegroups.com
Hey Phil,

Awesome, this is just what I needed. So i can call led-set just fine but when I call on-action I get

overtone.grid=> (on-action grid (fn [event x y] (println event x y)))
CompilerException java.lang.IllegalArgumentException: No single method: on_action of interface: overtone.grid.Grid found for function: on-action of protocol: Grid, compiling:(NO_SOURCE_PATH:10) 
overtone.grid=> (use 'overtone.grid)
nil
overtone.grid=> (on-action grid (fn [event x y] (println event x y)))
CompilerException java.lang.IllegalArgumentException: No single method: on_action of interface: overtone.grid.Grid found for function: on-action of protocol: Grid, compiling:(NO_SOURCE_PATH:12) 
overtone.grid=> 


What am I not using/requiring? I am running my repl from with in src/overtone/grid. 

Yeah it would probably be nice to nail down an initial version so people can work on some higher level features. I haven't looked into much of what else is out there as far as launchpad and monome applications for controlling more than just triggers in overtone but after testing it out with Ableton, I am going to for sure want to add functionality for controlling levels, panning, etc. 

Thanks again for the examples. 


 
// Jon

Philip Potter

unread,
Mar 25, 2012, 12:51:34 PM3/25/12
to over...@googlegroups.com

On Mar 25, 2012 5:41 PM, "Jon" <jonr...@gmail.com> wrote:
>
> Hey Phil,
>
> Awesome, this is just what I needed. So i can call led-set just fine but when I call on-action I get
>
> overtone.grid=> (on-action grid (fn [event x y] (println event x y)))
> CompilerException java.lang.IllegalArgumentException: No single method: on_action of interface: overtone.grid.Grid found for function: on-action of protocol: Grid, compiling:(NO_SOURCE_PATH:10) 

Oh sorry, you need two more arguments. It doesn't matter what they are, they get ignored - only the monome grid implementation uses them. This is a wart which I'd like to get rid of when I get time to understand it properly.

> Yeah it would probably be nice to nail down an initial version so people can work on some higher level features. I haven't looked into much of what else is out there as far as launchpad and monome applications for controlling more than just triggers in overtone but after testing it out with Ableton, I am going to for sure want to add functionality for controlling levels, panning, etc. 
>
> Thanks again for the examples. 

OK, I'll try to cut a 0.0.1 version this week. I'd like to be clear that everything is subject to change at this stage, so I'm making exactly zero forwards compatibility promises.

I'd also really appreciate feedback - if you use grid, please post your code to the list so I can see how it's being used in the wild. If you experience any pain points, please let me know too.

Phil

Philip Potter

unread,
Mar 25, 2012, 4:39:02 PM3/25/12
to over...@googlegroups.com
Ok, I've pushed an update to master that removes the metakey-fn
argument to make-launchpad (so instead of (make-launchpad nil) you
need (make-launchpad) now) and updates the README to reflect reality.
Hope this helps!

Phil

Jon

unread,
Mar 25, 2012, 4:44:01 PM3/25/12
to over...@googlegroups.com
awesome thanks! Also, i am having issues with the control buttons… When I push one of them nothing returns, then when I push button in the 8x8 matrix it flushes and prints all the error messages from the control buttons. I spent a little while looking though the source for grid and launch pad and can see that the control buttons are accounted for so i am not sure why it is erring for me. Is there something else I need to do to get events from them?

thanks

 
// Jon

Philip Potter

unread,
Mar 25, 2012, 4:53:05 PM3/25/12
to over...@googlegroups.com

I think I've seen something similar before. Are you still seeing this behaviour after the latest update? I rearranged the midi handler code so it might have changed. If you are still seeing the problem, could you give me step-by-step instructions to reproduce?

Thanks,

Phil

Jon

unread,
Mar 25, 2012, 6:40:47 PM3/25/12
to over...@googlegroups.com
The latest update fixed it. Thanks again


 
// Jon

wolf...@gmail.com

unread,
May 7, 2013, 4:04:16 PM5/7/13
to over...@googlegroups.com
Hi,

I'm interested in using the Launchpad with Overtone as well! I've been googling and looking through all the Overtone libraries, and it seems like a combination of overtone.device.launchpad and overtone.device.grid suits my purposes nicely (although it seems like Polynome is a similar project, but for serial?).

However, I'm not sure how to include overtone.device.launchpad as a dependency. Grid loaded as a dependency with this in my project.clj (using Leiningen):

[overtone/device.grid "0.0.5"]

I tried a couple of similar versions for device.launchpad, but after rooting around for a bit it appears it's not in the clojars/maven repositories. Is this because I haven't found the right version, or it actually doesn't exist? If it doesn't exist, will it or do I have to go about this another way?

Any help is appreciated,
-Kane

Philip Potter

unread,
May 13, 2013, 2:57:02 PM5/13/13
to over...@googlegroups.com
Hi Kane,

Grid was an experiment in finding the right abstraction for these
devices, which I think ultimately fell by the wayside in favour of
overtone's event bus.

Can you try using overtone.device.launchpad directly and let me know
if you have any trouble with it?

https://github.com/overtone/overtone.device.launchpad

I'm not actively involved with launchpad work anymore but I'm happy to
help with any questions/queries/issues.

Phil
> --
> You received this message because you are subscribed to the Google Groups
> "Overtone" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to overtone+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

wolf...@gmail.com

unread,
May 16, 2013, 9:31:24 PM5/16/13
to over...@googlegroups.com
Hi Philip,

For anyone who runs into my issues, I ended up using clj-launchpad (https://github.com/moumar/clj-launchpad).

I tried to use the launchpad github project that you linked, but it errored when I tried to load it. The above solution works for me so no worries trying to debug it, and thanks for the response!

-Kane

You received this message because you are subscribed to a topic in the Google Groups "Overtone" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/overtone/U0DcL7nRxpY/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to overtone+u...@googlegroups.com.

wolf...@gmail.com

unread,
May 29, 2013, 4:20:33 AM5/29/13
to Evan Livingston, over...@googlegroups.com
Hey Evan,

Sorry this took a while putting together - I've been busy. Here's an example lein project:
https://github.com/wolfbiter/clj-launchpad-example

Cheers,
Kane

On Fri, May 24, 2013 at 8:51 PM, Evan Livingston <evanliv...@gmail.com> wrote:
Hey Kane, 
I'm looking for a little help getting clj-launchpad going. Perhaps you could share an example :)
Reply all
Reply to author
Forward
0 new messages