Three years ago, Lee Reid's world unravelled.
The neuroscientist had finished his Masters degree at Auckland University and started a job as a medical writer when he began suffering crippling pain, first in one hand, then both.
"It started as RSI but then with RSI normally once you stop working you start to get better. I didn't," he said.
He saw doctors, physiotherapists, neurologists and neuromuscular specialists who couldn't diagnose the problem.
Unable to work, cook, clean or drive his car, Mr Reid moved back to live with his parents in Havelock North.
Simple tasks like opening a milk bottle were impossible. He was once locked in his bedroom for an hour because he couldn't turn the doorknob.
"That kind of frustration you can't even really explain," he said.
"It just builds up and up over time."
The keen musician, who had been drumming since age 7, was also unable to play - leaving his brand new drum kit to gather cobwebs - but still had ideas about writing music.
Frustrated with the music notation software available - "to write four bars of music would take me four hours" - he began developing his own.
Writing the programming code was laboriously slow. Unable to use his hands, he learned to move a mouse with his feet to operate an on-screen keyboard, and later used a voice recognition programme.
"When you're in a position like that the only thing you have in your life really is time," he said.
"It's that or stare at a wall. It kept me occupied, gave me some hope and made me feel that I actually could do something with myself.
"It was that or just give up, and I'm not really a big fan of the latter."
Mr Reid said he wanted the software to more effectively replicate how people write music by hand.
The system allows notes to be added and removed with a mouse click, and allows users to publish their sheet music as a book or play it back.
After two years of painfully slow work, Musink was released online as a free download in 2012 to an "overwhelmingly positive" response.
A new paid download, Musink Pro, has just been released with extra features. He has promoted the release by putting out a comic of his story, drawn by artist Joshua Drummond.
Mr Reid, 28, is now studying towards his PhD in neuroscience at the University of Queensland.
The pain has lessened and he's now regained "90-something per cent" function in his hands.
He's also playing the drums again. "It hurts but I'm at the point now where the consequences of doing normal everyday things are a matter of hours or days of pain rather than weeks or months of additional pain," he said.
"I have given up on it ever being perfect and just tried to focus on being happy rather than being well."
- On the web: Musink.net