I used to like to write with music playing but now I like it quiet. I used to like to sit up in a tree and do some writing up there but that tree is long gone and I don't have any climbable trees around and I may be too old for climbing trees anyway. But it was peaceful up there. Neighbors would walk by and never notice you were up there. Anyway, if you have a tree to climb, that's one way to get away from distractions.
I used to be able to write and watch TV at the same time too. Don't know how I managed that, but that might also explain why my writing wasn't so good back then. I wrote better stuff in studyhall, usually.
Anyway, here are some tips . . .
CROWDS: I could still write in a crowd. The more people around, the easier it is to not be distracted because there's actually less of a chance they will bother you because they tend to cling to each other, bantering about nonsense, while you can sit and get work done. The fewer people around, the more likely they will get bored and start asking questions like, "What are you doing?" Isn't it obvious you're writing? Of course, their question is merely an attempt at initiating a conversation because, unless they are visually-impaired, they know darned well that you are writing, unless they're stupid, in which case hand them a piece of paper which reads "Turn over" on both sides which should keep them busy for a while.
KIDS: I don't have any but I do have birds. They are about a foot long from the tip of the beak to the end of the tail. The minimum recommended cage size for them is a two foot cube. Actually, that's the minimum recommended cage size for a pair as well. So, extrapolating from that, a three foot child or two should be perfectly content in a six foot square area. Since they don't fly, you really only need headroom, so four foot high or so would be sufficient. If your house has eight foot ceilings, divide halfway with a sturdy horizontal divider and add steps and in a twelve-foot by twelve-foot room, you could easily fit sixteen kids. Pad the walls with sound-proofing material, cover the floor with newspapers, leave a bucket of water and a bucket of food for them, and lock the door. Based on my experience with feathered children, they should be good all day.
SPOUSE: I don't have one of those either, which is largely due to circumstances beyond my control--those circumstances typically being an invitation being answered by a "Ha ha ha ha ha ha, no." So, I'm afraid I cannot offer many solutions in this area primarily because I haven't had to develop any. But, if spouses are in any way like cats, keeping the bird feeder well-stocked seems to be a fairly effective solution at keeping them happily staring out the window for hours on end. The efficacy of this solution can also be increased by adding peanuts to the outdoor environment, which serves to attract birds as well as squirrels. And, if you have a tolerance for a wide variety of animal visitors, including opossums and skunks, throwing out any kind of stale bread, cereals, popcorn and other assorted treats will bring them all to your backyard. Also effective if your spouse is more like a dog than a cat, because dogs love barking at squirrels, opossums, skunks as well as stray cats or deer. Be careful of deer though. You don't want them charging through the glass door or window at your barking dog.