Knicks center Karl-Anthony Towns  commits an offensive foul as he...

Knicks center Karl-Anthony Towns  commits an offensive foul as he drives into Raptors forward Kelly Olynyk during the second half of an NBA game in Toronto on Monday. Credit: AP/Nathan Denette

The music was blaring in the Knicks locker room in Toronto late Monday night. Jokes were flying back and forth. Karl-Anthony Towns was mostly concerned about his beloved Yankees losing Juan Soto, and even Tom Thibodeau smiled as he walked through with his suitcase, just reminding his team to watch their language.

The mood was good, upbeat - that’s what surviving does for a team. The Knicks, fresh off a frustrating loss to the sub-.500 Pistons at home, had trailed much of the night against the 7-17 Raptors before finally pulling out a win with late-game heroics.

Survival changes the mood and the Knicks may have needed that as they head into Wednesday night’s NBA Cup quarterfinal against the Hawks at Madison Square Garden. The Knicks are healthy; other than Mitchell Robinson they were complete for the first time this season Monday night.

The ups and downs of the early season — and really, in Monday’s game, too — have created mood swings within the fan base for sure, but maybe not for the team. Through the bumps of this period they have, to a man, insisted that it’s all going to be OK.

And maybe just in time for the team to raise a banner — something the franchise hasn’t done in any capacity  in more than a decade.

The immediate path may not lead directly  to an NBA championship, but the in-season tournament road seems to have been paved smoothly for the Knicks. The Knicks drew Atlanta in the knockout round after crafting the proper point differential to keep Boston out of the tournament. If they get past that, it'll be  the disappointing Milwaukee Bucks, who beat a banged-up Orlando team Tuesday, to get through the Eastern Conference side of the tournament

Atlanta has certainly had their moments against the Knicks. Trae Young in a win-or-go-home scenario could bring up ugly memories, but these are not the Knicks of 2021. Still, the Hawks could arrive with something to prove.

“I think there’s money involved,” Jalen Brunson said. “So I think there’s a lot of motivation regardless.”

For the Knicks, a win would mean a trip to Las Vegas and all of the accoutrements of Adam Silver’s showcase. A loss would mean a trip to Orlando and wondering when — if — it’s all going to come together.

But you can’t tell the Knicks that now. Starters, bench players, even the coach, were in a mood Monday night and behind it is a belief that this team is coming together and understanding what they can be. Even Thibodeau understands.

“Hard? I give them hugs every day,” he joked when asked how he balances his gruff exterior in games with a belief in this players. “You want the right players. You want to be truthful. You build trust with the truth.

“We’ve got a great group of guys to work with. So, just be honest. And we want to understand why we win or why we lose. We always have the belief we can do things better. So, we get everything working together, good things are going to come from that. And then if we play as a team, it’s a team game, so we want to have a five-man offense, five-man defense. When you do that it’s enjoyable for everyone, when everyone is participating in the team and sacrificing and putting the team first. So, we’ve got great character on our team.”

You watch them play and you see that. There is the extra pass — Brunson quickly passing out of a double team with the game on the line and finding Towns for a go-ahead basket. Or Towns with an open three and swinging the ball to Mikal Bridges in the corner for a better shot. Or, on the defensive end, when Towns helped slow down an RJ Barrett drive to the basket, allowing OG Anunoby to come from behind with a game-saving blocked shot.

It’s those things that let them celebrate on the court and allows it to continue to the postgame locker room. If the music played and jokes flew after a middling performance against a lottery-bound Raptors team, imagine what it would be like with a banner -  any banner -  being raised at the Garden.