Today I wanted for the first time look up the implementation of a class (Warp1), and I see in the file that (to my eyes) the Warp1 has the same code as some other classes, like GrainIn (and all other classes in the GrainUGens.sc). How can it be that these classes have the same implementation, I see the arguments to the ^this.multiNew within the ar method are different, but what makes these implementations different. Can any one help me understanding/reading these classes?
You’d need to dig into the C++ gen code to see the implantations
A UGen object in SC doesn’t process audio itself. It (mainly) writes a description of itself and its inputs into a SynthDef. One part of this description is the class name, so it’s possible to have several UGens with similar (or even the same) inputs, but different names, written into the SynthDef. The server will load different UGens based on the name, so indeed, you can have UGen classes on the language side that are almost (or fully) identical but which perform very different calculations in the server.
In the source tree, those C++ implementations (server side) live in ./server/plugins. The signal processing code is not directly accessible in sclang.
hjh
1 Like