The SerialToDmx example sketch with DmxSimple does most of that.
http://code.google.com/p/tinkerit/wiki/SerialToDmx
You'll need to tweak that and/or freestyler to get them talking the
same protocol.
One thing to be aware of: when USB reinitialises after a
disconnection, it resets the Arduino - resetting the light show. If
that is a problem, cut the RESET-EN link on the Arduino board. (You
will need to reconnect it to reprogram the Arduino.)