[link] 2005-07-21T23:48:44 MIDI phrases to control home lighting: http://cvs.bigasterisk.com/viewcvs/room/lightswitchmidi?rev=1.4&content-type=text/vnd.viewcvs-markup has code that reads this n3 http://cvs.bigasterisk.com/viewcvs/room/midicodes.n3?rev=1.2&content-type=text/vnd.viewcvs-markup which describes midi note patterns and the light levels they should trigger. Now when I play certain phrases into the piano keyboard, the lights change. Middle C followed by the F above will turn on the main 4 lights all the way, for example. C-Eb turns them on partway. The n3 should have been a lot prettier, but rdflib currently can't parse any kind of advanced n3 syntax. The graph query code should use SPARQL and turn three loops into one, but I don't have any SPARQL installed yet. I should probably switch to redland for both of those. I hope it's easy to port between those libs. I am quite satisfied with pyalsamidi, since despite not knowing how alsa midi works or what half the terms mean, I was able to use the example event reader code and get my program listening to midi within a few minutes. I could probably get rid of the sequencer setup and just use raw midi events, given my needs. Also, something is very slow about the XMLRPC communications (it takes 2-3 sec to send 4 light change commands). I'll leave that alone for now since it looks kindof cool to see the lights turn on individually. This rdf setup is similar to http://bigasterisk.com/toilet/toiletcircuit.gif, which is close to the control program we used on the toilet automation project several years ago. I have not even tried to research existing circuit vocabularies yet, because I knew going off to read even more about rdf would just delay my project further. I would like to get the URIs a lot more standard, sometime.
[link] 2005-07-29T18:57:45 js vector graphics: http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm is cool, but I still wonder about all those div tags. Would it be better to make a bunch of (anti-aliased!) line images and then tile them in the client? You could get the exact required slope by doing minor image resizes on several basic line shapes. This approach would also allow for more line styles.
![]() | Unless otherwise noted, all content licensed by Drew Perttula under a Creative Commons License. |