Renalddy Then, 14, plays electric guitar for a project in his digital music class at Bronx Compass High School.

The teens sat hunched over MacBook Pro laptops, silently maneuvering their fingers over the keyboards while hypnotic beats thumped through black headphones covering their ears.

Behind them, a boy sat in a chair on a small stage and played the electric guitar, the sharp notes filling the darkly lit basement room.

“They’re off exploring things they didn’t have access to before,” said teacher Anthony Dimasso, watching his students’ intense focus on digital recording.

The scenario may not evoke memories of high school music class, but it’s the norm at Bronx Compass High School, where principal Stacy McCoy and her staff make every effort to incorporate art into a heavily STEM-focused curriculum.

STEM — science, technology, engineering and math — is rarely thought of in conjunction with painting, writing and making music, but the young school was devised with exactly that fusion in mind to create “STEAM,” with the addition of art.

“It’s really about being creative and understanding how digital technologies are completely linked to science and technology,” said technology teacher Cory Beder. “So if you’re someone who wouldn’t necessarily identify yourself as a math or science person, it’s still critical that you have these opportunities to work with a variety of different technologies.”

The Castle Hill school, which opened last year, offers classes and programs in video game design, robotics, film, media and software engineering. It will add fashion design — or “intelligent clothing” with electronics — next school year.

Instead of using textbooks, students complete all their work in Google Docs. They write essays and create their own podcasts. They produce and screen films.

And on a recent day, students were immersed in finishing up video games they had created based on serious topics like the Holocaust and life in the Bronx.

Jessika Cintron decided to build her video game around a family that deals with bullying and violence against women in the Boogie Down.

“I live in the Bronx, and I kind of wish these things wouldn’t happen,” the 14-year-old explained about her idea for the game. “My game shows awareness of bad things going on, and maybe people would realize how much it affects families.”

Other students fueled their artistic pursuits in the music class, using GarageBand and Audiotool programs to mix their beats.

“I’m not gonna lie, creating is really hard,” said Armando Reynoso, 15. “It takes a lot of concentration. But when it’s done, it’s a great feeling.”

Bronx Compass is not just about shaping future music producers, artists and video game designers — it was also selected as one of 20 city schools to create a software engineering program to be piloted across the five boroughs.

The fledgling program, announced by Mayor Bloomberg and Schools Chancellor Dennis Walcott in February, seeks to expand computer science and engineering classes for the city’s growing technology sector.

“Through this pilot we are training our students for the jobs of today and tomorrow,” Walcott told The News.

About 1,000 students will participate when the program launches this fall; by 2016, roughly 3,500 students are expected to be involved.

Beder will help outline a citywide program that includes topics like computer programming, embedded electronics, Web design and programming, e-textiles, robotics and mobile computing — subject matter with which Bronx Compass students are already familiar.

“It’s really exciting to see students so engaged,” said McCoy, the principal. “When I try to get them to pay attention, they ignore me because they’re so focused on what they’re doing — which is a good problem to have.”