Please contact me for a transaction. Claudia.
Oh, hello.
// scale a value in range [f0,f1] to fit in [t0,t1] | |
scale = function( val, f0, f1, t0, t1 ){ | |
return (val - f0) * (t1 - t0) / (f1 - f0) + t0; | |
}; |
// assuming you have an AudioBuffer instance called `buffer`, | |
// and an AudioContext (or OfflineAudioContext) called `ctx`... | |
// create a new Worker... | |
var worker = new Worker('recorderWorker.js'); | |
// get it started and send some config data... | |
worker.postMessage({ | |
command: 'init', |
document.body.style.textTransform = 'lowercase'; |
var ctx = new webkitAudioContext(); | |
navigator.webkitGetUserMedia({audio: true}, success, err); | |
function success( stream ) { | |
var src = ctx.createMediaStreamSource(stream); | |
src.connect(ctx.destination); | |
} | |
function err( e ) { |
function Pluck( ctx ) { | |
this.sr = ctx.sampleRate; | |
this.pro = ctx.createScriptProcessor( 512, 0, 1 ); | |
this.pro.connect( ctx.destination ); | |
} | |
Pluck.prototype.play = function( freq ) { | |
var N = Math.round( this.sr / freq ), | |
impulse = this.sr / 1000, | |
y = new Float32Array( N ), |
// see http://jsbin.com/okoxiq/3/edit | |
var src | |
, fftSize = 1024 | |
, audio = new Audio() | |
, ac = new webkitAudioContext() | |
, analyser = ac.createAnalyser() | |
, timeData = new Uint8Array(fftSize) | |
, bar = document.querySelector('.bar') | |
, url = 'http://static1.kevincennis.com/sounds/callmemaybe.mp3'; |
var thirtymins = 1000 * 60 * 30, | |
advanced = 0; | |
Date.now = (function(){ | |
var func = Date.now; | |
return function(){ | |
return func() + advanced; | |
} | |
}()); |
var audio = new window.webkitAudioContext(), | |
position = 0, | |
scale = { | |
g: 392, | |
f: 349.23, | |
e: 329.63, | |
b: 493.88 | |
}, | |
song = "gfefgg-fff-gbb-gfefggggffgfe---"; |
@media print { | |
body * { | |
display: none !important; | |
} | |
body:after { | |
content: 'Seriously? A printer?'; | |
} | |
} |