Start to collect parameters and wire up shape generation
This commit is contained in:
parent
ed44d61f51
commit
53c19dda03
@ -11,10 +11,7 @@ var serverUrl = 'http://localhost:5000';
|
||||
var archiveUrl = serverUrl + '/add-to-archive/';
|
||||
|
||||
var mic, recorder, soundFile;
|
||||
var state = 0;
|
||||
|
||||
// 30 seconds (in milliseconds)
|
||||
var recordingTimeout = 30000;
|
||||
var recordingTimeout = 30000; // 30 seconds (in milliseconds)
|
||||
|
||||
function setupRecording(){
|
||||
mic = new p5.AudioIn();
|
||||
@ -76,6 +73,24 @@ function setupRecording(){
|
||||
playButton.mousePressed(doArchiving);
|
||||
}
|
||||
|
||||
function collectSoundParamters(){
|
||||
// TODO: collect all the sound parameters
|
||||
// [x] amplitude
|
||||
// [x] length of sound
|
||||
// [ ] pitch
|
||||
// [ ] nuance
|
||||
// btw, there is no "nuance" function for p5js. My current guess is to
|
||||
// perhaps measure it from the "getPeaks". For all wave peaks measured,
|
||||
// ??? (need to think this through, not really sure ...)
|
||||
amplitude = soundFile.getPeaks();
|
||||
duration = soundFile.duration();
|
||||
}
|
||||
|
||||
function generateShape(){
|
||||
// TODO: take in sound parameters and generate a shape
|
||||
ellipse(100, 100, 25, 25);
|
||||
}
|
||||
|
||||
function setup(){
|
||||
// TODO: Replace this with the leaflet/mappa setup just
|
||||
// using this for now to draw something to experiment on
|
||||
|
Loading…
Reference in New Issue
Block a user