from PlayTune by Alan Tan
This function plays musical tunes. Write your own musical tune and call the function to play it.

canon_in_d.m
str = '2^^DC#D_F#AA4^C#2DD4F#A2ABGF#EGF#EDC#_BA^D_F#E^1C#D4C#2DC#D_F#4A^C#DF#A2ABGF#EGF#EDC#_BA^D_F#E^1C#D4C#2D1F#G2A1F#GA_AB^C#DEF#G2F#1DE2F#1_F#GABAGAF#GA2^D_1BA2G1F#EF#EDEF#GAB^2D1_BA2B1^EDC#_B^C#DEF#GE';
playtune(str);

Contact us at files@mathworks.com