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
# Convert any YouTube video into an audio file you can listen to on the go, using: | |
# http://rg3.github.com/youtube-dl/ | |
{ ~ } > brew install ffmpeg | |
{ ~ } > wget https://raw.github.com/rg3/youtube-dl/2012.02.27/youtube-dl | |
{ ~ } > chmod u+x youtube-dl | |
# Pick which video format you want to download.. (use any YT video link) | |
{ ~ } > ./youtube-dl -s -F http://www.youtube.com/watch?v=vT1KmTQ-1Os |
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
/* | |
Javascript port of CubicVR 3D engine for WebGL | |
by Charles J. Cliffe | |
http://www.cubicvr.org/ | |
May be used under the terms of LGPL v3.0 or greater. | |
*/ | |
var CubicVR = null; | |
var CubicVR_GLCore = new Object(); |
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
p.FFT = function(_bufferSize) { | |
var bufferSize = _bufferSize; | |
var self = { | |
initialize: function() { | |
self.buildReverseTable(); | |
self.buildTrigTables(); | |
return self; | |
} | |
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
var FFT = function(_bufferSize) { | |
var bufferSize = _bufferSize; | |
var self = { | |
// constructor | |
initialize: function(){ | |
self.reverseTable = self.buildReverseTable(); | |
return self; | |
}, |
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
var calculateFFT = function(real, imag) { | |
var bufferSize = real.length; | |
if ( bufferSize == 1 ) { | |
return [[real[0], imag[0]]]; | |
} | |
if(bufferSize % 2 != 0) throw "Invalid buffer size, length must be an even number"; | |
var even_real = []; |