overtone

diego.videco 2024-04-23T15:17:41.024909Z

Hello everyone, I am trying to add the SendPeakRMS UGen to overtone, but whenever I call the synth the server crashes with no error. Only this:

Server 'localhost' exited with exit code 0.
server 'localhost' disconnected shared memory interface
Could anyone help? https://github.com/overtone/overtone/commit/5db278b82984ca44d78ffd1b3c7c02c193166e37 https://doc.sccode.org/Classes/SendPeakRMS.html I remember there was some way to see the compiled ugen to compare with the supercollider version, but don’t remember how to do that or where I saw it.

diego.videco 2024-04-23T15:27:06.353809Z

Looking at this, but the printed data doesn’t seem to be enough: https://github.com/overtone/overtone/wiki/Comparing-sclang-and-Overtone-synthdefs#generating-overtone-synthdefs Basically getting this. The :constants do look suspicious.

{:name "external.scratch/peak-rms",
 :constants [0.0 2.0 3.0 1.0 -1.0 20.0 121 65 101 108 13 100 47 115 112 114],
 :params (),
 :pnames (),
 :ugens (#
 #
)}

diego.videco 2024-04-23T15:56:04.003449Z

Created a version in SuperCollider that looks like this:

{:ugens [],
 :variants [],
 :n-ugens 0,
 :n-variants 0,
 :pnames [],
 :name "ampTrigReplier",
 :n-constants 0,
 :params
 [20.0
  2.0
  3.0
  -1.0
  1.0
  13.0
  47.0
  114.0
  101.0
  112.0
  108.0
  121.0
  65.0
  100.0
  115.0],
 :n-pnames 0,
 :n-params 15,
 :constants []}
Currently managed to read and play it like this… a bit hacky, though:
(o/defsynth fake-peak-rms
    []
    (o/sin-osc (o/dust:kr 20)))

  (def peak-rms* (synthdef-read "~/Library/Application Support/SuperCollider/synthdefs/ampTrigReplier.scsyndef")) 
  
  (def peak-rms (assoc fake-peak-rms :sdef peak-rms*))
  (peak-rms)