Much can be programmed, and that includes sound. In the digital world, sound is typically represented by sequences of about 90 kB per second, so "printing" sound is merely a matter of printing bytes. As such, any general purpose language can be used to generate sounds.