<?xml version="1.0"?>
<rss version="2.0"><channel><title>SuperCollider Latest Topics</title><link>https://opusmodus.com/forums/forum/53-supercollider/</link><description>SuperCollider Latest Topics</description><language>en</language><item><title>Wrapper functions or symbol shadowing for sc: prefix UGens in cl-Collider?</title><link>https://opusmodus.com/forums/topic/4048-wrapper-functions-or-symbol-shadowing-for-sc-prefix-ugens-in-cl-collider/</link><description><![CDATA[<p>I'm looking at integrating sc: prefix UGen names into my OM package so that I can streamline code generation when using cl-Collider. I think there are two options for doing this:</p><p></p><p>1) List SC package symbols and import them all into the <code>:om</code> package - so I can use them just like OM symbols. Biggest drawback, possible symbol name confiicts and needing to ensure all SC symbols are in the list used</p><p></p><p>2) Create new <code>:om</code> package functions/macros with clean names that call<code>sc:</code> functions internally. Eliminates symbol conflicts, but wrappers need maintenance and possible processing implications.</p><p></p><p>Which - if any - would be preferable - or should I just continue to be bothered by having to use the sc: prefix all the time for UGens (or, more likely, forgetting to use it and getting errors!)</p><p></p><p>bw</p><p></p><p>Andrew</p>]]></description><guid isPermaLink="false">4048</guid><pubDate>Sun, 01 Feb 2026 14:58:32 +0000</pubDate></item><item><title>Opusmodus + SuperCollider in Windows ?  Do you have a tutorial ? Best !</title><link>https://opusmodus.com/forums/topic/3059-opusmodus-supercollider-in-windows-do-you-have-a-tutorial-best/</link><description><![CDATA[<p>
	Opusmodus + SuperCollider in Windows ?  Do you have a tutorial ? Best !
</p>
]]></description><guid isPermaLink="false">3059</guid><pubDate>Sat, 30 Dec 2023 23:44:27 +0000</pubDate></item><item><title>Couple of migrations of old SC code into cl-Collider for OM</title><link>https://opusmodus.com/forums/topic/3788-couple-of-migrations-of-old-sc-code-into-cl-collider-for-om/</link><description><![CDATA[<p>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.</p><p> </p><p>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.</p><p> </p><p>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:</p><p> </p><p><strong>Synth Def code:</strong></p><p> </p><pre spellcheck="" class="ipsCode language-plaintext" data-language="Plain Text"><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))))</code></pre><p> </p><p><strong>Player function code:</strong></p><p> </p><pre spellcheck="" class="ipsCode language-plaintext" data-language="Plain Text"><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)))</code></pre><p> </p><p>Load files into a buffer to be read by the Synth and then call the function with arguments:</p><p> </p><pre spellcheck="" class="ipsCode language-plaintext" data-language="Plain Text"><code>(multi-synth 1 bank 20 100 50)</code></pre><p> </p><p>where the arguments are = file number within bank of files, name of bank of files, min rate speed, max rate speed, number of synths</p><p> </p><p>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! </p>]]></description><guid isPermaLink="false">3788</guid><pubDate>Sat, 12 Oct 2024 12:41:59 +0000</pubDate></item><item><title>Bug? Unable to load cl-collider because of problem with cl-patterns package</title><link>https://opusmodus.com/forums/topic/3625-bug-unable-to-load-cl-collider-because-of-problem-with-cl-patterns-package/</link><description><![CDATA[<p>
	I appear to be now unable to load cl-collider due to a problem with cl-patterns.
</p>

<p>
	 
</p>

<p>
	On starting OM, I get the following error message pop-up:
</p>

<p>
	 
</p>

<p>
	Error: While loading file Users/acr/Opusmodus/User Source/Extensions/Load CL-Collider.lisp
</p>

<p>
	Package CL-PATTERNS not found
</p>

<p>
	 
</p>

<p>
	If I try to evaluate (load cl-collider) directly from the file I get the same error in the Listener initially, but then if I use the debugger to trace I get the following error:
</p>

<p>
	 
</p>

<p>
	Error: compile-file-error while compiling #&lt;asdf/lisp-action:cl-source-file "cl-patterns" "backend"&gt;
</p>

<p>
	 
</p>

<p>
	I have previously managed to load cl-collider successfully and connect to SC Server without any problems -  so not sure why this is now happening? Advice and suggestions?
</p>

<p>
	 
</p>

<p>
	I am running most recent updated OM Version 3.0.29319 
</p>

<p>
	 
</p>

<p>
	bw
</p>

<p>
	 
</p>

<p>
	Andrew
</p>
]]></description><guid isPermaLink="false">3625</guid><pubDate>Tue, 14 May 2024 16:44:26 +0000</pubDate></item><item><title>sc:Synthdef for sampler</title><link>https://opusmodus.com/forums/topic/3017-scsynthdef-for-sampler/</link><description><![CDATA[<p>Hello,</p><p> </p><p>I have a synthdef for a sampler that plays from a buffer based on the list of all files in a folder. It's working fine in SuperCollider:<br><br> </p><pre spellcheck="" class="ipsCode language-plaintext" data-language="Plain Text"><code>(
SynthDef(\play, {
    var sig, buf, e;
    e = PathName.new("/directory_path/*").files.scramble.copyFromStart(20);
    buf = \buf.ir(0);
    sig = PlayBuf.ar(1!2, buf, BufRateScale.ir(buf) * \rate.ir(1), doneAction: 2);
    sig = sig * \amp.ir(0.5);
    Out.ar(\out.ir(0), sig);
}).add;
)

Synth(\play, [buf: b, rate: 0.midiratio]);</code></pre><p> </p><p>I'm not sure how to build this in OM's sc:synthdef as the examples seem to be focused on oscillator-based sound sources.</p><p> </p><p>My first attempt at an OpusModus sc:synthdef sampler (based on the above example) is:<br> </p><pre spellcheck="" class="ipsCode language-plaintext" data-language="Plain Text"><code>(sc:defsynth sampler ((freq 200) (dur 2.0))
   (let* (e = PathName.new("/directory_path/*").files.scramble.copyFromStart(20))
         (buf = \buf.ir(0))
         (sig = PlayBuf.ar(1!2, buf, BufRateScale.ir(buf) * \rate.ir(1), doneAction: 2))
         (sig = sig * \amp.ir(0.5))
    (sc:out.ar 0 out)))</code></pre><p> </p><p>Which evaluates with a bug. I'm sure there are syntax problems but I'm also wondering if there are conceptual switches I could make to understand synthbuilding in OM rather than supercollider.</p><p> </p><p>Thanks!</p><p> </p><p>THT</p>]]></description><guid isPermaLink="false">3017</guid><pubDate>Wed, 04 Oct 2023 00:42:54 +0000</pubDate></item><item><title>server.default.options.Xdevice (Audio routing)</title><link>https://opusmodus.com/forums/topic/3009-serverdefaultoptionsxdevice-audio-routing/</link><description><![CDATA[<p>
	 
</p>

<p>
	Hello,
</p>

<p>
	 
</p>

<p>
	Working with SC in OM and wondering how I can route my audio on a mac? In SC there are settings like:
</p>

<p>
	 
</p>

<pre class="ipsCode">Server.default.options.inDevice_("Built-in Microph");
Server.default.options.outDevice_("Built-in Output");</pre>

<p>
	 
</p>

<p>
	Not sure how to make these device specifications in the OM SC library.<br />
	<br />
	Thanks,<br />
	<br />
	THT
</p>
]]></description><guid isPermaLink="false">3009</guid><pubDate>Tue, 19 Sep 2023 16:06:06 +0000</pubDate></item><item><title>cl-patterns doesn't output sound</title><link>https://opusmodus.com/forums/topic/2991-cl-patterns-doesnt-output-sound/</link><description><![CDATA[<p>
	Hi,
</p>

<p>
	I need a bit of help.
</p>

<p>
	I would love to use <strong>cl-patterns</strong> which is a wonderful real time tool for live coding with <strong>cl-collider</strong>.
</p>

<p>
	I've tried that example but doesn't works in fact works but no audio output.
</p>

<p>
	If somebody more experienced than me could help here, it would be nice !
</p>

<p>
	 
</p>

<pre class="ipsCode" id="ips_uid_1565_5">(sc:defsynth sine-kick ((freq 440) (time 0.25) (amp 0.5) (out 0))
    (let* ((env (sc:env-gen.kr 
                 (sc:env (list 0 1 1 0) 
                         (list 0.001 time 0.3)) :act :free))
           (fenv (sc:env-gen.kr
                  (sc:env (list 1 0)
                          (list time)) :level-scale freq))
           (sig (sc:sin-osc.ar fenv 0 (* env 0.2))))
      (sc:out.ar out (sc:pan2.ar sig 0 amp))))


(cl-patterns:pb :kick
  :embed (cl-patterns:pcycles "o-o-------oo----")
  :instrument :sine-kick
  :dur 1/4
  :quant 4)

 (cl-patterns:play :kick)</pre>

<p>
	 
</p>

<p>
	Best salutations to the always growing Opusmodus users community !
</p>

<p>
	S.
</p>
]]></description><guid isPermaLink="false">2991</guid><pubDate>Sun, 27 Aug 2023 18:31:34 +0000</pubDate></item><item><title>Short SC score</title><link>https://opusmodus.com/forums/topic/2973-short-sc-score/</link><description><![CDATA[<pre class="ipsCode" id="ips_uid_2687_5">(progn
;; DEFSYNTH
(sc:defsynth sine4 ((freq 200) (dur 2.0) (vel 1.0) (pan 0) (times 0.3) (pm 12))
  (let* ((env (* 0.3 (sc:env-gen.kr (sc:perc .0 (* 4.0 dur)) :act :free) vel))
         (out (* times (sc:sin-osc.ar freq 0 (max 0 (sc:lf-noise1.kr pm)))))
         (out (sc:pan2.ar out pan)))
    (sc:out.ar 0 out)))

  ;; OMN-SCORE
(setf size 200)
(setf vector
      (list-plot
       (add-triangle-waves
        4 size 1 0.6
        :modulation (gen-triangle
                     size 1 '(0.5 0.4 0.3 0.6)
                     :modulation (gen-triangle size 1 0.3 :phase 180)))
       :point-radius 2))

(setf pitches (gen-divide 4 (vector-to-pitch '(g2 g6) vector :quantize 1/4)))
(setf transpose (pitch-transpose -12 pitches))
(setf variants (pitch-variant transpose :variant '?))
(setf length1 (rnd-sample 120 '(s e s -s)))
(setf length2 (rnd-sample 120 '(s e s -s)))
(setf time1 (span pitches length1))
(setf time2 (span variants length2))
(setf dynamics '(p mf ff))

(setf omn1 (make-omn :length time1
                     :pitch (pitch-transpose 12 pitches)
                     :velocity (rnd-sample size dynamics)))

(setf omn2 (make-omn :length time2
                     :pitch variants
                     :velocity (rnd-sample size dynamics)))

;; CONVERSION
(setf len1 (omn-to-sc :length omn1))
(setf len2 (omn-to-sc :length omn2))
(setf freq1 (omn-to-sc :hertz omn1))
(setf freq2 (omn-to-sc :hertz omn2))
(setf vel1 (omn-to-sc :velocity omn1))
(setf vel2 (omn-to-sc :velocity omn2))

;; SC-SCORE
(def-sc-score add-triangle
    (:tempo 128
     :layout ((in1 . len1) (in2 . len2))
     ;:output "add-triangle"
     )

  (in1 :synth sine4
       :freq freq1
       :dur len1
       :times (rnd size :low 0.1 :high 0.3)
       :vel vel1
       :pan (rnd size :low -1.0 :high 1.0)
       :pm (rnd-sample size (gen-integer 6 30))
     )

  (in2 :synth sine4
       :freq freq2
       :dur len2
       :times (rnd size :low 0.1 :high 0.3)
       :vel vel2
       :pan (rnd size :low -1.0 :high 1.0)
       :pm (rnd-sample size (gen-integer 6 30))
     )
  )
)</pre>

<p>
	 
</p>

<p>
	<a class="ipsAttachLink ipsAttachLink_image" data-fileext="png" data-fileid="3541" href="https://opusmodus.com/forums/uploads/monthly_2023_08/image.png.775c22e951699f4cf767c01ef68d195f.png" rel=""><img alt="image.png" class="ipsImage ipsImage_thumbnailed" data-fileid="3541" data-unique="hvpdnc1uk" style="width: 640px; height: auto;" width="1000" src="https://opusmodus.com/forums/uploads/monthly_2023_08/image.thumb.png.56522615b2bb20893e8d273a181cd380.png" loading="lazy" height="460"></a>
</p>

<p>
	 
</p>

<p>
	<audio controls="" data-controller="core.global.core.embeddedaudio" data-fileid="3542" data-unique="o7d03g7tp" src="https://opusmodus.com/forums/applications/core/interface/file/attachment.php?id=3542&amp;key=143110c6969311e4b740d86a37ddddb6" type="audio/mpeg" preload="metadata">
		<a class="ipsAttachLink" href="https://opusmodus.com/forums/applications/core/interface/file/attachment.php?id=3542&amp;key=143110c6969311e4b740d86a37ddddb6" data-fileid="3542" data-fileext="mp3" rel="">add-triangle (Snippet).mp3</a>
	</audio>
	 
</p>

<p>
	 
</p>

<p>
	 
</p>
]]></description><guid isPermaLink="false">2973</guid><pubDate>Fri, 11 Aug 2023 16:01:36 +0000</pubDate></item><item><title>DEF-SC-SCORE additional keywords</title><link>https://opusmodus.com/forums/topic/2972-def-sc-score-additional-keywords/</link><description><![CDATA[<p>
	<span style="font-family:Courier New,Courier,monospace;"><strong>DEF-SC-SCORE</strong></span> additional keywords:<br>
	 
</p>

<div title="Page 1">
	<div>
		<div>
			<div>
				<pre class="ipsCode" id="ips_uid_7950_7">output - Specifies the name of the saved audio file (provided as a string).
         By default, the file is saved in the Waveform Audio (WAVE) format.

sr - Defines the sample rate of the saved audio file.
     The default setting is 48000 with a bit depth of 24 bits per sample.</pre>

				<p>
					 
				</p>

				<p>
					The <span style="font-family:Courier New,Courier,monospace;">:output</span> <span style="font-family:Courier New,Courier,monospace;">"name"</span> option enables you to save the score file in the Opusmodus/Media/Audio directory.<br>
					 
				</p>

				<div style="color:#000000; text-align:start" title="Page 2">
					<div style="background-color:#ffffff">
						<div>
							<div>
								<pre class="ipsCode" id="ips_uid_7950_5">(def-sc-score example2
  (:tempo 120
   :layout ((ins . len))
   :output "exp2")
  (ins :synth saw-synth
       :note midi
       :dur len
       :vel vel)
)</pre>

								<p>
									 
								</p>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
]]></description><guid isPermaLink="false">2972</guid><pubDate>Thu, 10 Aug 2023 20:59:09 +0000</pubDate></item><item><title>CL-Collider - DEF-SC-SCORE</title><link>https://opusmodus.com/forums/topic/2970-cl-collider-def-sc-score/</link><description><![CDATA[<p>
	More on this topic:
</p>
<iframe allowfullscreen="" class="ipsEmbed_finishedLoading" data-embedauthorid="1" data-embedcontent="" data-embedid="embed4781276099" src="https://opusmodus.com/forums/topic/2971-opusmodus-3029046-update/?do=embed&amp;comment=10319&amp;embedComment=10319&amp;embedDo=findComment#comment-10319" style="overflow: hidden; height: 296px; max-width: 502px;" loading="lazy"></iframe>

<p>
	 
</p>
]]></description><guid isPermaLink="false">2970</guid><pubDate>Thu, 10 Aug 2023 11:17:14 +0000</pubDate></item></channel></rss>
