This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- from http://www.p01.org/releases/20_lines_twinkle/ --> | |
<canvas id="tunnel" width="640" height="480"></canvas> | |
<script type="text/javascript"> | |
var WIDTH = 640; | |
var HEIGHT = 480; | |
var CENTER_X = WIDTH / 2; | |
var CENTER_Y = HEIGHT / 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: main/src/com/noteflight/standingwave2/output/AudioSampleHandler.as | |
=================================================================== | |
--- main/src/com/noteflight/standingwave2/output/AudioSampleHandler.as (revision 25) | |
+++ main/src/com/noteflight/standingwave2/output/AudioSampleHandler.as (working copy) | |
@@ -115,6 +115,7 @@ | |
var endFrame:Number; | |
var sample:Sample; | |
var length:Number; | |
+ var sampleLength:Number; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> | |
<mx:Panel title="SoundTouch Demo" width="100%" paddingTop="10" paddingRight="10" paddingBottom="10" paddingLeft="10"> | |
<mx:HBox paddingBottom="10"> | |
<mx:Button id="browseButton" label="Open an MP3…" click="chooseFile();"/> | |
</mx:HBox> | |
<mx:VBox width="100%"> | |
<mx:Label text="Tempo"/> | |
<mx:HSlider id="tempoSlider" minimum="0.01" maximum="1.99" value="1" snapInterval="0.01" liveDragging="false" change="updateFilter();" width="100%"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Calling Sound.play() after calling SoundChannel.stop() will begin playing | |
// with an empty buffer. | |
package { | |
import flash.display.Sprite; | |
import flash.events.SampleDataEvent; | |
import flash.external.ExternalInterface; | |
import flash.media.Sound; | |
import flash.media.SoundChannel; | |
import flash.utils.setTimeout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ported from http://amix.dk/blog/viewEntry/19367 | |
require 'digest/md5' | |
class ConsistentHash | |
def initialize(nodes=nil, replicas=100) | |
# Manages a hash ring. | |
# `nodes` is a list of objects that have a proper string representation. | |
# `replicas` indicates how many virtual points should be used per node, |
NewerOlder