Writing can be a lonely occupation. I have never worked with someone else in writing a book but I think that if I did then it would be remotely. Like many people who write, I have my preferences and they do not include having other people around me at the time. In fact, I have a strong attachment to the solitude that comes with being a writer. My wife is very good about this. On occasion she will sit near me, either reading or doing a jigsaw. When she does this quietness is the rule and she rarely breaks it. I respect her a lot for that consideration.
I have tried playing music in the background while I write and discovered that the best type to play is instrumental. Songs with lyrics distract me. Classical music is good, although if I choose it then I tend towards the more relaxing kind. I have found ambient music to be the best for writing to. It lays like a blanket over the quietness and subdues most sudden noises from outside. Ambient music is supposed to stimulate the alpha waves in the brain and help creativity. I do not know if this is scientifically correct, but I do know that I seem better able to concentrate when I am listening to it.
For me, solitude in writing has never turned into loneliness. I think that this is true of any creative activity that we undertake. If you enjoy doing something then you tend to lose yourself in the process and loneliness tends to require you to be aware that you are alone. I can certainly lose myself in my writing. On more than one occasion, I have gone all day without stopping for a meal or a drink simply because I have not wanted to break the spell, or should that be to exit the fantastical world that I have created? It does not matter as it is practically the same thing! My wife would never let that happen if she was sat silently nearby, she cares too much for that. Knowing that I am deep in my own art, however, she would disappear quietly and return a little later with something easy to eat and a warm drink. That is love.
The writer can appear a lonely creature, it is true. I dream about being locked away in a study, the walls lined with bookcases, a Chesterfield leather chair set near an open fire with a reading lamp suspended above it, a large desk with my computer sat upon it, and a small music centre keep me motivated. My reality is a small utilitarian desk in the corner of the loft where I hug a mobile radiator to keep warm. The place is overcrowded with stuff that we have somehow managed to acquire and have yet to get rid of, which I sincerely doubt that we ever will even though I raise this point every spring. Fortunately, I do spend a lot of my time in my dreams, so the reality is only a small inconvenience. I am not lonely when I write, I am almost at my happiest instead!