For people which have never used Cal files in Sonar, follow these steps:
1) In Sonar or HomeStudio check in Options / Global where is the Cal folder
2) Copy and paste this script in a file, save the file as Pitch_RANDOM.CAL in the Cal Folder
3) In Sonar select repetitive notes which sound as machine gun.
4) Hit Ctrl + F1 and double click on Pitch_RANDOM.CAL
Re: Attenuate the samples machine gun effect for Sonar/HomeStudio users
This final script randomize pitch, velocity, duration and time event.
;; __Randomizer.Cal, by Serge Daigneault 2005
;; Insert random pitch, velocity, duration and event time
;; Be careful with Variation values. Values below 2 will conduct to and endless loop trap.
(int PitchVar 6) ; Pitch variation may be changed
(int VelVar 5) ; Velocity variation may be changed
(int DurVar 10) ; Duration variation may be changed
(int EveVar 5) ; Event time variation may be changed
(int NoteVel 0) ; If NoteVel = 0 Note.Vel is used, otherwise NoteVel is used
(int NoteDur 0) ; If NoteDur = 0 Note.Dur is used, otherwise NoteDur is used