Continued Evolution of the SuperCollider Real Time Synthesis Environment
暂无分享,去创建一个
SuperCollider[McCartney, 1996] is aprogramming language and environment specialized for real time audio synthesis. SuperCollider version 2.0 (SC2) is a completerewrite of the system to make it more expressive, more efficient, andeasier to use. This required rethinking the implementation in light of theexperience of the first version. It is my opinion that the new version has benefitted significantly from thisrethink. It is not simply version 1.0 with more features. This paper willgive a brief overall description of the system followed by descriptions ofa few specific features. 1 The Language SuperCollider is now a fully objectoriented language very much like Smalltalk[Goldberg, 1989]. Many of theclass names and method names are the same as those in Smalltalk.The class library currently consists of over 250 classes, to which userscan add their own. There are Collection classes such as Arrays,Dictionaries, Sets, SortedLists, Bags, etc. There are a number of differences from Smalltalk that facilitate real timeoperation and computer music applications. Among these are: a real timegarbage collector, a method lookup table so that method lookup is as fast as for C++while still retaining the dynamism of Smalltalk style methods[Driesen, 1995], positional arguments, variable length argument lists like LISP's #restor C's varargs, default values for unsupplied arguments, initial constantvalues for local variables, full lexical closure semantics as in Scheme,ability to run at interrupt level. Why invent a new language and not use an existing language? Computer music composition is a specificationproblem. Both sound synthesis and the composition of sounds are complex problems anddemand a language which is highly expressive in order to deal with thatcomplexity. Real time signal processing is a problem demanding an efficientimplementation with bounded time operations. There was no language combining the features I wanted and neededfor doing digital music synthesis. There was no other language readilyavailable that was high level, real time and capable of running atinterrupt level. Why use a text based language rather than a graphical language? There are at least two answers to this: Dynamism: Most graphical synthesis environments use statically allocatedunit generators where one screen icon represents one unit generator. InSuperCollider, the user can create structures which spawn eventsdynamically and in a nested fashion. Patches can be built dynamically and parameterized not just by floating pointnumbers from a static score, but by other graphs of unit generators aswell. Or you can construct patches algorithmically on the fly. This kind of fluidity is not possible in alanguage with statically allocated unit generators. Brevity: In SuperCollider, symmetries in a patch can be exploited by eithermultichannel expansion or programmatic patch building. For example, thefollowing 5 line program generates a patch of 49 unit generators. In agraphical program this might requirea significant amount of time and space to wire up. Another advantage isthat the size of the patch below can be easily expanded or contracted justby changing a few constants, and it can be done on the fly, per event. ( // 10 voices of a random sine percussion sound : s = Mix.ar(Array.fill(10, { Resonz.ar(Dust.ar(0.2, 50), 200 + 3000.0.rand,0.003)}) ); // reverb predelay time : z = DelayN.ar(s, 0.048); // 7 length modulated comb delays in parallel : y = Mix.ar(Array.fill(7,{ CombL.ar(z, 0.1, LFNoise1.kr(0.1.rand, 0.04,0.05), 15) })); // two parallel chains of 4 allpass delays (8 total) : 4.do({ y = AllpassN.ar(y, 0.050, [0.050.rand, 0.050.rand], 1) }); // add original sound to reverb and play it : Synth.play(s+(0.2*y)); ) 2 The Synthesis Engine A number of improvements have been made in version 2.0 to make thesynthesis engine both faster and higher quality. There are many new unitgenerators in version 2.0 and many of those retained from version 1.x havebeen improved. The synthesis engine is a two rate system, withan audio sample rate and a sample block size which determines the controlrate. Unit generators either calculate a block of samples or a single value per control period. Control ratesignals are now always linearly interpolated up to audio rate whenever theyare used in order to eliminate zipper noise. There is a unit generator named Spawn which canspawn sub-events. Each spawned event can have its own control rate blocksize. Spawned event start times and stop times are single sample accurate. The synthesis engine is now separate from the language virtual machine.This makes it more efficient than in version 1 where the synthesis loop wasexecuting language code every control period. Audio buffers such as sample files and delay lines can be allocateddynamically. Delay line unit generators do not require that their buffer bezero filled to begin with, which means there is no glitch if you decide toallocate and begin using an 8 seconddelay line on a moment's notice.
[1] Adele Goldberg,et al. SmallTalk 80: The Language , 1989 .
[2] Karel Driesen,et al. Minimizing row displacement dispatch tables , 1995, OOPSLA.
[3] James McCartney,et al. SuperCollider, a New Real Time Synthesis Language , 1996, ICMC.