I have been playing with Jack for Windows, which is now in version 1.9 with 2.0 supposedly just around the corner.
It's open source project that started in Linux and spread to Mac and Windows. It is a virtual sound card/router that lets the users send audio between applications.
The current release is 1.9 and the complete package (binaries for all operating systems and source code) are available from here:
http://www.grame.fr/~letz/jackdmp.html
It's a fairly large package- 20MB+
I extracted the Windows installer and saved it to this website:
www.thuneau.com/jack4win.zip
The program does what it promises, but it requires manual setup of signal flow on every startup. There is a little control app that makes it straight forward, but it takes time every time you restart the computer.
In order to make my life easier I scripted the startup of Jack, Foobar, Allocator and their connections.
Here is how I run it. You will need to edit some commands to match your paths and names of ASIO devices.
EDIT: if you follow the directions below, you will end up with fully ready to go audio computer that performs playback of your audio and crossover processing- every time you boot it up. Just point to your music of choice and hit play. That's how my little Allocator machine now runs.
1. After installing Jack you need to tell it to create enough channels for your system. This is done by editing JackRouter.ini in the jack install directory (By default C:/Program Files/Jack v1.90).
Open JackRouter.ini in your text editor (Notepad or Wordpad will do just fine) edit it to:
[IO]
input=2
output=8
[AUTO_CONNECT]
input=0
output=0 |
and save it.
By default Jack installs with 4 channels input and 4 channels output per application. We need to send stereo audio to Allocator and need up to 8 channels to send to sound card.
Also, by default Jack connects everything it sees as a valid client. We don't want that, as your full range signal will hit the sound card if you leave the default on.
The first time you start Jack you want to use the Jack Control application to set default drivers, buffers and some parameters. After that we will run it in background.
Open Jack Control and hit Setup:
Make sure you select portaudio as Driver type,
Find your ASIO card in Interface menu (click on the > button)
For Allocator use long buffer (called Frames/Period). For Allocator Light, you can do short buffer.
Select sample rate,
make sure Realtime is checked
Click OK.
Close Jack Control
I start Jack with the following command:
jackd.exe -S -R -dportaudio -dASIO::"ASUS Xonar D2 ASIO" -r44100 -p4096
(Replace the name of your ASIO card to match your system you can also start it with different sample rate and buffer size).
Make sure to type the name of your card
exactly as it appears in Jack Control- spaces and capital letters are important.
Save the command in your text editor as startjack.bat
in your Jack v1.90 directory.
* If you just double click on it Windows will quickly start Jack and then promptly close it. We want it to stay open so that we can use it.
Here is a workaround:
create a shortcut to the startjack.bat (right mouse button drag> create shortcuts here).
Right click on the shortcut you just created and select Properties
in Target box add the following to the beginning:
C:\WINDOWS\system32\cmd.exe /K
The whole line looks like this:
C:\WINDOWS\system32\cmd.exe /K "C:\Program Files\Jack v1.90\startjack19.bat"
(this opens command window, the switch /K makes it not exit when the batch file is done)
Still in Properties, the box "start in" should read: "C:\Program Files\Jack v1.90"
Click OK
Now you can place the shortcut in your Startup Folder.
This will create Jack router every time you reboot your machine.
Now we need to start our media player (I use Foobar because it has ASIO output- but Winamp is good too), Allocator (or Allocator Light) and connect them
So I run a Visual Basic script to do this. In my case it looks like this:
Option Explicit
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
WScript.Sleep 5000
WshShell.Run """C:\Program Files\foobar2000\foobar2000.exe"" /command:Open C:/silence.wav", 1, False
WScript.Sleep 1000
WshShell.Run """C:\Documents and Settings\Jan\Desktop\Allocator1.0.15\Allocator.exe""", 1, False
WScript.Sleep 3000
WshShell.Run """C:\Documents and Settings\Jan\Desktop\connect""", 1, False |
Here is what it does:
1. It waits 5 seconds (5000 milliseconds) for Jack to be in place. (it probably can be shorter, but 5 seconds is safe)
2. It starts Foobar and it plays 10 seconds long silence wave. This is there because Foobar ASIO output is invisible to Jack unless actual audio is playing. It's a bug in the module itself and I will try to contact the author to maybe update the driver. 10 seconds is long enough to establish the Jack connection, which then stays in memory even if playback is stopped. (I created the silence.wav by recording 10 seconds of nothing using Windows Sound Recorder, but it can really be any audio file that Foobar can play)
3. It waits 1 second
4. it starts Allocator
5. It waits 3 seconds for Allocator to be established
6. Runs connect script (*see below) which makes our audio flow the way we want it to.
You can copy the script above and edit it in a text editor to match your machine's paths and file names. Save it as startup.vbs (or any other name of your choice as long as it has the vbs extension) and put it in your Startup folder (C:\Documents and Settings\*user name*\Start Menu\Programs\Startup). Also accessible from Start>All Programs menu.
Before you create and save the connecting bat file, run Jack Control program and select Connect to work out all your desired connections. Something like this:
Below is the actual batch file that makes the actual connections on my machine. Again, you might need to tweak it to connect to your sound card the way you want it to.
jack_connect "foobar2000:out1" "Allocator:in1"
jack_connect "foobar2000:out2" "Allocator:in2"
jack_connect "Allocator:out1" "system:playback_3"
jack_connect "Allocator:out2" "system:playback_4"
jack_connect "Allocator:out3" "system:playback_1"
jack_connect "Allocator:out4" "system:playback_2"
jack_connect "Allocator:out5" "system:playback_5"
jack_connect "Allocator:out6" "system:playback_6"
jack_connect "Allocator:out7" "system:playback_7"
jack_connect "Allocator:out8" "system:playback_8"
|
Save this (after possible tweaking of numbers and names) as connect.bat
in your Jack v1.90 directory
Create a shortcut to it on your desktop (right mouse button drag) and rename it to connect (skipping the .bat extension). VB Shell doesn't like .bat files for some reason. But it's happy triggering a shortcut to one. So that's why the shortcut has a simple name and is not a .bat file itself.
IMPORTANT:
In order for all this to work, you will need to install ASIO output in your Foobar (
http://www.foobar2000.org/?page=Download ) and set it as default output with JackRouter as the sound card.
Also, set up Allocator (actually VSTShell) with JackRouter as the sound card.
While working out the connections, keep the amps off or way down to protect your precious tweeters
Last little tip to keep things neat is to install Trayit (
http://www.teamcti.com/trayit/trayit.htm ) and teach it to minimize Jack command window and Allocator to tray immediately after they start. Do it after your system starts flawlessly every time. You don't want to keep going back to the tray to close things that don't work yet the way you want them to.
Ask questions below.
Good luck!
EDIT:
Follow up:
I had a few questions from people who had trouble getting Jack to work.
The one thing that's always the problem is a Microsoft C++ redistributable library that has to be installed on the machine in order for jack to work.
It's mentioned in Jack's README file, but many people don't look for it.
So, I added the installer from MS to the jack archive on my website.
But, it's probably best to grab it from MS directly. Here is the link:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en