Sending DMX with Max/MSP?
I am trying to control a DMX lighting system via Max/MSP. We are mac-based and we’re currently using the DMX USB Pro by Enttec, along with the dmxusbpro external.
There seems to be some conflicting info out there for OS X and Enttec’s product. My initial understanding was that there is no need to install additional drivers for the dmx usb pro to work. And indeed, it seems like my initial test worked. However, I couldn’t get anything to happen using the Max external, and documentation reads that one should install VCP drivers for it to work. But once I do that, I am unable to connect to the device at all.
Does anyone have any experience with this? Is there a better DMX interface that I should use? Maybe one that’s more stable and easily configured for OS X? Thanks in advance!
The dmxusbpro Max external does need the VCP drivers to operate (http://www.ftdichip.com/Drivers/VCP.htm). However, the external hasn’t been updated in a while, what version of OS X are you using?
Personally, I think I better option is to move away from USB devices and use Art-Net, with hardware to convert back to serial DMX such as the Enttec ODE (http://www.enttec.com/index.php?main_menu=Products&pn=70305&show=description). This way, there can never any problems with drivers and much less maintenance is needed on the software side to keep everything up to date. I’ve just released the initial beta version of max objects to handle Art-Net transmission. (http://cycling74.com/forums/topic.php?id=38550)
Also, you might find this useful. http://www.theimpersonalstereo.com/software/imp-dmx/
i’ve happily been using the Enttec Dmxusbpro on Max5 and OSX snow leopard. Don’t rememeber if I had to install drivers…
That’s helpful, David. Thanks. I’m very new to DMX and Max. Diving in to a big project and I’m in over my head. I am going to look carefully at ArtNet. I appreciate the resources!
I hate the idea of using outdated software, and I hate even more the idea of struggling to make it work…
I am using the most current version of Snow Leopard, though I had the same trouble in Lion.
one thing to check on the lanbox’s is the communication frequency. when i looked at them (sereval years ago) they did 20Hz max while the enttec’s do 40Hz i believe. this might or might not be of importance depending on the intended use.
Unfortunately this is still the case, maximum frame rate of 20 Hz. The LanBox is a great piece of hardware for the price, but that makes it a dealbreaker for me personally.
I have this same setup and it’s always a bit tricky.
I install the D2XX drivers here: http://www.ftdichip.com/Drivers/D2XX.htm
AND the VCP drivers as well (link on the same page).
As I remember the directions for installing the drivers via the terminal window have the wrong version number of the driver in the directions. Pay attention to syntax closely here.
Open a terminal window and type "ls /dev". You should see something like below. If you don’t see the cu.usbXXX listed it means your drivers aren’t installed correctly yet. Make sure your USB Pro is plugged in!
Copy that unique number identifier and then format it like this in your patch:
If all is well you’ll see that toggle box with an X if it connects.
@lostboy — thanks! A couple of questions:
Does the PRO Utility from Enttec behave as you’d expect after installing VCP? As you suggest, I installed D2XX as well as VCP, and indeed I see the device listed in /dev, but PRO will not connect to the device. It seems that Max (using Max 5) likes VCP but PRO does not. In fact, after uninstalling VCP I see PRO working again.
When does the green light come on the device? In an earlier test, I got a flashing green light, but generally now it is nothing except for when I first plug in. I believe I successfully upgraded the firmware (to 1.44) and even though it connects in Max, there appears to be no activity and I have not been able to make my colorstrip do anything yet. Are there messages in Max that let you know you are talking to a specific fixture?
Sorry to be a pain. I’m new to DMX and Max, and I’m really just flailing around. Can’t wait for this to work!!! I’m ready to reinstall my system to get this going…
I’m using the following max external to communicate with the Enttec box:
It’s totally worth the $$. If you decide to go this direction, be sure to open the help file, it will give you a good example to work from.
I’ve never tried the Pro Utility from Enttec so I can’t comment there.
The green light comes on when you plug it in (it flashes and then goes out), and when data is being sent to the unit. Once you get it working sending levels changes to say lights will make it blink continuously. I use this to control AC lighting in art installations based on the viewers interactions with proximity sensors.
Be sure and use a real DMX cable to connect your box to your DMX lighting unit. Some people just use standard XLR cable and it seems to work, but I’ve also heard people having problems with XLR cables b/c they aren’t properly shielded. If you get strange results, use the DMX cable w/ proper shielding.
I hope this helps.
The issue with using the right kind of cable is actually not because of the shielding, its because DMX is a data connection rather than an audio signal, and requires cable of a different impedance. However, for practical purposes XLR3 mic cables will work and should have no ill effects unless running over extremely long distances (50m+).
The reason not to use mic cable is actually more due to reducing confusion than anything else. Mic lines can potentially have 48 volt phantom power running down them, which if accidentally plugged into a lighting fixture will fry its control circuitry. This is one of the reasons that the DMX standard calls for 5-pin XLR connectors. The reason a lot of cheaper fixtures have 3 pin XLR is purely down to manufacturers trying to save money.
> The reason a lot of cheaper fixtures have 3 pin XLR is purely down to manufacturers trying to save money.
probably, but it’s also quite a convenience not to have to stock up on 5-pin cables or adapters. glad i can just use my XLR’s. i have just one 5-to-3 pin adapter for the Dmxusbpro output. everything else in the DMX chain is 3-pin.
I am using the same object. The demo version of dmxusbpro, to ensure that it will work before I buy. It seems like the object is dependent on VCP drivers. Sadly, it is after I install those drivers that I have trouble. Once installed, the enttec box is visible in Max, but I can’t get anything to happen. On the other hand, if I get rid of VCP I am able to access the box from the PRO app and then use other software (LXConsole) to control the colorstrip. Thanks for the confirmation about the green light. I’m starting to wonder if I have to choose between two driver types, VCP (Max) vs D2XX (Pro Utility+commercial dmx software.)
Can you give me an example of what message is sent to the dmxusbpro object to turn on a fixture? If I can get Max to control my lights at all I will forget about anything else…
Very cool to do lighting with proximity sensors! I’m trying to control stage lighting from my guitar rig.
The easiest way is to open the dmxusbpro help file in Max. Change the message where it says "open /dev/cu.usbserial-XXX" to your unique device identifier. Then click on it. You should see the toggle box below with an X if it is successful, the max window should also output some information on a successful connect. From there you should be able to just use the sliders to test some lights in your setup.
Not sure why you're having issues though. I would suggest removing all the drivers and starting clean. Also, I'm assuming you are on a Mac? If you're working on a Windows box, I really have no idea.
Thanks for the clarification on the DMX cables. I remember reading a lot of different articles debating the differences back when I was buying gear. I can confirm using both DMX and mic cables w/ success (my mic cables are well under 50m). I'm also using the 5pin-to-3pin adapter. I do use a 3pin DMX cable though, just to eliminate the potential for ghosts in the machine, I have enough of those in most of my patches ;-)
thanks a bunch, lostboy. Yep, I’m using Snow Leopard. I’ll fight some more (also have a ticket with Enttec) and report back!
As soon as I get my DMX USB Pro unit back from the installation it’s currently sitting inside, I’m planning on trying to write my own external for it as I think it’s unlikely that this one will ever be updated again. I have severe compatibility problems using it with Lion, and in Snow Leopard, I could only get the receive mode to work if I used version 1.3.5 rather than 1.4.
It’s one of those rules that you should follow for best practice but in reality doesn’t make much difference except in extreme circumstances. I’ve run DMX all around the 50 year old tie-lines in the last theatre I worked in without a problem.
@david — that’s great to hear that you’re writing an external. I can’t say that I’m sold on the stability of dmxusbpro (obviously because I can’t get it work at the moment!) Keep us posted, and thanks!
I used to use the entec dxmusbpro, then I made my own interface using arduino. Nice and easy, very reliable!
I suggest that route if you’ve tinkered with arduino at all
I have to say I am quite impressed with both Cycling 74 and Enttec for their customer service/tech support. Bottom line is that the PRO Utility (whose purpose I do not understand) uses D2XX drivers. So do other lighting software. But the dmxusbpro external requires virtual com port (VCP) which conflicts with D2XX.
This is only an issue in OS X, not WIndows, of course.
Helpful info here:
Anyway, all I need is Max/Msp, so I’m not worried about broken D2XX drivers. But I’m sure some folks do care. I can imagine a need to utilize the dmxusbpro object alongside some slick virtual lighting console…
I would love to build an arduino-based DMX controller. is it stable enough for pro work? Did you use a kit or tutorial that you can recommend?
FWIW I’ve been meaning to post a tutorial up for ages about my DMX-Hero:
Basically it sets up its own Wifi access point and translates OSC into DMX so you can use any wifi enabled OSC capable software to control DMX lighting. It would be fairly easy to adapt it to join an existing wifi network or just use an ethernet connection if you want to stay in OSC, or just adapt it to use serial over USB.
I’ll keep you posted if I manage to get it up there, but meantime, you might check out Daniel Hirschman for Arduino DMX tutorials.
The purpose of the Pro Utility is just as a test application for the hardware unit. It also lets you update the firmware, and configure various aspects of the transmission.
@Luke — nice! So you’ve built a device that takes the computer out of DMX control via TouchOSC! Very cool…You’d do the world a service by making a tutorial on how to go about building one. Nice work.
I’m trying! There’s just not enough time in the world!
This is an excellent forum! Makes me feel even better about my move from pure data to Max/MSP! Thanks, all!
So things seem to be working. The problem now is that I’m a complete newb at DMX as well as Max/MSP.
I have a patch that reads in analog values from an arduino. I have various voltages moving around and the ranges are all over the place. So first question is there an object that will take one range of values and re-map to a different range. That is, say one value moves between 80 and 800, is there an object (like autoscale in Pd) that will map the values to, say, 1-255? 0-127? etc…
And then how do I send those values to dmxusbpro? I understand the format is
Take a look at the example below. Also, the imp.dmx package has specific examples in the distribution.
----------begin_max5_patcher---------- 1054.3oc2Y00iiaBE84jeEH+TqZ1Qf+N8otR809VUUUqpVQrYRXqMXgIyjcW s+2Ke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302knDJoly0iTxl9ZGmGZqNBhghfe2EY+Z.QOqSeqA3O7f hbAOgyFdz2mzYwi9xUlK7j3BdlQ9I2E7r9L34TGfDiG.Zs4p9RxNV6J3AbB3 FQwAmOOfLGvCZ8aqU3S.8UEOtDwJb9hXk5B8flO4CxE7LezSnKAzOQicMwiK dWoyFZbw2ZFcsb.My2JkKBmYzuxEY7KDM1ighaZdfHZ6FRCPTGM+ibg4O8dk oJkYqZFw.A4AZe+iWpGsut7+.0MGq5A -----------end_max5_patcher-----------
David, my cup runneth over. I am officially on the right track now. Cheers!
okay more basic Max and basic DMX questions…
Am I correct that the values going into dmxusbpro are pairs that can be grouped with other pairs in the same message? Like [1 255 2 255 3 255]? If that’s the case, can somebody advise on the best way to get variable input into those longer messages? Prepend is great — can you nest those objects to put a constant pair for channel one and a variable integer for channel all in one message?
And also just to confirm: if I have two fixtures, both with 4 channels of DMX each, and I start with address 1 for the first one, I should address the second as 5? Then a message to dmxusbpro of [1 255 2 0] and [5 255 6 0] are the same for the two different lights?
You can send lists of channel value pairs, yes. There are a lot of different ways to format a list, take a look at the pack and pak objects, the join object and the various modes of the zl object.
imp.dmx (http://www.theimpersonalstereo.com/software/imp-dmx/) is a collection of abstractions to make formatting this kind of data easier, and has an object which automatically adds channel numbers onto a list of values. It also has hardware examples which will show you how to work with the dmxusbpro object, and everything is fully documented.
You’ve got it right with the addressing.
David, thanks again… I didn’t really see what the deal was with imp-dmx, but now that I do I will dig in. I also didn’t realize that you wrote it. Nice work. Thanks for being so generous with your expertise. This field needs more folks like you! Cheers.
Everything is working great! I’m using two chauvet colorstrip mins to test things out with, but my next step is trying to control some fairly fancy moving Robe lights at one of the nicest venues in town. Needless to say, it will be more complicated than controlling my current setup.
I have access to DMX values/addresses for these lights, but it occurs to me that if I were able to see the DMX values that are used in typical control over those lights, I could map actions accordingly much more simply. Like if I used their interface to do some fancy rotation and color change, I could see what values need to be send and map accordingly.
Can I use "Receive" on the DMX USB Pro to hijack some of that data? Does DMX data get saved in any sort of flat file when saving scenes or other preplanned sequences? If not, is there any advice on how I can use Max to get a clear sense of what messages do what to these new lights?
You can receive data with the dmxusbpro, however this mode has always been problematic on current OS versions. However this probably isn’t the best solution for your problem. What you should do is find the manual for your lighting fixtures, somewhere in there will be a dmx specification showing you what DMX channels are mapped to the various functions of the hardware.