• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

A tool to convert REW eq to a aupreset for AUNBandEQ

pierre

Addicted to Fun and Learning
Forum Donor
Joined
Jul 1, 2017
Messages
964
Likes
3,058
Location
Switzerland
EDIT: I added support for eqAPO and autoEQ.

When you use REW on a MAC, an easy way to apply the generated EQ is provided by Apple: AUNBandEQ is a plugin implementing IIR filters.
REW created an output for AUNBandEQ with frequency/gain/width for each filter.

I usually manually copy each data (3 per filters, up to 16 filters) to the plugin. This is error prone and boring.

I created a small script that takes the eq file generated by REW and generates a AUpreset (a configuration file for the plugin). You then only need to drop the AUpreset file on top of the plugin window and magic, all parameters are set.

Apple is not very transparent on how the AUpreset file is generated. After some reverse engineering, I have found a likely mapping of the data. I do not guaranty that it will always works and/or that Apple will not change the format over time.

This is an alpha version but it can convert

Code:
Notes:L w/sub
AU_N-Band_EQ
Number Enabled Control Type Frequency(Hz) Gain(dB) BW_Oct Bandwidth(Hz) TargetT60(ms) FilterT60(ms)
1 True Auto PK 34.25 -9.10 0.62 14.83
2 True Auto PK 109.0 7.40 0.19 14.37
3 True Auto PK 123.0 -7.10 0.25 21.34
4 True Auto PK 177.5 2.30 0.19 23.39
5 True Auto PK 197.0 -6.50 0.22 30.07
6 True Auto PK 221.0 6.30 0.27 41.42
7 True Auto PK 246.0 -7.00 0.27 46.11
8 True Auto PK 292.0 6.00 0.24 48.63
9 True Auto PK 328.0 -7.50 0.52 118.9
10 True Auto PK 683.0 2.80 0.19 90.01
11 True Auto PK 1202 4.50 0.21 175.1
12 True Auto PK 1964 -7.50 1.39 1966
13 True Auto PK 3068 6.80 1.39 3072
14 True Auto PK 3962 -9.90 0.34 935.9
15 True Auto PK 4780 1.80 0.98 3310
16 True Auto PK 6263 -5.40 0.37 1611

into

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>ParametricType</key>
    <integer>11</integer>
    <key>data</key>
    <data>
    AAAAAAAAAAAAAABRAAAAAAAAAAAAAAPoAAAAAAAAB9AAAAAAAAALuEIJAAAAAA+gwRG
    ZmgAAE4g/HrhSAAAD6QAAAAAAAAfRAAAAAAAAC7lC2gAAAAAPoUDszM0AABOJPkKPXA
    AAA+oAAAAAAAAH0gAAAAAAAAu6QvYAAAAAD6LA4zMzAAATij6AAAAAAAPrAAAAAAAAB
    9MAAAAAAAALu0MxgAAAAA+jQBMzMwAAE4s+Qo9cAAAD7AAAAAAAAAfUAAAAAAAAC7xD
    RQAAAAAPpMDQAAAAABOMPmFHrgAAA+0AAAAAAAAH1QAAAAAAAAu9Q10AAAAAD6VAyZm
    aAAATjT6KPXEAAAPuAAAAAAAAB9YAAAAAAAALvkN2AAAAAA+mwOAAAAAAE44+ij1xAA
    AD7wAAAAAAAAfXAAAAAAAAC79DkgAAAAAPp0DAAAAAABOPPnXCjwAAA/AAAAAAAAAH2
    AAAAAAAAAvAQ6QAAAAAD6jA8AAAAAATkD8FHrgAAAPxAAAAAAAAB9kAAAAAAAALwUQq
    wAAAAA+pQDMzMwAAE5E+Qo9cAAAD8gAAAAAAAAfaAAAAAAAAC8JElkAAAAAPqkCQAAA
    AABOSPlcKPQAAA/MAAAAAAAAH2wAAAAAAAAvDRPWAAAAAD6vA8AAAAAATkz+x64UAAA
    P0AAAAAAAAB9wAAAAAAAALxEU/wAAAAA+sQNmZmgAAE5Q/seuFAAAD9QAAAAAAAAfdA
    AAAAAAAC8VFd6AAAAAPrcEeZmYAABOVPq4UewAAA/YAAAAAAAAH3gAAAAAAAAvGRZVg
    AAAAD64/5mZmAAATlj964UgAAAP3AAAAAAAAB98AAAAAAAALx0XDuAAAAA+vwKzMzQA
    AE5c+vXCk
    </data>
    <key>manufacturer</key>
    <integer>1634758764</integer>
    <key>name</key>
    <string>test</string>
    <key>numberOfBands</key>
    <integer>16</integer>
    <key>subtype</key>
    <integer>1851942257</integer>
    <key>type</key>
    <integer>1635083896</integer>
    <key>version</key>
    <integer>0</integer>
</dict>
</plist>

The data field is not very well documented, my guesses are:
- uuencoded block
- data is bigendian, 4 bytes for each parameters, parameters comes in pair (key, value)
- first 5 are
- 0
- 0
- number of parameters +1 (uint32)
- 0
- gain (float)
- then 80 parameters (16 eq with 5 parameters each): details

Ideally this would be implemented directly in REW (@JohnPM).
 
Last edited:

FPSnodgrass

New Member
Joined
Jul 15, 2023
Messages
1
Likes
0
Also, many thanks for creating and providing this conversion methodology. Works like a charm, and bypasses having to manually enter EQ parameters, by quickly converting the output from Room EQ Wizard.
 

jeffme

Member
Forum Donor
Joined
Oct 18, 2021
Messages
96
Likes
73
Location
SF, CA, USA
Thanks you so much @pierre for putting this together! Is this by any chance limited to 10 filters?

Whenever I open the resulting presets in the AUBandEQ effects in SoundsSource, there are never more than 10 filters, regardless of the number of filters in the REW output.

It looks like the first 8 are fine & the remaining are combined into the final 2, just looking at the mismatched parameters in bands 9 & 10.

See here:
1695069740731.png
 

jeffme

Member
Forum Donor
Joined
Oct 18, 2021
Messages
96
Likes
73
Location
SF, CA, USA
On further review, this appears to be a SoundSource issue... some combination of turning off and on the AUBandEQ effects "wakes up" the correct parameters (or at least the UI).

Again, MANY THANKS!!! :cool:

1695145077566.png
 

IPunchCholla

Major Contributor
Forum Donor
Joined
Jan 15, 2022
Messages
1,116
Likes
1,400
This tool is exactly what I have been looking for. Unfortunately, I know nothing about python or how to get it to run. Any pointers?
 

jeffme

Member
Forum Donor
Joined
Oct 18, 2021
Messages
96
Likes
73
Location
SF, CA, USA
Hi @IPunchCholla - the beauty of most / many programs on the web is that you often don't have any real python or other. programming skills.

It looks like you might be a Mac user, but the general flow for any platform is;
- Make sure python & git are installed - I'll leave the specifics to you, but just search install python, git, etc. on your OS
- Copy the code to your machine: % git clone https://github.com/pierreaubert/AUpresetConverter
- Change into the newly cloned code directory on your machine: % cd AUpresetConverter
- Make sure the appropriate python packages are installed in order to run the program: % pip install -r requirements.txt
- Convert your rew output file: % ./rew2aupreset.py -i [./path./to/your/rew/output/filter_name.txt] -o [~/Library/Audio/Presets/Apple/AUNBandEQ/filter_name.aupreset]

Then, if you're running SoundsSource, the filter should show up in the Presets dropdown in the lower-right of your AUBandEQ effects window.

Hope this helps.
 

IPunchCholla

Major Contributor
Forum Donor
Joined
Jan 15, 2022
Messages
1,116
Likes
1,400
Hi @IPunchCholla - the beauty of most / many programs on the web is that you often don't have any real python or other. programming skills.

It looks like you might be a Mac user, but the general flow for any platform is;
- Make sure python & git are installed - I'll leave the specifics to you, but just search install python, git, etc. on your OS
- Copy the code to your machine: % git clone https://github.com/pierreaubert/AUpresetConverter
- Change into the newly cloned code directory on your machine: % cd AUpresetConverter
- Make sure the appropriate python packages are installed in order to run the program: % pip install -r requirements.txt
- Convert your rew output file: % ./rew2aupreset.py -i [./path./to/your/rew/output/filter_name.txt] -o [~/Library/Audio/Presets/Apple/AUNBandEQ/filter_name.aupreset]

Then, if you're running SoundsSource, the filter should show up in the Presets dropdown in the lower-right of your AUBandEQ effects window.

Hope this helps.
Thank you! Nothing like command line to make me feel stupid. I am still having these two issues: pip is not recognized as a command. And: no matter the path I put in, it will not find my file.

I have a Mac m1 Mini. I have home-brew installed. I used that to install bot git and python for previous projects. I just ran updates to make sure I am on the newest stable versions. the code is cloned to ~user/AUpresetConverter. The filter output from REW is saved as a txt file in ~user/downloads.

pip returns the error that it is not a recognized command. All combinations to ~user/Downloads that I can think of give an error of "no matches found".
 

jeffme

Member
Forum Donor
Joined
Oct 18, 2021
Messages
96
Likes
73
Location
SF, CA, USA
I - and many thousands with python experience - feel your pain. : )

Have no fear! We'll get you through this.

You may want to confirm which python you're using: % which python
And this: % python --version

Check this out for installing pip: https://phoenixnap.com/kb/install-pip-mac
(although, I'd bet it's already installed and there might just be a missing symlink somewhere)
 
OP
P

pierre

Addicted to Fun and Learning
Forum Donor
Joined
Jul 1, 2017
Messages
964
Likes
3,058
Location
Switzerland
Thank you! Nothing like command line to make me feel stupid. I am still having these two issues: pip is not recognized as a command. And: no matter the path I put in, it will not find my file.

I have a Mac m1 Mini. I have home-brew installed. I used that to install bot git and python for previous projects. I just ran updates to make sure I am on the newest stable versions. the code is cloned to ~user/AUpresetConverter. The filter output from REW is saved as a txt file in ~user/downloads.

pip returns the error that it is not a recognized command. All combinations to ~user/Downloads that I can think of give an error of "no matches found".
if you are using homebrew:

add it to your path if not already done

> export PATH=$PATH:/opt/homebrew/bin

then install python3.10

> brew install python3.10

if you do a

> which pip3

you should get

/opt/homebrew/bin/pip3

then

> python3.10 ./rew2aupreset.py -i [./path./to/your/rew/output/filter_name.txt] -o [~/Library/Audio/Presets/Apple/AUNBandEQ/filter_name.aupreset

should work.
 

IPunchCholla

Major Contributor
Forum Donor
Joined
Jan 15, 2022
Messages
1,116
Likes
1,400
I - and many thousands with python experience - feel your pain. : )

Have no fear! We'll get you through this.

You may want to confirm which python you're using: % which python
And this: % python --version

Check this out for installing pip: https://phoenixnap.com/kb/install-pip-mac
(although, I'd bet it's already installed and there might just be a missing symlink somewhere)
I get an error for either of those commands, unfortunately. It just says python not found. if I then use brew install [email protected] it says I have to use reinstall rather than install. reinstalling gives the message python not found.

@pierre Thanks. When I run which pip3 I get "/Library/Frameworks/Python.framework/Versions/3.11/bin/pip3"

It seems to recognizes the command python3.10 ./rew2aupreset.py -i [./path./to/your/rew/output/filter_name.txt] -o [~/Library/Audio/Presets/Apple/AUNBandEQ/filter_name.aupreset but no matter what I use for the path to the file (even dragging the file into the command from the finder) I get the error zsh: no matches found.
 

holdingpants01

Addicted to Fun and Learning
Forum Donor
Joined
Mar 18, 2023
Messages
669
Likes
1,039
I assume the AUNBandEQ works on both stereo channels and there's no way to use it in dual mono with different settings?
 

sushi2020

Member
Joined
Apr 28, 2021
Messages
63
Likes
71
Location
Japan
I was just looking for such a tool,
Unfortunately, Kushview Element I use with AUNBandEQ only seems to be able to import .elpreset (its original preset file) , so I could not use .aupreset:facepalm:

I am continuing to look for an easy way to import EQ settings on my Mac, and may better install SoundSource instead of Kushview Element.
 
OP
P

pierre

Addicted to Fun and Learning
Forum Donor
Joined
Jul 1, 2017
Messages
964
Likes
3,058
Location
Switzerland
is someone interested in an automatic conversion from EPO to RME format for room-EQ? It looks like TotalMix can load a xml file that I can generate.
 
Top Bottom