This file contains hidden or 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
# Returns a reversed copy of the supplied sample buffer | |
reverse = (buffer) -> | |
data = buffer.getChannelData 0 | |
ret = audioContext.createBuffer 1, data.length, 44100 | |
retData = ret.getChannelData 0 | |
i = 0 | |
j = data.length | |
retData[i++] = data[j] while j-- | |
ret |
This file contains hidden or 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
/* | |
* Midikeys.js | |
* > Turn your keyboard into a midi keyboard, compatible with the Web MIDI API. | |
* Copyright 2012 Nick Thompson | |
* MIT License | |
* https://gist.github.com/3995530 | |
*/ | |
(function (window, document, undefined) { | |
// Keycode to MIDI note values |
This file contains hidden or 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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>ANSIBlackColor</key> | |
<data> | |
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS | |
AAGGoKMHCA9VJG51bGzTCQoLDA0OViRjbGFzc1xOU0NvbG9yU3BhY2VVTlNSR0KAAhAC | |
TxAnMC4xNTI5NDExODIzIDAuMTU2ODYyNzUwNiAwLjEzMzMzMzM0MDMA0hAREhNaJGNs | |
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp |
This file contains hidden or 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 context = new webkitAudioContext() | |
, source = context.createOscillator() | |
, through = context.createScriptProcessor(1024, 1, 1) | |
, count = 0; | |
// The most basic of ScriptProcessing functions, copying the input buffer | |
// directly into the output buffer. | |
through.onaudioprocess = function (e) { | |
var input = e.inputBuffer.getChannelData(0) | |
, output = e.outputBuffer.getChannelData(0); |
This file contains hidden or 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
/*! | |
* Metronome.js | |
* | |
* A reliable metronome using HTML5 Web Workers to maintain the tick | |
* interval even when the parent thread is run in the background. | |
* | |
* For details, see: | |
* http://pivotallabs.com/chrome-and-firefox-throttle-settimeout-setinterval-in-inactive-tabs/ | |
* |
This file contains hidden or 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
/** | |
* A cool trick for making a transparent background image | |
* using only pseudo-elements. | |
*/ | |
body:after { | |
content: "", | |
background: url(/path/to/your/sweet/image.png) no-repeat center center fixed; | |
background-size: cover; |
This file contains hidden or 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 context = new webkitAudioContext() | |
, node = context.createOscillator() | |
, Overdrive = require("wa-overdrive") | |
, overdrive = new Overdrive(context, { | |
preBand: 1.0, | |
color: 4000, | |
drive: 0.8, | |
postCut: 8000 | |
}); |
This file contains hidden or 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
bootstrap: | |
@curl -X POST -H 'Content-Type: application/json' -d @bootstrap.json \ | |
https://nick-thompson.cloudant.com/_replicate | |
update: | |
@./scripts/update.js | |
This file contains hidden or 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
// New version | |
async.parallel([ | |
stores[BY_SEQ_STORE].put.bind(null, formatSeq(doc.metadata.seq, doc.data), | |
stores[DOC_STORE].put.bind(null, doc.metadata.id, doc.metadata) | |
], function(err) { | |
results.push(doc); | |
return saveUpdateSeq(callback2); | |
}); | |
// Old version |
This file contains hidden or 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
license: gpl-3.0 |
OlderNewer