Lorenz Cuno Klopfenstein

Dezember 2008 Archiv

This week I spent some time improving the interface and the underlying engine of the DMX Lightshow application. Every channel does now smoothly adjust its output values in order to make sudden changes less ugly (changes from one animation to the next are much more smooth as well). Additionally, each channel can now abstract one or more real DMX channels: this way it's now possible to register two or more channels on a single slider and change all channels simultaneously.

The interface.

I also made some changes to the interface (nothing groundbreaking): it's still ugly as hell, but at least it is also slightly more usable. Anyway, I'm a long way from the point where I'll confidently be able to use the application in a live scenario: I need way more shortcuts and presets in order to easily do some of the most common tasks (like fading out all channels at once).

Applet selection and channel assignment.

The application is also pretty modular: all applets (there's only one at the time, though  :D) are simply loaded by the interface they expose. Same goes for animations that can be applied to every single channel.

Enough talk... here's a new experiment!  ;)
I tried to play along "19:08", by my brother's band Spasmodicamente, but without any preparation and doing everything interactively (my brother would yell all changes and cues from behind, but I didn't get everyone of them and felt pretty helpless while I was clicking wildly around...). So, the show is pretty lame, but there is some potential!


Video on Vimeo.

By the way... you can download the music by Spasmodicamente from their website for free!  ;)

Publiziert am Donnerstag, 4. Dezember 2008
Mit Schlagwort
416 Besucher
5 geschriebene Kommentare

I'm currently trying to use NHibernate.Spatial with SQL Server 2008 (which natively supports Geometry and Geography types and indices) and so far everything works (thanks to the really good wikis on NHibernate Forge).

Unfortunately the MsSql2008 dialect implemented in NHibernate.Spatial has a known bug: in case you decide to store a NULL value in a Geometry column, the SQL generated by NHibernate uses a completely wrong parameter type (using tinyint instead of the intended geometry).

To solve the problem you need to download the NHibernate.Spatial code via SourceForge and open up the \src\NHibernate.Spatial.MsSql2008\Type\MsSql2008GeometryType.cs file. At line 58 or so you'll find:

/// <summary>
/// Converts from GeoAPI geometry type to database geometry type.
/// </summary>
/// <param name="value">The GeoAPI geometry value.</param>
/// <returns></returns>
protected override SqlGeometry FromGeometry(object value)
{
    IGeometry geometry = value as IGeometry;
    if (geometry == null)
    {
        return null;
    }
    //...

As you can see, when the value you are trying to assign to a Geometry column is null, the MsSql2008GeometryType simply passes null to the component that actually writes data to the SQL query. You need to correct that line passing a valid NULL value back:

protected override SqlGeometry FromGeometry(object value)
{
    IGeometry geometry = value as IGeometry;
    if (geometry == null)
    {
        return SqlGeometry.Null;
    }
    //...

Compile everything and use the newly generated NHibernate.Spatial.MsSql2008.dll library to store NULL values correctly.  ;)

Publiziert am Donnerstag, 11. Dezember 2008
Mit Schlagwort
726 Besucher
1 geschriebene Kommentare

My roommate Denis and I went skiing in San Martino di Castrozza last week. Here are a couple of pictures of our stay at the wonderful Hotel Orsingher and the splendid slopes in Tognola. (mehr...)

Publiziert am Dienstag, 16. Dezember 2008
Mit Schlagwort
386 Besucher
0 geschriebene Kommentare
Zurück zu Klopfenstein.net
Clemens Klopfenstein Serena Kiefer Lukas Tiberio Klopfenstein Lorenz Cuno Klopfenstein
English German