Home of the Squeezebox™ & Transporter® network music players.
Page 43 of 43 FirstFirst ... 33414243
Results 421 to 423 of 423

Thread: RC (Inguz etc.)

  1. #421
    Junior Member
    Join Date
    Mar 2011

    Setting up Inguz on Ubuntu

    Because the information regarding Inguz is quite scattered and the threads are quite long, I've decided to document my way of setting up Inguz. I found installing the plugin is quite easy, if you know which parts to update afterwards and know your way around the linux-filesystem.
    Creating a good filter was harder. The builtin sweep wasn't working well for me, it's a very fast sweep and ended with a click/thump/noise. I've tried to use REW to measure and import that measurement in DRCDesigner to create a filter but that resulted in clipping for me, although I guess it's possible. The advantage of doing the measurements through REW is that you could use pulseaudio-dlna (it's a way of sending audio from a linux (pulseaudio) system to DLNA/UPNP media renderers and thus squeezeboxes (through Inguz)) so you could measure a system without making a physical connection. But in the end I got the best result with a physical connection and using DRCDesigner. I still used REW/pulseaudio-dlna to verify my results.

    I realized that some people might have LMS running on a linux-box but have no idea how linux works, so I've converted my documentation into a sort of tutorial. This tutorial is intended for Ubuntu with LMS 7.9, if you use a different distribution or version of LMS, the LMS' plugin- & binaries-directory might be different and you should adjust the commands accordingly.

    You can view a working backup of the Inguz website through archive.org.

    Installing Inguz
    InguzDSP is written in a programming language called .NET, which is created by Microsoft, luckily Microsoft has been kind enough to help create a program that is able to run .NET-programs on linux. This program is called 'mono'. To install mono, visit its website and follow its directions.

    Download the zip-files attached to this post and InguzDSP & InguzEQ from the Inguz-website.
    Open a terminal in the directory where you downloaded the files, for example if you've downloaded them to your user's 'Download' directory and you've got a graphical interface you could open the the folder in your file-browser, right-click and click on 'Open in Terminal', or you could just open a terminal and type:
    cd ~/Downloads
    (~ is equivalent to the users home-directory, e.q. /home/USERNAME/)
    Make a working-directory, I called mine 'inguz', move the files to that directory and enter the directory:
    mkdir inguz && mv Inguz*.zip inguz/ && cd inguz
    Unzip InguzDSP.zip to folder 'InguzDSP' (the files in this zip are not inside a folder so '-d InguzDSP' will make that folder):
    unzip InguzDSP.zip -d InguzDSP
    Unzip the InguzDSP shell-script into the same folder:
    unzip InguzDSP_shellscript.zip -d InguzDSP/
    Make the shell-script executable:
    chmod +x InguzDSP/InguzDSP
    Unzip InguzEQ (the files in this zip are inside a folder so there's no need to create one):
    unzip InguzEQ.zip
    JohnB corrected 'Plugin.pm' for InguzEQ (posted elsewhere in this thread) to make it compatible with Perl 5.22 or higher. Unzip and replace the file:
    unzip InguzEQ_Plugin.pm.zip -d InguzEQ/
    Enter 'y' when asked whether to replace the file.
    bobertuk presented a fix in index.html for the missing text 'Save Preset' in the button (posted elsewhere in this thread). Unzip and replace the file:
    unzip InguzEQ_index.html.zip -d InguzEQ/HTML/EN/plugins/InguzEQ/
    Enter 'y' when asked whether to replace the file.
    The 'Silverlight.js' file included in InguzEQ is from v1, this version should contain (haven't tested) some incompatibilities with the newer versions of the browser-plugin. The zip-file attached to this post contains version 5.1.20125. Unzip and replace the file:
    unzip InguzEQ_Silverlight.js.zip -d InguzEQ/HTML/EN/plugins/InguzEQ/
    Enter 'y' when asked whether to replace the file.
    Copy InguzEQ to the LMS plugins-folder:
    sudo cp -R InguzEQ /var/lib/squeezeboxserver/Plugins/
    Create the InguzEQ shared-files directory:
    sudo mkdir -p /usr/share/InguzEQ/
    On my system LMS runs as user 'squeezeboxserver' and its files belong to no group. You can check this on your system by running:
    ls -l /var/lib/squeezeboxserver
    The output on my system:
    total 12
    drwxr-xr-x 8 squeezeboxserver nogroup 4096 Jan  2 10:03 cache
    drwxr-xr-x 4 squeezeboxserver nogroup 4096 Dec 29 16:13 Plugins
    drwxr-xr-x 3 squeezeboxserver nogroup 4096 Jan  2 10:01 prefs
    Adjust the following commands according to the output in order to give LMS ownership of the plugin-files:
    sudo chown -R squeezeboxserver:nogroup /var/lib/squeezeboxserver/Plugins/InguzEQ
    sudo chown -R squeezeboxserver:nogroup /usr/share/InguzEQ/
    Copy InguzDSP to the LMS binaries-folder:
    sudo cp InguzDSP/* /usr/share/squeezeboxserver/Bin/i386-linux/
    Restart LMS twice to let LMS detect the plugin and populate the /user/share/InguzEQ/ directory:
    sudo service logitechmediaserver restart
    Wait until it has fully loaded (until you can (re)load the web-interface) and run the command again. Some distributions might use a different command to restart LMS, if you can't find it you could also just reboot twice.

    DRCDesigner is a java-application and could (in theory) run on any architecture/OS, but the download for linux is linked to 32bit sound-libraries. This is not a problem in current 64bit Ubuntu-distributions, you can install the 32bit libraries and they will work. I haven't tried the Windows-version but I guess it will just work.

    You can install the 32bit libraries by running the following command:
    sudo apt-get install libasound2:i386 libasound2-plugins:i386 libjack-jackd2-0:i386
    The last library, libjack-jackd2-0, might not be necessary if you don't have JACK installed but installing it won't hurt.
    Another thing you will need in linux is the program 'drc':
    sudo apt-get install drc
    If you don't have java installed, you should install that too:
    sudo apt-get install openjdk-8-jre
    This is the opensource-version of java v8 but I guess any version will do.
    Now just download DRCDesigner, unpack it and launch the .bat file. Read the help included in the program for any instructions. Notice that you won't be able to generate the filters after measurement unless you change the sampling-rate at least once on one of the Generate Filters tabs (and back to the sampling rate you've measured at). Afterwards the filters will be in the folder 'ConvolverFilters' inside DRCDesigner's directory.

    Inguz needs the filters to be in the folder /usr/share/InguzEQ/Impulses/, so if you've placed DRCDesigner in your Downloads-folder:
    sudo cp ~/Downloads/DRCDesigner/ConvolverFilters/*.wav /usr/share/InguzEQ/Impulses/
    And it's probably a good idea to give LMS ownership of the files:
    sudo chown squeezeboxserver:nogroup /usr/share/InguzEQ/Impulses/*
    Attached Files Attached Files
    Last edited by W0153R; 2018-01-05 at 10:34. Reason: typo's, credits JohnB, 'Save Preset'-fix

  2. #422
    Junior Member
    Join Date
    Mar 2011
    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:
    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:
    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:
    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:
    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:
    sudo nano /usr/share/squeezeboxserver/Bin/i386-linux/InguzDSP.exe.config
    Enter CTRL+X when done, followed by 'y' to close and save the file. InguzDSP will pick up the changes when you restart playback/next song.
    I'd advise to look for the loudest music in your collection, garage-rock, punk, etc is usually very loud, your loudest music's peak should approach 0 dB but not reach it. The loudest file in my collection (I think) is 'Love Licks' by 'The Black Box Revelation' but there isn't much difference with the 'Foo Fighters'.

    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 the 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.
    Attached Files Attached Files
    Last edited by W0153R; 2018-01-06 at 01:44. Reason: typo's

  3. #423
    Senior Member
    Join Date
    Jan 2006
    South Coast, NSW, Australia

    Using REW with Inguz EQ

    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.

    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" />
    <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>

    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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts