ATTiny/Arduino Uno MIDI to high voltage spark

how do i stop a spark generator controlled from ATTINY 2313 from crashing the chip?

Stop the voltage spike from getting to the ATTiny. The situation is not unlike the noise generated by electric motors, and the solution is the same. A capacitor across the noise maker to absorb the spike. Look at Grumpy_Mike's web site, and look at the motor page(s).