[audacity4blind] Stereo Widener plug-in, attached

  • From: "David R. Sky" <davidsky@xxxxxxxxxxxxxx>
  • To: audacity4blind@xxxxxxxxxxxxx
  • Date: Sun, 19 Mar 2006 23:59:51 -0800 (PST)


Attached is the "stereo widener" plug-in which someone had asked me
about off-list, an effect which works with Audacity. It creates the
illusion of widening your stereo audio (making it sound like your
speakers are further apart than they really are, whether in your
headphones or part of your computer and/or stereo system). Stereo
widening effects will be different depending on the distance
between your speakers, where you are physically in relation to
them, and the settings you have used in the Stereo Widener plug-in.
I've set the default values of the three numbers (explained below)
so I hear stereo widening effects in my headphones.

If you want to install and use it, copy the attachment (called
widener.ny) into your Audacity plug-ins folder, usually

c:\program files\audacity\plug-ins\

in Windows. The next time you re-start Audacity, you will find
"Stereo Widener" under the effects menu.

To make the stereo widener work, first load stereo audio into
Audacity, select the audio you want to apply the effect to, open
the effects menu (alt+c in Windows), and cursor until you get to
Stereo Widener. (You can also press the 's' key to get to it much
faster). Click on Stereo Widener.

There are 3 edit fields:

1. Inverted signal volume - db
A widener works by first inverting a stereo signal (multiplying the
left and right channels by a negative number, so the audio waves
become upside-down or "inverted"). The default value is negative 18
db, a very low volume, but which you can change between  negative
48 db (very very low volume) and  negative 6 db (half normal

2. Pan position
A widener also needs to change the position of the inverted signal
(called "panning"), closer to the opposite channel. The numbers
range from 0 (panned to center, the default value) to negative 100
(panned to the opposite channel, for instance the right inverted
channel panned to the left channel position).

3. Time offset
A third way of enhancing the illusion of widening stereo is to also
"delay" the inverted signal slightly. For instance, you can have
them delayed up to 20 milliseconds (0.02 seconds) after the
original signal. The default is 0 delay time.


Written by David R. Sky, March 19, 2006.
Released under terms of the GNU Public License

widener.ny is a "Nyquist" plug-in. Other Nyquist plug-ins plus
example mp3 files are available for download from:


Other Audacity Nyquist resources and plug-ins are posted at:

;nyquist plug-in

;version 1

;type process

;name "Stereo Widener..."

;action "Widening stereo audio..."

;info "by David R. Sky\nReleased under terms of GNU Public License\n-Pan: 
-100=opposite channel, 0=center"

;control vol "Inverted signal volume - db" int "" -18 -48 -6

;control p "Pan position" int "" 0 -100 0

;control offset "Time offset - ms" int "" 0 0 20

#| Stereo Widener by David R. Sky, October 18, 2004

Updated March 19, 2006

Thanks to David Walsh and Monty of the Audacity-users list

for discussion and explanation of how to widen stereo.

Should work properly for both North American and European 

audacity-Nyquist -

N American uses . for decimal

European uses , for decimal

so calculations are done using floating whole numbers

(see two setf statements)

How it works: left and right channels of a stereo signal are both inverted and

attenuated to some degree, then panned somewhere between center pan position 
and the

opposite channel, depending on pan position setting. (0=center, -100=opposite 

The inverted signals can be offset in time to enhance the illusion of stereo 


; Stereo Butterfly function - used to 

; change the width of the stereo field.

(defun butterfly (sound width) 


(sum (mult (aref sound 0) (sum width 1) 0.5)

(mult (aref sound 1) (sum width -1) -0.5))

(sum (mult (aref sound 1) (sum width 1) 0.5) 

(mult (aref sound 0) (sum width -1) -0.5)))) 

; convert arguments to floating values

(setf offset (/ (float offset) (float 1000)))

(setf p (/ (float p) (float 100)))

; applying stereo widener

(if (arrayp s)

(sim (cue s)

(at-abs offset 

(cue (butterfly (mult -1 (db-to-linear vol) s) p))))

(format nil "You must apply the stereo widener to stereo audio.")


Other related posts:

  • » [audacity4blind] Stereo Widener plug-in, attached