program Tonikus;
uses    crt;
var     ist,war:char;
        oldline:byte;
begin
  clrscr;
  writeln(^j^m,
'Tonikus. Version 1.3 (c) 1995-97 by Timo Baumman, alle Rechte vorbehalten'^j^j^m,
'Die untere Tastenreihe von ''y'' bis '','' verk”rpert die T”ne von c bis C; die ent-',
'sprechenden Tasten mit der Umschalttaste gedrckt erh”hen den Ton um eine Oktave',
'auf den Tasten ''sdghj'' liegen cis, dis, fis, gis, ais/b.'^j^m,
'Ende mit <Esc>.    Beispiel mit <!>.'^j^m);
  oldline:=wherey;
  repeat
    ist:=readkey;
    if war=ist then begin
      nosound;
      delay(30)
    end;
{$IFDEF english}
    if ((war=',')and(ist='Z'))or((war='Z')and(ist=','))then begin
{$ELSE}
    if ((war=',')and(ist='Y'))or((war='Y')and(ist=','))then begin
{$ENDIF}
      nosound;
      delay(30)
    end;
    case ist of
{$IFDEF english}
{c}   'z':begin sound(262);  write('c ')     end;
{$ELSE}
{c}   'y':begin sound(262);  write('c ')     end;
{$ENDIF}
{cis} 's':begin sound(279);  write('cis ')   end;
{d}   'x':begin sound(294);  write('d ')     end;
{dis} 'd':begin sound(310);  write('dis ')   end;
{e}   'c':begin sound(330);  write('e ')     end;
{f}   'v':begin sound(349);  write('f ')     end;
{fis} 'g':begin sound(368);  write('fis ')   end;
{g}   'b':begin sound(392);  write('g ')     end;
{gis} 'h':begin sound(413);  write('gis ')   end;
{a}   'n':begin sound(440);  write('a ')     end;
{b}   'j':begin sound(464);  write('ais/b ') end;
{h}   'm':begin sound(494);  write('h ')     end;
{$IFDEF english}                                 {
c}',','Z':begin sound(524);  write('C ')     end;
{$ELSE}                                          {
c}',','Y':begin sound(524);  write('C ')     end;
{$ENDIF}
{cis} 'S':begin sound(552);  write('Cis ')   end;
{d}   'X':begin sound(588);  write('D ')     end;
{dis} 'D':begin sound(619);  write('Dis ')   end;
{e}   'C':begin sound(660);  write('E ')     end;
{f}   'V':begin sound(698);  write('F ')     end;
{fis} 'G':begin sound(735);  write('Fis ')   end;
{g}   'B':begin sound(784);  write('G ')     end;
{gis} 'H':begin sound(826);  write('Gis ')   end;
{a}   'N':begin sound(880);  write('A ')     end;
{b}   'J':begin sound(927);  write('Ais/B ') end;
{h}   'M':begin sound(988);  write('H ')     end;
{$IFDEF english}                                 {
{c}   '<':begin sound(1048); write('C'' ')   end;
{$ELSE}                                          {
{c}   ';':begin sound(1048); write('C'' ')   end;
{$ENDIF}
{help}'!':writeln(^j^m'Fr ''Alle meine Entchen'' geben sie ''yxc vbb nnn nbn nnn bvv vvc cbb bby'' ein.');
{clr} #13:begin
            gotoxy(1,oldline);
            write(' ':1359);
            gotoxy(1,oldline);
            nosound
          end
     else nosound
    end;
    war:=ist
  until ist=#27;
  nosound
end.