Skip to content

Instantly share code, notes, and snippets.

@gregtemp
gregtemp / something.pde
Created April 11, 2016 23:49
lines moving around
int scene = 0;
void setup () {
//size (1280, 720);
size (displayWidth, displayHeight);
smooth();
noCursor();
}
/// press y,p, or r to send test midi for that controller#
/// 1 turns sendMidi off, 2 sends it on
import processing.serial.*;
import themidibus.*;
Serial port;
MidiBus myBus; // The MidiBus
import processing.serial.*;
import ddf.minim.analysis.*;
import ddf.minim.*;
Minim minim;
AudioInput in;
FFT fft;
Serial myPort; // Create object from Serial class
int val; // Data received from the serial port
/// press wasd to assign midi controller# --- note: not linked to the appropriate direction yet.
/// 1 turns sendMidi off, 2 sends it on
// may need to tweak midi so that you can still get to 127 in both axis' when you tilt in two directions at once.
import processing.serial.*;
import themidibus.*;
Serial port;
/// the only thing I changed was the formating for the serial output. instead of tab separated, the vals are
/// separated by preceeding each value with the letter for what it is y for yaw, etc.
/// other than that, this is the exact example from the mpu6050 lib
// the more important file is below
@gregtemp
gregtemp / MagicMidiTrackpad.pd
Created April 8, 2015 18:15
A little sketch that allows you to use the trackpad on a mac as a midi controller. Turn on "Enable mouse keys w/ option/alt key". Press left alt key 5 times to switch between using trackpad as mouse or midi controller. Messages on the right are used to map x and y separately.
#N canvas 320 145 457 391 10;
#X declare -lib sfruit;
#X obj 39 81 multitouch;
#X obj 39 41 tgl 15 0 empty empty empty 0 -6 0 10 -204786 -1 -1 0 1
;
#X obj 39 60 metro 20;
#X obj 39 295 print;
#X obj 39 103 unpack 0 0 0 0 0 0 0;
#X obj 39 129 + 120;
#X obj 84 128 * 127;
@gregtemp
gregtemp / Spectrogram.pde
Created December 2, 2014 00:33
Stereo Spectrogram
// Stereo Spectrogram //
// - gregtemp - //
import ddf.minim.analysis.*;
import ddf.minim.*;
Minim minim;
AudioPlayer player;
FFT fftL;
@gregtemp
gregtemp / info
Created October 17, 2014 19:31
info
http://omino.com/
python in after effects
@gregtemp
gregtemp / organizer.py
Created October 17, 2014 01:40
Organizes your files into folders named after file types.
#
# Organizes your files into folders named after file types
# "Why?" you ask? Hard to say.
#
# Please note that all changes are permanent, and duplicates will be overwritten.
# All in all, not a super useful tool. I actually don't recommend using it.
# Also, I am not liable if you screw all your folders/files up with this.
import os
import errno
@gregtemp
gregtemp / fractals.py
Created September 27, 2014 19:28
almost real fucking fractals finally
import maya.cmds as cmds
#cube = cmds.polyCube(h=5, w=5, d=5)
#cubeName = cube[0]
#cmds.setAttr(cubeName + '.translateX', 5)
#cmds.setAttr(cubeName + '.translateY', 5)
#cmds.setAttr(cubeName + '.translateZ', 5)