home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / MBUG / MBUG013.ARC / DANUBE.PAS < prev    next >
Pascal/Delphi Source File  |  1979-12-31  |  2KB  |  49 lines

  1. program DANUBE;
  2.  
  3. { Demonstration program developed in Turbo Pascal
  4.        for the MicroBee by Bob Burt
  5.  
  6.   This play  routine  simulates the PLAY command
  7.   in  MicroWorld BASIC.  However, the note range
  8.   is extended beyond the 1 to 24 available there
  9.  
  10.   Values for  notes  can be  between -11 (A) and
  11.   +48 (G#) and rather further if required.  This
  12.   is at least a 5 octave range.   Note that  the
  13.   note  value of  0  does not give a 'rest', but
  14.   the G# immediately below the A sounded for the
  15.   value 1.  A delay  is  invoked  by  using  the
  16.       Turbo Pascal intrinsic 'delay(n)'.          }
  17.  
  18. const
  19.   space23 = '                       ';
  20.   title = '*** The Blue Danube ***';
  21.  
  22. {$I sound.pro}
  23. {$I play.pro}
  24.  
  25. begin {main}
  26.   clrscr;
  27.   writeln(space23,title);
  28.   play(4,1); play(8,1); play(11,1); play(11,2); delay(200);
  29.   play(23,1); play(23,2); delay(200); play(20,1); play(20,3); delay(300);
  30.   play(4,1); play(4,1); play(8,1); play(11,1); play(11,2); delay(200);
  31.   play(23,1); play(23,2); delay(200); play(21,1); play(21,3); delay(200);
  32.   play(3,1); play(3,1); play(6,1); play(13,1); play(13,2); delay(200);
  33.   play(25,1); play(25,2); delay(200); play(21,1); play(21,3); delay(200);
  34.   play(3,1); play(3,1); play(6,1); play(13,1); play(13,2); delay(200);
  35.   play(25,1); play(25,2); delay(200); play(20,1); play(20,3); delay(200);
  36.   play(4,1); play(4,1); play(8,1); play(11,1); play(16,3); delay(200);
  37.   play(28,1); play(28,2); delay(200); play(23,1); play(23,3); delay(200);
  38.   play(4,1); play(4,1); play(8,1); play(11,1); play(16,3); delay(200);
  39.   play(28,1); play(28,2); delay(200); play(25,1); play(25,3); delay(200);
  40.   play(6,1); play(6,1); play(9,1); play(13,1); play(13,4); delay(200);
  41.   play(10,1); play(11,1); play(20,4); delay(100);
  42.   play(16,1); play(8,1); play(8,4); play(6,1); delay(100);
  43.   play(13,3); play(11,1); play(4,2); play(16,1); play(16,1);
  44.   delay(50); play(16,4)
  45. end. {main}
  46.  
  47.  
  48.  
  49.