Jump to content

USB DMX Programming


karl

Recommended Posts

I'm not sure if Lighting is the right forum for this (or even if this is the right site) but here goes.

 

I am currently writing a simple (as in easy-to-use) show control system. Nothing fancy, just to allow sounds (wav, mp3, etc.) and basic lighting (not movers) to be controlled using a "hit key to action cue" type interface. I have got the sound part working and the logic for crossfading lighting states. What I need now is a USB-DMX gizmo that provides some form of (simple) interface (DLL, etc.) that I can use to control it from my program.

 

There seem to be quite a few USB-DMX gadgets out there: some seem to have common APIs, others seem to be proprietary and many don't tell you much about how you can programatically control them. I was wondering if anybody else has done anything similar and/or can provide advice, suggestions or examples of driving such devices. Which type would you recommend that I try to support?

 

I would like my program to be usable with a fairly robust USB-DMX interface. However I would prefer not to restrict the choice to very expensive hardware. I plan to make the software available as freeware (if I ever get it finished and tested :rolleyes: ).

 

I am writing it in Delphi to work on Windows (as wide a range of versions as possible).

 

Any thoughts?

Link to comment
Share on other sites

enntec openUSB is probably the most 'common' USB interface - it is fairly well documented and all the methods and API's are generally open source

I've had a look at the Enttec website and the only API documentation I found was for the Pro version (and that is far from easy to understand). There is some example code for both the Open and Pro versions but its all in C++ which is complete gibberish to me.

 

Other DMX dongle sites (those that provide source/example code) all seem to be C++ as well.

 

This looks like being a right pain in the proverbial, I can feel my enthusiasm draining away. Maybe I'll just rip out the lighting stuff and make it an audio only program.

Link to comment
Share on other sites

If you're looking at writing some audio control software and want to provide for the lighting side of things too, you could always write an integration into LightFactory, which can take external triggers from simple Telnet commands. LightFactory already supports the Enttec Pro dongles, together with Cooper Controls' own USB-DMX and a host of Ethernet protocols, and is the most fully featured lighting control software available.

 

If you need any help with LightFactory, it has a very active community on the Yahoo Group.

 

FYI, it's also written in Delphi.

Link to comment
Share on other sites

If you're looking at writing some audio control software and want to provide for the lighting side of things too, you could always write an integration into LightFactory, which can take external triggers from simple Telnet commands. LightFactory already supports the Enttec Pro dongles, together with Cooper Controls' own USB-DMX and a host of Ethernet protocols, and is the most fully featured lighting control software available.

If all else fails that might be an option although one of the key drivers for this project was to produce something suitable for non-technical people. The sort of person who freaks out at the sight of a 2 preset manual desk or a simple mixing desk because they're too complicated and scary. I would be worried that getting involved in having multiple bits of software talking to each other will faze them completely.

 

I'd recommend the Velleman VM116 as a USB-DMX device, it only costs £50 on average and comes with an example

Yeah, I looked at those. I don't know how straight forward it is to use the DLL, I'll make further investigations.

Link to comment
Share on other sites

Guest lightnix

An interesting and timely thread :blink:

 

I had an enquiry last week from a chap wanting to control a small (16x8) LED matrix using a C++ or Java application. He wasn't familiar with DMX, so I suggested that a USB/DMX device might be a way forward...

 

I found this while searching. It looks like it might be a bit more developer-friendly and I wondered if anyone had any experience or opinions on it.

Link to comment
Share on other sites

What code are you thinking of writing the drivers in?

I wasn't planning to write drivers as I understood (possibly wrongly) that these USB-DMX devices came with drivers. I was hoping they would have a DLL which provided a high level API. Load the appropriate function from the DLL and call it passing in something like a byte array containing the channel levels and away you go.

 

The Open-DMX does indeed come with a DLL but using it appears less straight forward than I had hoped. This is compounded by the fact that the examples showing how to use it are written in C++. The example programs, which would probably be contained in one .pas file in Delphi seem to be fragmented across umpteen .cpp and .h files in C++.

 

I have done some programming in C and I remember that rather than trying to modify an existing program we used to scrap it and write it again from scratch because it was easier than trying to work out how somebody else had coded it. Somebody once described it as a 'write only language'. I seem to recall there being about a dozen different ways of coding A=A+1 (A++, A+=1, etc.) never mind stuff like referencing / dereferencing pointers!!! C++ seems to have inherited this and then chucked OO on top for good measure.

 

Anyway, I had a flash of inspiration in the early hours of the morning (prompted by Peter's suggestion about using Light Factory). A lot of lighting desks provide interfaces allowing you to control them using midi. So I'm going to allow cues to trigger midi messages and these can be fed to a lighting desk.

 

Ok, so a lighting desk is more expensive than a DMX dongle but it gives you flexibility, you can run sound from the computer and lighting from the desk or you can connect up the midi link and control both from the PC. Plus if your PC crashes you've still got a lighting desk.

 

Ultimately I'd still like to get an interface to a USB-DMX widget working but that can be version 2.0.

Link to comment
Share on other sites

  • 5 months later...

Hi all,

I spotted this thread and wondered if it might be of use to my own project but need a little advice...

Ok, here's a quick overview of my project...

I am recreating Shakespearean stage lighting using LEDs. The show will be in July and will be outdoors although controlled from indoors. The fixtures I will hopefully be using will be RGBAW LED fixtures. There will be 6 fixtures in total that need controlling. 4 will receive exactly the same data and the other 2 will receive the same data. Imagine 4 fixtures at front of stage all receiving same data and 2 fixtures at rear of audience which receive different data to footlights.

What I want to do is add a random number generator on it using something like C++ to make a "flicker" like a candle. I also want to be able to fade the intensity down.

Do you think I'll be able to do it on one of these boxes? Has anyone used one and, if so, how easy was it to programme the chip?

I think it will be useful as I could programme in 8 bit meaning the colour match will be really good. (colour matching to tallow candle) If I can get the flicker going too, that means I don't have to try to use a KK wheel or similar which is going to look really naff.

 

Thanks for your help.

 

Emma.

Link to comment
Share on other sites

I am recreating Shakespearean stage lighting using LEDs. The show will be in July and will be outdoors although controlled from indoors. The fixtures I will hopefully be using will be RGBAW LED fixtures. There will be 6 fixtures in total that need controlling. 4 will receive exactly the same data and the other 2 will receive the same data. Imagine 4 fixtures at front of stage all receiving same data and 2 fixtures at rear of audience which receive different data to footlights.

What I want to do is add a random number generator on it using something like C++ to make a "flicker" like a candle. I also want to be able to fade the intensity down.

 

Is there a particular reason for wanting to do this in C++ rather than using a chase or similar on a lighting desk / computer lighting control program?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.