Jump to content

Recommended Posts

Posted

I've been tidying up some older archived files - and have been gradually getting to some old SC code that I want to use in cl-Collider.

 

Here's a really useful way to create massive clusters of sound with samples using a simple file-player Synth-Def inside a function that creates multiple instances of a synth within pitch ranges defined when calling the function. Number of instances only limited by your CPU. I've used this with 1000+instances without trouble. It's particularly effective with pitched metallic material but works well with anything as long as the 'rate' variable is kept within a range that doesn't go too low or too high. It works better within a smaller range for complex overlaps of sound file play rate in multiple instances.

 

This is basically a translation of the SC lang code into cl-Collider so formatting still retains some SC peculiarities but it's simple enough to understand:

 

Synth Def code:

 

(sc:defsynth playfile-sus 
           ((note 40)(out 0)(buf 0)(start 0)(end 0) (gate 1) (atk 1)(dec 1)(sus 0)(rel 1.5)(lp 0)(amp 0.5))
  (let* 
      ((rate (sc:midiratio (- note 60)))
       (env (sc:env-gen.kr (sc:adsr atk dec sus rel)
                             :gate gate
                             :level-scale amp
                             :act :free))
       (pointer (sc:line.ar start (- (sc:buf-frames.kr buf) 1) (/ (sc:buf-dur.kr buf) rate) :act :free))
       (sig (sc:buf-rd.ar 2 buf pointer)))
    (sc:out.ar out (* sig env))))

 

Player function code:

 

(defun multi-synth (file bank low high repeats)
  (dotimes (n repeats)
  (sc:synth 'playfile-sus 
                :buf (nth file bank) 
                :note (rnd repeats :low low :high high) 
                :start 1
                :end 0 
                :atk (rnd repeats :low 0.1 :high 50)
                :dec 1
                :sus 1
                :rel 1
                :lp 0)))

 

Load files into a buffer to be read by the Synth and then call the function with arguments:

 

(multi-synth 1 bank 20 100 50)

 

where the arguments are = file number within bank of files, name of bank of files, min rate speed, max rate speed, number of synths

 

This call above plays 50 instances of the synth with random choice of rate between 20 to 100 (based on original file rate of 60 so within -/+ 40 of original rate - which I've found is usually really good). Try with 100s of instances with the right material and it's great to play with.  Highly dependent on what sound file you feed into the buffer, of course! 

Posted

I should also add that if the play rate is kept within a very small range in the 60+ zone with 100s of instances, it can create extremely detailed short transients with the right material. I have used this approach to replicate the effect of using tape splicing on multiple playheads but the convenience of just changing the argument to increase the 'playheads' as instances of the synth, all while varying the two rate parameters, can produce a lot of interesting material quickly.

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy