gQ

a real-time para-graphic equalizer for the SGI - version 1.0


Dan Trueman
Music Department
Princeton University
June 1996
dan@music.princeton.edu

Overview:

gQ is a real-time, para-graphic equalizer. It is real-time in that it will play your soundfile and allow you manipulate the filters banks as you listen. It is para-graphic in that it has twelve bands (twelve stereo filters) that are arranged as in a graphic equalizer, but the center frequencies and bandwidths of the bands are sweepable. It reads and writes both AIFF and NeXT soundfiles.


What You See:


What You Hear:


Acknowledgements


gQ


The Response Window

The response window displays the composite frequency response of the twelve filters. The horizontal axis represents the log of the frequency and the vertical axis represents gain. The response values are calculated directly from the transfer function of the filters.

The Grid pulldown menu allows you to choose whether or not to display a frequency grid; the grid consists of vertical lines at multiples of 100Hz up to 1000Hz, and multiples of 1000Hz up to 10000Hz. The frequency and gain values at a specific location in the window are indicated in the small text boxes in the upper right corner of the main window when any of the mouse buttons are clicked.

Note that the frequency range of the window is from 20 to 20k Hz - the audible range for really good ears (infant's ears...) - and that it does not reflect the frequency limitations imposed by sampling. If you try to filter your soundfile at a frequency greater than the Nyquist frequency (the sampling rate / 2) you are likely to see aliasing in the display. Try opening a soundfile sampled at 22.1k and then filtering it at 20k; you will see...

return to top


The Filter Bands

There are three main components to each filter band: gain controls, frequency controls, and bandwidth controls. The gain controls consist of a big slider and a text box. The slider ranges from -96dB to +20dB; however, you can type values directly into the text box for values greater than 20dB (-96dB is a "hard-wired" minimum). The frequency controls consist of a slider, up/down arrows, and a text box. The slider runs from 20 to 20kHz, the up/down arrows increment/decrement by 1Hz, and values can be typed directly into the text box. The bandwidth controls consist of up/down arrows and a text box. The bandwidth is actually specified as a percentage of the center frequency.

The reset button in each band resets the gain to 0 dB. The reset all button (near the play button in the lower left corner of the main window) will reset all of the band's gains, frequencies, and bandwidths to the default values. Setting the multiply toggle on will cause the band's values to be changed by the multiply sliders (described below).

return to top


Master Gains

The master gain sliders control the overall gain of the soundfile. This is applied after all fitering has occurred, and is useful for preventing clipping when boosting at various frequencies. There is also a normalize feature (enabled in the normalize pulldown menu) that will sort of take care of this for you. It is not a true normalize; it simply looks for the highest peak in the response curve (greater than 0 dB) and and divides the master gain values accordingly. In general, it will not prevent clipping, but it can get you in the right ballpark.

gQ has a built in muting feature that looks for overflow and then mutes the output for a short time until the overflow is past. This is to prevent destroying speakers, ears, families, etc... In beta testing, we found that rapidly changing from one filter setting to another (which happens when you use the settings feature described below) can cause short, intense, damaging overflow. The mute button under the master gain sliders will light whenever overflow has occurred and muting has kicked in.

The dB toggle button allows you to choose whether you wish the gain values to be display in decibels or simple multiples. When not using dB, the gain values in each band indicate how much you are multiplying the signal by at that frequency, while the master gain values indicate how much you are multiplying the whole signal by (this will not necessarily be true when the normalizing feature is enabled).

When using mono soundfiles, only the left master gain slider is active.

return to top


Playback and Soundfile Controls

The functions of the stop/pause/stop buttons should be self evident - mail questions to bsobolik@music.princeton.edu. The current time text box shows the times during playback.

The start and end time boxes are where you can control what you listen to. By default, gQ will play the whole file, but you can type in your own start/end times to focus in on a particular part of the sound. These times should be quite accurate. The first long box under the start/end time boxes displays information about the opened soundfile. The second long box holds the soundfile name.

You can load soundfiles under the Soundfile Stuff pulldown menu, or you can type directly into the soundfile name box. You can also do it at the command line:

>gQ mysnd.aiff

also:

>gQ mysnd.aiff mysession.gQ

will open a sound and a previously saved gQ session. Nice, eh?

After you come up with a setting that you like, you can write a new soundfile with either of the writing options in the Soundfile Stuff menu.

return to top


Settings

The settings A, B, C, and D allow you to compare various equalization options. Just toggle between the settings to hear how they sound. When you toggle to a setting that hasn't been used yet, the settings from where you were (say, setting A) will be copied to your new setting (say, setting B). All settings are saved when you save a session.

return to top


Multipliers

Use these sliders and text boxes to control groups of bands. This is particularly useful for manipulating particular formant sets. You must select the multiply toggles on the bands that you wish to affect. The reset button in each parameter will reset the sliders to 1.0. You can type values directly into the text boxes.

return to top


Saving and Opening gQ sessions

You can save and open sessions with the options under the File pulldown menu. You can also open a gQ session and a soundfile with the command:

>gQ mysnd.aiff mysession.gQ

return to top


The Filter

gQ uses a slick filter that, unlike most digital equalizer filters, completely decouples gain, frequency and bandwidth specifications from one another. This means that you can move the frequency slider of a band without changing its gain. Try this on your standard digital equalizer. The filter is taken from a paper by Zolzer and Boltze, entitled Parametric Digital Filter Structures. You can get a copy of the paper from here (it's number 4099). For those who care, it uses a tuned allpass filter and multiple mixes of the allpassed sound with the original sound to cause phase cancellation or addition at the specified frequency. Ultimately, it looks like a biquad filter with strange coefficients.

return to top


Acknowledgements

OK, I got LOTS of help with this one. Bertolt Sobolik helped with the initial interface design and he also wrote the OpenGL code for the response window. If he didn't have to write music (music?) and take exams and stuff, he probably would have finished it with me. He also came up with the name. In the grand old tradition of software development, I stole LOTS of code from Paul Lansky, and he fixed a couple of the ugly bugs that I couldn't figure out. I also used his EIN program to work up the filter initially. Great program - check it out. Perry Cook gave me the Zolzer and Boltze paper and he found a nice bug in my EIN code that fooled me. He also told me how to "vectorize" the filter for greater efficiency. Finally, Paul Koonce was the most avid beta tester and many of the final features were his ideas (the multipliers in particular).

return to top