Syncronized music playback across multiple phones
June 1, 2015 11:21 PM   Subscribe

I'm working on a fun project which involves multiple bicycles and multiple boomboxes. I am trying to figure out how to synchronize music playback on all of these boomboxes, using phones. I assume this would be streaming from the internet (3G/4G/whatever), but are there streaming services that ensure totally synchronized playback across multiple devices?

If not, I've got coding experience I could draw on, and I'd love any pointers (heh) as to how to go about writing a small-scale streaming service with a focus on playback synchronization.

Or, lastly, is there a way to get all phones to play the same song/playlist, starting at the exact friggin same time? Like, utilizing UTC on a microsecond scale so everyone starts at once?

Thank youuuu
posted by special agent conrad uno to Computers & Internet (17 answers total) 3 users marked this as a favorite
 
Hmmm. I thought of bluetooth, but from what I'm reading an iPhone struggles to play sound to more than one device at once, even if it connected to them. Dunno about Android, and anyway I guess you'd need "Bluetooth-enabled boomboxes."

My second thought is to make a webpage with the song embedded, open it in the browser on all phones, and have JS that starts it at the right time. Of course, it probably won't execute exactly simultaneously, and starting in sync doesn't mean staying in sync. Ideally there would be a way to get the song cached locally first, but still in the web browser and so controllable by JS. (Is JS even allowed to start playing embedded sounds on phones? No clue)

My third thought is that the closest you will get is the low-tech solution of going "3 --- 2 ---1" and having everyone try to press play with their finger at once.
posted by drjimmy11 at 11:39 PM on June 1, 2015 [1 favorite]


Do the boomboxes have radios? Could you use an FM transmitter?
posted by a dangerous ruin at 11:56 PM on June 1, 2015 [3 favorites]


Response by poster: a dangerous ruin: no, but that is an idea. I could always get radios for each boombox. They're all custom made, with salvaged speaker cabs powered by cheap-o Lepai amps with 12v batteries.
posted by special agent conrad uno at 12:04 AM on June 2, 2015


Best answer: In that case it's probably easier to use the phones. I would look into using VLC. It will stream audio over the network and it has IOS and Android apps that can connect to its streams.
posted by a dangerous ruin at 12:47 AM on June 2, 2015 [2 favorites]


Best answer: Airfoil Speakers should do it, though each receiving device needs to be on the same wifi network (and same network as the transmitting device). Is that a limitation you could work with?
posted by wemayfreeze at 12:48 AM on June 2, 2015 [1 favorite]


Best answer: Research (teh googs) suggests this is a non-trivial problem that many have taken a stab at before. Check out this blog post for a good rundown.

If you can get the playlist/song onto everyone's devices, though, and get an app on there too, you may be able to simplify the problem significantly as in your final suggestion. NTP may allow for all clocks on the phones to be synchronized sufficiently for playback to begin at close enough to the same time. The actual time between sending the 'play' command and playback starting, though, may prove too variable for this to work well.
posted by wemayfreeze at 1:02 AM on June 2, 2015 [1 favorite]


I think ADR has the best idea. A single phone outputting to an FM transmitter will probably give you the best chance at getting all speakers synchronized. Sound is kinda slow though so depending on how far apart your various speakers are from your listeners you may still have problems with apparent synchronization.
posted by jmsta at 2:40 AM on June 2, 2015 [1 favorite]


You don't mention who your audience for the music are - and where they are going to be located. If the boom boxes are far enough away from the listeners - and unequally so - then a perfectly synchronised playback will not sound that way to them. If the audience are widely distributed - perhaps each one being with a bicycle which might be out of earshot of other listeners - then precise synchronisation might be less important. Can you provide a bit more information?
posted by rongorongo at 2:47 AM on June 2, 2015 [2 favorites]


There is an exhibition at the ICA in Boston that relies on synchronized play of several different tracks stored on several different iPod nanos. Part of the art exhibit is the simple but beautifully crafted mechanical device that was built to press the buttons on all of them simultaneously--explanation being that there was no other way to ensure that they were really synchronized.
posted by Sublimity at 4:08 AM on June 2, 2015 [1 favorite]


Best answer: Squeezebox server has a setting to synchronize playback devices, and there are clients for IOS and Android.
posted by Runes at 5:36 AM on June 2, 2015 [3 favorites]


Decentralized Dance Party just uses low-power FM, although poking around their website, it looks like they want to create a mesh network.
posted by adamrice at 6:58 AM on June 2, 2015 [1 favorite]


RE: FM/AM radio transmitters:

Radio transmission might be a viable option (having a local radio station play a list of songs at a certain time is one way I've seen various towns & cities work a low-budget quick-and-dirty "sync music to fireworks" scenario, for example), but it's worth noting that the FCC only allows unlicensed radio transmitters with an effective range of 200 feet. So it depends on the context of what you're trying to accomplish - might work for a stationary art installation, not so useful if you want a bunch of people on a city-wide bike ride to hear the same music at the same time. (And I personally would not fuck with the FCC on this, just in case you're thinking about taking your chances on doing a one-time high-power illegal broadcast . . . .)

For a one-time event, you could look into whether someone from a local college radio station and/or public radio station (i.e. someone with an actual FCC license) would be interested in participating by playing your song list at a certain time.

It seems that one possible advantage of radio is that it will reduce or eliminate the sync problems that could arise from buffering, either at the network level or at the receiving phones (if I'm reading wemayfreeze's link correctly), which I'm not sure you could do much about.


Other thoughts:

Maybe you co do something via one of the various live-streaming websites? They're obviously kinda aimed at video broadcasters, but you could just stream audio content. And I think most of them have some free/low-budget options, especially if it's a one-time event and/or a limited number of audience members.

Stepping back in perspective a little, I'll second rongorongo above re: synchronization in respect to the listeners. Sound transmission speed through air can be highly variable, depending on temp & humidity & (if you're outside) any wind, but it's generally approximated/averaged at 1130 feet per second, which is approximately 1 millisecond per foot. Which is to say you don't have to have much distance between two sound sources for a listener to hear them as "out of sync." (To put this in some context, the "chorus" sound of guitar/recording effects is essentially just 20 to 50 milliseconds of delay added to the signal which is then mixed back in with the original un-delayed signal.) So maybe at the least, depending on the context of what you're trying to do, trying to get things synced down to the microsecond might not be worth the effort - your listeners might not hear things in sync no matter what, or it'll be close enough as long as all of the boomboxes start receiving within 5-20 milliseconds of each other (which might be an easier problem to solve.)
posted by soundguy99 at 7:39 AM on June 2, 2015 [1 favorite]


Best answer: Try seedio and syncboss.
posted by gorcha at 7:48 AM on June 2, 2015 [1 favorite]


I've tried to do this before (on a wired LAN) with very mixed results.

Squeezebox server has a setting to synchronize playback devices, and there are clients for IOS and Android.

Squeezebox worked okay when I tried it, but it was very difficult to get the players to sync properly (and this was over the LAN!). If your sync is off by more than a few milliseconds then it starts to sound pretty bad if you can hear both players at once.

AirPlay seemed to work better in the sync department, but it's also proprietary and pretty flaky.

It seems that audio sync is a Hard Problem. There are a couple more commercial solutions out there (can't recall the names offhand) that I haven't tried.

I'd say the FM radio idea is the simplest and least failure-prone (legality notwithstanding). If you have a centralized transmitter, you can (in theory!) attach other streaming methods to it so people can play to it from their phones.
posted by neckro23 at 12:07 PM on June 2, 2015 [2 favorites]


Response by poster: Seedio looks like exactly what I'm looking for, and also I've sound an app called Speakerfy. Unfortunately they still require a wifi network, so I'd have to put a wireless router on the "lead" bike.

These bikes will all be within 200 ft, or so. I know about the speed of sound issue, and we are just going to accept that.

An FM broadcaster, maybe even boosted to 500 ft (shh don't tell the FCC) would definitely work, and still might be the best solution. But I am determined to first try and solve this with only cell phones, ha.

And yes, this is definitely a hard problem! Thanks everyone for the suggestions so far...
posted by special agent conrad uno at 3:30 PM on June 2, 2015


So, uh, here in DC the fine folks at Bicycle Space have an arguably decent solution to this problem.

The sound source is just really damned loud. And all the bikes can hear it.

The Thursday night social rides are led by this guy towing "the box" and playing the playlist from an iPhone on the bike. (At least, it was like that last time I rode with them.)

Worked great. Low tech.

Don't get me wrong - I think your idea is really cool, but if the main thing is for a bunch of cyclists to all hear the same music, volume works wonders.
posted by Thistledown at 3:40 PM on June 2, 2015


If fidelity is not a concern FM transmitter is probably the easiest, and cheapest, at about $20 or so, easily powered by a AAA (or AA) battery that lasts HOURS, and the boxes are just FM receivers and you can BUILT those easily with those RadioShack kits (RIP!)
posted by kschang at 2:10 AM on June 3, 2015


« Older Notetaking software, cross-platform, and OFF the...   |   Recommendations for a soft, flat-ish pillow? Newer »
This thread is closed to new comments.