Spatial Swarm Granulation
Spatial Swarm Granulation
Spatial Swarm Granulation
this approach has proved both effective in terms of creating vivid multichannel effects, and retaining the exibility and adaptability that a live diffusion approach allows. This approach also proved effective with realtime granulation; for instance assigning granulation to sub-arrays of loudspeakers resulted in diffuse but localised effects. The ability to control the relative location and extent of diffuse effects proved subjectively satisfactory, particularly on large systems and within large spaces. 1 The issue of how to effectively interpolate between locations and degrees of diffusion, however, remained unsolved. 3. IMPLEMENTATION
BMSwarmGranulator Speaker 1 Request the next boid Speaker 2 Channel output BMGrainBoid Speaker 3 ... BMGrainBoid
BMGrainBoidSpace
kd-tree BMGrainBoid Send updated boid for proximity test Speaker Array ...
3.1. Class Taxonomy The BEASTMulch project is implemented largely in the SuperCollider open source DSP and synthesis environment. 2 Our implementation is based mainly around three SC classes: BMSwarmGranulator, BMGrainBoid, and BMGrainBoidSpace. BMSwarmGranulator is a sampled sound granulator roughly in the style of Barry Truaxs GSAMX programme, implemented as part of his PODX system [7]. It allows control of grain pitch, time stretch factor, duration, a random amount of variation in duration, delay between grains in a stream, a random amount of variation in delay, a random offset from the current pointer position in the buffer (time smearing), and any extra parameters required for a customised grain. 3 Each of these parameters can be determined on a per-grain basis by a function or equivalent object (i.e. any SC object or class which returns an appropriate result when sent the message value.) In addition to these the number of simultaneous grain streams can be controlled (statistically rather than literally in this case). BMGrainBoid and BMGrainBoidSpace model the state of individual boids and of a multi-dimensional space within which boids can move, respectively. The number of dimensions in a BMGrainBoidSpace is not limited in principle, but in practice (since we are modelling spatial location) we have to date worked with two and three dimensional spaces. Speaker location is modelled by the BMSpeakerArray and BMSpeaker classes, which provide location along three axes, with {0, 0, 0} generally corresponding to approximately head height of a person seated at the control desk. 3.2. Determining Grain Location Each Boid represents a stream of grains. At grain spawn time the position of the corresponding boid is sampled and
1 At the current time BEAST routinely mounts upwards of 90 discretely addressable loudspeakers across 4 or more vertical strata within our home base, the CBSO Centre in Birmingham. 2 See http://supercollider.sourceforge.net 3 In SuperCollider terms, grains generated can be based upon a custom SynthDef rather than the default one, providing it includes the required controls.
Figure 1. Block diagram of the localisation process. used to determine grain location. An efcient kd-tree algorithm 4 is used to determine the nearest speaker to the boid. The generated grain is then hard assigned to this speaker. Figure 1 presents a block diagram of this process. This hard assigning approach was chosen for a number of reasons. Although panning between adjacent members of an equidistant array (e.g. a ring or dome) is relatively simple to do convincingly under normal circumstances, simulating positions between arbitrarily spaced speakers in three dimensions is not straightforward. In subjective testing, it was determined that the perceivable difference between hard panned and other approaches was minimal with anything more than a few grains, and that with a reasonably large number of grains of short duration the difference was perceptually indistinguishable. This is not surprising, given that in typical cases (i.e. with 16 simultaneous grain streams or more) it is very likely that multiple grains will be assigned to each active speaker at any given moment. Individual channels consisting of short grains with small variations in offset, delays due to distance, etc. serve adequately to create decorrelation between active channels (and thus the desired impression of diffuseness and/or increased physical volume [3]). Selective use of other approaches (e.g. ambisonics) to simulate location (or even movement over the course of a grains life) might prove useful in special cases (e.g. a small number of simultaneous grains of relatively long duration). However such cases fall outside the intended range of uses of the current systems design, and presumably would result in the segregation of grains into individually perceivable sonic events (i.e. literally perceivable as a swarm of sources), rather than in a diffuse but localised single sound.
4 Implemented in SuperCollider as a Quark (i.e. as part of SCs external package managing system) by Dan Stowell
3.3. Boid Movement BMGrainBoid implements the standard boids rules of separation, cohesion, and alignment. In addition it implements a rule for attractors, in order to allow the boids to converge on a location (and thus control movement), a boundary rule, to prevent the boids from leaving the performance space, and an object avoidance rule, which discourages the boids from entering a specied area. The latter rule can be useful in cases where a large area (for instance the audience seating) contains no loudspeakers; by applying this rule the boids will travel around this area even if the shortest path to an attractor is directly through it. If there is no attractor present the swarm will wander freely around the space. In addition to these rules a user is able to both scale and limit the velocity of the boids, and control the maximum distance at which the avoidance rule comes into effect. Through careful variation of these parameters one can control both the physical size of the swarm, and the extent to which that size varies as individuals move away in response to the avoidance rule. The latter can be effective in giving the resulting sound a subjective liveliness (somewhat akin to the effect of rustling leaves) since in practice quick outward movements mean greater variation in the assignment of grains to speakers. Multiple swarms can either be independent, using multiple instances of BMGrainBoidSpace, or interact using a single instance, along with careful application of the rules in order to encourage and control segregation. 3.4. Visualisation and Control While SuperCollider provides useful 2D drawing possibilities through its Pen class, its native 3D drawing capabilities are somewhat rudimentary. Because of this the author implemented SCQuartzComposerView as an SC GUI widget. This allows one to embed and exchange data with Quartz Compositions; visual rendering and processing specications created with Apples highly optimised Quartz Composer graphical rendering and processing language. Our implementation makes use of this for creating 3D representations of speaker and boid locations. Figures 2 and 3 present examples of this involving 40 grain streams spatialised over a 52 loudspeaker system. The speakers and boids are rendered using an iterative algorithm from the data supplied by the SC classes. A variety of 3D transformations (e.g. rotation and zooming) are possible. Parameters can be controlled programatically from code, both on the y or in a predetermined fashion (SuperCollider is an interpreted language); or through the use of an external controller such as a graphics tablet. Capture of input is of course possible, and by providing a random seed GrainBoid behaviour and granulation results can be made precisely reproducible. 5
5 In fact the only randomised element in terms of GrainBoid behaviour is the initial boid position.
Figure 2. Detail of swarm visualisation. The spheres represent boids, the boxes loudspeakers. 4. SYSTEM BALANCING In order for this approach to be effective it is important that the system be balanced so that the levels of the individual speakers are perceptually equal. Although this can be difcult to do in a non-homogenous system 6 , with BEAST we have developed an automated process which measures a series of band-limited noise pulses sent to each speaker in turn through an omnidirectional microphone. These levels are normalised to the highest captured level, and all outputs are scaled down to match the lowest. These levels can then be further rened by ear if needed. It is worth noting that this automated approach eliminates the natural falloff in level which occurs due to distance (i.e. one would expect that as a sound moved onto more distant speakers, its amplitude would decrease). Once the system is balanced however, and thus in a known state, it is possible to reintroduce distance amplitude falloff based on speaker position. Automatic speaker localisation is also possible, and has proven effective in tests. This can simplify the tedious process of precisely measuring and/or placing each individual loudspeaker in a large system. With hard assigned grains, however, small inaccuracies in speaker location data are not problematic. 5. ASSESSMENT Although rigourous perceptual testing has not been carried out to date, in subjective testing by BEAST users the
6 Specialised speakers such as tweeters and subwoofers are excluded from this process, as well as from the granulation output.
Figure 3. Overhead view of swarm visualisation with a 52 loudspeaker array. method was deemed successful in both creating the effect of localised but diffuse granular sources, and in convincingly moving those sources through a performance space. Presumably due to the combination of decorrelated channels, the effect was considered quite robust regardless of listening position, suffering from being out of the sweet spot only when one was in close proximity to an individual loudspeaker. Naturally, movement across large gaps in loudspeaker spacing can prove objectionable, but this effect can be reduced somewhat by increasing the size of the swarm, and/or applying an avoidance rule. 6. FUTURE WORK A number of possible directions for future work suggest themselves. One obvious possibility would be the extension of the boids approach to include other parameters / dimensions in a manner analogous to that used in Blackwell and Youngs Swarm Granulator, discussed above. Due to the need to adapt to varying work formats, aesthetics, and approaches to spatialisation, systems such as BEAST have become increasingly hybridised, and able to adapt to a variety of demands within a single concert. As part of the BEASTMulch project, for instance, the author has ported Ville Pullkis Vector Base Amplitude Panning (VBAP)[5] to SuperCollider, and BEAST setups in recent years have often included a partial dome of loudspeakers, which it is possible to address as a 3D VBAP Array. Although not specically designed for 2D or 3D equidistant speaker arrays, the swarm granulation system discussed herein would work in straightforward way with them, and could easily be adapted to specify position based on azimuth and elevation angles (as VBAP requires). As well, it could be extended to incorporate distance simulation using any of the common approaches. An ambisonic version would also be a possibility. This would make the system more generally useful with smaller setups, many of which consist mostly or entirely of a single 2D ring. Although the current implementation makes use of granulated sampled sound, the approach could also be used for spatialising granular synthesis. 7. REFERENCES [1] T. Blackwell and M. Young. Swarm granulator. In The European Workshop on Evolutionary Music and Art, 2004. [2] C. Clozier. The gmebaphone concept and the cybern phone instrument. Computer Music Journal, 25 e (4):8190, 2001. [3] G. S. Kendall. The decorrelation of audio signals and its impact on spatial imagery. Computer Music Journal, 19(4):7187, Winter 1995. [4] A. Lewis. Bangor audio toolkit. URL http:// www.bangor.ac.uk/music/studios/BAT/. [5] V. Pulkki. Spatial sound generation and perception by amplitude panning techniques. Technical Report 62, Helsinki University of Technology, Laboratory of Acoustics and Audio Signal Processing, 2001. [6] C. Reynolds. Herds, and schools: A distributed behavioral model. Computer Graphics, 21(4 (SIGGRAPH 87 Conference Proceedings)):2534, 1987. [7] B. Truax. Time shifting of sampled sound with a real-time granulation technique. In Proceedings of the 1990 International Computer Music Conference. Computer Music Association, San Francisco, 1990. [8] H. Tutschku. On the interpretation of multi-channel electroacoustic works on loudspeaker-orchestras: Some thoughts on the grm- acousmonium and beast. URL http://huseac.fas.harvard. edu/hydra/Interpretation-eng.pdf. [9] S. Wilson, J. Harrison, and S. L. Ancona. Beastmulch. URL http://www.beast.bham.ac. uk/research/mulch.shtml.