DMX to SPI conversion

Hi everyone

I am constucting device that is going to receive and convert a DMX-signal. I have constructed the circuit shown in this setup:

My question is, what code do I need to write in order to "convert" DMX into SPI (serial) data? I am trying to control LEDs by use of a shift register. I have tried using if/else-expressions, but I have not been able to control the LEDs using this method.

Best regards
Jonas

What type of LED's (monochrome, RGB etc)
What model shift register(s) and how many?
How is the DMX data to be interpreted, or do you have control of what is sent from the controller/desk?