by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 25 01:09

    brunchboy on master

    Add missing require [skip ci] Remove unused requires [skip ci] (compare)

  • May 13 03:06

    brunchboy on master

    Only index the latest version o… (compare)

  • May 07 03:23

    brunchboy on master

    Really fix comment, and indenta… (compare)

  • May 07 03:21

    brunchboy on master

    Fix comment [skip ci] (compare)

  • May 07 03:01

    brunchboy on master

    Remove fragments from site navi… (compare)

  • May 07 02:52

    brunchboy on master

    Fix a great many broken links. … (compare)

  • May 02 18:19

    brunchboy on master

    GitHub strips styles, argh! [sk… (compare)

  • Apr 29 23:51

    brunchboy on master

    Update to use new UI and pagina… (compare)

  • Apr 01 02:41

    brunchboy on master

    Update user guide to use new An… (compare)

  • Feb 25 01:41

    brunchboy on master

    Add lunr search to the develope… Update dependencies. (compare)

  • Jan 27 03:57

    brunchboy on master

    Add Sponsor button [skip ci] (compare)

  • Jan 26 06:42

    brunchboy on master

    Need to add sonatype-snapshots … (compare)

  • Jan 26 06:41

    brunchboy on master

    Need to add sonatype-snapshots … (compare)

  • Jan 26 06:36

    brunchboy on master

    Update user guide copyright dat… (compare)

  • Jan 26 06:35

    brunchboy on master

    Update copyright date. (compare)

  • Jan 26 06:34

    brunchboy on master

    Update dependencies. (compare)

  • Jan 26 06:30

    brunchboy on master

    Fix GitHub Actions to upload ja… (compare)

  • Jan 26 06:22

    brunchboy on v0.1.8-SNAPSHOT

    (compare)

  • Jan 26 06:16

    github-actions[bot] on v0.1.8

    (compare)

  • Jan 26 06:15

    brunchboy on master

    Release 0.1.8 (compare)

Benjamin Gudehus
@hastebrot
I have a small question. The README.mdsays afterglow can communicate with a LaunchPad Pro controller. Is it also possible to use a LaunchPad MK2 (on Linux)?
James Elliott
@brunchboy
Hi! I have not yet written an MK2 mapping. Just today I received a LaunchPad Mini on loan from Novation in order to write a mapping for that, and coincidentally yesterday I was looking at the programmer reference for the MK2, out of curiosity to see how much work it would be to support. It looks like it is very close to the Pro, missing only a couple of features like velocity and bulk update of the LED grid via System Exclusive messages. So the short answer is: not yet, but if you are willing to help me test things we should be able to get your MK2 working, even if not quite as quickly as if I had one sitting in front of me.
Also, as far as I know, you are the first person who will be trying things on Linux. I believe it should work fine, once you get OLA installed, and would definitely like to hear how that goes, and help smooth out any rough edges you may encounter.
Benjamin Gudehus
@hastebrot
Hey. Thanks. I'll receive my LaunchPad on Friday and am happy if I can help out. I briefly looked into afterglow/controllers/launchpad_pro.clj, it looks not too complicated and gladly Novation provides a more or less detailed programmer reference.
James Elliott
@brunchboy
Awesome! And yes, their programmer reference is very helpful. I just got some basic things working on my Mini, and looked a bit more into the Mk2. There are a few more differences than I mentioned above (the physical layout of the Mk2 is more like the Mini and S than like the Pro, for example, with only two sides of round buttons), but it still looks like it will be pretty straightforward.
I now plan to pull some of the common Launchpad support into its own namespace, and use the fact that their current models respond to the MIDI Device Inquiry message to enable Afterglow to detect what kind of Launchpad you have connected, and construct the appropriate mapping to drive it. By the time yours arrives, there should be a good framework for us to work with.
Benjamin Gudehus
@hastebrot
Linux: It seems to work out-of-the-box and there are drivers included in the Linux kernel since 2.6. launchpad.py says it works on Linux (https://github.com/FMMT666/launchpad.py#requirements).

Ahh, read about the Linux kernel driver in the readme of pyLaunchpad:

Support for the Launchpad was added in Linux Kernel 2.6.37, so Linuxes with a newer kernel will not need any special drivers.

James Elliott
@brunchboy
That’s great! And I believe OLA is quite happy on Linux too, and Afterglow should be. But I would not be shocked to discover that I had made some sort of assumption in my code that is fine for the Mac, but a problem on Linux. If so, it should be a pretty easy fix, but I am glad to have someone helping test it.
Benjamin Gudehus
@hastebrot
Compiling OLA took long on Ubuntu 14.04. It finished without errors. Yesterday I had some problems running Overtone in the Leiningen REPL on Linux.
Hmm, I see, ola-clojure is completely written in Clojure using Protobuf to communicate with OLA.
James Elliott
@brunchboy
That’s correct. It used to be part of Afterglow, but I pulled it out, because others might want to use OLA with Clojure.
(That was a request from the Open Lighting Architecture team, and I thought it was an excellent idea.)
Benjamin Gudehus
@hastebrot
Is there a programmer reference for the Launchpad Mini? I couldn't find any. The Mini is much more like a Monome Grid, with its small buttons and minimalistic design. I really like that. That it only has three colors (amber, green, red) is also ok. Maybe more constraints result in more creativity. :)
James Elliott
@brunchboy
There isn’t a programmer reference, but I have determined that the Launchpad Mini is functionally identical to the Launchpad S, only in a smaller form factor, so I am able to use that programmer reference in working on my mapping (and support both models with one set of code). And yes, I am not going to try to reflect cue colors on the Mini, I will use the colors only to convey state information.
I like it too, small but functional and solid feeling! I am glad it was the model I requested on loan first, although having an Mk2 would have been more helpful in getting yours up and running.
James Elliott
@brunchboy
All right, I have the Launchpad Mini mapping working. There are a couple niceties I would like to add, but tonight and (mostly) tomorrow evening I will work on the Launchpad Mk2, starting with the mini code since they are structurally so similar. Hopefully by the time yours arrives there will be a snapshot build that tries to support it, and we will just need to debug it.
Benjamin Gudehus
@hastebrot
My Launchpad arrived today. The USB-MIDI driver works on Linux.
James Elliott
@brunchboy
Ahead of schedule, wow! Ok, I don’t have anything ready yet but will start on the framework anyway. What MIDI port names show up for it under Linux? Do you have a checkout of Afterglow yet? If so, I’d be interested in what you see when you run lein repl from within that checkout, and evaluate (clojure.pprint/pprint (afterglow.midi/open-inputs-if-needed!)) with the Mk2 plugged in.
Benjamin Gudehus
@hastebrot
afterglow.examples=> 16-02-11 00:09:13 BG-X240 INFO [afterglow.midi] - Opened MIDI output: {:name "MK2 [hw:2,0,0]", :description "Launchpad MK2, USB MIDI, Launchpad MK2", :vendor "ALSA (http://www.alsa-project.org)", :version "3.19.0-49-generic", :sources 0, :sinks 2147483647, :info #object[com.sun.media.sound.MidiOutDeviceProvider$MidiOutDeviceInfo 0x583c0e2a "MK2 [hw:2,0,0]"], :device #object[com.sun.media.sound.MidiOutDevice 0x11141d29 "com.sun.media.sound.MidiOutDevice@11141d29"], :receiver #object[com.sun.media.sound.MidiOutDevice$MidiOutReceiver 0x38c28485 "com.sun.media.sound.MidiOutDevice$MidiOutReceiver@38c28485"]}
The REPL also says: Unable to load libCoreMidi4J.dylib, CoreMIDI4J will stay inactive: java.lang.UnsatisfiedLinkError: no CoreMIDI4J in java.library.path.
James Elliott
@brunchboy
Yeah, that’s an artifact of the fact that the project puts CoreMIDI4J’s java classes on the classpath at compile time so it can build against it, but CoreMIDI4J only gets installed on Macs, it is harmless.
Those log messages should be going to a log file, but logging is not getting initialized until you do (use-sample-show). I still need to address that.
There is no nicely formatted map coming back, apart from the log lines? Try (use-sample-show) and then running it again.
Benjamin Gudehus
@hastebrot
afterglow.examples=> (clojure.pprint/pprint (afterglow.midi/open-inputs-if-needed!))
({:name "MK2 [hw:2,0,0]",
  :description "Launchpad MK2, USB MIDI, Launchpad MK2",
  :vendor "ALSA (http://www.alsa-project.org)",
  :version "3.19.0-49-generic",
  :sources 2147483647,
  :sinks 0,
  :info
  #object[com.sun.media.sound.MidiInDeviceProvider$MidiInDeviceInfo 0x8f4a17b "MK2 [hw:2,0,0]"],
  :device
  #object[com.sun.media.sound.MidiInDevice 0x6bf434f "com.sun.media.sound.MidiInDevice@6bf434f"],
  :transmitter
  #object[com.sun.media.sound.MidiInDevice$MidiInTransmitter 0x546be169 "com.sun.media.sound.MidiInDevice$MidiInTransmitter@546be169"]})
nil
this is the complete output.
after I evaluated use-sample-show.
James Elliott
@brunchboy
Great, so it looks like just one port gets created under Linux. I wonder if that is true on other platforms? But for you we are going to be able to use "MK2" as a string to select the right port.
Benjamin Gudehus
@hastebrot
btw: do I need to restart the REPL after some clojure files were changed?
James Elliott
@brunchboy
In general no. That is one of the great things about Clojure. You can tell it to load the file again. But I would really suggest you use an editor with an integrated REPL support, then you can just re-evaluate a form or a function definition on the fly, jump to where things were defined, and so on.
What is your usual editor of choice?
Benjamin Gudehus
@hastebrot
I have neovim with some clojure plugins that connect to nREPL server and cursive for IntelliJ, but in cursive the evaluation of parts of the source code didn't work
So I'll use neovim.
James Elliott
@brunchboy
Cursive usually works great, one of my coworkers swears by it, and Colin offers great help on the mailing list. I think you’ll be a lot more productive in that if you can get it working, so it is worth trying a bit more.
I personally use Emacs and CIDER, but if you are not already an Emacs user I would not try to steer you in that direction.
Benjamin Gudehus
@hastebrot
I've started Cursive and imported Afterglow as Leiningen project. Source editor and local REPL work fine.
Ahh, and I can also switch REPL ns to current file and send the top form to the REPL.
Sending the form to REPL is (per default) "cpp" in vim and C-S-P in Cursive.
James Elliott
@brunchboy
Yeah, there are lots of powerful things you can do. I am not a great resource on Cursive but I think you will find it very useful, and I know there are some good tutorials and introductory material for it out there.
Benjamin Gudehus
@hastebrot
Cursive's official user guide looks very clean and accessible.
James Elliott
@brunchboy
It’s an amazing product. If I was more of an IDE than Emacs person, I would use it heavily.
Well, I would love to dive in and start writing the Mk2 mapping right now but I need to go to the gym and then eat dinner. Hopefully you have plenty to explore in the mean time. If you want to experiment with that, I plan to start with the Launchpad Mini as the basic framework, but substitute the RGB pad support from the Launchpad Pro. There will be some areas that are a hybrid of both, such as the lack of velocity support, and I am not sure if the MIDI note assignments are the same on the Mk2 and the Pro.
If you want to experiment with that, go ahead, but otherwise I should have a mapping for you to try within the next day or so.
(And I just pushed another version of launchpad_mini.clj.)
Benjamin Gudehus
@hastebrot
Nice, I'll check it out tomorrow. It's very late here (my timezone is europe/berlin).
James Elliott
@brunchboy
Yes, I had noticed you were in Germany. Are you actually in Berlin? I have visited that city a few times, but too briefly.
Benjamin Gudehus
@hastebrot
I live 300 kilometers west of Berlin in Hannover.
James Elliott
@brunchboy
(My timezone is US/Chicago, I am in Madison, a medium-sized University town and the capital of Wisconsin. Many German influences here, and the countryside reminds me a lot of East Germany.)
I have not visited Hannover, but would like to someday. For now, good night!
Benjamin Gudehus
@hastebrot
See you.