14 lines.

The roaring twenties classic gangster weapon. We found the firing rate on Wikipedia, then adjusted to our liking.

 //Tommy gun
 //each bullet as 2 parts,
 //risetime of the powder flash, and falltime as it dissipates
 //flashes are made slightly irregular, not exactly the same each time
@0ms
ratTatTat
@+15ms     chn1 = fade to 100% within 40ms    //bright fast flash
@+20ms     chn1 = fade to 0% within 100ms
@+45ms     go to ratTatTat with 10% chance
@+15ms     chn1 = fade to 70% within 60ms     //less bright less fast flash
@+20ms     chn1 = fade to 0% within 120ms
@+45ms     go to ratTatTat with 10% chance
ratTat
@+15ms     chn1 = fade to 100% within 38ms
@+20ms     chn1 = fade to 0% within 90ms      //longer sustained flash on exit
@+45ms     go to ratTatTat with 20% chance
@+15ms     chn1 = fade to 100% within 40ms    //bright fast flash
@+20ms     chn1 = fade to 0% within 100ms
@+45ms     go to ratTatTat with 30% chance

           //falls through and pauses
@400ms     //adds to shortest pause

rest       //variable longer pause
@720ms     go to rest with 80% chance

          //falls through and begins shooting again
          go to ratTat with 30% chance        //possible short shot

Possible adjustments include

  • Longer pauses (adjust “Go To rest…” to a higher percentage of likelihood)
  • Longer strings of shots (adjust “Go To ratTatTat” percentages higher)