Version 0.8

This commit is contained in:
jthedering committed 2013-05-19 15:33:04 +00:00
1 parent 495e6e45e3
commit cdf4fa734f
10 files changed
+150 -26

No files matched your search

+1 -1
View File
@@ -58,7 +58,7 @@ int main(int argc, char** argv)
cmd.parse(argc, argv);
LogHelper::set(stderr, verboseArg.getValue(), true);
LogHelper::set(stderr, verboseArg.getValue(), true, true);
unsigned sampleRate;
unsigned channelCount;
+18 -1
View File
@@ -31,6 +31,7 @@ wstring LogHelper::logPath;
bool LogHelper::enableTrace = false;
FILE* LogHelper::presetFP = NULL;
bool LogHelper::compact = false;
bool LogHelper::useConsoleColors = false;
void LogHelper::log(const char* file, int line, void* caller, bool trace, const wchar_t* format, ...)
{
@@ -71,6 +72,15 @@ void LogHelper::log(const char* file, int line, void* caller, bool trace, const
fp = presetFP;
}
if(useConsoleColors)
{
HANDLE con = GetStdHandle(STD_OUTPUT_HANDLE);
if(trace)
SetConsoleTextAttribute(con, 2); // Set console color to green
else
SetConsoleTextAttribute(con, 12); // Set console color to red
}
if(!compact)
{
SYSTEMTIME ___st;
@@ -89,6 +99,12 @@ void LogHelper::log(const char* file, int line, void* caller, bool trace, const
fwprintf(fp, L"\n");
if(useConsoleColors)
{
HANDLE con = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(con, 7); // Set console color to light grey (default)
}
if(presetFP == NULL)
fclose(fp);
}
@@ -100,11 +116,12 @@ void LogHelper::reset()
enableTrace = false;
}
void LogHelper::set(FILE* fp, bool enableTrace, bool compact)
void LogHelper::set(FILE* fp, bool enableTrace, bool compact, bool useConsoleColors)
{
LogHelper::initialized = true;
LogHelper::presetFP = fp;
LogHelper::enableTrace = enableTrace;
LogHelper::compact = compact;
LogHelper::useConsoleColors = useConsoleColors;
}
+2 -1
View File
@@ -32,7 +32,7 @@ class LogHelper
public:
static void log(const char* file, int line, void* caller, bool trace, const wchar_t* format, ...);
static void reset();
static void set(FILE* fp, bool enableTrace, bool compact);
static void set(FILE* fp, bool enableTrace, bool compact, bool useConsoleColors);
private:
static bool initialized;
@@ -40,4 +40,5 @@ private:
static bool enableTrace;
static FILE* presetFP;
static bool compact;
static bool useConsoleColors;
};
+12 -12
View File
@@ -102,7 +102,7 @@ ParametricEQ::~ParametricEQ()
SetEvent(shutdownEvent);
if(WaitForSingleObject(threadHandle, INFINITE) == WAIT_OBJECT_0)
{
TraceF(L"Successfully terminated directory change notification thread", configPath.c_str());
TraceF(L"Successfully terminated directory change notification thread");
}
CloseHandle(shutdownEvent);
CloseHandle(threadHandle);
@@ -176,7 +176,7 @@ void ParametricEQ::initialize(float sampleRate, unsigned channelCount, unsigned
}
catch(RegistryException e)
{
LogF(L"Can't read config path because of: %s", e.getMessage());
LogF(L"Can't read config path because of: %s", e.getMessage().c_str());
return;
}
if(configPath != L"")
@@ -320,7 +320,7 @@ void ParametricEQ::loadConfig(const wstring& path, vector<bool> selectedChannels
break;
}
TraceF(L"%satching device \"%s\" \"%s\" \"%s\" with pattern \"%s\"", matches ? L"M" : L"Not m", deviceName.c_str(), connectionName.c_str(), deviceGuid.c_str(), value.c_str());
TraceF(L"%satching pattern \"%s\" with device \"%s\" \"%s\" \"%s\"", matches ? L"M" : L"Not m", value.substr(0, value.length()-1).c_str(), deviceName.c_str(), connectionName.c_str(), deviceGuid.c_str());
deviceMatches = matches;
}
@@ -424,11 +424,11 @@ void ParametricEQ::loadConfig(const wstring& path, vector<bool> selectedChannels
{
wstring freqString = match.str(1);
freq = getFreq(freqString);
stream << " with center frequency " << freq << " Hz";
stream << " with frequency " << freq << " Hz";
}
else
{
LogF(L"No frequency given in filter string %s%s", typeString, value);
LogF(L"No frequency given in filter string %s%s", typeString.c_str(), value.c_str());
error = true;
}
@@ -436,7 +436,7 @@ void ParametricEQ::loadConfig(const wstring& path, vector<bool> selectedChannels
if(found)
{
if(type == BiQuad::LOW_PASS || type == BiQuad::HIGH_PASS || type == BiQuad::NOTCH || type == BiQuad::ALL_PASS)
TraceF(L"Ignoring gain for filter of type %s", typeDescription);
TraceF(L"Ignoring gain for filter of type %s", typeDescription.c_str());
else
{
wstring gainString = match.str(1);
@@ -449,7 +449,7 @@ void ParametricEQ::loadConfig(const wstring& path, vector<bool> selectedChannels
}
else if(type == BiQuad::PEAKING || type == BiQuad::LOW_SHELF || type == BiQuad::HIGH_SHELF)
{
LogF(L"No gain given in filter string %s%s", typeString, value);
LogF(L"No gain given in filter string %s%s", typeString.c_str(), value.c_str());
error = true;
}
@@ -457,7 +457,7 @@ void ParametricEQ::loadConfig(const wstring& path, vector<bool> selectedChannels
if(found)
{
if(type == BiQuad::LOW_SHELF || type == BiQuad::HIGH_SHELF)
TraceF(L"Ignoring Q for filter of type %s", typeDescription);
TraceF(L"Ignoring Q for filter of type %s", typeDescription.c_str());
else
{
wstring qString = match.str(1);
@@ -470,7 +470,7 @@ void ParametricEQ::loadConfig(const wstring& path, vector<bool> selectedChannels
if(found)
{
if(type == BiQuad::LOW_SHELF || type == BiQuad::HIGH_SHELF)
TraceF(L"Ignoring bandwidth for filter of type %s", typeDescription);
TraceF(L"Ignoring bandwidth for filter of type %s", typeDescription.c_str());
else
{
wstring bwString = match.str(1);
@@ -484,7 +484,7 @@ void ParametricEQ::loadConfig(const wstring& path, vector<bool> selectedChannels
if(found)
{
if(!(type == BiQuad::LOW_SHELF || type == BiQuad::HIGH_SHELF))
TraceF(L"Ignoring slope for filter of type %s", typeDescription);
TraceF(L"Ignoring slope for filter of type %s", typeDescription.c_str());
else
{
wstring slopeString = match.str(1);
@@ -497,7 +497,7 @@ void ParametricEQ::loadConfig(const wstring& path, vector<bool> selectedChannels
{
if(type == BiQuad::PEAKING || type == BiQuad::ALL_PASS)
{
LogF(L"No Q or bandwidth given in filter string %s%s", typeString, value);
LogF(L"No Q or bandwidth given in filter string %s%s", typeString.c_str(), value.c_str());
error = true;
}
else if(type == BiQuad::LOW_PASS || type == BiQuad::HIGH_PASS || type == BiQuad::BAND_PASS)
@@ -510,7 +510,7 @@ void ParametricEQ::loadConfig(const wstring& path, vector<bool> selectedChannels
}
else if(type == BiQuad::NOTCH)
{
bandwidthOrQOrS = 31.0f; // only roughly matches RoomEQWizard's notch
bandwidthOrQOrS = 30.0f; // found out by experimentation with RoomEQWizard
}
}
else if(type == BiQuad::LOW_SHELF || type == BiQuad::HIGH_SHELF)
+2
View File
@@ -118,6 +118,8 @@ Section "Install" SecInstall
SetOverwrite off
File /oname=config\config.txt "config\config.txt"
File /oname=config\example.txt "config\example.txt"
File /oname=config\demo.txt "config\demo.txt"
File /oname=config\multichannel.txt "config\multichannel.txt"
SetOverwrite on
;Grant write access to the config directory for all users
+30
View File
@@ -0,0 +1,30 @@
Filter Settings file
Room EQ V5,01
Dated: 16.05.2013 21:56:38
Notes:This file demonstrates all filter types the Generic equalizer supports
Equaliser: Generic
No measurement
Filter 1: ON PK Fc 50,0 Hz Gain -10,0 dB Q 2,50
Filter 2: ON Modal Fc 100H z Gain 3,0 dB Q 5,41 T60 target 100 ms
Filter 3: ON LP Fc 8.000 Hz
Filter 4: ON HP Fc 30,0 Hz
Filter 5: ON LPQ Fc 10.000 Hz Q 0,400
Filter 6: ON HPQ Fc 20,0 Hz Q 0,500
Filter 7: ON LS Fc 300 Hz Gain 5,0 dB
Filter 8: ON HS Fc 1.000 Hz Gain -3,0 dB
Filter 9: ON LS 12dB Fc 2.000 Hz Gain -5,0 dB
Filter 10: ON HS 12dB Fc 500 Hz Gain 5,0 dB
Filter 11: ON LS 6dB Fc 50,0 Hz Gain 7,2 dB
Filter 12: ON HS 6dB Fc 12.000 Hz Gain 10,0 dB
Filter 13: ON NO Fc 800 Hz
Filter 14: ON AP Fc 900 Hz Q 0,707
Filter 15: ON None
Filter 16: ON None
Filter 17: ON None
Filter 18: ON None
Filter 19: ON None
Filter 20: ON None
+12
View File
@@ -0,0 +1,12 @@
#Common preamp
Preamp: -6 dB
Channel: L
#Additional preamp for left channel
Preamp: -5 dB
#Filters only for left channel
Include: demo.txt
Channel: 2 C
#Filters for second(right) and center channel
Include: example.txt
+70 -10
View File
@@ -7,7 +7,7 @@ Welcome to the Wiki of Equalizer APO. This is currently the only documentation r
<a name="install_tutorial"></a>
# Installation tutorial
1. Download the Equalizer APO Setup for your version of Windows (32 or 64 bit). If you are unsure if you need the 32 or the 64 bit version, you can open Start Menu -> Control Panel -> System and look up the system type.
1. Download the Equalizer APO setup for your version of Windows (32 or 64 bit). If you are unsure if you need the 32 or the 64 bit version, you can open Start Menu -> Control Panel -> System and look up the system type.
2. Execute the setup program and follow the instructions. Remember your installation path if you don't use the default of C:\\Program Files\\EqualizerAPO . From here on, for better readability it is assumed that you use the default path.
3. During the installation process the program Configurator.exe will be run. Make sure that you select the correct audio device to install the APO to. If you are unsure you can open Start Menu -> Control Panel -> Sound and look for the default output device. If you need to install the APO to other audio devices later, you can run the program again from C:\\Program Files\\EqualizerAPO\\Configurator.exe .
4. After the installation finished, you should allow the reboot of your system. This is needed because the newly installed APO will not be used immediately but only after the audio service is restarted.
@@ -22,18 +22,18 @@ Welcome to the Wiki of Equalizer APO. This is currently the only documentation r
Screenshot of Room EQ Wizard (click to enlarge):
<a href="/p/equalizerapo/wiki/Documentation/attachment/RoomEQWizard.png"><img src="/p/equalizerapo/wiki/Documentation/attachment/RoomEQWizard-thumb.png"/></a>
<a href="/p/equalizerapo/wiki/Images/attachment/RoomEQWizard.png"><img src="/p/equalizerapo/wiki/Images/attachment/RoomEQWizard-thumb.png"/></a>
A detailed explanation of the usage of Room EQ Wizard is out of the scope of this document, but here is the basic process:
1. Click the "Measure" button in the toolbar (Mark A in the above screenshot) to bring up the measurement dialog. Here you should first do "Check Levels" and adjust your output volume appropriately, then "Start Measuring". After the measurement, the dialog will close automatically and a frequency response graph is shown.
2. Click the "EQ" button (Mark B) in the toolbar. Here you can select an equalizer type (Mark C). Use either "Generic" or, if you prefer bandwidth instead of Q, the "FBQ2496" equalizer type. Beware that no other equalizer types are currently supported.
3. Click the "EQ Filters" button (Mark D) in the EQ window. Now you can add filters by setting "Control" to Manual, "Type" to PK/PEQ and then adjusting "Frequency", "Gain" and "Q"/"Bw Oct" to your needs. The graph in the EQ window will directly show the filter's frequency response.
3. Click the "EQ Filters" button (Mark D) in the EQ window. Now you can add filters by setting "Control" to Manual, "Type" to PK/PEQ and then adjusting "Frequency", "Gain" and "Q"/"Bw Oct" to your needs. The graph in the EQ window will directly show the filter's frequency response. Since version 0.8, you can also use any of the other filter types available if they suit your needs, but generally the peaking filters should be the most appropriate for room correction.
4. To save the filter settings, you should first use the "Save this filter set" button (Mark E) in the EQ Filters window. This will save the settings in a format that Room EQ Wizard can read back later when you need to make further adjustments.
5. Now save the filter settings in a format that Equalizer APO can read. To do this, go to the main window of Room EQ Wizard. Open the "File" menu (Mark F) and select "Export" -> "Filter Settings as text". Save under a new filename into C:\\Program Files\\EqualizerAPO\\config .
6. Open C:\\Program Files\\EqualizerAPO\\config\\config.txt in a text editor and change the "Include" line to refer to your newly created configuration file. The change should be effective immediately.
Congratulations, you have now created your first configuration for Equalizer APO.
Congratulations, you have now created your first configuration for Equalizer APO. To learn more about the usage of RoomEQWizard, you can look into its [help file](http://www.hometheatershack.com/roomeq/wizardhelpv5/help_en-GB/html/index.html). The process can even be automated to some extent, as is explained in this [forum thread](/p/equalizerapo/discussion/general/thread/3ba39cad/).
# Configuration file format
@@ -41,22 +41,82 @@ The configuration files of Equalizer APO are organized as lines of the following
Command: Parameters
All lines not conforming to this format are silently ignored, like the comment lines that start with # in the example below.
Example:
Device: High Definition Audio Device Speakers; Benchmark
#All lines below will only be applied to the specified device and the benchmark application
Preamp: -6 db
Include: example.txt
Filter 1: ON PK Fc 50 Hz Gain -3.0 dB Q 10.00
Filter 2: ON PEQ Fc 100 Hz Gain 1.0 dB BW Oct 0.167
All lines not conforming to this format are silently ignored.
Channel: L
#Additional preamp for left channel
Preamp: -5 dB
#Filters only for left channel
Include: demo.txt
Filter 3: ON LS Fc 300 Hz Gain 5.0 dB
Channel: 2 C
#Filters for second(right) and center channel
Filter 4: ON HP Fc 30 Hz
Filter 5: ON LPQ Fc 10000 Hz Q 0.400
Device: Microphone
#From here, the lines only apply to microphone devices
Filter 1: ON NO Fc 50 Hz
The commands currently defined are:
Command | Parameters | Description
-|-|-
Preamp | ***Negative number*** db | Sets a preamplification value in decibels. This is useful when you are using filters with positive gain, to make sure that no clipping occurs.
Preamp | ***Negative number*** dB | Sets a preamplification value in decibels. This is useful when you are using filters with positive gain, to make sure that no clipping occurs. Since version 0.8, when multiple preamps apply to the same channel, the resulting preamp is the sum in dB.
Include | ***File name*** | Loads the given file as a configuration file. Instead of directly replacing config.txt, it can be better to load the actual filter definition from a separate file so that you can e.g. set a preamp before.
Filter ***n*** | ON PK Fc ***Frequency*** Hz Gain ***Gain value*** dB Q ***Q value*** | Adds a parametric equalization filter with the given frequency, gain and Q. This is the filter text format used by Room EQ Wizard for equalizer type "Generic".
Filter ***n*** | ON PEQ Fc ***Frequency*** Hz Gain ***Gain value*** dB BW Oct ***Bandwidth value*** | Adds a parametric equalization filter with the given frequency, gain and bandwidth. This is the filter text format used by Room EQ Wizard for equalizer type "FBQ2496".
Filter ***n*** | ON ***Type*** Fc ***Frequency*** Hz Gain ***Gain value*** dB Q ***Q value*** | Adds a filter of the given type with the given frequency, gain and Q. The supported filter types and their parameters are listed <a href="filter_types">below</a>. This is the filter text format used by Room EQ Wizard for equalizer type "Generic".
Filter ***n*** | ON ***Type*** Fc ***Frequency*** Hz Gain ***Gain value*** dB BW Oct ***Bandwidth value*** | Adds a filter of the given type with the given frequency, gain and bandwidth. The supported filter types and their parameters are listed <a href="filter_types">below</a>. This is the filter text format used by Room EQ Wizard for equalizer type "FBQ2496".
Device | ***Device identification pattern*** | Matches the given pattern to the connection name, device name and GUID of the current output device. If the pattern does not match, all following commands except Device commands are ignored. The pattern consists of words separated by space that must all be found in the string "***Device_name*** ***Connection_name*** ***GUID***". Multiple patterns of which one must match can be specified by separating the patterns with ';'. The special pattern "all" matches always. The benchmark application uses the device name "Benchmark" and connection name "File output". The easiest way to generate a Device command is to use the button in the Configurator application. (added in version 0.7)
Channel | *** Channel positions *** | Selects the channels to which the following Filter and Preamp commands will be applied. Channel positions can be given by identifier (acronym of 1 up to 3 characters) or by number (counted from 1). The supported channel configurations are listed <a href="channel_configs">below</a>. If a channel configuration is not supported, channels can only be selected by number. Multiple channels can be specified by separating with space. The special position "all" selects all channels. (added in version 0.8)
Lines that contain any command name not in this list are silently ignored.
Lines that contain any command name not in this list are silently ignored.
<a name="filter_types"></a>
# Filter types
The following table lists the filter types supported by Equalizer APO since version 0.8. The columns Fc, Gain and Q/BW show the parameters supported by the filter type. An 'X' means that the parameter is required while an 'O' denotes an optional parameter. The filter types supported cover all filters of the "Generic" and the "FBQ2496" equalizer type. Other equalizer types may also be compatible if their filter text format is. There is one exception however: The band-pass filter supported by Equalizer APO is a real band-pass filter that does not support gain, like low/high-pass filters, but unlike the DCX2496's "BP" filter, which is actually a peaking filter.
Type | Description | Fc | Gain | Q/BW | Example for filter parameters
- | - | - | - | - | -
PK<br>Modal<br>PEQ | Peaking filter<br>(Parametric EQ) | X | X | X | ON PK Fc 50.0 Hz Gain -10.0 dB Q 2.50<br>ON Modal Fc 100 Hz Gain 3.0 dB Q 5.41 T60 target 100 ms<br>ON PEQ Fc 100 Hz Gain 1.0 dB BW Oct 0.167
LP<br>LPQ | Low-pass filter | X | | O | ON LP Fc 8000 Hz<br>ON LPQ Fc 10000 Hz Q 0.400
HP<br>HPQ | High-pass filter | X | | O | ON HP Fc 30.0 Hz<br>ON HPQ Fc 20.0 Hz Q 0.500
BP | Band-pass filter<br>(not from DCX2496) | X | | O | ON BP Fc 1000 Hz Q 0.100
LS | Low-shelf filter<br>(with center freq.) | X | X | | ON LS Fc 300 Hz Gain 5.0 dB
HS | High-shelf filter<br>(with center freq.) | X | X | | ON HS Fc 1000 Hz Gain -3.0 dB
LS 6dB<br>LS 12dB | Low-shelf filter<br>(6 / 12 dB per octave<br>with corner freq.) | X | X | | ON LS 6dB Fc 50.0 Hz Gain 7.2 dB<br>ON LS 12dB Fc 2000 Hz Gain -5.0 dB
HS 6dB<br>HS 12dB | High-shelf filter<br>(6 / 12 dB per octave<br>with corner freq.) | X | X | | ON HS 6dB Fc 12000 Hz Gain 10.0 dB<br>ON HS 12dB Fc 500 Hz Gain 5.0 dB
NO | Notch filter | X | | O | ON NO Fc 800 Hz
AP | All-pass filter | X | | X | ON AP Fc 900 Hz Q 0.707
<a name="channel_configs"></a>
# Channel configurations
The following table lists the channel configurations that are supported by Equalizer APO. The channel identifiers in the column titles resemble the channels in Start -> Control Panel -> Sound -> Configure. If a channel position is supported for a configuration, the cell in the corresponding row contains the channel number.
Configuration | Left<br>L | Right<br>R | Center<br>C | Subwoofer<br>SUB | Rear left<br>RL | Rear right<br>RR | Rear center<br>RC | Side left<br>SL | Side right<br>SR
- | - | - | - | - | - | - | - | - | -
Mono | | | 1 | | | | | |
Stereo | 1 | 2 | | | | | | |
Quadraphonic | 1 | 2 | | | 3 | 4 | | |
Surround | 1 | 2 | 3 | | | | 4 | |
5.1 Surround | 1 | 2 | 3 | 4 | | | | 5 | 6
5.1 Surround | 1 | 2 | 3 | 4 | 5 | 6 | | |
7.1 Surround | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8
<div style="border: 2px solid red; padding: 3px">
<b>Attention:</b><br>
Although it might be tempting to assign low frequency filters only to the subwoofer channel, this might not lead to the expected results. Many audio systems apply bass redirection after Equalizer APO has processed the signal, so filters applied to the subwoofer channel won't be effective for redirected sound. Furthermore, as crossover filters only gradually fade in, the low frequency audio might be played over multiple speakers, not just the subwoofer, reducing the effectivity of subwoofer-only filters. Therefore, to avoid these problems, it's recommended to <b>apply low frequency filters to all channels</b>.
</div>
+2
View File
@@ -6,3 +6,5 @@ cd Setup
"%ProgramFiles%\NSIS\makensis.exe" Setup32.nsi
"%ProgramFiles%\NSIS\makensis.exe" Setup64.nsi
cd..
pause
+1 -1
View File
@@ -1,2 +1,2 @@
#define MAJOR 0
#define MINOR 7
#define MINOR 8