Terrace Martin details balancing production for YG and Herbie Hancock. In a recent interview with Billboard, the beatsmith, who also serves as Kendrick Lamar’s saxophone player, explains how he manages to work with YG as a rapper and Hancock as a jazz musician at the same time.

“Working with Herbie has actually taught me how to produce records better for YG, better for Kendrick — because one thing Herbie does, is he honors the mistake, and he expects the unexpected,” Martin says. “Those are two rules that I haven’t lived by that I’m now practicing. I’ve realized that I’ve missed out on so much by just being in the box. Now my eyes are open for new music. I want to just grow, and be better, and work with new people.”

The producer also details balancing the schedules and says that he takes a nap after spending a five-hour session with Hancock before heading to the studio with YG.

“They both stretch my brain,” Martin says. “YG works on a whole different schedule, where he doesn’t work that long, but he works more intensely. They both are challenging, and I love a challenge.”

Martin produced YG’s “Twist My Fingaz” single, which follows the pattern of funk that Martin helped Lamar create on To Pimp a Butterfly. The producer says that YG has become more confident in his own sound as he prepares his next project, Still Krazy.

“He has his own things he wants to do now,” Martin says. “He knows how he wants things to sound. Working with him is a challenge because he’s so into the funk element. Can’t be jazz funk. It’s gotta be funky for him.”

Martin is preparing to release his own LP, Velvet Portraits.