Actually just playing the music loud over speakers works much better. But YMMV depending on your music taste, mine is perceived as too intrusive by most.
Paradoxically, at least in the US, we're seeing a trend towards fewer workplace friendships and greater detachment.[5] I/O (industrial and organizational) psychologists have a lot of interesting interpretations for those trends. Almost across the board, employment is far more transitory today than in past decades, so there's less pressure to invest time in meaningful relationships at work. And we're so connected nowadays that it's easier than ever to preserve relationships in some form (regardless of whether they're preserved, or we just believe they are), so we don't feel the need to generate replacements as much.
Having done a lot of freelance work myself for a couple of years, if I'm being entirely honest with myself, this is one of the disadvantages at times. I enjoy getting to work on different projects, but there's something to be said for getting to focus on something with the same team. Even if open offices and talkative coworkers can get in the way at times :).
0. https://hbr.org/2013/07/we-all-need-friends-at-work
1. http://www.gallup.com/services/178514/state-american-workpla... (behind a form)
2. https://www.fastcompany.com/3051290/why-having-friends-at-wo...
3. https://blog.linkedin.com/2014/07/08/work-bffs
4. http://www.lse.ac.uk/website-archive/newsAndMedia/news/archi...
5. https://www.nytimes.com/2015/09/06/opinion/sunday/adam-grant...
In an open office it is obviously much easier for someone to just lean over or look around their monitor and grab your attention, but having a private office with a door is still prone to someone knocking (or walking in if not closed)
Working from home, people can email, chat, or leave a phone message and in any case when I am focusing none of those will bother me until I make an effort to check for messages. Emergency calls can get through by calling me twice.
The only reason I'd like to be in an office is often my workmates become friends, and I want to "hang out" with my friends