No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with
7 additions and
0 deletions
-
vocoder/static/vocoder.js
|
|
@ -12,6 +12,7 @@ var archiveUrl = serverUrl + '/add-to-archive/'; |
|
|
|
|
|
|
|
var mic, recorder, soundFile; |
|
|
|
var recordingTimeout = 30000; // 30 seconds (in milliseconds)
|
|
|
|
var shouldGenerateNewShape = false; |
|
|
|
|
|
|
|
function setupRecording(){ |
|
|
|
mic = new p5.AudioIn(); |
|
|
@ -31,6 +32,7 @@ function setupRecording(){ |
|
|
|
function doStopping(){ |
|
|
|
if (recorder.recording) { |
|
|
|
recorder.stop(); |
|
|
|
shouldGenerateNewShape = true; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
@ -100,4 +102,9 @@ function setup(){ |
|
|
|
} |
|
|
|
|
|
|
|
function draw(){ |
|
|
|
if (shouldGenerateNewShape){ |
|
|
|
collectSoundParamters(); |
|
|
|
generateShape(); |
|
|
|
shouldGenerateNewShape = false; |
|
|
|
} |
|
|
|
} |
|
|
|