This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Ella Dagan, Olivia Cueva, Vinyata Pany | |
Feb 20, 2017 | |
Music Player, Tangible Interaction Workshop | |
To control p5.js music player sketch created by Tom Igoe | |
https://github.com/tigoe/p5js_examples/tree/master/musicPlayer | |
Sensors | |
- Toggle Switch | |
- Momentary Push Button |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Bamboo { | |
float x, y, t, h, grow, growSpeed, opacity; | |
color col; | |
float curT, curH; | |
ArrayList<Branch> branches; | |
float branchDirection; | |
Bamboo(float _x) { | |
this.x = _x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var song1; | |
var song2; | |
var song3; | |
var speedSlider1; | |
var volumeSlider1; | |
var speedSlider2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Declare a "SerialPort" object | |
var serial; | |
var song; | |
// Variable for size | |
var switchState = 0; | |
function preload() { | |
song = loadSound('assets/sade.mp3'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = 50; | |
function setup() { | |
createCanvas(windowWidth, windowHeight); | |
} | |
function draw() { | |
background('Lavender'); | |
fill(50,20,225,130); | |
triangle(30, 75, 58, 20, 86, 75); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var img; // create an image variable | |
var lineX = 124; // set X coordinate for lazer eyes | |
var lineY = 136; // set Y coordinate for lazer eyes | |
function preload (){ | |
img = loadImage ("images/jamika.png"); | |
} | |
function setup() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var triangleX = 500; | |
function setup() { | |
createCanvas(windowWidth, windowHeight); | |
background(200); | |
} | |
function draw() { | |
//triangle1 will be controlled by movement of mouse | |
fill(200, 0, 255, 20); | |
triangle (50, 25, mouseX, mouseY, 200, 200); |