JackAudio over Network: Jack Client/Server Connection

JackAudio is a low latency audio connection software, that can transmit audio data via TCP/IP network connections. Setup is somewhat crucial for "first timers". I hope that this post can help over the standard pitfalls.

  1. Download and Install JackAudio
  2. Setup JACK Master
    • Launch Jack Control Application (as Administrator)
    • Configure Jack according to the following settings
      Jack-Setup-1
    • Start Jack using the "Start"-Button in the Jack Control GUIJack-Setup-2
    • Run an elevated command prompt  (as Administrator), change to the Program Files/Jack directory and run the following command:
      jack_load netmanager
      You can optionally bind the netmanager to an IP-Address using:
      jack_load netmanager -i "-a [IP-Address]"
  3. Setup the JACK Slave on another computer
    • From the command line enter the following:
      jackd -R -d net -a 192.168.0.1
      Note that the IP-Address must match the IP from the step before.

Using ASIO-Software, Jack publishes a "JackRouter" virtual driver that can be used to stream audio data through the network channel. Within the directory "C:\Program Files (x86)\Jack\32bits" there is a file called "Jackrouter,ini" which lets you configure input and output channels of the virtual sound driver.

Multichannel DirectShow ASIO Renderer

During an ongoing programming project in our school, I developed a multichannel ASIO-DirectShow filter. This filter provides ASIO multichannel output for any DirectShow source in Windows.
The filter can be used with almost any Windows media player that supports user-defined output filters (e.g. Media Player Classic, The Core Media Player, Zoom Player, RadLight, WinAmp, etc.).

Supported features:

  • Dynamic ASIO-Driver Selection
  • Supports up to 24 output channels
  • Waveformat conversion and detection
    • Mono, Stereo, Surround modes 4.0,4.1,5.0.5.1,6.0,6.1,7.0,7.1
    • Sample rates up to 192kHz
    • Encoding PCM 16,24,32-Bits and PCM Float
  • FFT-Spectrum Analyzer
  • Output sample rate selection
  • Output volume control for master and separate output channels
  • N:N channel mapping (i.e. connect each input channel to arbitrary number of output channels)
  • Virtual speaker room (i.e. graphical interface to control volume of each speaker, using 2D-position of user within a virtual room)
  • Spatial FFT mapping feature that moves virtual user, and therefore sound based on frequency spectrum

In order to use the Multichannel ASIO Renderer Filter, just download and install the software. Prerequisite is .NET 4.

Version History

Version 1.46:

  • Fixed install issues with regasm
  • Deleted Mathnet, implemented Vector class
  • Modified setup routine
  • Fixed bufferlength for multichannel wav

Version 1.47:

  • Modified Pause/Start/Stop reinitialization of ASIO Drivers
  • Modified ClearBuffer

Version 1.50:

  • Re-implemented ASIO-output
  • Adaptive buffersize
  • Fixed sync- and click-issues
  • Fixed spectrum viewer

     

Version 1.65:

  • Included NAudio in Assembly
  • Eliminated Sourcegrid - now only one Assembly-DLL
  • Smaller footprint

Version 1.66 (10/04/2016):

  • Fixed synchronization

Version 1.67 (10/10/2016):

  • Fixed small bug in virtual speakerroom

Version 1.70 (10/14/2016):

  • Fixed small channel-mapping grid problem

Version 1.72 (10/28/2016):

  • Timestamp-based synchronization
  • Remember speakerroom settings
  • Modified ASIO driver initialization

Version 1.76 (12/03/2016):

  • Fixed bug where renderer crashed when switching drivers
  • Changed registry key to HKCU/Software
  • Fixed bug in channel mapping grid with channel names

Version 1.80 (12/19/2016):

  • Fixed serious memory leak in renderer 
  • Improved audio output
  • Fixed update bug in channel mapping grid

Version 1.81 (12/22/2016):

  • Fixed channel grid update bug when changing channels while displaying mapping

Version 1.91 (01/02/2017):

  • Fixed driver initialization
  • Fixed registry entries for channel mapping and driver selection
  • Fixed registry save and load

Version 1.94 (01/08/2017):

  • Updated to audio library
  • Modified driver initialization
  • Fixed bug in audio buffering
  • Added output samplerate selection

Version 1.95 (01/12/2017):

  • Modified Pause function

Version 1.96 (01/18/2017):

  • Fixed issue with default driver selection
  • Fixed concurrency issue in buffering

Version 1.98 (01/24/2017):

  • Fixed renderer disposal problem
  • Fixed memory leaks when renderer is removed from filter graph

Version 1.99 (02/23/2017):

  • Fixed compatibility with other player (KMPlayer, PotPlayer, etc.)
  • Fixed problem with speaker names
  • Reworked memory management

Version 2.00 (02/27/2017):

  • Fixed volume issue
  • Fixed issue in PotPlayer
LICENSING: Through donations, you are eligible to use this software for private, non-commercial purposes. If you intend to sell, include or distribute this software in connection or packaged with or within a commercial product, please contact the author for commercial licensing at: michael@familie-buchberger.at

PLEASE -DONATE- before using the software!

MultiChannelASIORendererSetup2.00.exe (13063 downloads)
softonic-logo-inlineDownload from Softonic
videohelpDownload from Videohelp.com
Softpedia_LogoDownload from Softpedia
iuklgcndcDownload from download.com

Please donate between $5 and $10 if you are using the software.   Thank you!


When installed, just start your favorite  DirectShow media player and find the option to change the audio renderer (e.g. in MPC Menu->View->Options->Playback/Output):
Properties-7

After selecting the Multichannel ASIO Renderer, start playing the media. The filter properties window can be opened in almost any player, using the Filters-Menu:
Properties-1

The filter properties provide access to all the features of the Multichannel ASIO Renderer:
Properties-3Properties-2Properties-4Properties-5Properties-6

Additional Links on this topic:

http://forum.doom9.org/showthread.php?t=173174

http://www.videohelp.com/software/Multichannel-ASIO-DirectShow-Renderer

http://multichannel-asio-directshow-renderer.en.softonic.com/

http://download.cnet.com/Multichannel-ASIO-Renderer/3000-2169_4-76473944.html

Audio-Programming: Directshow Logarithmic Volume Control

[Latexpage]When programming audio user-interfaces, volume is usually calculated in form of logarithmic scales. In Windows, specifically DirectX, volume ranges from -10000 (=silence) up to 0 (=maximum volume). However, a volume slide is moved linearly between e.g. 0 (=silence) up to 1.0 (maximum volume) - so we need to convert linear values to logarithmic and vice versa.

The basic function, that takes a linear value in the range of [0;1] and converts to a exponential value can be denoted as:

f(x) := 10^x

exp10-volume1 
Note, that this function ranges from 0 up to 10 on the vertical axis. The inverse function can be denoted as the logarithmic function with base 10:

f(x)^{-1} := Log_{10}(x)

exp10-volume2

In order to apply the correct ranges, we need to shift the values of x in both functions. Thus, we can rewrite $f(x)$ as:

f(x) := -1000 \cdot 10^{1-x}

exp10-volume3For the logarithmic function, we write:

f(x)^{-1} := 1-Log_{10}(\frac{1-x}{1000})

exp10-volume4
Using these formulae, we can convert volumes within the linear ranges from 0.0 to 1.0 to logarithmic values between -10000 and 0 and vice versa.