According to the Wikipedia page for the song "Happy Birthday To You", the Mars rover Curiosity sang to itself on its birthday in 2013, using its SAM as a musical instrument.
The page for the SAM indicated it is a suite of tools for chemical analysis. So how exactly did it produce notes? Were there centrifuges spinning at a specific rate, were gasses allowed to "squeak" out? Did they plan this ahead of time, did they test it's singing functionality before its trip to Mars?