SuperEQ

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(include .feq file on the page; formatting; more links)
m (FEQ file info added, determined by experimentation; misc touchup)
Line 6: Line 6:
 
|-  
 
|-  
 
| filename
 
| filename
| The foobar2k equalizer preset file to apply.
+
| Set EQ bands from a preset file
 
|-  
 
|-  
 
| band1-band18
 
| band1-band18
| Allows to set all bands within your script (in dB).
+
| Set EQ bands within your script
 
|}
 
|}
  
Line 23: Line 23:
 
| 1||0 Hz|| 65 Hz
 
| 1||0 Hz|| 65 Hz
 
|-  
 
|-  
|2|| 65 Hz|| 92 Hz
+
|2|| 65 Hz|| 93 Hz
 
|-  
 
|-  
|3|| 92 Hz|| 131 Hz
+
|3|| 93 Hz|| 131 Hz
 
|-  
 
|-  
 
|4|| 131 Hz|| 185 Hz
 
|4|| 131 Hz|| 185 Hz
Line 37: Line 37:
 
|8|| 523 Hz|| 740 Hz
 
|8|| 523 Hz|| 740 Hz
 
|-  
 
|-  
|9|| 740 Hz|| 1046 Hz
+
|9|| 740 Hz|| 1047 Hz
 
|-  
 
|-  
|10|| 1046 Hz|| 1480 Hz
+
|10|| 1047 Hz|| 1480 Hz
 
|-  
 
|-  
 
|11|| 1480 Hz|| 2093 Hz
 
|11|| 1480 Hz|| 2093 Hz
Line 51: Line 51:
 
|15|| 5920 Hz|| 8372 Hz
 
|15|| 5920 Hz|| 8372 Hz
 
|-  
 
|-  
|16|| 8372 Hz||11839 Hz
+
|16|| 8372 Hz||11840 Hz
 
|-  
 
|-  
|17||11839 Hz||16744 Hz
+
|17||11840 Hz||16744 Hz
 +
|-
 +
|18||16744 Hz||style="text-align:center;font-family:courier;font-size:150%;" |'''∞'''
 
|}
 
|}
 
(adapted from [http://avisynth2.cvs.sourceforge.net/viewvc/avisynth2/avisynth/src/audio/supereq.h?view=markup#l197 avisynth/src/audio/supereq.h])
 
(adapted from [http://avisynth2.cvs.sourceforge.net/viewvc/avisynth2/avisynth/src/audio/supereq.h?view=markup#l197 avisynth/src/audio/supereq.h])
Line 64: Line 66:
 
SuperEQ can accept a [http://www.foobar2000.org foobar2k] equalizer '''Preset''' (.feq) file. Foobar's equalizer can be found in the [http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Preferences:Playback:DSP_Manager DSPManager], and presets are adjusted and saved from there as well.
 
SuperEQ can accept a [http://www.foobar2000.org foobar2k] equalizer '''Preset''' (.feq) file. Foobar's equalizer can be found in the [http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Preferences:Playback:DSP_Manager DSPManager], and presets are adjusted and saved from there as well.
  
An .feq file is a text file with a positive or negative integer on each line. No extra characters are allowed on the line.
+
<div style="margin:1em 1em 1em 2em;padding:0.2em 0.2em 0.2em 1em;border-left:4px solid blue;">A Preset file is a text file with a positive or negative integer on each line. Nothing else is allowed on the line, except white space. Empty (blank) lines are ignored. Each line sets the gain in [http://en.wikipedia.org/wiki/Decibel decibels] for a frequency band. All text after the first 18 non-empty lines are ignored, allowing you to add comments to the file.</div>
Each value controls the amplification in [http://en.wikipedia.org/wiki/Decibel decibels] over one frequency band. Preset files can be found in your \AviSynth25\Examples folder (Equalizer Presets.zip), or may be found by searching the Web for "foobar2000 presets."  
+
<!--
 +
If SuperEQ encounters an error in the preset file, all bands after the invalid line will be set to the last valid decibel value; but if the file can not be parsed at all, all bands may be set to +20 dB (??)
 +
-->
 +
 
 +
Preset files can be found in your \AviSynth25\Examples folder (Equalizer Presets.zip), available online [http://avisynth2.cvs.sourceforge.net/viewvc/avisynth2/avisynth/distrib/Examples/Equalizer%20Presets.zip here], or may be found by searching the Web for "foobar2000 presets."  
  
'''Example 1:''' ''Apply a Preset file Loudness.feq)''
+
'''Example 1:''' ''Apply a Preset file''
  
 
  SuperEq("C:\Equalizer Presets\Loudness.feq")
 
  SuperEq("C:\Equalizer Presets\Loudness.feq")
Line 90: Line 96:
 
  4
 
  4
 
  4
 
  4
[http://audacityteam.org/ Audacity] spectrum analysis:
 
  
 +
[http://audacityteam.org/ Audacity] spectrum analysis of processed [http://en.wikipedia.org/wiki/White_noise white noise]:
 
:[[File:SuperEQ-loudness-624x534.png|206px]]
 
:[[File:SuperEQ-loudness-624x534.png|206px]]
  
  
 
=====''Band Gain Arguments''=====
 
=====''Band Gain Arguments''=====
From Avisynth version 2.60, '''band gain arguments''' allow all 18 bands to be set within your script, instead of requiring a preset file. The values are specified in decibels, as integer or floating point.
+
From Avisynth version 2.60, '''band gain arguments''' allow all 18 bands to be set within your script, instead of requiring a preset file. The values are specified in decibels, in floating point or integer format.
  
 
'''Example 2:''' ''Boost midrange (speech) using band arguments''
 
'''Example 2:''' ''Boost midrange (speech) using band arguments''
  
  ConvertAudioToFloat
+
  ConvertAudioToFloat ## optional but recommended
 
  SuperEQ(
 
  SuperEQ(
  \  0,  [*    65 *]
+
  \  0,  [*     0 -   65 *]
  \  0,  [*    92 *]
+
  \  0,  [*    65 -    93 *]
  \  0,  [*  131 *]
+
  \  0,  [*   93 -   131 *]
  \  0,  [*  185 *]
+
  \  0,  [*   131 -   185 *]
  \  0,  [*  262 *]
+
  \  0,  [*   185 -   262 *]
  \  0,  [*  370 *]
+
  \  0,  [*   262 -   370 *]
  \  0,  [*  523 *]
+
  \  0,  [*   370 -   523 *]
  \  5,  [*  740 *]
+
  \  5,  [*   523 -   740 *]
  \  10,  [*  1046 *]
+
  \  10,  [*   740 - 1047 *]
  \  10,  [*  1480 *]
+
  \  10,  [* 1047 - 1480 *]
  \  10,  [*  2093 *]
+
  \  10,  [* 1480 - 2093 *]
  \  5,  [*  2960 *]
+
  \  5,  [* 2093 - 2960 *]
  \  0,  [*  4186 *]
+
  \  0,  [* 2960 - 4186 *]
  \  0,  [*  5920 *]
+
  \  0,  [* 4186 - 5920 *]
  \  0,  [*  8372 *]
+
  \  0,  [* 5920 - 8372 *]
  \  0,  [* 11839 *]
+
  \  0,  [* 8372 - 11840 *]
  \  0  [* 16744 *]
+
  \  0  [* 11840 - 16744 *]
 +
\  0  [* 16744 -  ?  *]
 
  \ )
 
  \ )
  ConvertAudioTo16bit
+
  ConvertAudioTo16bit ## required for VirtualDub
  
[http://audacityteam.org/ Audacity] spectrum analysis:
+
[http://audacityteam.org/ Audacity] spectrum analysis of processed [http://en.wikipedia.org/wiki/White_noise white noise]:
 
:[[File:SuperEQ-midboost-624x534.png|206px]]
 
:[[File:SuperEQ-midboost-624x534.png|206px]]
  

Revision as of 09:04, 2 September 2015

SuperEQ(clip, string filename)
SuperEQ(clip, float band1 [, float band2, ..., float band18])

Parameter:

filename Set EQ bands from a preset file
band1-band18 Set EQ bands within your script


Shibatch Super Equalizer is a graphic equalizer, originally created as a plugin for Winamp by Naoki Shibata. SuperEQ uses 16383th order FIR filters using FFT. Its equalization is very precise. Note that unlike traditional equalizers, there is very little roll-off or overlap between the bands.


Frequencies

The 18 bands cover the following frequency ranges:

Band # f (low) f (high)
1 0 Hz 65 Hz
2 65 Hz 93 Hz
3 93 Hz 131 Hz
4 131 Hz 185 Hz
5 185 Hz 262 Hz
6 262 Hz 370 Hz
7 370 Hz 523 Hz
8 523 Hz 740 Hz
9 740 Hz 1047 Hz
10 1047 Hz 1480 Hz
11 1480 Hz 2093 Hz
12 2093 Hz 2960 Hz
13 2960 Hz 4186 Hz
14 4186 Hz 5920 Hz
15 5920 Hz 8372 Hz
16 8372 Hz 11840 Hz
17 11840 Hz 16744 Hz
18 16744 Hz

(adapted from avisynth/src/audio/supereq.h)


Preset Files

SuperEQ can accept a foobar2k equalizer Preset (.feq) file. Foobar's equalizer can be found in the DSPManager, and presets are adjusted and saved from there as well.

A Preset file is a text file with a positive or negative integer on each line. Nothing else is allowed on the line, except white space. Empty (blank) lines are ignored. Each line sets the gain in decibels for a frequency band. All text after the first 18 non-empty lines are ignored, allowing you to add comments to the file.

Preset files can be found in your \AviSynth25\Examples folder (Equalizer Presets.zip), available online here, or may be found by searching the Web for "foobar2000 presets."

Example 1: Apply a Preset file

SuperEq("C:\Equalizer Presets\Loudness.feq")

Contents of Loudness.feq:

4
4
4
2
-2
-2
-2
-2
-2
-2
-2
-4
-10
-7
0
3
4
4

Audacity spectrum analysis of processed white noise:

SuperEQ-loudness-624x534.png


Band Gain Arguments

From Avisynth version 2.60, band gain arguments allow all 18 bands to be set within your script, instead of requiring a preset file. The values are specified in decibels, in floating point or integer format.

Example 2: Boost midrange (speech) using band arguments

ConvertAudioToFloat ## optional but recommended
SuperEQ(
\   0,  [*     0 -    65 *]
\   0,  [*    65 -    93 *]
\   0,  [*    93 -   131 *]
\   0,  [*   131 -   185 *]
\   0,  [*   185 -   262 *]
\   0,  [*   262 -   370 *]
\   0,  [*   370 -   523 *]
\   5,  [*   523 -   740 *]
\  10,  [*   740 -  1047 *]
\  10,  [*  1047 -  1480 *]
\  10,  [*  1480 -  2093 *]
\   5,  [*  2093 -  2960 *]
\   0,  [*  2960 -  4186 *]
\   0,  [*  4186 -  5920 *]
\   0,  [*  5920 -  8372 *]
\   0,  [*  8372 - 11840 *]
\   0   [* 11840 - 16744 *]
\   0   [* 16744 -   ?   *]
\ )
ConvertAudioTo16bit ## required for VirtualDub

Audacity spectrum analysis of processed white noise:

SuperEQ-midboost-624x534.png


Requirements

This plugin is optimized for processors which have cache equal to or greater than 128k bytes (16383*2*sizeof(float) = 128k). This plugin won't work efficiently with K6 series processors.

Changes:

v2.60 Added custom band setting to allow all 16 bands to be set from script.
v2.54 Initial Release.

Some parts of SuperEQ are:
Copyright © Naoki Shibata.

Other parts are:
Copyright © 2001-2003, Peter Pawlowski All rights reserved.

Personal tools