We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello,
I am trying to create an audio visualizer and I need to have drag and drop functionality in my program. I've watched Daniel Shiffman's tutorial on drag and drop but I can't seem to figure out how to turn the file.data
into a p5.SoundFile
.
Thanks!
function newSong (file) {
button.class('btn btn-warning'); button.html("Play");
if (file.type != "audio") { showAlert("danger","Invalid File Type! Supported formats are mp3 and m4a.");
} else { showAlert("info","Loading sound file " + file.name + ". Please wait."); song.pause(); button.addClass("disabled"); playAllowed = false; song = file.data;
} }
Answers
https://forum.Processing.org/two/discussions/tagged?Tag=drop()
Solved.