Forum rss-feed

Forum

Developers: MIDI key illuminator

Most Recent

written by: NothanUmber

Ok, here a Windows version of the MIDI Illuminator agent for EigenD 1.4.12. Please have a look at the contained Readme.
If it doesn't work just come back to me and I can have a look.
(As far as I can remember, there were problems with very big setups - like the Alpha3 setup. Because the way layouts are handled is more on the memory intensive "brute force" side. Here it might help to experiment with the "light" versions (also included - but not fully tested if I remember right), that use less memory - but also offer fewer features.)

Also added the complete sources in the state I left it. (Not prettiest possible, this was mainly for learning how things work. Wanted to clean it up but never did... - but it should work.)
P.S.: Forgot to add the Stage tabs. If the folder should be empty - please redownload

written by: dhjdhj

Sat, 31 Mar 2012 21:43:20 +0100 BST

Can you post some sample URLs you used?

I'm going to add this support to my Max implementation but it's always nice to have lots of examples.


written by: geert

Sun, 1 Apr 2012 01:02:27 +0100 BST

Steve, glad to hear it's working well for you.

dhj, I'm posting some other code in a dedicated thread


written by: dhjdhj

Sun, 1 Apr 2012 03:00:03 +0100 BST

Maybe, but there is insufficient information there for me (at least) to actually get it working.

So, for example, I used workbench to create a new "illuminator 1"
I noted I could change the port and I set it to 10250

I then tried the curl example and noted that the "physical light map" field got changed to [[[1,5],green],[[1,4],green]] which implies that the http server was running.

However, nothing happened on the Alpha --- no lights on.

Also, for curiosity, I opened the EigenCommander and tried a few of the commands.
illuminator 1 listen (not sure this is needed, I figured that creation by workbench was doing that but tried it anyway)
Then I tried
server toggle start
and got the message "No agents use the verb start"

What next?



geert said:
dhj, the Illuminator docs cover how to change the server port and how to start/stop the server


written by: geert

Sun, 1 Apr 2012 07:30:00 +0100 BST

Did you connect the Illuminator light output to a keyboard or a keygroup that's connected with its light output to a keyboard upstream?


written by: dhjdhj

Sun, 1 Apr 2012 13:08:06 +0100 BST

Nope --- looked everywhere in documentation wiki for examples of how to use the illuminator but didn't see anything like that. It's obvious once you mention it but not before. I still don't have a good user conceptual model for this stuff.

Do I connect it to the same keyboard whose output is connected to the OSC agent?

I'll play around when I'm at the machine where the alpha is setup.


written by: dhjdhj

Sun, 1 Apr 2012 19:36:28 +0100 BST

I'm sorry --- but this just makes absolutely no sense to me. If you look at the screen shot, the only thing I found I could connect was the "red" connector of the illuminator light output to the green connector of the alpha keyboard 1 light input. When I connected those together, a couple of lights came on representing the values I had apparently sent via curl yesterday. But sending new values via curl does nothing.


I don't know what is the significant of "green" vs "red" connector nor the significance of such things showing up on the left or the right of the agent nor can I find anything that describes it. Maybe the information is there but it's just way too hard to find it.


Screenshot


I read

The light output provides the lighting pattern that is active in the Illuminator, this is typically connected to a Keygroup Output Light Input port.


but I don't have a keygroup. I have an alpha keyboard 1 connected to an osc output 1 which seems to work just fine.



written by: dhjdhj

Sun, 1 Apr 2012 19:38:53 +0100 BST

OK --- just figured out one issue --- rows and columns seem to be the wrong way around so in my curl example, I was apparently trying to turn on a light for a non-existent key.

I have this working now. TFG


written by: dhjdhj

Sun, 1 Apr 2012 20:38:26 +0100 BST

For the --data argument in the REST request, the color values red, orange and green are allowed. May I suggest that the argument "off" or "delete" be supported as well so that an led can be turned to any color (including off) using the same URL command.


written by: dhjdhj

Sun, 1 Apr 2012 23:12:36 +0100 BST

I've observed that if I try to send requests too fast into the Illuminator via http, only some of the LEDs get updated. I've had to artificially slow down the rate at which I send commands which will be problematic if requests can be sent from multiple places, a not unreasonable function.


I'm wondering if the http server is single threaded (or not otherwise reentrant) and so is unable to handle multiple requests.


written by: geert

Mon, 2 Apr 2012 07:00:36 +0100 BST

Yes, the HTTP server is purposely single threaded and executing in a low priority thread. The update rates are fast enough though to make it impossible to see individual changes when running at maximum rates, which is sufficient. Note that there are also bound to be occasional garbage collection pauses. Finally, sending simultaneous request from different places to update the same lights concurrently doesn't seem like a useful feature to have since they do eventually have to go back to a fixed resource that needs to lock access some way or another. There's only one physical keyboard and one physical light in the locations you're accessing. Reducing the whole complexity by making the entry point single threaded, corresponds to the single physical resource that can be modified.


written by: dhjdhj

Mon, 2 Apr 2012 14:16:07 +0100 BST

The reason for sending requests from different places is because Max (just one example) is conceptually distributed and so different patchers can reasonably be responsible for handling different parts of the Alpha (e.g. each patcher takes over a particular keygroup and does unique processing).

However, I'm not quite sure what's going on. Single-threading is fine assuming that incoming requests are held up. I just did some experiments from a command line prompt where I wrote a simple script that executes the 'curl' multiple times concurrently without any delays and all the appropriate lights went on just fine so that suggests that the server is properly blocking new requests.

In Max I had to use a temporary hack (going through an external shell object) because the eigend server is using custom requests. There may very well be a problem with that object if new requests are sent in too fast.

Thanks,
D


written by: Bjoern

Sun, 13 May 2012 00:39:43 +0100 BST

Hello,

could somebody give a full belcanto example of how to start the midi illuminator server (and select a particular port)?

I've had a look at
http://www.eigenlabs.com/wiki/2.0/Illuminator/
but not having done much belcanto, I can't figure it out.


written by: dhjdhj

Mon, 21 May 2012 03:53:03 +0100 BST

I went back and checked my code against 2.0.44 and the REST commands work perfectly with it.

However, in 2.0.48, the exact same commands do not work. The EigenD server is definitely listening but it returns 404 Not Found errors.


written by: geert

Mon, 21 May 2012 07:23:36 +0100 BST

@dhjdhj, the rows and columns have been renamed and switched around in 2.0.48, maybe that's what's happening?


written by: dhjdhj

Mon, 21 May 2012 11:18:47 +0100 BST

Someone might want to update http://www.eigenlabs.com/wiki/2.0/Illuminator/
to reflect that change.

I have it working again now.

Thanks,
D


written by: dhjdhj

Mon, 21 May 2012 11:54:54 +0100 BST

What are the correct row and column values needed to light up the percussion section keys?

I tried using /column/1/row/25 assuming that the first percussion key might be row 25 (on an alpha) but that didn't work.


written by: geert

Mon, 21 May 2012 12:03:55 +0100 BST

Thanks for the wiki reminder, fixed it.

The percussion keys are on row 6 on the Alpha.


written by: dhjdhj

Mon, 21 May 2012 12:38:50 +0100 BST

I think you meant to say column 6.

That works, thanks.


written by: geert

Mon, 21 May 2012 12:39:05 +0100 BST

Hehe, indeed, still thinking in the old world :-)


written by: whitetree

Sun, 9 Jun 2013 00:30:35 +0100 BST

I'm having some confusion on this project and the illuminator agent. Is it possible to illuminate the keys dynamically with midi in?

In example, a chord from a daw sent via midi to the eigenharp will light those notes if they are present on the current scale/tonic setup.

I see that fixed bitmap lightings are available, but can midi data light keys dynamically according the scale?



Please log in to join the discussions