It's all Ramin Djawadi:
Djawadi, who grew up in Germany and now calls Los Angeles home, says that when the series started in 2011, he and the show's creators, David Benioff and D. B. Weiss, met to discuss the conceptual approach to the show. "They had a great vision," he says. "I brought my ideas and then I started writing themes. I wrote main title and themes for characters and locations. The one thing we wanted to focus on is not having a different theme for everything because there are so many characters."
He told The Hollywood Reporter:
THR: Does the music come from the script or the visuals of the show?
Djawadi: I read the scripts, but the visuals trigger a whole new level of inspiration. Like the main title -- they showed me this beautiful rough cut of the main title sequence. That really triggered me to write this theme.
Any limitations seem to come from the producers:
"Game of Thrones" is set in a mystical, imaginary world - and yet the music sounds quite modern, nothing like the folklore-heavy sound that dominates many other fantasy films. Did you make a conscious decision against that classic medieval sound?
Definitely. Despite these thematic elements, and the medieval aspect of the series, we decided to tackle the music differently. Initially, I was told not to use any flutes, an instrument that's often featured in "The Lord of the Rings," for example. And so I had to think about which instruments I wanted to work with. The deep sound of a cello, for example, stands out quite prominently. "Game of Thrones" is mostly a very dark series, and so the cello fits very well into the soundtrack.
Djawadi explains how he conceived of the music for "The Rains Of Castamere":
"Rains of Castamere" is the most well-known piece of music in George R.R. Martin's "A Song of Ice and Fire" universe. The song tells the story of how House Lannister destroyed the rival House Reyne of Castamere when they dared to rebel. In the years that followed, "Rains of Castamere" would play to both celebrate House Lannister and strike fear in the hearts of their enemies. The tune was famously played at the beginning of the Red Wedding, signaling the Freys alliance with the Lannisters and cuing the massacre's start.
Given the rich history of the song, its onscreen debut in "Game of Thrones" was a widely anticipated moment for fans of the book series. But there was a catch: No one knew what the actual melody of the song would sound like.
"Benioff and Weiss said there's lyrics in the books for 'The Rains of Castamere' that we would like you to write a melody for," Djawadi tells INSIDER. "It needed to be haunting but beautiful, and all these other criteria because the theme had to be really flexible. So just based on the lyrics I sat down and wrote it."
I've read all of the books and the related material, and I don't recall any significant details by GRRM with regard to how the songs are supposed to sound.