Category: code
Posted by
glibersat on December 3, 2009 |
No comments
For some reasons, I have to come back to web development. I hate having to write websites, because I feel that so boring, but what I want to achieve is more something that is a close to a real application, but web-based. At least, the business code and the goal is going to be much funnier. Anyway, in a pythonic logic, I therefore fired up django and started writing this web app.
The first step lead me to collect a few of reusable apps. One of the problem is that most of them aren’t packaged or if they are, most of them are too old compared to what is released. Some cool guys had a good idea : include a way to fetch dependencies automatically using the “manage.py” command. This piece of code is called django-dependency. All you have to do is something like this :
1 2 3 4 5 6 7
| DEPENDENCIES = (
# subversion
deps.SVN(
'http://code.djangoproject.com/svn/django/trunk/django',
root=DEPDENDENCY_ROOT,
),
) |
and then, from the command line :
While it looks sexy, this software have some problems :
- It doesn’t support GIT
- It relies on shell commands (not the python libraries) for RCSes
- It doesn’t handle checking out/updating a specific revision
I therefore decided to patch it. But, while I was adding things, I felt something was wrong and I ended up rewriting it completely.
This is why I now have a new system that is very close to the idea of django-dependency (thank you guys for this awesome idea !). I’ve called it django-autodeps and it is licensed under the GPL v3. I plan to released it as soon as possible (it works well for me, but I prefer to use it a few weeks, fix bugs, etc before releasing a stable version).
Tags: autodeps, dependencies, django, git, gpl, hg, mercurial, rcs, subversion, svn
Posted by
glibersat on September 25, 2009 |
6 comments

X10-controlled
I have recently ordered a few X10 equipments to play with. For those who don’t know, X10 is a standard for Home-automation (domotics) that enables you to remote control devices over a classical power line. A typical scenario could be for example remotely changing the intensity of a light. This has many “serious” use cases but honestly, for me, this is more a fun device to play with. Even if I may use them later for my home, I guess, I’m more interested in seeing how they can be used in another contexes such as artistic installations.

CM15
One of the devices I’ve ordered is a USB controller (model CM15) that you plug both to a usb port and the powerline. It can also receive and send events coming from wireless controllers, but that’s out of the scope for now.
So, first, I’ve of course started lurking at the existing free software to control all these toys and discovered a few projects such as Eclipse, MisterHouse, etc. They all seem to be interesting but my initial plan was more to have a good library so that I can integrate them into my existing projects. I’ve then found a low-level perl library, another one for the CM17 in ruby and my best result was a C one with a demo application.
The later works like a charm and allowed me to enter the cool world of X10 by sending some commands to my actuators. Fun. But, even if C is good for many things such as operating systems, we nowadays tend to use higher level programming language, such as my prefered one : Python.
After searching for some CM15/X10 stuff for Python, I’ve only found three libraries : a module for the firecracker (CM17) which exposes a low-level interface (very C style, low level commands) and two others called PyXAL and PyX10 that basically wrap the X10 Abstraction Layer library. While they may seem interesting, these three projects are no more maintained and the latest commits are from 2000… erg !
One possible solution could have been to wrap this C code to a Python module, but even if it works well, I had the feeling that I could rewrite it in a more consive way and in an object-oriented manner. Moreoever, this kind of USB devices are usually not too much complex to use, leading me to prefer to write a pure Python module. Beginning of another story
My goal is to make a generic, yet not complex, X10 library. Using the documents and specifications I’ve found, I’ve already written what’s needed to detect, setup the CM15 and made a pretty object-oriented interface to talk to the devices. I’ve also added the concept of House and plan to have virtual groups to be able to send a command to a set of devices you have chosen. Have a look :
1 2 3 4 5
| lamp = dev.actuator("A2")
lamp.dim(10)
lamp.off()
house = dev.house("B")
house.lightsOff() |
By the way, the module can be used for any other X10 device, it’s made for that. All the code is almost generic, you just have to write your own controller class. Also, the API is likely to change so if you have suggestions…
I’ll publish the module soon and my plan is to enhance it little by little… in fact I’ll add a feature every time I need it. If you want it faster, I’ll be happy to apply your patches
Tags: cm15, python, usb driver, x10
Posted by
glibersat on September 23, 2009 |
No comments

TuxGuitar
A few weeks ago, I’ve started trying to use the free tablature editor TuxGuitar. It’s a clone of Guitar Pro written in Java and available for Linux, MacOSX and Windows. Basically, it works, but hell, this is really no fun to use. You start playing a riff on your guitar, then you want to translate it onto a tab and it takes ages before you get the perfect timing.

Melodyne
A friend showed me earlier a new software called melodyne, and have to say, it’s quite impressive. The idea is to read an audio file, analyze it and find out the notes that were played. The result is therefore a score and you can change the pitch and length of any note, transpose them to a new scale, etc. With this example, I wanted to show that we do have the technology to extract notes from an analogical music stream.

Roland GK-3
Indeed, we have it, and Roland did not wait for melodyne to make some interesting devices such as the GK-3. It’s a device you add to your guitar and it produces the corresponding MIDI signals. They have also made some devices to go along this one such as the GR-20, which can synthesize a plethora of instruments (e.g. sitar, piano, …).
Ok, but the downside of the Roland approach is that you have to buy and attach a device to your guitar. This device uses a dedicated microphone, which can read the strings independently, therefore simplifying the signal analysis. Moreover, the GK costs about $200 and it’s more than twice for the GR…
Back to the original topic, what I’d like to have is the ability to plug my guitar in the sound card, play my riff so that it writes the notes to the tablature editor as if I had a MIDI guitar… but without adding any device. This may be quite complex to be able to do realtime analysis, but I guess it’s worth trying.

Using keyboard to play
Another much easier way to do that would be to, at least, have a way to tap the notes on the keyboard. Maybe you can already do that by using the MIDI input of the tablature editor and by using a virtual keyboard connected to it. If so, why isn’t this integrated into the tablature editors ? This is rather boring to use the mouse and the keypad to write music, really. So, basically, you would play FretsOnFire with your keyboard (using enter and F1/F2/Fx keys) to give the rhythm.
Anyway, since I’m quite lazy, I don’t want to use the mouse and keypad anymore for this task, so I’ll investigate these ideas a bit as soon as I can allocate time. Oh, and if you know about some software or combinaison of software that can do that, I’m really interested in knowing them (and also scientific publications).
Tags: analyzis, fretsonfire, gk3, melodyne, midi, music, roland, synthesis, tuxguitar
Posted by
glibersat on August 22, 2009 |
No comments
Yeah, CS-SoC… It’s like Google Summer of Code, but internal to the CrystalSpace community, hehe.
Jorrit (CrystalSpace project leader) proposed to sueastside (Jelle) to get a particular slot so that he can work on DAMN and its web interface during this summer and be paid also. Read Jelle’s blog for more informations.
The goal of this SoC was to build a Web interface on top of DAMN, to enable artists to work easily with the new tool chain we’re building at Kyanite. Jelle also added support for the Open Asset Import Library (Assimp) to DAMN, which is a very good thing. It provides us support for many new formats such as 3dsMax, Autocad, Maya, Quake, etc, etc (see here). He also made many other contributions, that you can read there.
We hope to use all his work soon to enpower the new tools even more !
Thank you sueastside !
Tags: assets, assimp, crystalspace, damn, kyanite, soc, sueastside
Posted by
glibersat on August 22, 2009 |
No comments
The CrystalSpace GSoC’09 is now almost over, students have to put their pencils down.
Sam Devlin, my student from the York institute, working on the Quest refactoring and Behaviour Tree implementation (Artificial Intelligence) for the Crystal Entity Layer, managed to successfully complete this challenge !
Thank you Sam for your serious and involvement into this project. I couldn’t expect a better SoC ! You can read his proposal to understand the objectives better.
He managed to complete most of the objectives and we have worked on preparing a future integration of the BT into editors such as CrystalArchitect. Sam is going to be a Phd Student next year, but told us he will continue to contribute to the project, which is an awesome news for the CrystalSpace community !
CrystalSpace should therefore have soon a better Quest System and a sound implementation of the Behaviour Trees. Of course, it’s not totally complete, so volunteers are welcomed to finish it.
Thanks for your work, we’ll merge it to the main branch as soon as possible… and good luck for your PhD !!
Tags: 09, ai, behaviour tree, cel, crystalspace, gsoc, quests, sam, soc
Posted by
glibersat on August 9, 2009 |
2 comments
Pablo (caedes) came to Lille for one week so that we could see each others and code on CrystalArchitect, CAF, DAMN & Metamodel
He visited the lab where I work and discovered what I do with the these python packages we wrote — on the profesionnal side. He could also see some works around the Fractal component model and we had some interesting discussions.
We also visited the 3d team of the lab so that he could see what they do (multitouch applications, virtual reality, …) there.
Of course, we also had fun, drinking some good beers and eating many dishes with mayonnaise =P. I also discovered the spanish omelette, which was great !
The result of dicussions and work is there : Lille dev meeting.
We also saw a prototype of what Sueastside (Jelle) is doing for the CrystalSpace SoC and it was very cool ! The status of his work is there : DAMN SoC’09.
Next meeting should be Amsterdam
Tags: ca, caf, damn, kyanite, meeting, metamodel, soc