blog – Handsome Jack's Show Band https://handsomejacks.co.uk Tue, 12 Dec 2023 16:31:27 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.2 Set Up A Jamulus Server On AWS https://handsomejacks.co.uk/index.php/set-up-a-jamulus-server-on-aws/ https://handsomejacks.co.uk/index.php/set-up-a-jamulus-server-on-aws/#respond Fri, 17 Apr 2020 21:55:50 +0000 http://handsomejacks.co.uk/?p=8446 After seeing my post about how we did band-practice online, I was asked for more detailed help in setting up a server.

I published the Amazon Machine Image (the server template) that I built which we’ve been using and sent these instructions. Apparently they were good enough that it was possible for someone fearing they weren’t technical enough who had never before used Amazon Web Services or hosted any kind of server at all or done any programming.

Running a server costs a few quid per hour. Way less than renting a practice room.

Before you start you need to have registered with Amazon Web Services and logged in to their main page.

1) My machine-image is available only in London data-center, so we need to pick “Europe (London) eu-west-2” from the drop-menu on the top-right of the header-bar.

[If anyone outside London really needs it, apparently it is possible for me to copy it to another region. Let me know, pre @ dalliance.net ]

[EDIT: It’s been copied to Asia Pacific, Tokyo and Singapore as well.]

2) We want to use “Elastic Compute Cloud”, known as EC2. So pick “Services” menu, top-left. Click “EC2” to get the service for rending Elastic Compute Cloud servers.

3) Click “Launch Instance” in Orange at the bottom.

4) Click “Community AMIs” (AMI = Amazon Machine Image) in the left hand side dropbox to try and find the one I made.

5) The server I made was assigned the random ID: “0a8cb6a239f6c2f0d” so type that in to the search.

Hopefully it comes up in the search results as “JamulusServer – ami-0a8cb6a239f6c2f0d”

[
EDIT: It has been copied to these other zones:
Asia Pacific, Tokyo: ami-0d1a691dc2c7dd410
Asia Pacific, Singapore: ami-079b02a7786cdf5f6
US East, North Virginia: ami-0fd7e3fa3d50deb8b
Europe, Frankfurt: ami-0a4703f3c89847901
]

“Runs a Jamulus server. Your security group should open port 22124”

6) Click the “Select” button next to that.

7) Select a “t3.medium” server from the list of types of server. I have no idea if that’s more power than
is really needed, probably it’s overkill, but I am sure it is enough

Click “configure instance details” at the bottom for the next page.

8) Instance detail defaults are all fine here, click “Next: Add Storage”

9) Storage default is 8GB which is fine, click “Next: Add Tags”

10) Don’t need any tags, click “Next: Configure Security Group”

11) We need to open up the firewall on the server to allow users to contact it on the UDP port upon which it listens: 22124

Click “Add Rule”, select in each field (don’t type the quotes):
“Custom UDP Rule” / “UDP” / 22124 / “0.0.0.0/0, ::/0”
Leave the right column blank.

The second time you do this, if you’re doing it again, you may instead choose “Select an existing security group” and then select the one you created this time with that rule already in place.

If you give the Security Group Name a good name and description you’ll find it easier to do so. Call it “Jamulus” or something.

At some point it may scare you saying something like “Your server is open to the public! This might be a security issue!”. It is possible here to get the address of everyone in your band and add that to the server firewall so that only your band can connect to the server.

But it’s a pain, and the chances of a random stranger wondering into your un-advertised server are almost zero. If they do, just jam with them and drop me a line saying how it went.

Click “Review And Launch”

12) Review if you want, then click “Launch”

13) Key-Pairs are like a password used to get in touch with the server to make changes to it.

You won’t want to make any changes to it, but it won’t let you launch without a key-pair.

Select “create a new key pair” then “Download key pair” and save the file, or throw it away. Doesn’t matter.

The second time you might select to just reuse the one you downloaded this time.

Click “Launch Instances”

14) It’s launching the server now. Click “View Instances” to see it.

15) One of the servers in the list should be “initializing”.

Click that one and the bottom part of the screen will show details about it.

Its address is the “Public DNS (IPv4)” on the top right of that section.

If you move the mouse over that you will see an icon popup with a “copy to clipboard” option.

If you click that the name of the server will be copied to your clipboard.

16) Paste that name into the Jamulus client running on everyone’s machines as the server address to connect to that server.

You can then play together!

17) When you are finished, you will want to close the machine down, or else Amazon will continue charging you a few dollars an hour for it.

Click the server in the list so its details are on the bottom half of the page, then click “Actions”, at the top of the page. Click “Instance State”, and “Terminate”

It’ll then close down and Amazon will stop charging you at the end of the hour.

]]>
https://handsomejacks.co.uk/index.php/set-up-a-jamulus-server-on-aws/feed/ 0
How To Do Band Practice Online https://handsomejacks.co.uk/index.php/how-to-do-band-practice-online/ https://handsomejacks.co.uk/index.php/how-to-do-band-practice-online/#respond Thu, 26 Mar 2020 23:31:36 +0000 http://handsomejacks.co.uk/?p=8431 Yes it is possible, just about, to do music together online but no, you can’t use Skype or Zoom or whatever. At least not on their own. As you’ll know if you’ve tried. There’s just too much Lag

Music is all about timing, and not only is there a delay between you talking and your band-mates hearing it in those video-conference apps but that delay is even variable. You couldn’t compensate even if you could compensate.

But as you can see from the video of our first proper online band-practice here, it can be done.

The key is of course the right software. And that software is a little open-source application called Jamulus. It is not fancy. It is not all that pretty. It doesn’t do video. It concentrates on one thing: Getting that lag down as low as it can go.

You will help the software by all being in the same city, for a start. The lag half-way around the world isn’t going to work for anyone.

You’ll all want fiber broadband ideally, and ADSL or cable internet at least. The fastest you can buy!

Everyone needs to download the Jamulus software and install it on their Windows/Mac/Linux machine. Then everyone connects to the same server.

But which server? Aren’t they all overloaded because of everyone having to stay inside because there’s a virus stalking the streets?

That is the beauty of open-source. You can just run your own!

You want a server in your city, as close to everyone in the band as possible. We used an Amazon Web Services cloud server. They have compute centers in a few big cities, and luckily for us London is one of them.

If you can all use the same ISP it’s going to help, and especially then you can maybe host the server in your home. Or rent one from that ISP themselves.

I spot-rented a t3-medium Linux machine for a few hours, installed the Jamulus software on it and ran it under the command-line with:

./Jamlulus -s -n

The “-s” says “Be a server” and the “-n” says “Don’t try and open any windows, this machine hasn’t got a graphics card”.

Then you just need to give the IP address of your server to your band mates and have them connect to it.

In Linux, it runs on JackD. You want to launch JackD with very low latency. That’s the “-p 128” here:

/usr/bin/jackd -dalsa -dhw:0,0 -r48000 -p128 -n2

Then run the Jamulus software.

Our bassist was on Windows and our Drummer and Guitarist are on Macs while I’m a Linux guy. So everything works cross platform, but I have no tips on whatever they might have done to tune it.

Everyone gets a volume-slider for each person in the band so they can tune their own mix. You see me turn up my vocals audio in the video here. That didn’t affect the noises in the other guy’s rooms.

You will have to find a way to mix your microphone and instrument sounds down into a single jack or USB input for input to the computer. My synth allows me to plug a mic into it. Think the rest have some kinda hardware splitters.

The software works by sending signals as fast as it can to the server, which forwards them as fast as it can to everyone. But the internet is a strange thing, and the bits of sound don’t arrive in the same order that they are sent. In order to not have any break in the sound, it has to store up a few of the packets of sound in a queue, slotting each bit of sound into the right order as they arrive and feeding the queue into the sound-card at your end.

If that queue is too long, you get lag and delay and can’t play in sync.

If that queue is too short, some of the sound arrives out of order and kinda sounds like it wobbles and chirps. Known as “jitter”. You have a slider to change the length of the queues.

With them set to about six, and an incredible 2ms ping to the AWS server, I was getting about a 40ms lag. The rest of the band broadly similar.

This is just about playable, but feels weird.

Our Guitarist Adds:

Oh. If only I had fibre and a 2 ms ping. That would have given me <10ms latency. As it was, I had a 15/20ms ping with my cable connection, for a 35/45ms round trip. Odd, but workable once you get used to it. Which didn’t take that long, really. Needs must and that.

That only gives you audio, and it isn’t enough. It really isn’t. So we run a Zoom meeting alongside it. I put the Zoom on a different Laptop. The bassist had his phone running the Zoom app and his laptop running Jamulus. I think the guitarist and the drummer ran the zoom just in a different window on the same machine.

The video is not in sync, obviously.

Thought y’all might want a few clues on how we managed it.

The guy who wrote Jamulus seems bemused and surprised at how his software which was getting like one download a month until last month has shot up in popularity coz everyone’s not able to get to band practice now and he may be a bit overloaded with support email.

He is not a big corporation.

So I thank him. Cheers dude.

]]>
https://handsomejacks.co.uk/index.php/how-to-do-band-practice-online/feed/ 0