Working with video and sound.
These are two of my favorite topics, and I have a lot of ideas but what I would like to make happen ideally, but need to catch up on my code. Today I am focusing on loading a few sound files or using MIDI and making the sounds change based on where objects are on the screen, and animate somehow, also would like to incorporate mousePressed and to drag them around the screen as well as to add and delete images if possible to "collage" with them...
First I will start with getting some simple elements to work! I used an example from p5js.org (here) to create a simple oscillator, playing w/ the parameters:
(Ack! Now I am getting a message that p5.TriOsc is not a constructor. Will have to troubleshoot...)
Here is another try... http://alpha.editor.p5js.org/full/B1JW5MEA-
And the source code:
Now it works! But I'm honestly not sure what changed, if anything.
I wanted to work with a live video capture, but for some reason I could not get the "video = createCapture(VIDEO);" code to work on my own web editor. It worked when I went to the example, but then it didn't work when I duplicated it. I will try to figure this out before class, and hopefully come up with some kind of hybrid of what I imagined and an experiment that helps to learn the principles...Maybe just a few buttons that change the sound, or at least some other interactivity with the sound if not video. I imagine some kind of audio/visual palette where you can just move things around and create a scene and an audio composition with loops overlaid, but I'm getting there with baby steps.
Note: for using the web cam I needed to have the "HTTPS://" box enabled at the top of the sketch...