| I'd like to clarify some things about constant power panning and the "hole
in the middle" problem. In particular, constant power panning is not the
solution to this problem. The "hole in the middle" problem arises when the
listener is positioned so the angle between the left speaker, the listener,
and the right speaker is larger than about 60 degrees. Remember that the
stereophonic technique simply creates the illusion of a spatialized sound;
this illusion simply breaks down when the above angle is greater than 60
degrees. Note that this also problem implies that one needs at least 6
speakers to pan a sound in a circle. Constant power panning potentially
makes this problem worse, because it lowers the volume of sound from each
speaker when the sound is centered. The problem is solved by good
loudspeaker placement. (and good recording technique, too.)
Constant power panning, in general, is implemented by scaling the left
channel by a function F(t), and the right channel by sqrt(1-F(t)^2). The
sum of these two scaling factors will always be 1, independent of t. The
reason why squared terms are used is that power (~loudness) is proportional
to the square of amplitude. F(t) = sin t or F(t) = cos t are good choices,
as when t moves linearly, the sound approximately moves linearly in the
stereo field (more accurately, these functions simulate constant angular
velocity). In addition, if F(t) = sin (t) by sqrt(1-F(t)^2)= cos(t).
Sin(t) and cos(t) are efficiently implemented using table lookup. However,
F(t) = t is a reasonable choice as well, although slightly less efficient.
F(t) = t maintains a slightly more centralized image compared to F(t) = sin
(t).
To expand the stereo technique to multiple channels, simply use the stereo
technique for the two speakers the sound is to be located between. This
only creates directional cues. One can use reverb, attenuation, and delay
to create distance cues.
I can be more mathematically detailed about this if people are interested,
but I don't want to write math in a hurry, which is a good way to make
mistakes. E-mail me if anyone is interested...
Christopher Neese
Received: from shaun.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa19183;
29 Nov 98 11:32 GMT
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by shaun.maths.bath.ac.uk with esmtp (Exim 1.92 #2)
for jpff@maths.bath.ac.uk
id 0zk55c-0004RX-00; Sun, 29 Nov 1998 11:32:32 +0000
Received: from noether [144.173.8.10] by hermes via SMTP (LAA00238); Sun, 29 Nov 1998 11:30:54 GMT
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 29 Nov 1998 11:30:42 GMT
Received: from jaguars-int.cableinet.net [193.38.113.9] by hermes via SMTP (LAA13356); Sun, 29 Nov 1998 11:30:42 GMT
Received: (qmail 11383 invoked from network); 29 Nov 1998 11:28:03 -0000
Received: from unknown (HELO cableinet.co.uk) (194.117.146.73)
by jaguars with SMTP; 29 Nov 1998 11:28:03 -0000
Message-ID: <36612FA4.EED1AD50@cableinet.co.uk>
Date: Sun, 29 Nov 1998 11:27:32 +0000
From: Richard Dobson
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Csound
Subject: Re: Quad & Discrete 5.1
References: <000601be1b56$8c5264e0$056dfea9@christon>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
So often it can be the case that people can understand quite different things
by the same term. I have not come across this explanation of the
'hole-in-the-middle' effect before - inter-speaker angle. I always understood
that the primary problem with angles above 60 is poor localization.
My main reference for this, as for so many things, is F.R. Moore's Book
'Elements of Computer Music' - pp 353-359, 'Intensity panning'. He refers to a
simple linear crossfade between adjacent channels:
"This effect, which has been called the 'hole-in-the-middle effect', is due to
the fact that in the midway position both loudspeakers will produce the sound
with one-half the amplitude associated with the endpoints of the path.
...
In other words, the distance cue based on intensity would imply that the
sound is sqrt(2) = 1.414 times farther from the listener at the midpoint of
its travel that it is at either endpoint."
He then presents constant-power panning techniques as simply a more correct
way to pan sounds. Nowhere does he suggest it as a solution to the acoustic
problem of speaker placement or poor recording technique.
Curtis Roads presents the same argument in his more recent book 'The Computer
Music Tutorial', pp 459-461.
The possibility of such a simplistic linear crossfade probably never arises
for recording engineers (especially, using analogue equipment), as faders and
panpots are (probably?) never linear anyway. However, it is commonly done by
synthesists/programmers, who are thus much more prone to the H.I.M. effect.
So, in fact, constant-power panning ~increases~ signal intensity at the
mid-point, by comparison with a linear crossfade pan.
Composers using software such as Csound are creating artificial sounds which
have never existed (and perhaps could not exist!) in the physical world. So
'good recording technique' is neither a possible fault, nor a solution. On the
other hand, composers are frequently very concerned to achieve good
stereophonic or even periphonic imaging of their sounds, so the more
information we can have about how to do that, the better!
Part of the problem may be that most sounds are still nominally monophonic at
the moment of synthesis (i.e have no distance or acoustic location at all),
and rendering into multiple channels is achieved by a combination of intensity
panning (pairwise) and reverberation. In many cases, the final localisation of
a sound is achieved not at the composition stage, but in final live projection
where the composer uses a mixing desk to direct sounds (which may be on
anything from stereo to eight-channel tape) anywhere amongst the available
speakers. The composers is thus entirely dependent on the sophistication or
otherwise of the desk (faders? joysticks?) to control location and intensity.
To solve this problem at the compositional stage, composers need to define not
only the sound of an instrument, but also the acoustic environment in which
that sound will be placed, and probably trajectories along which that sound
will move in that space. This implies knowledge, to some degree, of final
speaker placement, much as some composers exploit the placement of first and
second violins at opposite sides of the orchestra, or the location of choirs
in multiple galleries in St Mark's, Venice. Of course, these placements cannot
be guaranteed, and the only base-line performance medium on which modern
electro-acoustic composers can rely is still stereo. Some composers (notably
Ambrose Field) are looking to Ambisonics as the final solution to the
'diffusion problem'; but even there, the technology is still predicated on the
rendering of a 'real' acoustic space, and electro-acoustic composers are
notorious for wanting to do 'unreal' things too...
As a final codicil to this, I would like to mention the Microsoft proposals
for a 'wave-format-positional' soundfile format. The proposale are at that
moment nothing more than questions, eg:
Assumption is that the listener is at the origin[0,0,0]. Is this valid?
Is origin between the ears, ore are ears coincident in space?
Handle inter-aural distance, HRTF?
Cartesian coordinates(x,y,z) better than spherical or cylindrical?
How does a channel indicate it is not spatially positioned?
Should we accomodate moving sound sources?
Can we accomodate moving listeners?
There are others; the whole white-paper on the new proposed formats is at the
music-dsp site:
http://shoko.calarts.edu/~glmrbuy/musicdsp/sourcecode/mulchaud.rtf
For this format to materialize, Microsoft needs feedback; my contact, Martin
Puryear is very responsive, and keen to get feedback from everyone.
Whatever some people may think of Microsoft generally, I am pleased that these
initiatives are happening. It is hard to imagine Apple doing anything similar
with AIFF, given their traditional indifference to audio!
Just possibly, the development of this format might lead to new facilities for
composers, not least in Csound, to define the acoustical attributes of a sound
in a generic way (intensity, directivity, position in 3d space, etc), knowing
that the results will be diffused as accurately as the playback hardware will
allow. Then, all questions of panning algorithms can, at last, be re-delegated
to the sound engineer. At the moment, Csound requires us to be both, which is
why all these confusions have arisen in the first place.
Richard Dobson
Xopher wrote:
>
> I'd like to clarify some things about constant power panning and the "hole
> in the middle" problem. In particular, constant power panning is not the
> solution to this problem. The "hole in the middle" problem arises when the
> listener is positioned so the angle between the left speaker, the listener,
> and the right speaker is larger than about 60 degrees. Remember that the
> stereophonic technique simply creates the illusion of a spatialized sound;
> this illusion simply breaks down when the above angle is greater than 60
> degrees. Note that this also problem implies that one needs at least 6
> speakers to pan a sound in a circle. Constant power panning potentially
> makes this problem worse, because it lowers the volume of sound from each
> speaker when the sound is centered. The problem is solved by good
> loudspeaker placement. (and good recording technique, too.)
>
Received: from wallace.maths.bath.ac.uk by omphalos.maths.Bath.AC.UK id aa19276;
29 Nov 98 13:03 GMT
Received: from [144.173.6.14] (helo=exeter.ac.uk)
by wallace.maths.bath.ac.uk with esmtp (Exim 1.92 #2)
for jpff@maths.bath.ac.uk
id 0zk6VA-0003vo-00; Sun, 29 Nov 1998 13:03:00 +0000
Received: from noether [144.173.8.10] by hermes via SMTP (NAA03989); Sun, 29 Nov 1998 13:02:05 GMT
Received: from exeter.ac.uk by maths.ex.ac.uk; Sun, 29 Nov 1998 13:01:53 GMT
Received: from [203.36.219.100] by hermes via SMTP (NAA19921); Sun, 29 Nov 1998 13:01:49 GMT
Received: from RossBencina (unverified [203.56.205.5]) by www.webpage.com.au
(EMWAC SMTPRS 0.83) with SMTP id ;
Sun, 29 Nov 1998 23:57:39 +1100
Message-ID: <005701be1b97$9f872b40$05cd38cb@RossBencina>
From: Ross Bencina
To: Csound
Subject: Re: Quad & Discrete 5.1
Date: Sun, 29 Nov 1998 23:25:45 +1030
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: owner-csound-outgoing@maths.ex.ac.uk
Precedence: bulk
On Sunday, 29 November 1998 22:06, Richard Dobson writes:
>So often it can be the case that people can understand quite different
things
>by the same term. I have not come across this explanation of the
>'hole-in-the-middle' effect before - inter-speaker angle. I always
understood
>that the primary problem with angles above 60 is poor localization.
Excluding the 60 degree rule....
There seem to be two different interpretations of panning/hole in the
middle.
One interpretation of panning involves providing a signal that appears to
move
in a _straight line_ from one speaker to another, as an improvement over
a _radial line_ from one speaker to the other.
The other interpretation is between using a constant amplitude algorithm
which
produces a hole in the middle, or using constant power (which produces a
radial pan from speaker to speaker).
A 'linear pan' as I call it makes the sound (appear to) travel in a straight
line from
speaker to speaker - I have found this method effective when creating stereo
ray tracing spatialiser effects. I don't think this is the same equation as
Moore
gives (I can't work out the math), but it works nicely (for stereo).
I've included the calculations I've been using for a while... any comments?
float pan ; ranges from 0 to 1. 0 == left, 1==right
;constant amplitude pan
leftGain = 1. - pan
rightGain = pan
;constan power pan
leftGain = sqrt( 1. - pan )
rightGain = sqrt( pan )
;linear pan
leftGain = ROOT_TWO*cos((1.-pan)*PI_ON_TWO)*
sin(((1.-pan)*PI_ON_TWO)+PI_ON_FOUR);
rightGain = ROOT_TWO*cos(pan*PI_ON_TWO)*
sin((pan*PI_ON_TWO)+PI_ON_FOUR);
for reference:
1.
The sspat contraption in audiomulch uses trig and the linear pan equations
above to calculate speaker plane intercepts for spatialisation... it works
really well with stereo
2.
last year I programmed an installation which had 8 speakers set up in a
circle,
with sounds continuously spinning, arcing, etc arround (outside) the space.
The algorithm was just simple panning and distance amplitude scaling.
Initially I used the linear pan equation above... but in a radial
configuration
the sound seemed to get louder at the speakers... so I used the constant
power pan which worked fine.
I assume that for a given number of speakers / angles... it's possible to
tune the panning algorithms. However ambisonics is probably a better way
to go for arbitrary speaker placement... that's where I'm headed.
Ross B.
|