Hip-hop has been the dominant musical force in the streaming era—last year, three of the five most-streamed artists on Spotify were rappers—and that popularity has been driven by youth culture. Generally speaking, both the producers and consumers of the most popular hip-hop are young, which suggests that its place in culture is here to stay. But another sign of the genre’s health might be the creativity happening away from the mainstream, where the possibility of mass acceptance is remote, especially when that energy comes from veterans.

Two artists who fit that bill, the rapper Freddie Gibbs and the producer Madlib, have teamed up and recorded a terrific new album. “Bandana” (RCA/Keep Cool), out Friday, is their second full-length collaboration, and it’s further evidence that they are making vital music at ages (Mr. Gibbs is 37, while Otis Jackson Jr., who records as Madlib, is 45) when most people in the rap sphere have burned out.