• Register
  • Help
Results 1 to 5 of 5

Topic: Attenuate the samples machine gun effect for Sonar/HomeStudio users

Share/Bookmark
  1. #1

    Smile Attenuate the samples machine gun effect for Sonar/HomeStudio users

    This Cal script is intented to attenuate (not eliminate) the machine gun effect for users working with samples.

    I think that if repetition samples are gently pitched the results are not so bad.

    How does it sound with samples like snare, glock or any staccato articulation ?

    Please try and give your advice...

    ;; ---------------------
    ;; Pitch_RANDOM.CAL, by Serge Daigneault 2005
    ;; Insert random pitch

    (do
    (dword setting 6) ; Or whatever you want
    (int NewPitch 0)
    (int OldPitch 0)
    (int Channel 0)

    (do
    (forEachEvent
    (do
    (if (== Event.Kind NOTE)
    (do
    (= NewPitch OldPitch)
    (= Channel Event.Chan)

    ; Randomize pitch. No repeating equal values ...

    (while (== NewPitch OldPitch)
    (= NewPitch (* 15 (random (* -1 setting) setting)))
    )
    (insert (- Event.Time 1) Channel WHEEL NewPitch) ; Random wheel
    (= OldPitch NewPitch)
    ))
    ))
    (insert Event.Time Channel WHEEL 0) ; Reset wheel on last note event
    )
    )
    ;;------------------------

    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


    Thanks,

    SergeD

  2. #2
    Moderator
    Join Date
    Oct 2000
    Location
    Orcas Island
    Posts
    11,454

    Re: Attenuate the samples machine gun effect for Sonar/HomeStudio users

    Serge,

    Excellent script. This is similar in concept to the variability control in GPO/Kontakt Player and MaestroTools but can be used for any patch for any library.

    Thanks for posting this.

    Now can it attenuate the machine gun effect of this machine-gun guitar on ebay??
    Gary Garritan



  3. #3

    Re: Attenuate the samples machine gun effect for Sonar/HomeStudio users

    Quote Originally Posted by Garritan
    Serge,

    Excellent script. This is similar in concept to the variability control in GPO/Kontakt Player and MaestroTools but can be used for any patch for any library.

    Thanks for posting this.

    Now can it attenuate the machine gun effect of this machine-gun guitar on ebay??
    Gary Garritan


    HAHAHAHAHA....

    Try to fire one shot at a time

  4. #4

    Re: Attenuate the samples machine gun effect for Sonar/HomeStudio users

    Quote Originally Posted by Garritan
    Serge,
    This is similar in concept to the variability control in GPO/Kontakt Player and MaestroTools

    Gary,

    I'm proud having a flash like yours, and only four years later...

    Quote Originally Posted by Garritan
    Now can it attenuate the machine gun effect of this machine-gun guitar on ebay??
    Easily, print the script and wrap the neck with the printout.

    SergeD

  5. #5

    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.

    (do
    (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

    (int VelVal 0)
    (int DurVal 0)
    (int EveVal 0)

    (int NewPitch 0)
    (int OldPitch 0)
    (int NewVel 0)
    (int OldVel 0)
    (int NewDur 0)
    (int OldDur 0)
    (int NewEve 0)
    (int OldEve 0)
    (int Channel 0)

    (do
    (forEachEvent
    (do
    (if (== Event.Kind NOTE)
    (do
    (= NewPitch OldPitch)

    (= NewVel OldVel)
    (= VelVal Note.Vel)
    (if (> NoteVel 0) (= VelVal NoteVel)) ; instead of Note.Vel used

    (= NewDur OldDur)
    (= DurVal Note.Dur) ; or any constant number
    (if (> NoteDur 0) (= DurVal NoteDur)) ; instead of Note.Dur used

    (= NewEve OldEve)
    (= Channel Event.Chan)

    ; Randomize pitch, velocity, duration and Time event. No repeating equal values ...

    (while ( || ( || (|| (== NewPitch OldPitch) (== NewVel OldVel)) (== NewDur OldDur)) (== NewEve OldEve))
    (do
    (= NewPitch (* 15 (random (* -1 PitchVar) PitchVar))) ; may try other than 15 value
    (= NewVel (+ VelVal (random (* -1 VelVar) VelVar)))
    (= NewDur (+ DurVal (random (* -1 DurVar) DurVar)))
    (= NewEve (+ EveVal (random (* -1 EveVar) EveVar)))
    ))
    (+= Event.Time NewEve) ; Random Time Event
    (= Note.Vel NewVel) ; Random velocity
    (= Note.Dur NewDur) ; Random duration
    (insert (- Event.Time 1) Channel WHEEL NewPitch) ; Random wheel

    (= OldPitch NewPitch)
    (= OldVel NewVel)
    (= OldDur NewDur)
    (= OldEve NewEve)
    ))
    ))
    (insert Event.Time Channel WHEEL 0) ; Reset wheel on last note event
    )
    )
    ;; ---------------------------

    Sorry for the lack of tabs, I could not preserved them in the thread...

    SergeD

Go Back to forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •