EVR.Beam = function(
   container, color, width, height, range, alignment, size_relative)
{
   EVR.Graphic.call(
      this, container, RATIO_HEIGHT, range, alignment, size_relative);
   if (!!color && typeof(width) != "undefined")
   {
      this.set_color(color);
      height = height != null ? height : BEAM_HEIGHT_RATIO;
      this.set_proportions(width, height);
      this.append();
   }
}
EVR.Beam.prototype = new EVR.Graphic;
EVR.Beam.prototype.toString = function()
{
   return "[object EVR.Beam]";
}
EVR.Prompt = function(
   container, text, color, size, background, depth, alignment, offset, spacing,
   height)
{
   if (!!container)
   {
      alignment = alignment || ALIGN_CENTER;
      height = height || null;
      EVR.Graphic.call(this, container, null, null, alignment);
      this.set_proportions(1, height);
      if (!!offset)
      {
	 this.place(offset[0], offset[1]);
      }
      this.set_text(text, PROMPT_FONT, color, size);
      this.text.css.background = background || "";
      this.set_z(depth);
      this.css.letterSpacing = spacing || PROMPT_LETTER_SPACING;
   }
}
EVR.Prompt.prototype = new EVR.Graphic;
EVR.Prompt.prototype.toString = function()
{
   return "[object EVR.Prompt]";
}
EVR.include("emoticon/features/Features.js");
EVR.Emoticon = function(container, range, alignment)
{
   var alignment = alignment != null ? alignment : ALIGN_BOTTOM_LEFT;
   EVR.Graphic.call(this, container, RATIO_HEIGHT, range, alignment);
   this.set_color();
   this.set_proportions(1, BEAM_HEIGHT_RATIO);
   this.append();
   this.features = new EVR.Emoticon.Features(this);
   this.set_z(1);
   this.shift();
   this.element.style.overflow = "visible";
}
EVR.Emoticon.prototype = new EVR.Graphic;
EVR.Emoticon.prototype.draw = function()
{
   EVR.Graphic.prototype.draw.call(this);
   if (typeof(this.features) != "undefined")
   {
      this.features.draw();
   }
}
EVR.Emoticon.prototype.shift = function()
{
   var horizontal_offset = this.get_dimensions(true)[0] * 10;
//    var vertical_offset = this.container.ground.get_dimensions(true)[1];
   this.place(-horizontal_offset, 0);
}
EVR.Emoticon.prototype.set_color = function(color)
{
   color = !!color ? color : EMOTICON_COLOR;
   EVR.Graphic.prototype.set_color.call(this, color);
   if (!!this.features)
   {
      this.features.mask.set_color(color);
      this.features.guard.set_color(color);
   }
}
EVR.Emoticon.prototype.toString = function()
{
   return "[object EVR.Emoticon]";
}
EVR.include("emoticon/features/Mask.js");
EVR.include("emoticon/features/Guard.js");
EVR.Emoticon.Features = function(container)
{
   EVR.Graphic.call(this, container, null, null, ALIGN_CENTER);
   this.set_proportions();
   this.set_color(EMOTICON_FEATURE_COLOR);
   this.set_opacity(1);
   this.append();
   this.mask = new EVR.Emoticon.Features.Mask(this);
   this.guard = new EVR.Emoticon.Features.Guard(this);
}
EVR.Emoticon.Features.prototype = new EVR.Graphic;
EVR.Emoticon.Features.prototype.set_proportions = function()
{
   var ratio = 1 - EMOTICON_PADDING * 2;
   EVR.Graphic.prototype.set_proportions.call(this, ratio, ratio);
}
EVR.Emoticon.Features.prototype.shape = function()
{
   EVR.Graphic.prototype.shape.call(this);
   var width = this.get_dimensions()[0];
   var difference = this.container.get_dimensions()[0] - width;
   if (difference % 2)
   {
      this.set_dimensions(width - 1, width - 1);
   }
}
EVR.Emoticon.Features.prototype.draw = function()
{
   EVR.Graphic.prototype.draw.call(this);
   if (typeof(this.mask) != "undefined")
   {
      this.mask.draw();
      this.guard.draw();
   }
}
EVR.Emoticon.Features.prototype.toString = function()
{
   return "[object EVR.Emoticon.Features]";
}
EVR.Emoticon.Features.Mask = function(container)
{
   EVR.Graphic.call(this, container, null, null, ALIGN_TOP);
   this.set_color(EMOTICON_COLOR);
   this.set_proportions();
   this.append();
}
EVR.Emoticon.Features.Mask.prototype = new EVR.Graphic;
EVR.Emoticon.Features.Mask.prototype.shape = function()
{
   EVR.Graphic.prototype.shape.call(this);
   var dimensions = this.get_dimensions();
   var relative = this.container.get_dimensions();
   var difference = relative[0] - dimensions[0];
   if (difference % 2)
   {
      this.set_dimensions(dimensions[0] - 1);
   }
   if (relative[1] && relative[1] <= dimensions[1])
   {
      this.set_dimensions(null, relative[1] - 1);
   }
}
EVR.Emoticon.Features.Mask.prototype.set_proportions = function()
{
   var width_ratio = 1 - EMOTICON_FEATURES_WIDTH * 2;
   var height_ratio = 1 - EMOTICON_FEATURES_HEIGHT;
   EVR.Graphic.prototype.set_proportions.call(this, width_ratio, height_ratio);
}
EVR.Emoticon.Features.Mask.prototype.toString = function()
{
   return "[object EVR.Emoticon.Features.Mask]";
}
EVR.Emoticon.Features.Guard = function(container)
{
   EVR.Graphic.call(this, container, null, null, ALIGN_CENTER);
   this.set_proportions(1, EMOTICON_FEATURES_MARGIN);
   this.set_color(EMOTICON_COLOR);
   this.element.style.overflow = "hidden";
   this.append();
}
EVR.Emoticon.Features.Guard.prototype = new EVR.Graphic;
EVR.Emoticon.Features.Guard.prototype.toString = function()
{
   return "[object EVR.Emoticon.Features.Guard]";
}
EVR.History.Parser = function(document)
{
   this.document = document;
   this.records = [];
   this.parse();
}
EVR.History.Parser.prototype.parse = function()
{
   var fields = this.document.split(/[\ \n]/);
   var entry = [];
   for (var ii = 0; ii < fields.length; ii++)
   {
      entry.push(fields[ii]);
      if (entry.length == 3)
      {
	 this.add_record(entry);
	 entry = [];
      }
   }
}
EVR.History.Parser.prototype.add_record = function(fields)
{
   var record = new EVR.History.Record();
   EVR.History.Record.apply(record, fields);
   this.records.push(record);
}   
EVR.History.Parser.prototype.toString = function()
{
   return "[object EVR.History.Parser]";
}
35.170.81.33
35.170.81.33
35.170.81.33
 
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.