Braden Holtby's pregame routine has involved a guitar for the past several seasons. (Toni L. Sandys/The Washington Post)

There were maybe 10 other people at the bar, so Braden Holtby assumed he was safe. He was incorrect.

The Washington Capitals had just wrapped up a long day of team-building activities in Whistler, B.C., during their trip to western Canada in October, so players ended the night with a visit to the Dubh Linn Gate. As always, Holtby had his guitar with him, so when the Irish pub’s live-music act needed a break, Holtby took the stage to serenade his teammates and the handful of patrons.

It didn’t take long for video of Holtby singing “Keep The Wolves Away” by Uncle Lucius to make the rounds on social media, much to Holtby’s chagrin.

“I kind of just thought there was no chance it would get out,” he said. “It’s completely different playing with a microphone; it sounds completely weird.”

Holtby’s concerts tend to be more private, from playing his guitar in an office at the Capitals’ practice facility every game day to learning a new song in his hotel room when there’s time to kill on the road. It has become part of his routine in the same way his pregame visualization techniques are, and that routine is what grounds him — when things are erratic in front of him or his own play is suffering, he approaches every day the same way.

It’s part of the reason he has been one of the most consistent goaltenders in the NHL over the past five seasons, selected to the All-Star Game four straight years and being named a Vezina Trophy finalist twice, winning the award in 2015-16. But as the past two seasons have tested him with roster changes that caused some of his closest friends to leave the team and a more wide-open style of play around the league leading to more scoring — and not just against him — he has had more highs and lows than a song. One of the few constants through all of that has been his reliance on music.

“It’s therapeutic,” Holtby said, who added he’s a fan of folk and country, listing Sturgill Simpson, Jason Isbell and Colter Wall, a singer-songwriter from Holtby’s native Saskatchewan, among his favorite performers. “It takes your mind off things. That’s kind of why I feel it helps me on game days. To play a little bit, you kind of forget about all that. Whether you’re in a good or bad mood, it doesn’t matter; you kind of come back to square one. Music controls your mood, different types of music, and it’s just one of those things I do to get into the same mind frame every day.”

Some of Holtby’s most colorful childhood memories are of falling asleep under a bar table or a stage as his mother’s voice fills the room. Tami Holtby was the lead singer in a country band, Tami Hunter and Walkin’ After Midnight, that toured western Canada. Braden and his older sister, Taryn, often tagged along for practices and concerts as kids.

“I didn’t appreciate it as much as I would now, how good they were and how cool it was to be around that,” he said.

While Braden followed in his father’s footsteps by becoming a goaltender, Tami could see her influence in the way her son would rhythmically tap his fingers or play air guitar. “Every day there was live music in our house,” she said.

Holtby took some piano lessons, but the guitar was his real love. He tried teaching himself how to play during his last season in Canadian major junior hockey with the Saskatoon Blades, but he was frustrated with his lack of progress and put the instrument aside for a couple of years as he concentrated on moving up the Capitals’ depth chart.

Then, during the 2014-15 season, a guitar arrived at the team’s practice facility, and since no one else knew what to do with it, Holtby strummed for a couple of hours before he was due in net.

The Capitals won that night, so Holtby had another guitar session on the day of his next start. Washington went on a hot streak, and a new wrinkle was added to his carefully structured routine. He played in a career-high 73 games that season, the first he established himself as the team’s top option in net. After Holtby signed his five-year, $30.5 million contract extension in 2015, his agent bought him a small guitar for the road, and it travels with Holtby for even the team’s shortest trips.

When his mother’s band had a reunion this summer, Holtby performed, too — “when everyone was not worried about how the music sounded,” he joked.

“He got up and played his guitar, and of course, to my bandmates who knew him as a young boy, they’re just all amazed at how he’s self-taught himself to play guitar and that he can sing,” said Tami, adding that he plays the guitar better than she can.

What started as a hobby became a relaxing release when last season felt chaotic. As much as Holtby values routine and stability, the Capitals’ roster turnover before last season threw him for a loop. Defenseman Karl Alzner, who had played with Holtby since their days in the American Hockey League, signed with the Montreal Canadiens, and defenseman Nate Schmidt, Holtby’s close friend and seatmate on the team plane, was swiped in the Vegas expansion draft.

Mitch Korn, the goaltending coach who played a large part in Holtby joining the NHL’s elite class of netminders, was still with the team, but no longer in an on-ice capacity. Then it bothered Holtby to watch blue-liner Taylor Chorney be scratched every night before he was eventually waived in February.

“Last year was a difficult one because there was a lot going on outside of just goaltending that affected me,” Holtby said. “It was just a change from the year before. You lose a lot of good friends. Seeing one of the best teammates I’ve ever had sit on the bench for a year was tough. You’re a family as a hockey team, and when you lose guys to different teams or even staff members, it changes things and it just wears on you a bit.”

With the Capitals playing porous defense in front of him, Holtby’s game in the second half of the season deteriorated to the point that he was temporarily usurped as the team’s top goaltender. He was frustrated that, while he felt like he was playing the same way, the results were drastically different, culminating in the worst statistical season of his career. Philipp Grubauer was tabbed the starter for the playoffs, but Holtby shortly thereafter reclaimed his role and backstopped Washington to its first Stanley Cup with a 2.16 goals against average and .922 save percentage. Grubauer was traded to the Colorado Avalanche during the summer, reaffirming the organization’s confidence in Holtby.

“I think the play in front of him, too, sometimes creates a little inconsistency,” General Manager Brian MacLellan said. “You can’t just say our goaltending has been inconsistent. I mean, the way we play in front of him can also assist how he is, how he plays.”

Last season’s experience proved valuable when he again struggled some last month; in eight January games, he had a .880 save percentage with a 4.11 goals against average. He didn’t overreact to the poor results, accepting that even the few things he could’ve tweaked probably wouldn’t make much of a difference in the games the Capitals lost with him in net.

Since the Capitals’ bye week after the All-Star Game, Holtby has allowed six goals in three games, stopping 95 of the 101 shots he has faced for a .941 save percentage. The most important thing was trusting his approach — another trait he got from his mother.

“When he started playing hockey competitively, we did talk a bit about the parallels between entertaining in music and entertaining in sports,” Tami said. “Your preparation is not the same, but along the same lines — the practice that nobody sees, the preparation before you step on that stage to not have too many jitters, but just the right amount of jitters and to be able to focus the whole night, to be able to continue to entertain.”