Jump to content

DMX input


HawThorn

Recommended Posts

AFAIK it's not that easy. As DMX is based on a serial RS-485 protocol, I doubt you can directly connect it to J4 (which is - if I remember right) the IIC-Jumper.

If you're into the DMX Protocol you might check out the IIC-MIDI-Bridge pages on uCApps.de which actually use a PIC16F. I assume you'll have to write a firmware for the PIC16F to do IIC/DMX-Conversion.

DMX-circuit -> PIC16F for Protocol Conversion -> communication via IIC to the Core Module (PIC 18F).

I would be lucky to build a DMX2MIDI vv controller as well, but I always found some (price- or knowledge related) problems that kept me away from it so far :-\

Keep us updated if you're going to build one! ;)

Regards,

Michael

Edit: You can program the Core in C; for the PIC16F you might use ASM, but I'm not sure of that, maybe C is also an option for the PIC16F...

Link to comment
Share on other sites

DMX-circuit -> PIC16F for Protocol Conversion -> communication via IIC to the Core Module (PIC 18F).

This is the only way without some crazy coding tricks....DMX runs at roughly 8 times the data rate of MIDI, and every value is transmitted in every frame of data vs. MIDIs only as needed way.

The difficulty in coding this is directly related to what you want to do, ie do you need a full frame of DMX data converted to MIDI, or just a few channels of DMX triggering MIDI events.

Grabbing a partial frame is easy, you can set your uart in the MCU to the wrong serial format and DMX will cause an error flag at the start of each frame, then you count channels and grab only the data you need. (google for the specifics on this, it's out there)

Conversion of a full frame means reading and storing 512 8-bit numbers 75 times a second (or more or less, depending on what rate your fixtures expect-75fps is most common), a task most MCU's are not capable of, not even considering doing something usefull with that data.  Of course at that data rate you can skip complete frames and get back some cycles at the expense of response time.....jumping from DMX down to MIDI you could probably only read every 8th frame and not see any real world lag.

If you need an off the shelf solution an open DMX usb interface (see Entec's site) can read DMX data in to a PC/mac, and there are MAX objects and other drivers to give you access to that data.

An expensive off the shelf solution might the LanBox, it has the capability of reading DMX but I don't know if it can generate MIDI from DMX stand alone (without a PC)

Let us know what you find.....Even if you don't get to goal your research on this will help me us give a better answer on this in the future...  :)

Best

Smash

Link to comment
Share on other sites

Well,

I've a box how convert a dmx message into a midi one. But I must have after a MIOS how translate my midi message (can’t work with a pc on site during show). So I thought: "why not to do everything in a same box". My actual box converts all the 128 first dmx channels in NoteOn. The first value of the NoteOn is the channel of the dmx (0-127) and the second is the intensity of the dmx channel (8bit convert to 7bit).

The PIC16F can’t do the same? Too much information during a too short time?

Can I must store the entire dmx frame before sending it in a midi message? I can detect the break of dmx message, store the first 8bit value of dmx convert it in 7bit and send it with a other message for the channel (and a other for statue message). Then increase the channel bye one (detection of stop bit, Mark time and start bit) and doing the operation 128 times, forget the 128 last dmx channel, detecting the break of the dmx frame, etc, etc…

The PIC16F can do this, or is it too slow?

Thanks

Laurent

Link to comment
Share on other sites

I've a box how convert a dmx message into a midi one.
Please define "box" in this context....

But I must have after a MIOS how translate my midi message (can’t work with a pc on site during show). So I thought: "why not to do everything in a same box". My actual box converts all the 128 first dmx channels in NoteOn. The first value of the NoteOn is the channel of the dmx (0-127) and the second is the intensity of the dmx channel (8bit convert to 7bit).

The PIC16F can’t do the same? Too much information during a too short time?

depends on how it's coded....I doubt your "box" is able to know 128 channels by looking at only one frame....

Can I must store the entire dmx frame before sending it in a midi message? I can detect the break of dmx message, store the first 8bit value of dmx convert it in 7bit and send it with a other message for the channel (and a other for statue message). Then increase the channel bye one (detection of stop bit, Mark time and start bit) and doing the operation 128 times, forget the 128 last dmx channel, detecting the break of the dmx frame, etc, etc…

The PIC16F can do this, or is it too slow?

That method is too slow, no matter what the pic is capable of...need to grab more than one channel of data on each read.  128 reads of 75fps DMX takes almost 2 seconds.

Best

Smash

Link to comment
Share on other sites

Well,

If I want to read and use only 24 dmx values (to resolve the problem of memory and speed), is it better to use two CORE modules linked or one CORE module and one I2C midi module?

One who read and translate the dmx and one for my "traditional" midi mapping.

Link to comment
Share on other sites

If I want to read and use only 24 dmx values (to resolve the problem of memory and speed), is it better to use two CORE modules linked or one CORE module and one I2C midi module?

One who read and translate the dmx and one for my "traditional" midi mapping.

I would say one CORE and one I2C if you can pull it off.  :)

Are you considering writing the DMX input as a MIOS app?  It's quite possible if the reading of every x frame to stack up those 24 values is done.....But I don't know how cranking the serial in speed up will complicate things with MIOS.....(can you tell I'm not a coder? put me on an AVR and I can fake it though)  ;)

Best

Smash

Link to comment
Share on other sites

  • 1 month later...

I need some help to find a way of working to begin the job...

I have a Core module with mios and my own application inside (C is easy compared with assembler for me) and I have an I²C module.

With the I²C module I want to received and analyse dmx frame and convert it in midi message for my core module. Just the 24 first dmx channels…

The best way is to create a completely new asm file or to modify the current one?

I’ve an asm file that analyse and convert in an analog signal with a pic18f876… So I think it’s possible.

It’s the last straight line before the end of my project…

If you can give me a way of working…

I know what I want to do, but I don’t know how…

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...