(CNN) -- Brian Jantz marched down the hallway of the hospital with his guitar, accompanying a 4-year-old oncology patient with a maraca and a drum. He remembers they were singing their own creative version of "Itsy Bitsy Spider."
The girl had been anxious about an upcoming X-ray, he said, and resisted going to the procedure. Hospital staff paged Jantz to help. He kept the music going even on the elevator; the girl's parents, a nurse and a child-life specialist sang, too.
"I'm not completely sure that she realized when it was happening ... because before you knew it, we were back on the elevator, back in the room, and the music just continued straight through," Jantz said.
Jantz is one of two music therapists at Boston Children's Hospital, where the idea of using music to help patients as young as premature babies in the neonatal intensive care unit has taken off in the last decade. Jantz and his colleague have scheduled visits with patients in almost every unit but will come to a melodic rescue in urgent situations.
"We kind of joke around, 'It's like a music emergency,' but it really is," Jantz said. "It really can be like, 'This patient needs music therapy right now.' "
Music therapy formally began in the 20th century, after musicians went to play for World War I and World War II veterans at hospitals across the United States. Today, there are about 5,000 board-certified music therapists in the United States, according to the American Music Therapy Association. Over the last decade, the group's membership has expanded, particularly among students.
"We're not huge, but are slow growing -- but a mighty -- group," said Barbara Else, senior adviser for policy and research at the American Music Therapy Association.
Why it works
There is scientific research to back up the idea that music has healing properties. A 2013 analysis by Daniel Levitin, a prominent psychologist who studies the neuroscience of music at McGill University in Montreal, and his colleagues highlighted a variety of evidence: for instance, one study showed music's anti-anxiety properties, another found music was associated with higher levels of immunoglobin A, an antibody linked to immunity.
The brain's reward center responds to music -- a brain structure called the striatum releases the chemical dopamine, associated with pleasure. Food and sex also have this effect. The dopamine rush could even be comparable to methamphetamines, Robert Zatorre, professor of neurology and neurosurgery at Montreal Neurological Institute, told CNN last year.
Beyond that, music presents a nonthreatening tool for interventions that is already attractive to patients, Jantz said.
"On the surface it works because, in some way, everyone relates to music," Jantz said. "Music really is universal."
Music therapists often work nonverbally, which is why the method is particularly effective for individuals with verbal expression difficulties, such as children with autism, Else said. The profession helps people at every age, from babies to Alzheimer's patients.
For individuals with autism in particular, music therapy has shown to be a positive reinforcement of appropriate behaviors and a motivator to reduce negative ones, according to the American Music Therapy Association. Music can also help with the development of language skills, and the identification and expression of emotions, which are characteristic challenges in autism. Some children with autism have superb musical abilities, and music therapy can help them focus on their strengths.
Alzheimer's patients, who have memory and thinking impairment, may still recognize songs of their youth or respond emotionally to music. Music can also be used in elderly care settings to calm or stimulate residents.
Music as a tool
Singing with someone when you feel anxious, or expressing emotions through songwriting, are more than just casual activities in music therapy. Therapists always have specific goals in mind, such as helping patients overcome a fear.
One fundamental of music therapy is called the "Iso principle," the idea that the therapist takes cues from the client when choosing what music to play. This can inform the improvised music that therapists and clients play together. If the client feels hyped up, the therapist and client might play vigorous drum beats together, but if the goal is to relax, they might begin energetically and then tone down.
Therapists are conscious of rhythm, tempo, texture and melody of the music as clients express themselves. In a hospital setting such as Jantz's, such components of music can also distract a patient who is in pain.
In Else's private practice, she has been helping a college student with an anxiety disorder called agoraphobia; the young woman, who was homeschooled, has been fearful of leaving her house.
The student writes song lyrics when she meets with Else, and also learns guitar from the therapist in the process. By discussing the lyrics and other elements of the music that the student generates through improvisation, the client and therapist uncover clues about what is fueling the woman's anxieties.
"We are using music as a mechanism. One, for motivation, but also as a mechanism so she can express herself and we can figure out what are some of these things that are driving her fears," Else said. "We've made a lot of progress."
Having worked through her issues with music, the young woman became more open to going out in public, Else said. She accompanied Else to a rehearsal for an opera, and then to an actual opera performance.
She has now started junior college and is doing well, Else said. The young woman still sees Else for follow-up maintenance.
"Part of that therapeutic process working with her ... was building a high level of trust," Else said. "Developing trust with someone so she could understand that the world isn't quite so scary out there, to get to the root cause."
Music as a lifesaver
Going through music therapy isn't always relaxing, fun or easy.
Cpl. Demi Bullock, 25, a former Marine, experienced post-traumatic stress disorder after her second deployment in Afghanistan. In summer 2011, music therapy was part of her treatment program.
At first, Bullock, who had played the guitar since she was 15, hated music therapy. Her therapist, Rebecca Vaudreuil, would organize activities such as a drum circle, lyric analysis, listening exercises or instrumental playing for service members in the program.
Impatience, and a desire to withdraw from emotion, quickly overtook Bullock. She refused to participate.
"I did not like playing music, having something make me feel that pain and that sadness, that can be completely overwhelming," she said.
Such resistance isn't unusual among returning military, Vaudreuil said. Some people can connect with music more than others, but in some cases it takes time and "soul-searching" for music to become a beneficial part of recovery.
Bullock rediscovered music therapy more than a year after her initial encounter with it. In January, Vaudreuil invited her to join the Semper Sound Band, a musical program through the nonprofit Resounding Joy Inc. that helps service members reintegrate into the community and promotes group cohesion. Vaudreuil was the band director at that time.
The invitation came at a particularly dark moment. Bullock was in the process of getting evicted and continued to struggle with PTSD and depression. She had also recently attempted suicide.
Bullock came to discover that jamming on a guitar, keyboard or drum set helped her cope with stress or intrusive thoughts. The band also provides a social support system and an outlet for self-expression.
"The songs that come out of it, and the process they go through, is so genuine," Vaudreuil said. "The songs are a direct reflection of their emotions, their trials, what they've been through, their experiences, and it's completely cathartic for them."
Bullock continues to play with the band, and works as an intern at Resounding Joy. Her job allows her to be on the facilitator side of music therapy, and connect with other veterans.
"If I hadn't gotten into it (music therapy), I'd literally be dead or still be homeless," Bullock said. "It literally did save my life."
Other therapists are exploring technologies that allow them to see what effect music has on the human body, and use that information to guide clients. This is called biofeedback.
Eric B. Miller, a music therapist in Phoenixville, Pennsylvania, uses real-time data about patients' physiological responses to inform how he runs sessions. He recently discussed a biofeedback method at the Interdisciplinary Society for Quantitative Research in Music and Medicine conference in Athens, Georgia.
"The idea is that this information is informing me as a music therapist how I want to be playing my guitar, what tempo I'm going for," he said at the conference.
Conference attendees took turns listening to music while wearing a finger sensor. Through a computer program, a graph appeared on a projector screen showing relative heart rate, heart rate variance and skin conductivity in real time. The computer program then translated the readings from the sensor into tones, which could be heard overlayed with music.
Independent researcher Elijah Easton listened to another conference attendee (full disclosure: it was the author of this article) improvise on the piano. Easton said he found the activity relaxing; Miller noted that Easton's heart rate had decreased after the music stopped.
In a real session, Miller would create a physiological profile of a client by looking at his or her responses to sitting naturally, doing a cognitive task, relaxing and envisioning something emotional. After more relaxation, he would set up the biofeedback system of tones, and challenge the client to lower the tone, an indication of relaxation. Different tones can be assigned to different variables such as heart rate.
The point is helping clients learn the art of self-regulation, of adjusting their own bodies, Miller said.
"The music and the data are both co-therapists," Miller said.
Biofeedback-oriented music therapy can be used in a variety of conditions, including high blood pressure and seizures -- not necessarily instead of mainstream medicine, but in concert with it, Miller said.
"Western doctors may recommend it to complement existing treatment or as a trial in cases of adverse reaction to typical pharmacological remedies," he said.
In a more subtle way, Jantz also uses biofeedback with patients who are already hooked up to monitors at Boston Children's Hospital for medical reasons. When he plays music in the neonatal intensive care unit, he can see what impact strumming his guitar has by observing the heart rate graph.
Fun is part of it
Jantz sees music itself as having an intrinsic therapeutic value, in addition to the positive experience that a person can have with a music therapist. For children in particular, it can encourage them to learn a new skill; sometimes patients who stay at Boston Children's Hospital for longer periods get good at guitar.
Occasionally Jantz has to dress in a surgical gown and gloves, but for the most part the kids don't view what he does as a therapy -- they're just relieved that instead of poking and prodding, he's there to play music with them.
"There's nothing wrong with having fun," he said. "That's part of how it works."
He's prepared for a full repertoire of traditional children's songs, but he has also worked with young kids who love The Beatles. And some teens would rather hear music from their earlier childhood than Justin Bieber.
The phone that pages him, though, doesn't beep or ring to alert him to his next destination.