SuperCollider Code
As an untrained programmer, the tools presented here do not represent paragons of signal processing algorithms or design patterns. Each artefact emerged iteratively in response to a set of particular issues that arose during the activities of my composition process. The decision to publish these tools stems from their integral role in resolving myriad technical and aesthetic issues associated with the construction of environmental spatial illusions. Hopefully, they prove useful to others facing similar issues and concerns. Although they do not signify ideal technical solutions, these tools are crucial to the realisation of my creative ideas.
Until recently, writing classes in SuperCollider was an entirely foreign activity. As such, these objects' syntax, structure, and functionality are far from perfect or even efficient. However, they are suitable for my current needs and are under regular revision. I welcome any advice and feedback, especially on the topic of writing classes and object-orientation more generally.
DistanceMixer
The DistanceMixer is a software artefact designed to assist in the composition of fixed media works that seek to integrate environmental sounds and structures into music. It represents an attempt at merging a variety of compositional aesthetics into a single tool. It aims to fuse aspects of acoustic ecology with electroacoustic techniques by allowing the user to structure musical phrases and textures with clearly partitioned spectral and spatial niches using a basic form of mimesis to imply realistic spatial impressions and behaviour.
Doppler
This simple class abstracts the example found in the atan2 documentation. Despite its lack of sophistication, its calculations contribute significantly to the production of robust spatial illusions, particularly in combination with the DistanceFilter and reverb scaling. It uses variations in distances to calculate pitch and amplitude changes and provides methods (rotation and azimuth) for soundfield position. The mix method is useful for sending signals to auxiliary reverberation and uses the amplitude changes to adjust the ratio of dry and wet signals based on the distance of a sound source from a virtual listening position. This class only provides calculations. Consequently, it is possible to apply the Doppler effect to a sound source, independent of the number of output channels.
DistanceFilter
The DistanceFilter is a pseudo unit generator, created specifically to work with the DistanceMixer and the Doppler classes. According to Richard Furse the formula to calculate the low-pass filter coefficient is as follows:
Cutoff = 100000 / distance
Wouter Snoei uses this formula in his wave field synthesis application WFSCollider. The DistanceFilter directly applies Snoei’s calculations for the cutoff frequency of a one-pole filter. As such, this pseudo unit generator is an abstraction of Snoei’s mathematics and is in no way my invention.
In combination with the Doppler class, the DistanceFilter strengthens the sense of illusion considerably. It handles the high-frequency attenuation within the DistanceMixer.
BFConv
BFConv produces the essential data required to convolve First Order Ambisonic (FOA) signals. It functions as a straightforward yet effective form of convolution reverb.
David Granström's EZConv class strongly influenced its design. BFConv works on FOA signals by:
Decoding B-Format signals to A-Format with a specific orientation
Convolving each A-Format channel with a B-Format impulse response
Encoding back to the spherical domain using the same directions as the angular domain signal.
The OpenAIR database contains an excellent collection of B-Format impulse responses suitable for use with BFConv.