Пример. Мелодия
program Melody;
uses crt;
const p = 50 ; { Можно изменить скорость мелодии }
Procedure Beep (note, time : integer);
begin
If note > 0
Then Sound (note);
Delay (time*p);
NoSound;
end;
begin
Beep(330,2); Beep(439,2); Beep(414,2); Beep(439,2);
Beep(493,2); Beep(439,2); Beep(391,2); Beep(439,2);
Beep(391,4); Beep(349,4); Beep(348,6); Beep(0,2);
Beep(293,2); Beep(391,2); Beep(369,2); Beep(391,2);
Beep(439,2); Beep(391,2); Beep(293,2); Beep(348,2);
Beep(329,6); Beep(0,6);
Beep(329,2); Beep(439,2); Beep(414,2); Beep(439,2);
Beep(493,2); Beep(439,2); Beep(391,2); Beep(348,2);
Beep(329,4); Beep(293,4); Beep(439,6); Beep(0,2);
Beep(329,2); Beep(523,2); Beep(493,2); Beep(439,2);
Beep(414,2); Beep(439,2); Beep(493,2); Beep(414,2);
Beep(439,6); Beep(0,6);
end.
from winsound import *
Beep(330, 200); Beep(439, 200); Beep(414, 200); Beep(439, 200);
Beep(493, 200); Beep(439, 200); Beep(391, 200); Beep(439, 200);
Beep(391, 400); Beep(349, 400); Beep(348, 600); Beep(32767, 200);
Beep(293, 200); Beep(391, 200); Beep(369, 200); Beep(391, 200);
Beep(439, 200); Beep(391, 200); Beep(293, 200); Beep(348, 200);
Beep(329, 600); Beep(32767, 600);
Beep(329, 200); Beep(439, 200); Beep(414, 200); Beep(439, 200);
Beep(493, 200); Beep(439, 200); Beep(391, 200); Beep(348, 200);
Beep(329, 400); Beep(293, 400); Beep(439, 600); Beep(32767, 200);
Beep(329, 200); Beep(523, 200); Beep(493, 200); Beep(439, 200);
Beep(414, 200); Beep(439, 200); Beep(493, 200); Beep(414, 200);
Beep(439, 600); Beep(32767, 600);
Эд, ну так допиши. =)