space - unit generator for spatial processing

SPACE(b,n) RV*; where RV = x[bvpn] y[bvpn] theta[bvpn] amp[bvpn] back[bvpn] ;

(Work in progress - use at your own risk)
Spatial processing unit generator macro (requires the file
<carl/cmusic.h> be #include'd in the score file).  The macro takes 2
arguments, b and n. b is an io block which is a source sound to be
located in space at the coordinates x,y.  For now, set n to 1 unless
you know what else is possible.  x and y are specified directly in
meters - in the default usage they may range from -50 to +50.  theta is
a direction for a radiation vector (in radians, with 0 pointing to the
right).  amp is the length of the radiation vector (it simply scales
the amplitude - use 1 unless you know what else is possible).  back is
the relative radiation amplitude in the opposite direction to theta (0
gives a very directional source, 1 gives an omnidirectional source,
values in between give cardiod shapes in between).  Multiple radiation
vectors, each with complete specifications for x, y, theta, amp, and
back, may be given.  The relative amount of global reverb is given with
a set statement - the example below gives some good settings for
everything.

    #include <carl/cmusic.h>
    set list = loop2.list;
    set stereo; {sets number of output channels computed}
    set revscale = .1; {relative strength of global reverb}
    set t60 = 3; {reverb time in seconds}
    set cutoff = -60dB; {saves computation when reverb tail small}

    ins 0 one;
    {env}	seg  b4 p5 f4 d .1sec 0 .1sec;
    {pulser}	osc  b5 b4 p10 f5 d;
    {x}		osc  b2 p7 p8 f2 d;
    {y}		osc  b3 p7 p9 f3 d;
    {front}	adn  b3 b3 p11;
    {carrier} 	osc  b1 b5 p6 f1 d;
		SPACE(b1,1) b2 b3 0 1 0dB;
    end;

    SAWTOOTH(f1);
    SINE(f2);
    COS(f3);
    GEN1(f4) 0,0 1/3,1 2/3,1 1,0;
    PULSE(f5);
    GEN3(f6) 3/4 -1/4;

    {play 4 second note that moves in circular path centered
    about point (0,20). Circle has radius of 10 meters. Sound
    takes 2 seconds to complete one circular movement}

    note 0 one 4 0dB 440Hz 10 2sec 2sec 11Hz 20;

    sec;
    ter 4; {allow 4 seconds at end for global reverb to die}
