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 whiteNoiseGen = function(){ | |
var bufferSize = 4096; //Math.pow(2,13); //between 8 & 14 | |
//make this a global var so it isnt garbage collected | |
whiteNoise = context.createScriptProcessor(bufferSize, 0, 2); | |
whiteNoise.onaudioprocess = function(e) { | |
var outputBuffer = e.outputBuffer; | |
for (var channel = 0; channel < outputBuffer.numberOfChannels; channel++) { | |
var outputData = outputBuffer.getChannelData(channel); | |
for (var i = 0; i < bufferSize; i++) { |
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
/** | |
* this function will crop any given text to the size of the given target | |
* will crop in the middle | |
**/ | |
function cropMiddle(target, text) { | |
var input, | |
inputFontStyle, | |
ellipsisWidth, | |
maxWidth, |
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
{ | |
"auto_complete_commit_on_tab": true, | |
"auto_complete_delay": 300, | |
"caret_style": "phase", | |
"close_windows_when_empty": false, | |
"color_scheme": "Packages/Color Scheme - Default/Sunburst.tmTheme", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"file_exclude_patterns": | |
[ |