Jump to content

MIOS for MIDI to DMX


Recommended Posts

I have some questions about MIOS in regards to my attempt at making a MIDI to DMX converter.

I can easily make the UART do the DMX output (its really simple), but then its not available for MIDI in. I read about the MIDIMerger which uses a regular DIN as a second MIDI in, is this available from MIOS? I see several functions in MIOS relating to MERGE, are these them? If so can they be used WITHOUT using the UART for MIDI in as well?  Does a MIDI message from the MERGE input get sent to the user app just like a regular one?  

Would it be best to do the DMX out as a new MIOS device driver or put it in user code? If its in user code it has to configure the UART and talk to it without the standrd MIOS reseting it back to normal MIDI use.

That bring up another question, looking at the sample MIOS apps it doesn't look like there is any explicetly called MIDI initialization from user code. Is this done automatically when MIOS is started? If so there would have to be some sort of "disable MIDI uart" function so it wouldn't  step on the toes of the DMX output.

I have no problem writing a DMX out device driver or module, but it would help to see the MIOS source code to see how others are written. Is this available?

Thanks for any help with this.

John S.

Link to comment
Share on other sites

Hi John,

I plan to upload the source code of MIOS to sourceforge.net in some months when I feel pleased with the implementation.

However, the seperate MIDI merger project is a standalone device. It uses a second, software-implemented UART input which relies on a minimum interrupt latency and consumes a lot of CPU power, therefore it doesn't make sense to integrate a similar function into MIOS (the OS wouldn't be useable to handle any other task if the realtime behaviour of the UART has to be ensured).

The MIOS merger is similar to the routine which can be found in the MIDIfilter/processor project

(both sources are available)

Yes, the MIDI interface will be initialized during startup (in fact: also by the first level bootstrap loader). The MIDI In/Out is buffered and interrupt driven in order to reduce the system load.

To integrate a user driver for the UART, a seperate IRQ hook would be required. But: so far as I remember DMX needs some RAM, since MIDI messages are repeated perodically. This would mean that huge applications and the DMX driver couldn't run in parallel due to memory conflicts.

From my point of view it would make sense to implement a seperate DMX module (which fits with the MBHP :)) and works with a cheap PIC like the 16F628. In this case everything would be in your hands, and the module could also be used with other MIDI controllers.

Best Regards, Thorsten.

Link to comment
Share on other sites

Thanks for that detailed reply.

It looks like my best bet here is to start from the midimerger, rip out everything except the software midi in and add the DMX out code.

I'll probably use the existing core module for the processor and add a small separate module for differential line drive which can also be used as a long distance midi driver.

Yes the DMX out function takes RAM since DMX is constantly outputting the state (not just the state changes as in midi), but you don't have to implement all 512 channels, you can only do 16 or 64 or however many you want.

Standard MIOS and MBHP will handle all the rest of the system nicely.

John S.

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...
 Share

×
×
  • Create New...