Discussion:
[SlimDevices: Audiophiles] RC (Inguz etc.)
W0153R
2018-01-05 18:13:09 UTC
Permalink
CLIPPING
InguzDSP creates a few files in /usr/share/InguzEQ/, after you've set up
Inguz there are 2 files of interest: error & log.txt. You can check for
errors with:

Code:
--------------------
cat /usr/share/InguzEQ/error
--------------------

It should give you no output at all.

The file log.txt can get big and we're only interested in the latest
data so we'll use 'tail' to just give us the end of the file and print
any new information as it comes in:

Code:
--------------------
tail -f /usr/share/InguzEQ/log.txt
--------------------

If there's clipping going on, it will print 'CLIPPING+' or 'CLIPPING-'
and something along the lines of:

Code:
--------------------
20180105181413: 01:53:01:53:01:02 2387377 samples, 404442.711 ms (1610.266 init), 0.1335 * realtime, peak 0.865 dBfs
--------------------

We're only interested in the last bit, the peak-value, a peak > 0 means
clipping.
The log will also contain the following information:

Code:
--------------------
20180105181939: 00:04:20:16:cd:70 24/96000 PCM => 24/96000 PCM TRIANGULAR, gain -16 dB
--------------------

Once again, we're only interested in the last bit, the gain, if you're
experiencing clipping you should adjust it.
In the above example a gain of 1dB lower would already prevent the
clipping. To adjust the clipping enter the following in a terminal:

Code:
--------------------
sudo nano /usr/share/squeezeboxserver/Bin/i386-linux/InguzDSP.exe.config
--------------------




RESAMPLING
By default InguzDSP will turn off when LMS needs to resample (except for
MP3 & OGG-files). I've added extra profiles to Plugin.pm that allow for
resampling and even upsampling. There are 4 extra profiles in there:
template_FLAC24_resample: allows for resampling when necessary and spits
out 24bit FLAC's
template_FLAC16_resample: allows for resampling when necessary and spits
out 16bit FLAC's
template_FLAC24_upsample192 and template_FLAC24_upsample96: upsampling
to respectively 24bit/192kHz and 24bit/96kHz

InguzDSP uses 24bit filters and all processing is done in 24bit,
template_FLAC16_resample turns it back into 16bit after the processing
is done.

On line 3596 of the attached Plugin.pm you'll find 2 extra if-statements
checking for the squeezebox-model, you should adjust here if you want to
use a certain profile.
I've got a Receiver (which can playback 24bit/48kHz) so I've got it
setup to apply the FLAC24_resample-template when the modelname equals
'receiver', and I've got a SqueezeLite-box with a soundcard that can
only do 16bit/48kHz so I've got that setup to use the
FLAC16_resample-template.
You can find the model-name of your device on LMS-settings page. If
you've already got InguzDSP set up, replacing the Plugin.pm-file and
restarting LMS twice should take care of the settings but you might have
to delete the file 'custom-convert.conf' in the same folder
(/usr/share/squeezeboxserver/Plugins/InguzEQ/) before restarting.


+-------------------------------------------------------------------+
|Filename: InguzEQ_Plugin.pm_resampling.zip |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=24300|
+-------------------------------------------------------------------+

------------------------------------------------------------------------
W0153R's Profile: http://forums.slimdevices.com/member.php?userid=44848
View this thread: http://forums.slimdevices.com/showthread.php?t=77084
Wirrunna
2018-01-14 05:13:46 UTC
Permalink
W0153R excellent tutorial. Your procedures also work with Vortexbox 2.4

A recent thread in the Klipsch forums showed how to use REW (Room EQ
Wizard freeware) to measure your room and calculate Parametric Equalizer
(PEQ) settings.
https://community.klipsch.com/index.php?/topic/167089-using-rew-to-find-parametric-equalizer-peq-settings/

Some time ago Darren Yeats pointed out that Inguz " EQ presets can be
defined separately from the EQ GUI plug-in. There is an xml file for
each preset which you can configure by hand to have an indefinite number
of EQ bands. On Linux the preset files live at
/usr/share/InguzEQ/Settings/. "
http://www.audiocircle.com/index.php?topic=51994.0 reply #18

So we should be able to use REW to create PEQ settings and then build a
working preset.

Here is an EQ conf for a preset I call Transistor Radio, a great preset
for testing if EQ is working after installing Inguz -
Transistor Radio.preset.conf

<?xml version="1.0"?>
<InguzEQSettings Revision="0.9.33">
<Client ID="00:52:1b:60:ea:c0">
<AmbisonicDecode Type="UHJ" RotateZ="0" RotateY="0" RotateX="0" />
<SignalGenerator Type="None" />
<Matrix></Matrix>
<Width>0</Width>
<Balance>0</Balance>
<Skew>0</Skew>
<Filter></Filter>
<EQ Bands="5">
<Band Freq="60">-20</Band>
<Band Freq="240">-20</Band>
<Band Freq="1000">0</Band>
<Band Freq="3840">-20</Band>
<Band Freq="15360">-20</Band>
</EQ>
<Quietness>0</Quietness>
<Flatness>10</Flatness>
</Client>
</InguzEQSettings>

You can see it is a 5 band equalizer with -20db bass cut, flat at 1000Hz
and -20db treble cut, sounds just like an old tinny pocket transister
radio.

It is simple to modify a .preset.conf, and after selecting the modified
preset Inguz will show the response in the graph in the GUI.

I have found that Inguz EQ is not just a software parametric equalizer,
rather it appears to draw a line between points, so that if you want to
equalize a bump in your speaker's response, then define the frequency at
start of the bump with a zero, the bump peak frequency with a negative
db number and the frequency where the response is flat with a zero -

<Band Freq="850">0</Band>
<Band Freq="900">-10</Band>
<Band Freq="950">-12</Band>
<Band Freq="1000">0</Band>

These entries will build an EQ curve flat to 850Hz, -10db at 900Hz,
-12db at 950Hz and flat from 1000Hz

REW makes measurement simple by its ability to output a measurement
sweep including the timing reference signal as a .wav file.

This is done in the REW Generator function - select "Meas. Sweep", click
the WAV icon and tick "add timing reference signal", set the WAV sample
resolution and record the sweep.

Convert the WAV to flac, use MP3Tag to add a title and add the track to
your LMS library.

So with our REW measurement Sweep complete with timing reference saved
as a track in LMS, we can select the REW measurement function , make
sure that the measurement sweep is set to what was recorded in the
previous step (20 to 20,000 etc) and that the "Wait for timing
reference" box is ticked and play our sweep through a squeezebox and
measure the system response. Make sure that Don't Stop the Music or
SpiceFly SugarCube is disabled. You will probably have to play the
measurement sweep adjusting the volume several times until you have a
good volume level.

You can now use REW to calculate the PEQ settings and either edit an
existing preset.conf or copy and rename an existing preset.conf and edit
the new settings into the file.

In the LMS GUI, go to Extras / Inguz EQ make sure that the settings file
created/edited earlier is selected.
Then play the sweep through the Squeezebox and measure with REW, the
timing bleep will trigger REW to start measuring.

This way the effect of the Inguz EQ settings can be measured and
verified. This sequence can be repeated until you are happy with the
equalisation. I use WinSCP to edit the .preset.conf file in
/usr/share/InguzEQ/Settings/

All that is left is to figure out where to place the microphone in the
room ......



A camel is a racehorse designed by a committee.

Seen sprayed on the outside wall of the local library -
Three things I hate in life :
1. Vandalism
2. Irony
3. Lists
------------------------------------------------------------------------
Wirrunna's Profile: http://forums.slimdevices.com/member.php?userid=3225
View this thread: http://forums.slimdevices.com/showthread.php?t=77084
JohnB
2018-12-06 12:42:32 UTC
Permalink
I have compiled a new build of InguzDSP.exe which overcomes a potential
problem with later versions of Sox and which I am currently testing. I
will provide a link to it when I am convinced there are no issues with
it (it certainly seems to work fine, but it is early days). In the mean
time, if anyone would like a copy of the file please send me a PM. (I
don't think I am infringing any copyright issues as Hugh Pyle has made
the source code available.)

The background:

There is a potential issue with DRC when Inguz uses SOX versions after
14.3.

When doing DRC Inguz checks the sampling rate of the file being played
with the sampling rate of the selected filter and, if they differ, it
uses SOX to resample the filter to the file sampling rate. For example,
if you have selected a 44.1kHz filter file and then play a 96kHz file,
Inguz will use Sox to resample the 44.1kHz filter file and create a
96kHz filter file.

The potential problem with this is that Inguz uses a SOX command that
was removed from Sox version 14.4 (i.e. the "polyphase" option). It was
already deprecated in Sox 14.3 but still usable.)

If Inguz cannot resample the filter file the audio files plays, but
without any DRC.

This would only affect people when Sox 14.4 is installed. Even then it
is possible to get round the issue by getting Inguz to use Sox 14.3
instead or switch filter files when one selects an audio file with a
different sampling rate. However, perhaps that is less than ideal.

The Sox command line that Inguz uses is hard coded in InguzDSP.exe.
Luckily Hugh Pyle has made the source code available and I have
recompiled InguzDSP.exe with a Sox compliant command.

Original line 86 in program.cs:

Code:
--------------------
static string _soxFmt = "\"{0}\" -r {1} \"{2}\" polyphase";
--------------------


which generates Sox command:

Code:
--------------------
Sox input_file -r new_sample_rate output_file polyphase
--------------------



Replacement line 86:

Code:
--------------------
static string _soxFmt = "\"{0}\" \"{2}\" rate -v -I {1}";
--------------------


which generates Sox command

Code:
--------------------
Sox input_file output_file rate -v -I new_sample_rate
--------------------



Touch, Meridian G92, Bryston B4 SST2, PMC OB1i speakers, HP Proliant
Microserver/Ubuntu, PC/Windows 7, iPad 4, iPeng, Squeezepad.
------------------------------------------------------------------------
JohnB's Profile: http://forums.slimdevices.com/member.php?userid=31553
View this thread: http://forums.slimdevices.com/showthread.php?t=77084
rbl
2018-12-06 17:11:46 UTC
Permalink
Does anyone by any chance have a guide for installing Inguz on Windows
10 / LMS 7.9.x? I haven;'t used Inguz since LMS 6.x, but would quite
like to get it going again...


------------------------------------------------------------------------
rbl's Profile: http://forums.slimdevices.com/member.php?userid=4517
View this thread: http://forums.slimdevices.com/showthread.php?t=77084
JohnB
2018-12-06 17:19:54 UTC
Permalink
Installing Ingush on W7 is fairly straight forward. I haven't installed
it on W10 but I will dig out the W10 instructions.

Of course, if you are using Inguz for DRC everything depends on the
quality of the measurement and filter generation.



Touch, Meridian G92, Bryston B4 SST2, PMC OB1i speakers, HP Proliant
Microserver/Ubuntu, PC/Windows 7, iPad 4, iPeng, Squeezepad.
------------------------------------------------------------------------
JohnB's Profile: http://forums.slimdevices.com/member.php?userid=31553
View this thread: http://forums.slimdevices.com/showthread.php?t=77084
rbl
2018-12-06 18:19:25 UTC
Permalink
Installing Ingush on W7 is fairly straight forward (I am using Inguz on
W7 with LMS 7.9.x as well as on Ubuntu). I haven't installed it on W10
but I will dig out the W7 instructions.
Of course, if you are using Inguz for DRC everything depends on the
quality of the measurement and filter generation.
The instructions for installing Inguz on Windows would be very much
appreciated. I will probably also try to do DRC again, but I think I can
figure that out as the process of making the filters presumably hasn't
changed...


------------------------------------------------------------------------
rbl's Profile: http://forums.slimdevices.com/member.php?userid=4517
View this thread: http://forums.slimdevices.com/showthread.php?t=77084
JohnB
2018-12-06 18:55:41 UTC
Permalink
This post might be inappropriate. Click to display it.
rbl
2018-12-06 20:27:39 UTC
Permalink
Wow - this just worked, easily. Thank you!
Running on Windows 10 Pro...


------------------------------------------------------------------------
rbl's Profile: http://forums.slimdevices.com/member.php?userid=4517
View this thread: http://forums.slimdevices.com/showthread.php?t=77084
JohnB
2018-12-07 10:54:54 UTC
Permalink
Glad that it worked - and glad to have helped.



Touch, Meridian G92, Bryston B4 SST2, PMC OB1i speakers, HP Proliant
Microserver/Ubuntu, PC/Windows 7, iPad 4, iPeng, Squeezepad.
------------------------------------------------------------------------
JohnB's Profile: http://forums.slimdevices.com/member.php?userid=31553
View this thread: http://forums.slimdevices.com/showthread.php?t=77084
JohnB
2018-12-10 17:04:08 UTC
Permalink
Wirrunna,

Thanks for that.

This is going to sound like nit-picking of the highest order - and I
apologise for that.

A few words of caution though.

We are in a situation where many people using Inguz have probably
updated their Plugin.pm and custom-convert.conf (which is re-generated
by Plugin.pm) for their own particular requirements. (For example the
"alc" section in your Plugin.pm is broken.) If your new Plugin.pm is
used "as is" it might well knock out something else that has been
previously tweaked.

The zip file contains:

install.xml
custom-types.conf
Plugin.pm

They all have CRLF line endings which might possibly cause problems with
non-Windows sytems such as Ubuntu, etc. The original files had LF line
endings and I think it is best to maintain that for compatibility.

install.xml
The only change in this is to the version number. While it is obviously
a good idea to have version numbers, in the current situation where no
one person is responsible for Inguz and where various people are making
their own amendments to Plugin.pm, etc changing version numbers might
get confusing - just a thought.

custom-types.conf
You have changed the "aap" entry to "aac". In my experience there is no
need for an "aac" entry in the Inguz custom-types.conf as it already
specified in the LMS "types.conf". The "aap" entry becomes redundant but
does no harm.

Plugin.pm
See my earlier comments.

It might be a good idea for someone to try to pull together a Plugin.pm
which contains the necessary corrections and additional entries that
people have made over the years and to have that as a reference.
However, that is much easier said than done but I will try to do a bit
of research over the coming week (unless someone else would like to do
it).

In the mean time I think it is probably best to give people the choice
of replacing the Plugin.pm (the other files are not really necessary) or
editing the entries in their existing files.

Edit with Wordpad or an editor that supports "LF" line endings.

_Plugin.pm_
In the last section headed "# transcode for 24-bit FLAC output (sb2,
sb3, transporter)"
(This is at the end of the file.)

Replace the aap entry with:

Code:
--------------------
aac flc * $CLIENTID$
# IFT
[faad] -q -w -f 1 $FILE$ | [InguzDSP] -id "$CLIENTID$" -wav -wavo -d 24 | [flac] -cs -0 --totally-silent -

--------------------

_custom-convert.conf:
_
The aap entry would be replaced by:

Code:
--------------------
aac flc * XX:XX:XX:XX:XX:XX
# IFT
[faad] -q -w -f 1 $FILE$ | [InguzDSP] -id "XX:XX:XX:XX:XX:XX" -wav -wavo -d 24 | [flac] -cs -0 --totally-silent -

--------------------

(Where "XX:XX:XX:XX:XX:XX" represents the player's MAC address)

Of course, edits to the Inguz custom-convert.conf file will take
immediate effect once LMS is restarted. BUT the Inguz
custom-convert.conf file will eventually be overwritten with a
re-generated custom-convert.conf file from the entries in Plugin.pm,
e.g. if Inguz is de-enabled and then re-enabled in the LMS Plugins, etc,
etc.



Touch, Meridian G92, Bryston B4 SST2, PMC OB1i speakers, HP Proliant
Microserver/Ubuntu, PC/Windows 7, iPad 4, iPeng, Squeezepad.
------------------------------------------------------------------------
JohnB's Profile: http://forums.slimdevices.com/member.php?userid=31553
View this thread: http://forums.slimdevices.com/showthread.php?t=77084
Loading...