The Sinewav3 Plugin example 'Sparks Fly' creates a particle system simulating sparks which dim as they age, while moving in a realistic fashion.
A number of settings are exposed for the particle system emitter and its movement as well as the protoypical spark particle and its movement. The code demonstrates the use of audio modulation and easing.
Learn more about this plugin here: https://medium.com/sinewav3/make-sparks-fly-c48e94219d4f