Advertisement
nezzario

Computer Noise

Jan 31st, 2015
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. <?php
  2.     /* A.B. Carroll ben@hl9.net */
  3.     /* I don't know what I'm doing, but try this. */
  4.  
  5.     function beep($frequency, $duration) {
  6.         shell_exec("beep -f $frequency -l $duration");
  7.     }
  8.     beep(440, 100);
  9.     for($x = 1; $x <= 50; $x++) {
  10.         if( ($x % 3) == 0) {
  11.             continue;
  12.         }      
  13.         $y = $x % 4;
  14.         $y = $y * 440;
  15.         echo " > $y\n";
  16.         $z = floor($x / 16);
  17.         $y = $y + ($z * 220);
  18.         beep($y, 100);
  19.      }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement