Skip to content

Instantly share code, notes, and snippets.

View slambert's full-sized avatar

Steve Lambert slambert

View GitHub Profile
@slambert
slambert / Mathilde no echo.pde
Last active October 27, 2015 16:01
Sample from class of getting sounds to not echo with flags
int x = 0;
int speed = 5;
PImage img; //this is the name of the pictures in this file
PImage img1;
PImage img2;
PImage img3;
PImage img4;
PImage img5;
PImage bg;
@slambert
slambert / basic sketch with states.pde
Created October 27, 2015 16:04
This one works with keypressed states
/* A sketch that has states
Steve Lambert October 27, 2015
v.01
Note: Add your own images
*/
int state;
@slambert
slambert / slideshow and states combined.pde
Created October 27, 2015 16:08
example that combines the two earlier examples
/* A sketch that has states and a timebased slideshow
Steve Lambert October 27, 2015
v.01
Note: insert your own images to make it work.
*/
float time;
float currentTime;
@slambert
slambert / alex-spot-sketch.pde
Created November 4, 2015 20:54
Alex's spot sketch, modified as we did in class.
// Alex's spot sketch.
// It could use more comments.
// Steve Lambert 2015-11-02
Spot[] spots; // Declare array
float gravity = 0.005;
float r;
float g;
@slambert
slambert / Griffen_Knob_sample.pde
Created November 25, 2015 16:28
sample tone generator, with Griffen Tech knob (or whatever)
/*
This is a sample sketch I made to work with the Griffen Tech knob.
You can alter it to use any input.
The sounds are all generated with the sine wave generator in Processing.
Steve Lambert November 24, 2015
*/
float sineFreq = 440;
float sineFreqPast = 440;
float sineAmp = 1;
@slambert
slambert / sound samplerate tweaker.pde
Created November 25, 2015 16:33
Changes speed of a sound file up to 3 times forward or backward
/*
Changes speed of a sound file up to 3 times forward or backward
use with an analog input.
Remember to add youw own sound file
Reconfigure to use whatever analog input you like
Steve Lambert November 24, 2015
*/
// Variables
float knobPos = 500;
@slambert
slambert / tiger_game_controller_w_saw_wave.pde
Created November 25, 2015 16:40
update of the game controller sketch from last week, with a tone generator in it. Use the data folder from the other one...
// Game Controller Example
// Steve Lambert around November 24, 2015
// import libraries
import net.java.games.input.*;
import org.gamecontrolplus.*;
import org.gamecontrolplus.gui.*;
import processing.sound.*;
// sine osc
@slambert
slambert / facedetection.pde
Created December 1, 2015 15:13
Face Detection for Erinn - only works with Processing 2
import gab.opencv.*; //Loads OpenCV library
import processing.video.*; // Loads video library (Capture, playback)
import java.awt.*; //Loads Java library
Capture video; // Creates a new Video/Capture Object
OpenCV opencv; // Creates a new OpenCV Object
void setup() {
size(640, 480);
video = new Capture(this, 640/2, 480/2);

Keybase proof

I hereby claim:

  • I am slambert on github.
  • I am stevelambert (https://keybase.io/stevelambert) on keybase.
  • I have a public key ASBVJPsbro8cxigN8nuHW0zEjbjG_sVdjEI-MCRLxlo6Cgo

To claim this, I am signing this object:

@slambert
slambert / class-example-2018-01-31.pde
Last active February 1, 2018 15:33
Demo of println and ellipse
// Demo of println and ellipse v0.1
// Steve Lambert January 31, 2018
/* Todo:
*/
void setup() {
size(200,200);
background(0,255,0); // green
println("hi, the program started");