You will probably have to decode to midi signal into values for each channel or note or however it works.
Then find a way to send each value to a corresponding channel in the dmx signal.
One DMX signal can hold 512 values, with a range of 0 to 255 for each.
Depending on the range of values of midi, you might have "stretch" the DMX range to match it with the midi's.
Also as far as hardware goes, DMX signal levels sent are different than to standard 0V/5V used on micro controllers.
This advice might get you started but get more help!