Lang Lang, the internationally acclaimed pianist, knew he had to get pianos into Philadelphia classrooms.

"Philadelphia for me is a second home," he told a rapt audience of second graders at Thomas Holme Elementary School on Friday. "I felt always very emotionally attached to the city of Philadelphia."

The children sat at state-of-the-art keyboards in the school's brand-new piano lab, made possible by a grant from the Lang Lang International Music Foundation. The Chinese musician has invested nearly $1 million in six Philadelphia schools, equipping them with not just the pianos but funds to support them for three years.

When he was a teenager, Lang studied at the Curtis Institute of Music, where he developed both an appreciation for cheesesteaks and hoagies and a sense of frustration that the city's schools did not all have robust art and music programs.

"I felt pretty sad," said Lang. "Music and art should be part of the regular system."

Lang listened — and played along, enthusiastically — to a group of second graders, who only began to learn piano a few weeks ago. He clapped and cheered for their version of the first few measures of "Ode to Joy."

"I am really happy to see our kids already playing some Beethoven stuff," he said, giving thumbs ups and high-fives to the children.

Along with Holme, Muñoz-Marin and Francis Scott Key Schools won foundation grants this year. Fox Chase, Southwark and Steel Schools received the grants last year, for a total investment of $780,000 in city schools.

Lang's gift is a boon at Holme, a K-6 school in the Northeast that already had a rich art and music program, even including dance.

It would never have been able otherwise to afford keyboards, headphones, Lang's piano curriculum, and other accoutrements, said Crystle Roye-Gill, the school's principal.

"This donation is taking us to another level," Roye-Gill said.

The $30,000 check Holme will receive annually for three years will allow the school to begin an after-school piano program for students and parents, and also provide funding for research into just how its arts push is affecting students academically and socially.

"They're just getting a more well-rounded education," Roye-Gill said of her 605 students.

Music teacher Nicholas Petit said Lang's investment helps keep Holme an attractive neighborhood option in an area where families often choose other schools.

"We're not a magnet, we're not a charter, but we have some of those top-flight things that magnets and charters offer," Petit said.

The students took full advantage of having a celebrity in their midst.

They peppered him with questions — how old were you when you started playing (2½), is there any piano player in the world better than you (Maybe you someday, if you practice a lot).

And they listened raptly as Lang performed two duets with Maxim Lando, 14, a Lang protege. (Lang, whose left arm is injured, played with Lando on Wednesday night at Carnegie Hall.)

Lang had a grand piano shipped in pieces and assembled on Holme's modest stage early Friday.

It was, 7-year-old Daniel Cheeseman said, maybe the best day of his life.

Daniel is a brand-new piano student, and was the boy with enough courage to ask Lang if he was the best pianist in the world. Lang was nice and funny, Daniel said.

"I think he was great," Daniel said. "He is so cool."