{"id":306,"date":"2020-05-24T03:41:59","date_gmt":"2020-05-24T08:41:59","guid":{"rendered":"https:\/\/www.seanchenpiano.com\/pianonotes\/?p=306"},"modified":"2020-05-24T12:42:52","modified_gmt":"2020-05-24T17:42:52","slug":"jacktrip-the-modern-day-paper-phone-cup","status":"publish","type":"post","link":"https:\/\/seanchenpiano.com\/pianonotes\/2020\/05\/24\/jacktrip-the-modern-day-paper-phone-cup\/","title":{"rendered":"JackTrip &#8211; The Modern-Day Paper Cup Phone"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/phone_cup-1024x456.png\" alt=\"\" width=\"525\"\n    height=\"234\" class=\"aligncenter size-large wp-image-409\" srcset=\"https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/phone_cup-1024x456.png 1024w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/phone_cup-300x134.png 300w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/phone_cup-768x342.png 768w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/phone_cup.png 1200w\" sizes=\"(max-width: 525px) 100vw, 525px\" \/><\/p>\n<p><em>Post updated 5\/24: Added information about repeating the process later<\/em><\/p>\n<h1>What is JackTrip?<\/h1>\n<p>The people best equipped to tell you about JackTrip are the creators at Stanford University: <a href=\"https:\/\/ccrma.stanford.edu\/docs\/common\/JackTrip.html\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/ccrma.stanford.edu\/docs\/common\/JackTrip.html<\/a><\/p>\n<p>But basically, the title is pretty apropos. JackTrip allows you to make a (relatively) direct connection between users<br \/>\nwithout the overhead of middlemen servers or special processing.<\/p>\n<p>JackTrip runs on top of JACK, which stands for Jack Audio Connection Kit. What JACK does, among other things, is to<br \/>\nallow you to pipe audio around different software.<\/p>\n<p style=\"color: red;\">*Warning* For best results don&#8217;t do this with WiFi. It might work, but it might buzz a lot, and<br \/>\n    then you have to increase the latency, which makes it less instantaneous.<\/p>\n<p>Less dire warning: This post has a lot of information to understand if you&#8217;re just reading it, but I promise if you go<br \/>\nthrough and follow it step by step, you won&#8217;t have any problems. And it&#8217;s mostly repeated twice for differences between<br \/>\nWindows and Mac.<\/p>\n<h2>Table of Contents<\/h2>\n<p>Before you read on, even though <a href=\"#notes\">Important Notes<\/a> are at the end, I would read through them first,<br \/>\nignoring things you don&#8217;t understand, but keeping in mind things you do.<\/p>\n<ol>\n<li><a href=\"#open_ports\">Open UDP port 4464 (if Hosting)<\/a><\/li>\n<li>Install Jack and JackTrip: <a href=\"#install_jack_win\">Windows<\/a> | <a href=\"#install_jack_mac\">Mac OSX<\/a>\n    <\/li>\n<li>Start Jack Server: <a href=\"#start_jack_win\">Windows<\/a> | <a href=\"#start_jack_mac\">Mac OSX<\/a><\/li>\n<li>Start\/Connect JackTrip: <a href=\"#jacktrip_win\">Windows<\/a> | <a href=\"#jacktrip_mac\">Mac OSX<\/a><\/li>\n<li>Profit<\/li>\n<li><a href=\"#notes\">Important Notes<\/a><\/li>\n<\/ol>\n<h1 id=\"open_ports\">Get Set Up<\/h1>\n<p>If you&#8217;re hosting, then read this part. If you&#8217;re running the client, you can skip to <a\n    href=\"#install_jack\">&#8220;Installing Jack.&#8221;<\/a> It doesn&#8217;t really matter who&#8217;s server and who&#8217;s client, but one person<br \/>\nhas to be the server, preferably the one who knows how to forward their firewall ports.<\/p>\n<h2>Opening Ports and Finding Public IP: Hosts Only<\/h2>\n<p>JackTrip by default uses UDP port 4464 for quick communication. If you know what this means and how to get your ports<br \/>\nopen, skip this section. If not, read on.<\/p>\n<p>This is the most difficult section to write, because opening ports depends on what router, internet provider, and<br \/>\noperating system you have. The unfortunate thing is that this means you probably won&#8217;t be able to JackTrip behind a<br \/>\nschool or office network.<\/p>\n<h3>Finding your local IP and Gateway address<\/h3>\n<p>You&#8217;re most likely behind a router. You&#8217;ll need to find both the local IP address of your computer and of the router.<br \/>\nWe&#8217;re looking for IP addresses that are in the range of<\/p>\n<ul>\n<li><code>192.168.0.0<\/code> to <code>192.168.255.255<\/code><\/li>\n<li><code>172.16.0.0<\/code> to <code>172.31.255.255<\/code><\/li>\n<li><code>10.0.0.0<\/code> to <code>10.255.255.255<\/code><\/li>\n<\/ul>\n<p>Yours is most likely in the first range.<\/p>\n<p>I&#8217;m giving you two different ways to check on each OS. If you&#8217;ve never used cmd or terminal before, I suggest you<br \/>\ntry it.<\/p>\n<table>\n<thead>\n<tr>\n<td>Method<\/td>\n<td>Windows<\/td>\n<td>Mac<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Cmd\/Terminal<\/td>\n<td>Right-click on the start menu (or press <code>Win-X<\/code>) and click on &#8220;Command Prompt&#8221;. In the<br \/>\n                window that pops up, type <code>ipconfig<\/code> and press enter.<\/p>\n<p>                Look for the longest section, and look for IPv4 Address and Default Gateway. Write those down.<\/td>\n<td>In spotlight search (the search icon in the top right) type <code>Terminal<\/code> and press enter.<br \/>\n                In the window that appears, type IP: <code>ifconfig | grep inet<\/code> and press enter.<br \/>\n                Look for &#8220;inet 192.168.X.X&#8221;<\/p>\n<p>                Gateway: in the Terminal, type<br \/>\n                <code>netstat -r | grep default <\/code> and Enter<\/td>\n<\/tr>\n<tr>\n<td>GUI<\/td>\n<td>On the bottom menu bar, right click the network icon (either a WiFi symbol or a connected monitor<br \/>\n                symbol), and click on &#8220;Open Network &amp; Settings&#8221;. Then click on &#8220;View your network properties&#8221;<br \/>\n                and look for &#8220;IPv4 address&#8221; and &#8220;Default gateway&#8221;.<\/td>\n<td>Click on the WiFi icon in the top bar, click &#8220;Advanced&#8221; near the bottom, then click on &#8220;TCP\/IP&#8221; tab.<br \/>\n                Write down &#8220;IPv4 Address&#8221; and &#8220;Router&#8221;.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>For reference, IPv4 addresses are most commonly 192.168.X.X. The router or default gateway (same thing) usually<br \/>\noccupies a low address in this range, so 192.168.1.1 or something, whereas your computer&#8217;s local IP might be<br \/>\nsomething like 192.168.1.135.<\/p>\n<h3>Accessing the Router Administration Interface<\/h3>\n<p>If you&#8217;ve never logged into your router&#8217;s administration panel, this is a good time to try it. Go to your browser<br \/>\nand type in the router address into the address bar and press enter. With any luck, you&#8217;ll be greeted with a log-in.<br \/>\nA sure bet is user: <code>admin<\/code>, pass: <code>admin<\/code>, but you might look on the sticker of your router<br \/>\nto see if the credentials are there.<\/p>\n<p>To find the page where we can open\/forward ports, you should look for menus that are something like:<\/p>\n<p>Network -&gt; Security\/Firewall -&gt; Port Forwarding<\/p>\n<p>In the Port Forwarding section, you will be able to open ports &#8211; you tell it what protocol to use: TCP, UDP, or both<br \/>\n&#8211; in this case UDP, what port number &#8211; in this case 4464, and the computer to forward it to &#8211; in this case, they<br \/>\nusually have a dropdown list, so look for your IP address that we found in the previous part. Apply the changes, and<br \/>\nwe should be good to go.<\/p>\n<p>I&#8217;ve consolidated a list of guides for different ISPs and routers, in case you need more specific guidance:<\/p>\n<p>Google Fiber: <a href=\"https:\/\/support.google.com\/fiber\/answer\/4650342\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/support.google.com\/fiber\/answer\/4650342<\/a><\/p>\n<p>AT&amp;T Uverse: <a href=\"https:\/\/www.att.com\/support\/article\/u-verse-high-speed-internet\/KM1123072\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.att.com\/support\/article\/u-verse-high-speed-internet\/KM1123072\/<\/a><\/p>\n<p>Xfinity: <a href=\"https:\/\/www.xfinity.com\/support\/articles\/port-forwarding-xfinity-wireless-gateway\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.xfinity.com\/support\/articles\/port-forwarding-xfinity-wireless-gateway<\/a><\/p>\n<p>Linksys Routers: <a href=\"https:\/\/www.linksys.com\/us\/support-article?articleNum=136711\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.linksys.com\/us\/support-article?articleNum=136711<\/a><\/p>\n<p>Netgear: <a href=\"https:\/\/kb.netgear.com\/24290\/How-do-I-add-a-custom-port-forwarding-service-on-my-Nighthawk-router\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/kb.netgear.com\/24290\/How-do-I-add-a-custom-port-forwarding-service-on-my-Nighthawk-router<\/a><\/p>\n<p>In general, you can Google &#8220;port forwarding&#8221; and then your device or ISP.<\/p>\n<h3>Public IP<\/h3>\n<p>Go to <a href=\"https:\/\/api.ipify.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/api.ipify.org\/<\/a> in your<br \/>\nbrowser and copy down the address. This is what you will give your clients for them to connect to you.<\/p>\n<p>From here, go to the section for your operating system: <a href=\"#install_jack_win\">Windows<\/a> | <a\n    href=\"#install_jack_mac\">Mac OSX<\/a><\/p>\n<div id=\"install_jack_win\" class=\"scroll-to-container\"><\/div>\n<h1>Windows<\/h1>\n<p>You can follow this guide: <a\n    href=\"https:\/\/ccrma.stanford.edu\/software\/jacktrip\/windows\/index.html\">https:\/\/ccrma.stanford.edu\/software\/jacktrip\/windows\/index.html<\/a><br \/>\nbut I couldn&#8217;t get it to work using Jack Control, so I&#8217;ve written what worked for me.<\/p>\n<h2>Helpful Prereq: Install ASIO4ALL<\/h2>\n<p>Download and install from here: <a href=\"http:\/\/www.asio4all.org\/\"\n    rel=\"noopener noreferrer\">http:\/\/www.asio4all.org\/<\/a><\/p>\n<h2>Install JACK2<\/h2>\n<ol>\n<li>Download the JACK2 installer: <a href=\"https:\/\/jackaudio.org\/downloads\/#windows\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/jackaudio.org\/downloads\/#windows<\/a>\n<ol style=\"list-style-type: lower-alpha;\">\n<li class=\"aside\">Select the correct bit version. To check, in your start menu type &#8220;System<br \/>\n                Information&#8221;, and then look for the entry &#8220;System Type&#8221; &#8211; if it says x64, then I would install both<br \/>\n                the 32 bit and 64 bit versions. If it says x86, then you can only install the 32 bit version.<\/li>\n<\/ol>\n<\/li>\n<li>Double click the downloaded file to install JACK2.<\/li>\n<li>Reboot computer if it asks after installation.<\/li>\n<\/ol>\n<h2>Install JackTrip<\/h2>\n<ol>\n<li id=\"start_jack_win\">Download the JackTrip: <a href=\"https:\/\/ccrma.stanford.edu\/software\/jacktrip\/windows\/Jack_v1.9.10_64_setup.exe\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/ccrma.stanford.edu\/software\/jacktrip\/windows\/Jack_v1.9.10_64_setup.exe<\/a>\n    <\/li>\n<li>Double click to install, and use default settings.<\/li>\n<\/ol>\n<h2>Start JACK Server<\/h2>\n<p>Here&#8217;s where I differ from the previously referenced page. We&#8217;re going to run the server from the command line.\n<\/p>\n<ol>\n<li>Right-click on the start menu (or press <code>Win-X<\/code>) and click on &#8220;Command Prompt&#8221;.<\/li>\n<li>If you installed the 64-bit version earlier, type <code>cd 'C:\\Program Files (x86)\\Jack\\'<\/code>, otherwise,<br \/>\n        type <code>cd 'C:\\Program Files\\Jack\\'<\/code>. <code>cd<\/code> is a command that stands for &#8220;change<br \/>\n        directory.&#8221;<\/li>\n<li>Then, type <code>.\\jackd.exe -d portaudio -r 44100 -p 128 -d \"ASIO::ASIO4ALL v2\"<\/code> and press enter.\n<\/ol>\n<p>You will then see a bunch of output, but if it doesn&#8217;t say &#8220;Failed to start Jack&#8221; or something along those lines,<br \/>\nthen you are good to continue. This is what my window looks like:<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jackd-1024x592.png\" alt=\"\" width=\"525\"\n    height=\"304\" class=\"aligncenter size-large wp-image-349\" srcset=\"https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jackd-1024x592.png 1024w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jackd-300x174.png 300w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jackd-768x444.png 768w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jackd.png 1103w\" sizes=\"(max-width: 525px) 100vw, 525px\" \/><\/p>\n<h3>Check that your audio devices are correct in ASIO4All<\/h3>\n<ol>\n<li>Find the notification area: <img decoding=\"async\"\n            src=\"https:\/\/msegceporticoprodassets.blob.core.windows.net\/asset-blobs\/30033_en_2\" \/><\/li>\n<li>Click on the ASIO4ALL icon (if you followed the above command, it should say &#8220;128 Samples @44100 Hz&#8221;<br \/>\n        instead):<\/p>\n<div><img decoding=\"async\" src=\"https:\/\/ccrma.stanford.edu\/software\/jacktrip\/windows\/asio4all-select.png\" \/><\/div>\n<\/li>\n<li>Make sure the devices that you want to use are selected. I want to use Realtek HD Audio, so it is selected.<br \/>\n        Adjust as appropriate. I also moved the slider on the bottom to where the blue line is to correspond with<br \/>\n        the 128 samples we choose.<img loading=\"lazy\" decoding=\"async\"\n            src=\"https:\/\/www.seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/asio4all.png\" alt=\"\" width=\"702\"\n            height=\"307\" class=\"aligncenter size-full wp-image-344\" \/> Note that, if you switch audio<br \/>\n        devices, you might have to close the window and restart JACK. To do that, go to your command window and type<br \/>\n        <code id=\"jacktrip_win\">Ctrl C<\/code> (as if you were copying something) which will stop the Jack server.<br \/>\n        Then do the previous section over. Another pro-tip is that you can press the <code>Up Arrow Key<\/code><br \/>\n        repetitively to cycle through your previous commands, so you don&#8217;t have to retype it. Just press enter.<\/li>\n<\/ol>\n<h2>Run JackTrip<\/h2>\n<ol>\n<li>Open another command window, as above (don&#8217;t close that one).<\/li>\n<li>This time, &#8216;cd&#8217; to the JackTrip installation location. So for mine, it would be<br \/>\n        <code>cd C:\\Users\\USERNAME\\jacktrip1.2<\/code> where USERNAME is my username, and the 1.2 after jacktrip<br \/>\n        could be different in the future. A pro-tip is just to type all the way up until &#8220;jacktrip&#8221; and then<br \/>\n        press the Tab key; the command line will auto-complete the folder name for you.<\/li>\n<\/ol>\n<h3>For Hosts (must run this first before client):<\/h3>\n<ol start=\"3\">\n<li>Type <code>.\\jacktrip.exe -s <\/code><\/li>\n<\/ol>\n<p>This is what mine looks like: <img loading=\"lazy\" decoding=\"async\"\n    src=\"https:\/\/www.seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jacktrip-1-1024x595.png\" alt=\"\" width=\"525\"\n    height=\"305\" class=\"aligncenter size-large wp-image-351\" \/><br \/>\nWhen the client successfully connects, you&#8217;ll see this:<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jacktrip_server_connected-1024x592.png\"\n    alt=\"\" width=\"525\" height=\"304\" class=\"aligncenter size-large wp-image-364\" \/><br \/>\nBecause I&#8217;m bad and a hypocrite, I used WiFi&#8230; so you see the UDP waiting too long warnings. No worries, it<br \/>\nworks.<\/p>\n<h3>For Clients (must wait for host to run first):<\/h3>\n<ol start=\"3\">\n<li>Type <code>.\\jacktrip.exe -c IP_ADDRESS <\/code><\/li>\n<\/ol>\n<p>IP_ADDRESS is what your host will give you (the one the he or she should have looked up if they followed the <a\n    href=\"#open_ports\">Open Ports section<\/a>. Note that I am using a local IP address because I&#8217;m connecting<br \/>\nwithin my network for demo purposes, but the number you put in will most definitely NOT be 192.168.X.X. You<br \/>\nshould see a bunch of stuff, but important to see is &#8220;Received Connection for Peer!&#8221;<img loading=\"lazy\" decoding=\"async\"\n    src=\"https:\/\/www.seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jacktrip_client_connected-1024x595.png\"\n    alt=\"\" width=\"525\" height=\"305\" class=\"aligncenter size-large wp-image-361\" \/><\/p>\n<p>At this point, you should be all connected and ready to do virtually-lagless audio communication! From here, see<br \/>\nthe <a href=\"#notes\">Notes section<\/a> for tips and warnings. Once you&#8217;re done with your jam sesh, stop<br \/>\neverything by going to each command window and pressing <code>Ctrl C<\/code> (as if you were copying something).<br \/>\nThis kills the process, and you can close the windows.<\/p>\n<div id=\"install_jack_mac\" class=\"scroll-to-container\"><\/div>\n<h1>Mac OSX<\/h1>\n<p>You can follow this guide: <a\n    href=\"https:\/\/ccrma.stanford.edu\/software\/jacktrip\/osx\/index.html\">https:\/\/ccrma.stanford.edu\/software\/jacktrip\/osx\/index.html<\/a><br \/>\nbut I couldn&#8217;t get it to work using Jack Control, so I&#8217;ve written what worked for me.<\/p>\n<h2>Install JACK2<\/h2>\n<ol>\n<li>Download the JACK2 installer: <a href=\"https:\/\/jackaudio.org\/downloads\/#os-x\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/jackaudio.org\/downloads\/#os-x<\/a>\n<ol style=\"list-style-type: lower-alpha;\">\n<li class=\"aside\">Download the JACK2 Binaries link (JackOSX 0.92_b3 as of this writing).<\/li>\n<\/ol>\n<\/li>\n<li>Because of some Mac OSX security thing, you have to install this by going to Finder, the downloads<br \/>\n        folder, Ctrl-click on the .pkg file, and then click &#8220;Open&#8221;. Then you can install it.<\/li>\n<li>Reboot computer if it asks after installation.<\/li>\n<\/ol>\n<h2>Install JackTrip<\/h2>\n<ol>\n<li id=\"start_jack_mac\">Download the JackTrip: <a href=\"https:\/\/ccrma.stanford.edu\/software\/jacktrip\/osx\/JackTrip.pkg\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/ccrma.stanford.edu\/software\/jacktrip\/osx\/JackTrip.pkg<\/a><\/li>\n<li>Same as above, go to downloads folder in Finder, Ctrl-click and click &#8220;Open&#8221;.<\/li>\n<li>Shouldn&#8217;t need to reboot, but do it if it asks.<\/li>\n<\/ol>\n<h2>Start JACK Server<\/h2>\n<p>Here&#8217;s where I differ from the previously referenced page. We&#8217;re going to run the server from the command<br \/>\n    line.<\/p>\n<ol>\n<li>Open Terminal. If you don&#8217;t know where to find it, go to Spotlight search (search icon on the top bar)<br \/>\n        and type &#8220;Terminal&#8221;, then Enter.<\/li>\n<li>A little user-interface change I like to do is enable visible tab bar on Terminal: On the top click on<br \/>\n        View -> Show tab bar.<\/li>\n<li>Go back to the Terminal window and type <code>jackd -d coreaudio -r 44100 -p 128<\/code> and press enter.\n<\/ol>\n<p>You will then see a bunch of output, but if it doesn&#8217;t say &#8220;Failed to start Jack&#8221; or something along those<br \/>\nlines, then you are good to continue. This is what my window looks like:<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jackd_mac-1024x709.png\" alt=\"\" width=\"525\"\n    height=\"364\" class=\"aligncenter size-large wp-image-360\" srcset=\"https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jackd_mac-1024x709.png 1024w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jackd_mac-300x208.png 300w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jackd_mac-768x532.png 768w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jackd_mac.png 1364w\" sizes=\"(max-width: 525px) 100vw, 525px\" \/><\/p>\n<p>[Optional] If you want to use non-default devices, you&#8217;ll have to specify them with -C and -P at the end. To<br \/>\nshow what devices exist, use <code>jackd -d coreaudio -l<\/code>. You&#8217;ll see for each entry something that says<br \/>\n&#8220;internal name.&#8221; Don&#8217;t worry about the &#8220;Failed to open server&#8221; because in this case that&#8217;s what we wanted &#8211; just<br \/>\nto list the devices but not start the server. Now that we know the internal names of the devices, we can put the<br \/>\ninput after -C, and output after -P:<br \/>\n<code>jackd -d coreaudio -r 44100 -p 128 -C \"InputDeviceName\" -P \"OutputDeviceName\"<\/code><br \/>\nSee the next image for sample of what I have.<br \/>\n<img loading=\"lazy\" decoding=\"async\" id=\"jacktrip_mac\"\n    src=\"https:\/\/www.seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jackd_mac_separate_devices-1024x709.png\"\n    alt=\"\" width=\"525\" height=\"364\" class=\"aligncenter size-large wp-image-374\" srcset=\"https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jackd_mac_separate_devices-1024x709.png 1024w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jackd_mac_separate_devices-300x208.png 300w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jackd_mac_separate_devices-768x532.png 768w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jackd_mac_separate_devices.png 1364w\" sizes=\"(max-width: 525px) 100vw, 525px\" \/><\/p>\n<h2>Run JackTrip<\/h2>\n<ol>\n<li>In Terminal, open a new Tab either by Ctrl-T or clicking the plus in the tab bar.<\/li>\n<h3>For Hosts (must run this first before client):<\/h3>\n<ol start=\"3\">\n<li>Type <code>jacktrip.exe -s <\/code><\/li>\n<\/ol>\n<p>    This is what mine looks like: <img loading=\"lazy\" decoding=\"async\"\n        src=\"https:\/\/www.seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jacktrip_server-1024x709.png\" alt=\"\"\n        width=\"525\" height=\"364\" class=\"aligncenter size-large wp-image-363\" \/><br \/>\n    When the client successfully connects, you&#8217;ll see this:<br \/>\n    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jacktrip_server_connected_mac-1024x709.png\"\n        alt=\"\" width=\"525\" height=\"364\" class=\"aligncenter size-large wp-image-365\" srcset=\"https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jacktrip_server_connected_mac-1024x709.png 1024w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jacktrip_server_connected_mac-300x208.png 300w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jacktrip_server_connected_mac-768x532.png 768w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jacktrip_server_connected_mac.png 1364w\" sizes=\"(max-width: 525px) 100vw, 525px\" \/><br \/>\n    You might see UDP waiting too long warnings. No worries, it works.<\/p>\n<h3>For Clients (must wait for host to run first):<\/h3>\n<ol start=\"3\">\n<li>Type <code>jacktrip.exe -c IP_ADDRESS <\/code><\/li>\n<\/ol>\n<p>    IP_ADDRESS is what your host will give you (the one the he or she should have looked up if they followed the<br \/>\n    <a href=\"#open_ports\">Open Ports section<\/a>. Note that I am using a local IP address because I&#8217;m connecting<br \/>\n    within my network for demo purposes, but the number you put in will most definitely NOT be 192.168.X.X. You<br \/>\n    should see a bunch of stuff, but important to see is &#8220;Received Connection for Peer!&#8221;<br \/>\n    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jacktrip_client_connected_mac-1024x709.png\"\n        alt=\"\" width=\"525\" height=\"364\" class=\"aligncenter size-large wp-image-362\" srcset=\"https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jacktrip_client_connected_mac-1024x709.png 1024w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jacktrip_client_connected_mac-300x208.png 300w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jacktrip_client_connected_mac-768x532.png 768w, https:\/\/seanchenpiano.com\/pianonotes\/wp-content\/uploads\/2020\/05\/jacktrip_client_connected_mac.png 1364w\" sizes=\"(max-width: 525px) 100vw, 525px\" \/><\/p>\n<p>    At this point, you should be all connected and ready to do virtually-lagless audio communication! From here,<br \/>\n    see the <a href=\"#notes\">Notes section<\/a> for tips and warnings. Once you&#8217;re done with your jam sesh, stop<br \/>\n    everything by going to each command window and pressing <code id=\"notes\">Ctrl C<\/code> (as if you were<br \/>\n    copying something). This kills the process, and you can close the windows.<\/p>\n<\/ol>\n<div class=\"container\"><\/div>\n<h1>Notes<\/h1>\n<ul>\n<li>\n        I don&#8217;t think it needs to be said, but I&#8217;ll mention it anyways: after you&#8217;ve got it working once,<br \/>\n        all you need to do for the next time is to run JACK and JackTrip &#8211; no need to reinstall everything.\n    <\/li>\n<li>\n        All parties must use the same sample rate (-r) and buffer size (-p) parameters, or else JackTrip<br \/>\n        will fail to connect!!\n    <\/li>\n<li>\n        Use headphones! Because there isn&#8217;t any sound processing, there&#8217;s no noise- or echo-cancellation.<br \/>\n        Using it without headphones, however, is a good way to see how good the latency is, since you can<br \/>\n        hear your own echo from the other person&#8217;s speakers.\n    <\/li>\n<li>\n        <code>Ctrl C<\/code> on both Windows and Mac stops the program. Sometimes, you need to spam it. If<br \/>\n        one person does <code>Ctrl C<\/code> on their Jack Server, everything will start buzzing, so just<br \/>\n        mash <code>Ctrl C<\/code> when you hear incessant buzzing.\n    <\/li>\n<li>\n        To save your sanity, most command lines have some nice features:<\/p>\n<ul>\n<li>Pressing <code>Arrow Up Key<\/code> goes back in time through your command history. So, if<br \/>\n                you want to edit your previous command, press Up, and then start deleting\/typing.<br \/>\n                <code>Arrow Down Key<\/code> goes forward in time, up until the current time, duh.\n            <\/li>\n<li>If you&#8217;re not quite sure if you&#8217;re typing the correct path to some folder or file, you can<br \/>\n                always press Tab to cycle through auto-complete. For example, in the Windows example, you<br \/>\n                can type <code>cd C:\\Progr<\/code> and then press Tab, and it should automatically fill in<br \/>\n                <code>cd 'C:\\Program Files\\'<\/code><\/li>\n<\/ul>\n<\/li>\n<li>I chose the jackd parameters from experience; a 128 buffer size had latency that was barely<br \/>\n        perceptible. If you can sort of hear the other person, but there&#8217;s quite a bit of buzzing noise on<br \/>\n        top of it, then you might need to increase your latency. In the jackd command, instead of<br \/>\n        <code>-r 44100 -p 128<\/code> try <code>-r 44100 -p 256<\/code>. Then restart JackTrip as well. Again,<br \/>\n        all parties involved need to be using the same -r (sample rate) and -p (buffer size).\n    <\/li>\n<li>DON&#8217;T USE WIFI. Locally, with Betty&#8217;s Macbook on WiFi, and my computer on ethernet, we could do -p<br \/>\n        256, but the latency isn&#8217;t as good, and you won&#8217;t have as good of an experience.<\/li>\n<li>\n<p class=\"red\">On Windows, you might run into an error starting up certain audio programs after you<br \/>\n            install JACK2.<\/p>\n<p> There&#8217;s some critical bug that hasn&#8217;t been fixed. For example, my Sibelius<br \/>\n        software crashed upon opening every time. There is a workaround, and involves disabling Address<br \/>\n        Space Layout Randomization. It&#8217;s a small security decrease, but it&#8217;ll prevent your audio<br \/>\n        applications from crashing. If you want to read about the bug, go here: <a href=\"https:\/\/github.com\/jackaudio\/jack2\/issues\/332\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/jackaudio\/jack2\/issues\/332<\/a>. Otherwise, to fix<br \/>\n        it:<\/p>\n<ol>\n<li>Go to your start menu, and type &#8220;Windows Security&#8221; and launch the app.<\/li>\n<li>Then go to &#8220;App &#038; browser control&#8221; and then scroll down to &#8220;Exploit Protection&#8221;. Click on<br \/>\n                &#8220;Exploit protection settings&#8221;.<\/li>\n<li>\n                Go down to to &#8220;Randomized memory allocations (Bottom-up ASLR)&#8221; and change it to &#8220;Off by<br \/>\n                default&#8221;.\n            <\/li>\n<li>\n                You might have to restart. Everything should work now.\n            <\/li>\n<\/ol>\n<\/li>\n<li>\n        In case you want to pipe audio around to, for example, record all the audio streams, the easiest way<br \/>\n        would be to use qjackctl (type in Spotlight or Windows Start Menu &#8211; the program is called Jack<br \/>\n        Control, but qjackctl also brings it up) after you&#8217;ve connected JackTrip between host and clients<br \/>\n        and opened up whatever software you need to use (OBS, Reaper, etc.). Click on the &#8220;Connect&#8221; button,<br \/>\n        and you&#8217;ll see the connections window. You can drag inputs from the left side to outputs on the<br \/>\n        right side. This will require some experimentation on your part, because I won&#8217;t be able to cover<br \/>\n        all the cases. Here&#8217;s an image from QJackCtl&#8217;s screenshot page:<br \/>\n        <img decoding=\"async\" src=\"https:\/\/qjackctl.sourceforge.io\/image\/qjackctlConnectionsForm1.png\" \/>\n    <\/li>\n<\/ul>\n<p>\n    Hopefully this has been helpful. It&#8217;s a lot to parse if you&#8217;re just reading it, but I promise if you go<br \/>\n    through and follow it step by step, you won&#8217;t have any problems. I hope this can allow many more<br \/>\n    musicians to collaborate, especially realtime, because, let&#8217;s face it, syncing audio and video or<br \/>\n    recording with yourself is fun and all, but it&#8217;s a pain in the butt. Happy Music Making!\n<\/p>\n<p>\n    If you found this post helpful, please consider donating! <a href=\"https:\/\/www.paypal.me\/seanchenpiano\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.paypal.me\/seanchenpiano<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Post updated 5\/24: Added information about repeating the process later What is JackTrip? The people best equipped to tell you about JackTrip are the creators at Stanford University: https:\/\/ccrma.stanford.edu\/docs\/common\/JackTrip.html But basically, the title is pretty apropos. JackTrip allows you to make a (relatively) direct connection between users without the overhead of middlemen servers or special &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/seanchenpiano.com\/pianonotes\/2020\/05\/24\/jacktrip-the-modern-day-paper-phone-cup\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;JackTrip &#8211; The Modern-Day Paper Cup Phone&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,26,1],"tags":[32,33,28,29,31,12,34,30,35],"_links":{"self":[{"href":"https:\/\/seanchenpiano.com\/pianonotes\/wp-json\/wp\/v2\/posts\/306"}],"collection":[{"href":"https:\/\/seanchenpiano.com\/pianonotes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/seanchenpiano.com\/pianonotes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/seanchenpiano.com\/pianonotes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/seanchenpiano.com\/pianonotes\/wp-json\/wp\/v2\/comments?post=306"}],"version-history":[{"count":89,"href":"https:\/\/seanchenpiano.com\/pianonotes\/wp-json\/wp\/v2\/posts\/306\/revisions"}],"predecessor-version":[{"id":415,"href":"https:\/\/seanchenpiano.com\/pianonotes\/wp-json\/wp\/v2\/posts\/306\/revisions\/415"}],"wp:attachment":[{"href":"https:\/\/seanchenpiano.com\/pianonotes\/wp-json\/wp\/v2\/media?parent=306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/seanchenpiano.com\/pianonotes\/wp-json\/wp\/v2\/categories?post=306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/seanchenpiano.com\/pianonotes\/wp-json\/wp\/v2\/tags?post=306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}