<?php
require_once "../account/get_user_path.php";
$GLOBALS["FILE_NAME"] = "expert";
print_expert_list();
function print_expert_list()
{
   $path = account\get_user_path() . $GLOBALS["FILE_NAME"];
   echo file_get_contents($path);
}
<?php
require_once "../account/get_user_path.php";
$GLOBALS["ALBUM_PATH"] = "../../../../../img/album/";
$GLOBALS["PROGRESS_FILE_NAME"] = "progress";
print_file_names();
function print_file_names()
{
   $progress = get_progress();
   $ii = 0;
   foreach (scandir($GLOBALS["ALBUM_PATH"]) as $file_name)
   {
      if ($file_name[0] != ".")
      {
         echo "$file_name\n";
         $ii++;
      }
      if ($ii >= $progress)
      {
         break;
      }
   }
}
function get_progress()
{
   $path = account\get_user_path() . $GLOBALS["PROGRESS_FILE_NAME"];
   return file_get_contents($path, FILE_IGNORE_NEW_LINES);
}
EVR.include("album/Menu.js");
EVR.include("album/grid/Grid.js");
EVR.include("album/Page.js");
EVR.include("album/Availability.js");
EVR.Album = function(container)
{
   EVR.Graphic.call(this, container, null, null, ALIGN_CENTER);
   this.set_attributes();
   this.index = 0;
   this.initialize_pages();
   this.add_pages();
   this.availability = new EVR.Album.Availability();
   this.menu = new EVR.Album.Menu(this);
   this.grid = new EVR.Album.Grid(this.element);
}
EVR.Album.prototype = new EVR.Graphic;
EVR.Album.prototype.set_attributes = function()
{
   this.set_color(ALBUM_BACKGROUND);
   this.set_z(ALBUM_Z_INDEX);
}
EVR.Album.prototype.shape = function()
{
   this.css.width = "100%";
   this.css.height = "100%";
}
EVR.Album.prototype.initialize_pages = function()
{
   this.pages = [];
}
EVR.Album.prototype.add_pages = function()
{
   var pages = this.pages;
   var container = this.container;
   var script = SOURCE_PATH + "album/list_image_paths.php";
   var paths = new EVR.Requester(script, null, true).execute().split("\n");
   for (var ii = pages.length; ii < paths.length - 1; ii++)
   {
      pages.push(new EVR.Album.Page(paths[ii], this.element));
   }
}
EVR.Album.prototype.refresh = function(index)
{
   var grid = this.grid;
   if (grid.visible && !this.grid_available())
   {
      grid.toggle();
   }
   this.add_pages();
   if (index != null)
   {
      this.index = index;
   }
   this.pages[this.index].show();
   this.menu.update();
}
EVR.Album.prototype.grid_available = function()
{
   var level = this.index + 1;
   return this.availability.is_available(level);
}
EVR.Album.prototype.next = function()
{
   this.pages[this.index].hide();
   this.increment_index();
   this.refresh();
}
EVR.Album.prototype.increment_index = function()
{
   var index = this.index;
   index++;
   if (index >= this.pages.length)
   {
      index = 0;
   }
   this.index = index;
}
EVR.Album.prototype.previous = function()
{
   this.pages[this.index].hide();
   this.decrement_index();
   this.refresh();
}
EVR.Album.prototype.decrement_index = function()
{
   var index = this.index;
   index--;
   if (index < 0)
   {
      index = this.pages.length - 1;
   }
   this.index = index;
}
EVR.Album.prototype.toggle_menu = function()
{
   this.menu.toggle();
}
EVR.Album.prototype.count = function()
{
   return this.pages.length;
}
EVR.Album.prototype.toggle_grid = function()
{
   if (this.grid_available())
   {
      this.grid.toggle();
   }
}
EVR.Album.prototype.append = function(index)
{
   this.availability.update();
   this.refresh(index);
   EVR.Graphic.prototype.append.call(this);
}
EVR.Album.prototype.remove = function()
{
   this.hide_children();
   EVR.Graphic.prototype.remove.call(this);
}
EVR.Album.prototype.hide_children = function()
{
   var menu = this.menu;
   var grid = this.grid;
   this.pages[this.index].hide();
   menu.visible && menu.hide();
   grid.visible && grid.hide();
}
EVR.Album.prototype.toString = function()
{
   return "[object EVR.Album]";
}
EVR.Album.Availability = function()
{
   this.build_list();
}
EVR.Album.Availability.prototype.build_list = function()
{
   var script = SOURCE_PATH + "album/fetch_expert_list.php";
   this.list = new EVR.Requester(script, null, true).execute().split(" ");
}
EVR.Album.Availability.prototype.update = function()
{
   this.build_list();
}
EVR.Album.Availability.prototype.is_available = function(level)
{
   var list = this.list;
   for (var ii = 0; ii < list.length; ii++)
   {
      if (list[ii] == level)
      {
	 return true;
      }
   }
   return false;
}
EVR.Album.Availability.prototype.toString = function()
{
   return "[object EVR.Album.Availability]";
}
216.73.216.13
216.73.216.13
216.73.216.13
 
September 13, 2013

from array import array
from time import sleep

import pygame
from pygame.mixer import Sound, get_init, pre_init

class Note(Sound):

    def __init__(self, frequency, volume=.1):
        self.frequency = frequency
        Sound.__init__(self, self.build_samples())
        self.set_volume(volume)

    def build_samples(self):
        period = int(round(get_init()[0] / self.frequency))
        samples = array("h", [0] * period)
        amplitude = 2 ** (abs(get_init()[1]) - 1) - 1
        for time in xrange(period):
            if time < period / 2:
                samples[time] = amplitude
            else:
                samples[time] = -amplitude
        return samples

if __name__ == "__main__":
    pre_init(44100, -16, 1, 1024)
    pygame.init()
    Note(440).play(-1)
    sleep(5)

This program generates and plays a 440 Hz tone for 5 seconds. It can be extended to generate the spectrum of notes with a frequency table or the frequency formula. Because the rewards in Send are idealized ocean waves, they can also be represented as tones. Each level has a tone in its goal and a tone based on where the player's disc lands. Both play at the end of a level, sounding harmonic for a close shot and discordant for a near miss. The game can dynamically create these tones using the program as a basis.

I'm also building an algorithmically generated song: Silk Routes (Scissored). Here is an example of how it sounds so far.