├── Max:MSP
├── README.md
├── Sequencer_With_Errors.maxpat
├── amplitude_following.maxpat
├── grain_envelopes.maxpat
├── loopstation.maxpat
├── tools
│ ├── delay_lines.maxpat
│ ├── grain_envelope.maxpat
│ ├── masterDAC.maxpat
│ ├── onset_detector.maxpat
│ ├── pitch_shifter.maxpat
│ ├── quick_sing.maxpat
│ ├── receive_oF.maxpat
│ ├── rememberChord.maxpat
│ ├── remember_chord_js
│ │ ├── remember_chord.js
│ │ └── remember_chord.maxpat
│ └── utteranceToBuffer.maxpat
└── workshop_patches
│ └── otion_august13.maxpat
├── OpenFrameworks
├── Doppelganger
│ ├── Doppelganger.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── Doppelganger Debug.xcscheme
│ │ │ └── Doppelganger Release.xcscheme
│ ├── Makefile
│ ├── Project.xcconfig
│ ├── addons.make
│ ├── bin
│ │ └── data
│ │ │ └── .gitkeep
│ ├── config.make
│ ├── openFrameworks-Info.plist
│ └── src
│ │ ├── main.cpp
│ │ ├── ofApp.cpp
│ │ └── ofApp.h
├── JasonDanceSystem
│ ├── JasonDanceSystem.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── JasonDanceSystem Debug.xcscheme
│ │ │ └── JasonDanceSystem Release.xcscheme
│ ├── Makefile
│ ├── Project.xcconfig
│ ├── addons.make
│ ├── bin
│ │ └── data
│ │ │ ├── .gitkeep
│ │ │ ├── GUI
│ │ │ └── NewMedia Fett.ttf
│ │ │ ├── presets
│ │ │ ├── 2014-02-05-00-36-13-690.xml
│ │ │ ├── 2014-02-05-00-45-41-932.xml
│ │ │ ├── 2014-02-05-00-53-58-782.xml
│ │ │ ├── 2014-02-05-10-49-02-305.xml
│ │ │ ├── 2014-02-05-10-51-13-910.xml
│ │ │ ├── 2014-02-05-10-51-25-211.xml
│ │ │ ├── 2014-02-05-10-52-14-061.xml
│ │ │ ├── 2014-02-05-10-52-21-969.xml
│ │ │ ├── 2014-02-05-10-55-25-133.xml
│ │ │ ├── discovery1.xml
│ │ │ ├── discovery1.xml.scene
│ │ │ ├── discovery2.xml
│ │ │ ├── discovery2.xml.scene
│ │ │ ├── discovery3.xml
│ │ │ ├── discovery3.xml.scene
│ │ │ ├── discovery4.xml
│ │ │ ├── discovery4.xml.scene
│ │ │ ├── discovery5.xml
│ │ │ └── discovery5.xml.scene
│ │ │ └── verdana.ttf
│ ├── config.make
│ ├── openFrameworks-Info.plist
│ └── src
│ │ ├── main.cpp
│ │ ├── managers
│ │ ├── flowManager.cpp
│ │ ├── flowManager.h
│ │ ├── openNIManager.cpp
│ │ ├── openNIManager.h
│ │ ├── postProcManager.cpp
│ │ └── postProcManager.h
│ │ ├── ofApp.cpp
│ │ ├── ofApp.h
│ │ └── scenes
│ │ ├── laserScene
│ │ ├── laserScene.cpp
│ │ └── laserScene.h
│ │ ├── lineScene
│ │ ├── lineScene.cpp
│ │ └── lineScene.h
│ │ ├── particleScene
│ │ ├── particle.cpp
│ │ ├── particle.h
│ │ ├── particleScene.cpp
│ │ ├── particleScene.h
│ │ ├── particleSystem.cpp
│ │ └── particleSystem.h
│ │ ├── scene.h
│ │ └── smokeScene
│ │ ├── fluid particles
│ │ ├── FluidParticle.cpp
│ │ ├── FluidParticle.h
│ │ ├── FluidParticleSystem.cpp
│ │ └── FluidParticleSystem.h
│ │ ├── smokeScene.cpp
│ │ └── smokeScene.h
├── KinectProjector_BgLines
│ ├── KinectProjector_BgLines.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── KinectProjector_BgLines Debug.xcscheme
│ │ │ └── KinectProjector_BgLines Release.xcscheme
│ ├── Makefile
│ ├── Project.xcconfig
│ ├── addons.make
│ ├── bin
│ │ └── data
│ │ │ └── .gitkeep
│ ├── config.make
│ ├── openFrameworks-Info.plist
│ └── src
│ │ ├── main.cpp
│ │ ├── ofApp.cpp
│ │ └── ofApp.h
├── KinectProjector_Calibration
│ ├── KinectProjector_Calibration.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── KinectProjector_Calibration Debug.xcscheme
│ │ │ └── KinectProjector_Calibration Release.xcscheme
│ ├── Makefile
│ ├── Project.xcconfig
│ ├── addons.make
│ ├── bin
│ │ └── data
│ │ │ └── .gitkeep
│ ├── config.make
│ ├── openFrameworks-Info.plist
│ └── src
│ │ ├── main.cpp
│ │ ├── ofApp.cpp
│ │ └── ofApp.h
├── KinectProjector_Explosions
│ ├── KinectProjector_Explosions.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── KinectProjector_Explosions Debug.xcscheme
│ │ │ └── KinectProjector_Explosions Release.xcscheme
│ ├── Makefile
│ ├── Project.xcconfig
│ ├── addons.make
│ ├── bin
│ │ └── data
│ │ │ └── .gitkeep
│ ├── config.make
│ ├── openFrameworks-Info.plist
│ └── src
│ │ ├── main.cpp
│ │ ├── ofApp.cpp
│ │ └── ofApp.h
├── KinectProjector_Fluids
│ ├── KinectProjector_Fluids.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── KinectProjector_Fluids Debug.xcscheme
│ │ │ └── KinectProjector_Fluids Release.xcscheme
│ ├── Makefile
│ ├── Project.xcconfig
│ ├── addons.make
│ ├── bin
│ │ └── data
│ │ │ └── .gitkeep
│ ├── config.make
│ ├── openFrameworks-Info.plist
│ └── src
│ │ ├── main.cpp
│ │ ├── ofApp.cpp
│ │ └── ofApp.h
├── KinectProjector_Mask
│ ├── KinectProjector_Mask.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── KinectProjector_Mask Debug.xcscheme
│ │ │ └── KinectProjector_Mask Release.xcscheme
│ ├── Makefile
│ ├── Project.xcconfig
│ ├── addons.make
│ ├── bin
│ │ └── data
│ │ │ └── .gitkeep
│ ├── config.make
│ ├── openFrameworks-Info.plist
│ └── src
│ │ ├── main.cpp
│ │ ├── ofApp.cpp
│ │ └── ofApp.h
├── KinectProjector_Ribbons
│ ├── KinectProjector_Ribbons.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── KinectProjector_Ribbons Debug.xcscheme
│ │ │ └── KinectProjector_Ribbons Release.xcscheme
│ ├── Makefile
│ ├── Project.xcconfig
│ ├── addons.make
│ ├── bin
│ │ └── data
│ │ │ └── .gitkeep
│ ├── config.make
│ ├── openFrameworks-Info.plist
│ └── src
│ │ ├── Ribbons.cpp
│ │ ├── Ribbons.h
│ │ ├── main.cpp
│ │ ├── ofApp.cpp
│ │ └── ofApp.h
├── KinectProjector_Stars
│ ├── KinectProjector_Stars.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── KinectProjector_Stars Debug.xcscheme
│ │ │ └── KinectProjector_Stars Release.xcscheme
│ ├── Makefile
│ ├── Project.xcconfig
│ ├── addons.make
│ ├── bin
│ │ └── data
│ │ │ └── .gitkeep
│ ├── config.make
│ ├── openFrameworks-Info.plist
│ └── src
│ │ ├── main.cpp
│ │ ├── ofApp.cpp
│ │ └── ofApp.h
├── KinectProjector_VannaWhite
│ ├── KinectProjector_VannaWhite.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── KinectProjector_VannaWhite Debug.xcscheme
│ │ │ └── KinectProjector_VannaWhite Release.xcscheme
│ ├── Makefile
│ ├── Project.xcconfig
│ ├── addons.make
│ ├── bin
│ │ └── data
│ │ │ ├── .gitkeep
│ │ │ └── settings.xml
│ ├── config.make
│ ├── openFrameworks-Info.plist
│ └── src
│ │ ├── main.cpp
│ │ ├── ofApp.cpp
│ │ └── ofApp.h
├── Looper
│ ├── Looper.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── Looper Debug.xcscheme
│ │ │ └── Looper Release.xcscheme
│ ├── Makefile
│ ├── Project.xcconfig
│ ├── addons.make
│ ├── bin
│ │ └── data
│ │ │ └── .gitkeep
│ ├── config.make
│ ├── openFrameworks-Info.plist
│ └── src
│ │ ├── main.cpp
│ │ ├── ofApp.cpp
│ │ └── ofApp.h
├── MirrorMesh
│ ├── Makefile
│ ├── MirrorMesh.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── MirrorMesh Debug.xcscheme
│ │ │ └── MirrorMesh Release.xcscheme
│ ├── Project.xcconfig
│ ├── addons.make
│ ├── bin
│ │ └── data
│ │ │ ├── .gitkeep
│ │ │ ├── k2.frag
│ │ │ └── k2.vert
│ ├── config.make
│ ├── openFrameworks-Info.plist
│ └── src
│ │ ├── main.cpp
│ │ ├── ofApp.cpp
│ │ └── ofApp.h
├── README.md
├── Reprojection
│ ├── Makefile
│ ├── Project.xcconfig
│ ├── Reprojection.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── Reprojection Debug.xcscheme
│ │ │ └── Reprojection Release.xcscheme
│ ├── addons.make
│ ├── bin
│ │ └── data
│ │ │ ├── .gitkeep
│ │ │ ├── brcosa.frag
│ │ │ ├── channels.frag
│ │ │ ├── hue.frag
│ │ │ ├── mapping.xml
│ │ │ ├── neon.frag
│ │ │ ├── settings.xml
│ │ │ └── standard.vert
│ ├── config.make
│ ├── openFrameworks-Info.plist
│ └── src
│ │ ├── ProjectionMapping.cpp
│ │ ├── ProjectionMapping.h
│ │ ├── main.cpp
│ │ ├── ofApp.cpp
│ │ └── ofApp.h
├── ThousandArms
│ ├── Makefile
│ ├── Project.xcconfig
│ ├── ThousandArms.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ ├── ThousandArms Debug.xcscheme
│ │ │ └── ThousandArms Release.xcscheme
│ ├── addons.make
│ ├── bin
│ │ └── data
│ │ │ └── .gitkeep
│ ├── config.make
│ ├── openFrameworks-Info.plist
│ └── src
│ │ ├── main.cpp
│ │ ├── ofApp.cpp
│ │ └── ofApp.h
└── ThousandArmsV1
│ ├── Makefile
│ ├── Project.xcconfig
│ ├── ThousandArmsV1.xcodeproj
│ ├── project.pbxproj
│ └── xcshareddata
│ │ └── xcschemes
│ │ ├── ThousandArmsV1 Debug.xcscheme
│ │ └── ThousandArmsV1 Release.xcscheme
│ ├── addons.make
│ ├── bin
│ └── data
│ │ └── .gitkeep
│ ├── config.make
│ ├── openFrameworks-Info.plist
│ └── src
│ ├── main.cpp
│ ├── ofApp.cpp
│ └── ofApp.h
├── Performances
└── StopWork.maxpat
├── README.md
└── Unsorted
└── Max_OSC_Processing
├── Max_OSC_Processing.maxpat
├── Max_OSC_Processing.pde
└── sketch.properties
/Max:MSP/README.md:
--------------------------------------------------------------------------------
1 | # Max/MSP
2 |
3 |
4 | ### amplitude_following
5 |
6 | sketch for amplitude following
7 |
8 | ### grain_envelopes
9 |
10 | create grains from a buffer, modulate grain parameters -- delete this patch and refine the version in tools
11 |
12 | ### loopstation
13 |
14 | prototype workflow: record into a buffer, view waveform, select clip within waveform, sequence selected clip
15 |
16 | ### Sequencer_With_Errors
17 |
18 | sequencer with fake human "errors"
19 |
20 | ## Tools
21 |
22 | A collection of encapsulated tools which can be useful in other patches.
23 |
24 | ### onset_detector
25 |
26 | three methods for sending a bang upon detecting an onset
27 |
28 | ### rememberChord
29 |
30 | (work in progress) keep a list of the last set of selected Midi notes
31 |
32 | ### utteranceToBuffer
33 |
34 | (work in progress) using onset/offset detection to automatically capture an isolated sound event into a buffer
35 |
36 | ### masterDAC
37 |
38 | DAC with master fader and record
39 |
40 | ### grain_envelope
41 |
42 | record sound into a buffer, set grain parameters, create envelopes for a grain, reverse grain
43 |
44 | ### quick_sing
45 |
46 | quickly be able to monitor and record an audio input
47 |
48 | ### receive_oF
49 |
50 | patch to receive select and parse OSC data from openFrameworks apps. currently set up to receive keypoint data
--------------------------------------------------------------------------------
/Max:MSP/tools/remember_chord_js/remember_chord.js:
--------------------------------------------------------------------------------
1 | post("Iʻm stoked about this");
2 |
3 | inlets = 4;
4 | outlets = 2;
5 |
6 | chordOver = false;
7 |
8 | var chord = [];
9 | var lastChord = [];
10 | var velocity;
11 |
12 | // case switching
13 | var caseNumber = 0;
14 | var index = 0;
15 | var noteRepeats = 4;
16 | var noteRepeatIndex = 0;
17 |
18 | function msg_int(a) {
19 | if (inlet == 0) {
20 | var note = a;
21 | if (chordOver == false) {
22 | post("note: " + note);
23 | post();
24 | chord.push(note);
25 | post("adding to chord" + note);
26 | post();
27 | post("current chord: " + chord);
28 | post();
29 | }
30 | }
31 | if (inlet == 1) {
32 | // check for repeat 0 velocity
33 | // first non 0 velocity after the zeros is where to make chordover false
34 | var newVelocity = a;
35 | post("new velocity: " + newVelocity);
36 | post();
37 | if (newVelocity == velocity && velocity == 0) {
38 | velocity = newVelocity;
39 | post("repeat 0 velocity, disregard");
40 | post();
41 | } else if (newVelocity != 0 && velocity == 0) {
42 | velocity = newVelocity;
43 | post("first non zero velocity");
44 | post();
45 | chordOver = false;
46 | post("chordOver: " + chordOver);
47 | post();
48 |
49 | } else if (newVelocity == 0 && velocity != 0) {
50 | velocity = newVelocity;
51 | chordOver = true;
52 | post("non-repeat 0 velocity, thus chordOver is true");
53 | post();
54 | post("final chord: " + chord);
55 | post();
56 | lastChord = chord.slice();
57 | post("move final chord to lastChord: " + lastChord);
58 | post();
59 | chord.length = 0;
60 | post("emtpy chord: " + chord);
61 | post();
62 |
63 | }
64 |
65 | }
66 | if (inlet == 3) {
67 | a = arguments[0];
68 | if (a < 0) {a = 0};
69 | if (a > 4) {a = 4}; // increase this # if increase cases
70 | caseNumber = a;
71 | post("case switch: " + caseNumber);
72 | post();
73 | }
74 | }
75 |
76 | function bang() {
77 | //case 5 = polyphony?
78 | //case 6 = even and odd array items?
79 | switch (caseNumber) {
80 | case 0:
81 | // iterate through all notes in the chord
82 | if (index < (lastChord.length - 1)) {
83 | index++;
84 | } else {
85 | index = 0;
86 | }
87 | outlet(0, lastChord[index]);
88 | break;
89 | case 1:
90 | // case 1 kind of runs slow
91 | if (index > 0) {
92 | index = index - 1;
93 | } else {
94 | index = lastChord.length;
95 | }
96 | outlet(0, lastChord[index]);
97 | break;
98 | case 2:
99 | // repeated notes
100 | if (noteRepeatIndex < noteRepeats - 1) {
101 | noteRepeatIndex++
102 | } else {
103 | noteRepeatIndex = 0;
104 | if (index < (lastChord.length - 1)) {
105 | index++;
106 | } else {
107 | index = 0;
108 | }
109 | }
110 | outlet(0, lastChord[index]);
111 | break;
112 | case 3:
113 | // random
114 | index = Math.floor(Math.random() * lastChord.length);
115 | outlet(0, lastChord[index]);
116 | break;
117 | case 4:
118 | // random + random octave up or down
119 | index = Math.floor(Math.random() * lastChord.length);
120 | var octave = (Math.floor(Math.random() * 3)-1);
121 | var note = lastChord[index]+(octave*12);
122 | outlet(0, note);
123 | break;
124 | //case 5:
125 | // break;
126 | //case 6:
127 | // break;
128 | }
129 | }
--------------------------------------------------------------------------------
/OpenFrameworks/Doppelganger/Doppelganger.xcodeproj/xcshareddata/xcschemes/Doppelganger Debug.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/OpenFrameworks/Doppelganger/Doppelganger.xcodeproj/xcshareddata/xcschemes/Doppelganger Release.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/OpenFrameworks/Doppelganger/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/Doppelganger/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/OpenFrameworks/Doppelganger/addons.make:
--------------------------------------------------------------------------------
1 | ofxGui
2 | ofxKinect
3 | ofxOpenCv
4 | ofxOsc
5 | ofxControl
6 | ofxCv
7 | ofxLayerMask
8 | ofxSecondWindow
9 |
--------------------------------------------------------------------------------
/OpenFrameworks/Doppelganger/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/operatoolkit/OperaToolkit/2059ad0f24bf3fa1b00f392a380902b0e603ee56/OpenFrameworks/Doppelganger/bin/data/.gitkeep
--------------------------------------------------------------------------------
/OpenFrameworks/Doppelganger/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | cc.openFrameworks.ofapp
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenFrameworks/Doppelganger/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7 |
8 | // this kicks off the running of my app
9 | // can be OF_WINDOW or OF_FULLSCREEN
10 | // pass in width and height too:
11 | ofRunApp(new ofApp());
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/Doppelganger/src/ofApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxGui.h"
5 | #include "ofxOpenCv.h"
6 | #include "ofxKinect.h"
7 | #include "ofxLayerMask.h"
8 | #include "ofxSecondWindow.h"
9 |
10 |
11 | class ofApp : public ofBaseApp {
12 | public:
13 | void setup();
14 | void update();
15 | void draw();
16 | void exit();
17 |
18 | void keyPressed(int key);
19 | void mouseDragged(int x, int y, int button);
20 | void mousePressed(int x, int y, int button);
21 | void mouseReleased(int x, int y, int button);
22 | void windowResized(int w, int h);
23 |
24 | ofxSecondWindow projector;
25 |
26 | ofxKinect kinect;
27 |
28 | ofxCvColorImage colorImg;
29 | ofxCvGrayscaleImage grayImage;
30 | ofxCvGrayscaleImage grayThreshNear;
31 | ofxCvGrayscaleImage grayThreshFar;
32 |
33 | ofxLayerMask masker;
34 | vector fbo;
35 |
36 | ofParameter debug;
37 | ofParameter recording;
38 | ofParameter totalNumImages;
39 | ofParameter nearThreshold;
40 | ofParameter farThreshold;
41 | ofParameter oscillate;
42 | ofParameter delay;
43 | ofParameter translate;
44 | ofParameter scale;
45 |
46 | ofxPanel gui;
47 |
48 | int indexImage;
49 | int indexDraw;
50 | };
51 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/JasonDanceSystem.xcodeproj/xcshareddata/xcschemes/JasonDanceSystem Debug.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/JasonDanceSystem.xcodeproj/xcshareddata/xcschemes/JasonDanceSystem Release.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/addons.make:
--------------------------------------------------------------------------------
1 | ofxOpenCv
2 | ofxXmlSettings
3 | ofxCv
4 | ofxMSACore
5 | ofxMSAFluid
6 | ofxOpenNI
7 | ofxPostProcessing
8 | ofxSecondWindow
9 | ofxUI
10 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/operatoolkit/OperaToolkit/2059ad0f24bf3fa1b00f392a380902b0e603ee56/OpenFrameworks/JasonDanceSystem/bin/data/.gitkeep
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/GUI/NewMedia Fett.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/operatoolkit/OperaToolkit/2059ad0f24bf3fa1b00f392a380902b0e603ee56/OpenFrameworks/JasonDanceSystem/bin/data/GUI/NewMedia Fett.ttf
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/2014-02-05-00-36-13-690.xml:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 30.160911560
5 |
6 |
7 | 11
8 | position
9 | 497.489898682
10 | 459.109313965
11 |
12 |
13 | 4
14 | scale
15 | 3.562752962
16 |
17 |
18 | 42
19 | scene
20 | 2
21 |
22 |
23 | 4
24 | fadeAmt
25 | 5.000000000
26 |
27 |
28 | 17
29 | flip?
30 | 0
31 |
32 |
33 | 17
34 | bloom
35 | 0
36 |
37 |
38 | 17
39 | rims
40 | 0
41 |
42 |
43 | 17
44 | bloom2
45 | 0
46 |
47 |
48 | 17
49 | dof
50 | 0
51 |
52 |
53 | 4
54 | brightness
55 | 0.000000000
56 |
57 |
58 | 4
59 | contrast
60 | 0.000000000
61 |
62 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/2014-02-05-00-45-41-932.xml:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 30.091363907
5 |
6 |
7 | 11
8 | position
9 | 808.421081543
10 | 454.736846924
11 |
12 |
13 | 4
14 | scale
15 | 3.825911045
16 |
17 |
18 | 42
19 | scene
20 | 2
21 |
22 |
23 | 4
24 | fadeAmt
25 | 5.000000000
26 |
27 |
28 | 17
29 | flip?
30 | 0
31 |
32 |
33 | 17
34 | bloom
35 | 0
36 |
37 |
38 | 17
39 | rims
40 | 0
41 |
42 |
43 | 17
44 | bloom2
45 | 0
46 |
47 |
48 | 17
49 | dof
50 | 0
51 |
52 |
53 | 4
54 | brightness
55 | 0.000000000
56 |
57 |
58 | 4
59 | contrast
60 | 0.000000000
61 |
62 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/2014-02-05-00-53-58-782.xml:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 30.001499176
5 |
6 |
7 | 11
8 | position
9 | 0.000000000
10 | 752.064819336
11 |
12 |
13 | 4
14 | scale
15 | 1.000000000
16 |
17 |
18 | 42
19 | scene
20 | 3
21 |
22 |
23 | 4
24 | fadeAmt
25 | 5.000000000
26 |
27 |
28 | 17
29 | flip?
30 | 0
31 |
32 |
33 | 17
34 | bloom
35 | 0
36 |
37 |
38 | 17
39 | rims
40 | 0
41 |
42 |
43 | 17
44 | bloom2
45 | 0
46 |
47 |
48 | 17
49 | dof
50 | 0
51 |
52 |
53 | 4
54 | brightness
55 | 0.000000000
56 |
57 |
58 | 4
59 | contrast
60 | 0.000000000
61 |
62 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/2014-02-05-10-49-02-305.xml:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 39.996315002
5 |
6 |
7 | 11
8 | position
9 | 839.514221191
10 | 708.340087891
11 |
12 |
13 | 4
14 | scale
15 | 1.417003989
16 |
17 |
18 | 42
19 | scene
20 | 1
21 |
22 |
23 | 4
24 | fadeAmt
25 | 5.000000000
26 |
27 |
28 | 17
29 | flip?
30 | 0
31 |
32 |
33 | 17
34 | bloom
35 | 1
36 |
37 |
38 | 17
39 | rims
40 | 0
41 |
42 |
43 | 17
44 | bloom2
45 | 0
46 |
47 |
48 | 17
49 | dof
50 | 0
51 |
52 |
53 | 4
54 | brightness
55 | 0.000000000
56 |
57 |
58 | 4
59 | contrast
60 | 0.000000000
61 |
62 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/2014-02-05-10-51-13-910.xml:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 30.454460144
5 |
6 |
7 | 11
8 | position
9 | 948.340087891
10 | 756.437255859
11 |
12 |
13 | 4
14 | scale
15 | 0.688259065
16 |
17 |
18 | 42
19 | scene
20 | 0
21 |
22 |
23 | 4
24 | fadeAmt
25 | 255.000000000
26 |
27 |
28 | 17
29 | flip?
30 | 0
31 |
32 |
33 | 17
34 | bloom
35 | 0
36 |
37 |
38 | 17
39 | rims
40 | 0
41 |
42 |
43 | 17
44 | bloom2
45 | 0
46 |
47 |
48 | 17
49 | dof
50 | 0
51 |
52 |
53 | 4
54 | brightness
55 | 0.000000000
56 |
57 |
58 | 4
59 | contrast
60 | 0.000000000
61 |
62 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/2014-02-05-10-51-25-211.xml:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 42.001693726
5 |
6 |
7 | 11
8 | position
9 | 932.793518066
10 | 760.809753418
11 |
12 |
13 | 4
14 | scale
15 | 1.000000000
16 |
17 |
18 | 42
19 | scene
20 | 3
21 |
22 |
23 | 4
24 | fadeAmt
25 | 5.000000000
26 |
27 |
28 | 17
29 | flip?
30 | 0
31 |
32 |
33 | 17
34 | bloom
35 | 0
36 |
37 |
38 | 17
39 | rims
40 | 0
41 |
42 |
43 | 17
44 | bloom2
45 | 0
46 |
47 |
48 | 17
49 | dof
50 | 0
51 |
52 |
53 | 4
54 | brightness
55 | 0.000000000
56 |
57 |
58 | 4
59 | contrast
60 | 0.000000000
61 |
62 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/2014-02-05-10-52-14-061.xml:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 30.138433456
5 |
6 |
7 | 11
8 | position
9 | 823.967651367
10 | 664.615417480
11 |
12 |
13 | 4
14 | scale
15 | 1.963562846
16 |
17 |
18 | 42
19 | scene
20 | 2
21 |
22 |
23 | 4
24 | fadeAmt
25 | 5.000000000
26 |
27 |
28 | 17
29 | flip?
30 | 0
31 |
32 |
33 | 17
34 | bloom
35 | 0
36 |
37 |
38 | 17
39 | rims
40 | 0
41 |
42 |
43 | 17
44 | bloom2
45 | 0
46 |
47 |
48 | 17
49 | dof
50 | 0
51 |
52 |
53 | 4
54 | brightness
55 | 0.000000000
56 |
57 |
58 | 4
59 | contrast
60 | 0.000000000
61 |
62 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/2014-02-05-10-52-21-969.xml:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 42.811103821
5 |
6 |
7 | 11
8 | position
9 | 994.979797363
10 | 778.299560547
11 |
12 |
13 | 4
14 | scale
15 | 0.829959512
16 |
17 |
18 | 42
19 | scene
20 | 2
21 |
22 |
23 | 4
24 | fadeAmt
25 | 5.000000000
26 |
27 |
28 | 17
29 | flip?
30 | 0
31 |
32 |
33 | 17
34 | bloom
35 | 0
36 |
37 |
38 | 17
39 | rims
40 | 0
41 |
42 |
43 | 17
44 | bloom2
45 | 0
46 |
47 |
48 | 17
49 | dof
50 | 0
51 |
52 |
53 | 4
54 | brightness
55 | 0.000000000
56 |
57 |
58 | 4
59 | contrast
60 | 0.000000000
61 |
62 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/2014-02-05-10-55-25-133.xml:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 44.268260956
5 |
6 |
7 | 11
8 | position
9 | 458.623504639
10 | 437.246948242
11 |
12 |
13 | 4
14 | scale
15 | 0.829959512
16 |
17 |
18 | 42
19 | scene
20 | 2
21 |
22 |
23 | 4
24 | fadeAmt
25 | 5.000000000
26 |
27 |
28 | 17
29 | flip?
30 | 0
31 |
32 |
33 | 17
34 | bloom
35 | 0
36 |
37 |
38 | 17
39 | rims
40 | 0
41 |
42 |
43 | 17
44 | bloom2
45 | 0
46 |
47 |
48 | 17
49 | dof
50 | 0
51 |
52 |
53 | 4
54 | brightness
55 | 0.000000000
56 |
57 |
58 | 4
59 | contrast
60 | 0.000000000
61 |
62 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/discovery1.xml:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 30.766857147
5 |
6 |
7 | 42
8 | scene
9 | 2
10 |
11 |
12 | 4
13 | bgred
14 | 0.000000000
15 |
16 |
17 | 4
18 | bggreen
19 | 0.000000000
20 |
21 |
22 | 4
23 | bgblue
24 | 0.129554659
25 |
26 |
27 | 4
28 | fadeAmt
29 | 0.951417029
30 |
31 |
32 | 17
33 | flip?
34 | 0
35 |
36 |
37 | 17
38 | bloom
39 | 1
40 |
41 |
42 | 17
43 | rims
44 | 0
45 |
46 |
47 | 17
48 | bloom2
49 | 1
50 |
51 |
52 | 17
53 | dof
54 | 0
55 |
56 |
57 | 4
58 | brightness
59 | 1.000000000
60 |
61 |
62 | 4
63 | contrast
64 | 1.000000000
65 |
66 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/discovery1.xml.scene:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 30.766857147
5 |
6 |
7 | 17
8 | generate/control
9 | 1
10 |
11 |
12 | 42
13 | totalParticles
14 | 200
15 |
16 |
17 | 42
18 | maxParticles
19 | 200
20 |
21 |
22 | 4
23 | threshold
24 | 2.024291515
25 |
26 |
27 | 4
28 | velMult
29 | 0.203360334
30 |
31 |
32 | 17
33 | reverse
34 | 0
35 |
36 |
37 | 17
38 | bounce
39 | 0
40 |
41 |
42 | 17
43 | wrap
44 | 0
45 |
46 |
47 | 42
48 | attractionRadius
49 | 256
50 |
51 |
52 | 4
53 | attractionForce
54 | 0.000000000
55 |
56 |
57 | 42
58 | repulsionRadius
59 | 100
60 |
61 |
62 | 4
63 | repulsionForce
64 | 0.000000000
65 |
66 |
67 | 4
68 | baseSize
69 | 3.000000000
70 |
71 |
72 | 4
73 | sizeMod
74 | 0.000100000
75 |
76 |
77 | 42
78 | tailLength
79 | 5
80 |
81 |
82 | 42
83 | alpha
84 | 1
85 |
86 |
87 | 17
88 | circles
89 | 1
90 |
91 |
92 | 17
93 | lines
94 | 0
95 |
96 |
97 | 4
98 | red
99 | 1.000000000
100 |
101 |
102 | 4
103 | green
104 | 1.000000000
105 |
106 |
107 | 4
108 | blue
109 | 1.000000000
110 |
111 |
112 | 4
113 | alpha
114 | 1.000000000
115 |
116 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/discovery2.xml:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 37.387401581
5 |
6 |
7 | 42
8 | scene
9 | 2
10 |
11 |
12 | 4
13 | bgred
14 | 0.000000000
15 |
16 |
17 | 4
18 | bggreen
19 | 0.000000000
20 |
21 |
22 | 4
23 | bgblue
24 | 0.129554659
25 |
26 |
27 | 4
28 | fadeAmt
29 | 0.951417029
30 |
31 |
32 | 17
33 | flip?
34 | 0
35 |
36 |
37 | 17
38 | bloom
39 | 1
40 |
41 |
42 | 17
43 | rims
44 | 0
45 |
46 |
47 | 17
48 | bloom2
49 | 1
50 |
51 |
52 | 17
53 | dof
54 | 0
55 |
56 |
57 | 4
58 | brightness
59 | 1.000000000
60 |
61 |
62 | 4
63 | contrast
64 | 1.000000000
65 |
66 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/discovery2.xml.scene:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 37.387401581
5 |
6 |
7 | 17
8 | generate/control
9 | 1
10 |
11 |
12 | 42
13 | totalParticles
14 | 200
15 |
16 |
17 | 42
18 | maxParticles
19 | 200
20 |
21 |
22 | 4
23 | threshold
24 | 2.024291515
25 |
26 |
27 | 4
28 | velMult
29 | 0.203360334
30 |
31 |
32 | 17
33 | reverse
34 | 0
35 |
36 |
37 | 17
38 | bounce
39 | 0
40 |
41 |
42 | 17
43 | wrap
44 | 0
45 |
46 |
47 | 42
48 | attractionRadius
49 | 256
50 |
51 |
52 | 4
53 | attractionForce
54 | 0.425101221
55 |
56 |
57 | 42
58 | repulsionRadius
59 | 100
60 |
61 |
62 | 4
63 | repulsionForce
64 | 0.000000000
65 |
66 |
67 | 4
68 | baseSize
69 | 3.000000000
70 |
71 |
72 | 4
73 | sizeMod
74 | 0.000100000
75 |
76 |
77 | 42
78 | tailLength
79 | 5
80 |
81 |
82 | 42
83 | alpha
84 | 1
85 |
86 |
87 | 17
88 | circles
89 | 1
90 |
91 |
92 | 17
93 | lines
94 | 0
95 |
96 |
97 | 4
98 | red
99 | 1.000000000
100 |
101 |
102 | 4
103 | green
104 | 1.000000000
105 |
106 |
107 | 4
108 | blue
109 | 1.000000000
110 |
111 |
112 | 4
113 | alpha
114 | 1.000000000
115 |
116 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/discovery3.xml:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 19.668775558
5 |
6 |
7 | 42
8 | scene
9 | 2
10 |
11 |
12 | 4
13 | bgred
14 | 0.000000000
15 |
16 |
17 | 4
18 | bggreen
19 | 0.161943316
20 |
21 |
22 | 4
23 | bgblue
24 | 0.129554659
25 |
26 |
27 | 4
28 | fadeAmt
29 | 0.951417029
30 |
31 |
32 | 17
33 | flip?
34 | 0
35 |
36 |
37 | 17
38 | bloom
39 | 1
40 |
41 |
42 | 17
43 | rims
44 | 0
45 |
46 |
47 | 17
48 | bloom2
49 | 1
50 |
51 |
52 | 17
53 | dof
54 | 0
55 |
56 |
57 | 4
58 | brightness
59 | 1.000000000
60 |
61 |
62 | 4
63 | contrast
64 | 1.000000000
65 |
66 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/discovery3.xml.scene:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 19.668775558
5 |
6 |
7 | 17
8 | generate/control
9 | 1
10 |
11 |
12 | 42
13 | totalParticles
14 | 200
15 |
16 |
17 | 42
18 | maxParticles
19 | 1883
20 |
21 |
22 | 4
23 | threshold
24 | 2.024291515
25 |
26 |
27 | 4
28 | velMult
29 | 1.774412870
30 |
31 |
32 | 17
33 | reverse
34 | 0
35 |
36 |
37 | 17
38 | bounce
39 | 0
40 |
41 |
42 | 17
43 | wrap
44 | 0
45 |
46 |
47 | 42
48 | attractionRadius
49 | 256
50 |
51 |
52 | 4
53 | attractionForce
54 | 0.222672060
55 |
56 |
57 | 42
58 | repulsionRadius
59 | 100
60 |
61 |
62 | 4
63 | repulsionForce
64 | 0.000000000
65 |
66 |
67 | 4
68 | baseSize
69 | 3.000000000
70 |
71 |
72 | 4
73 | sizeMod
74 | 0.000100000
75 |
76 |
77 | 42
78 | tailLength
79 | 5
80 |
81 |
82 | 42
83 | alpha
84 | 1
85 |
86 |
87 | 17
88 | circles
89 | 1
90 |
91 |
92 | 17
93 | lines
94 | 0
95 |
96 |
97 | 4
98 | red
99 | 1.000000000
100 |
101 |
102 | 4
103 | green
104 | 1.000000000
105 |
106 |
107 | 4
108 | blue
109 | 1.000000000
110 |
111 |
112 | 4
113 | alpha
114 | 1.000000000
115 |
116 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/discovery4.xml:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 26.798171997
5 |
6 |
7 | 42
8 | scene
9 | 2
10 |
11 |
12 | 4
13 | bgred
14 | 0.000000000
15 |
16 |
17 | 4
18 | bggreen
19 | 0.161943316
20 |
21 |
22 | 4
23 | bgblue
24 | 0.129554659
25 |
26 |
27 | 4
28 | fadeAmt
29 | 0.951417029
30 |
31 |
32 | 17
33 | flip?
34 | 0
35 |
36 |
37 | 17
38 | bloom
39 | 1
40 |
41 |
42 | 17
43 | rims
44 | 0
45 |
46 |
47 | 17
48 | bloom2
49 | 1
50 |
51 |
52 | 17
53 | dof
54 | 0
55 |
56 |
57 | 4
58 | brightness
59 | 1.000000000
60 |
61 |
62 | 4
63 | contrast
64 | 1.000000000
65 |
66 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/discovery4.xml.scene:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 26.798171997
5 |
6 |
7 | 17
8 | generate/control
9 | 1
10 |
11 |
12 | 42
13 | totalParticles
14 | 200
15 |
16 |
17 | 42
18 | maxParticles
19 | 1883
20 |
21 |
22 | 4
23 | threshold
24 | 2.024291515
25 |
26 |
27 | 4
28 | velMult
29 | 1.774412870
30 |
31 |
32 | 17
33 | reverse
34 | 0
35 |
36 |
37 | 17
38 | bounce
39 | 0
40 |
41 |
42 | 17
43 | wrap
44 | 0
45 |
46 |
47 | 42
48 | attractionRadius
49 | 256
50 |
51 |
52 | 4
53 | attractionForce
54 | 0.222672060
55 |
56 |
57 | 42
58 | repulsionRadius
59 | 100
60 |
61 |
62 | 4
63 | repulsionForce
64 | 0.000000000
65 |
66 |
67 | 4
68 | baseSize
69 | 3.000000000
70 |
71 |
72 | 4
73 | sizeMod
74 | 0.004953441
75 |
76 |
77 | 42
78 | tailLength
79 | 5
80 |
81 |
82 | 42
83 | alpha
84 | 1
85 |
86 |
87 | 17
88 | circles
89 | 1
90 |
91 |
92 | 17
93 | lines
94 | 0
95 |
96 |
97 | 4
98 | red
99 | 1.000000000
100 |
101 |
102 | 4
103 | green
104 | 1.000000000
105 |
106 |
107 | 4
108 | blue
109 | 1.000000000
110 |
111 |
112 | 4
113 | alpha
114 | 1.000000000
115 |
116 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/discovery5.xml:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 25.826877594
5 |
6 |
7 | 42
8 | scene
9 | 2
10 |
11 |
12 | 4
13 | bgred
14 | 0.000000000
15 |
16 |
17 | 4
18 | bggreen
19 | 0.161943316
20 |
21 |
22 | 4
23 | bgblue
24 | 0.129554659
25 |
26 |
27 | 4
28 | fadeAmt
29 | 0.380566806
30 |
31 |
32 | 17
33 | flip?
34 | 0
35 |
36 |
37 | 17
38 | bloom
39 | 1
40 |
41 |
42 | 17
43 | rims
44 | 0
45 |
46 |
47 | 17
48 | bloom2
49 | 1
50 |
51 |
52 | 17
53 | dof
54 | 0
55 |
56 |
57 | 4
58 | brightness
59 | 1.000000000
60 |
61 |
62 | 4
63 | contrast
64 | 1.000000000
65 |
66 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/presets/discovery5.xml.scene:
--------------------------------------------------------------------------------
1 |
2 | 4
3 | FPS SLIDER
4 | 25.826877594
5 |
6 |
7 | 17
8 | generate/control
9 | 1
10 |
11 |
12 | 42
13 | totalParticles
14 | 200
15 |
16 |
17 | 42
18 | maxParticles
19 | 1883
20 |
21 |
22 | 4
23 | threshold
24 | 2.024291515
25 |
26 |
27 | 4
28 | velMult
29 | 1.774412870
30 |
31 |
32 | 17
33 | reverse
34 | 0
35 |
36 |
37 | 17
38 | bounce
39 | 0
40 |
41 |
42 | 17
43 | wrap
44 | 0
45 |
46 |
47 | 42
48 | attractionRadius
49 | 256
50 |
51 |
52 | 4
53 | attractionForce
54 | 0.222672060
55 |
56 |
57 | 42
58 | repulsionRadius
59 | 100
60 |
61 |
62 | 4
63 | repulsionForce
64 | 0.000000000
65 |
66 |
67 | 4
68 | baseSize
69 | 3.000000000
70 |
71 |
72 | 4
73 | sizeMod
74 | 0.004953441
75 |
76 |
77 | 42
78 | tailLength
79 | 5
80 |
81 |
82 | 42
83 | alpha
84 | 1
85 |
86 |
87 | 17
88 | circles
89 | 1
90 |
91 |
92 | 17
93 | lines
94 | 0
95 |
96 |
97 | 4
98 | red
99 | 1.000000000
100 |
101 |
102 | 4
103 | green
104 | 1.000000000
105 |
106 |
107 | 4
108 | blue
109 | 1.000000000
110 |
111 |
112 | 4
113 | alpha
114 | 1.000000000
115 |
116 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/bin/data/verdana.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/operatoolkit/OperaToolkit/2059ad0f24bf3fa1b00f392a380902b0e603ee56/OpenFrameworks/JasonDanceSystem/bin/data/verdana.ttf
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | cc.openFrameworks.ofapp
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7 |
8 | // this kicks off the running of my app
9 | // can be OF_WINDOW or OF_FULLSCREEN
10 | // pass in width and height too:
11 | ofRunApp(new ofApp());
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/managers/flowManager.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // flowManager.cpp
3 | // openNiSample007
4 | //
5 | // Created by Jason Levine on 2014-02-02.
6 | //
7 | //
8 |
9 | #include "flowManager.h"
10 |
11 | //--------------------------------------------------------------
12 | void flowManager::setup() {
13 |
14 | pyrLk.setMaxFeatures( 300 );
15 | pyrLk.setQualityLevel( 0.01 );
16 | pyrLk.setMinDistance( 4 );
17 | pyrLk.setWindowSize( 32 );
18 | pyrLk.setMaxLevel( 3 );
19 |
20 | ofPixels firstFrame;
21 | firstFrame.allocate(320, 240, 1);
22 |
23 | // pyrLk.calcOpticalFlow(firstFrame, firstFrame);
24 |
25 | features.clear();
26 | current.clear();
27 | motion.clear();
28 | }
29 |
30 | //--------------------------------------------------------------
31 | void flowManager::update(ofPixels &maskPix){
32 |
33 | if (ofGetFrameNum() % 60 == 0) pyrLk.resetFeaturesToTrack();
34 |
35 | pyrLk.calcOpticalFlow(maskPix);
36 |
37 | features = pyrLk.getFeatures();
38 | current = pyrLk.getCurrent();
39 | motion = pyrLk.getMotion();
40 |
41 |
42 | }
43 |
44 | //--------------------------------------------------------------
45 | void flowManager::draw(int x, int y, int w, int h){
46 |
47 | pyrLk.draw(x,y,w,h);
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/managers/flowManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // flowManager.h
3 | // openNiSample007
4 | //
5 | // Created by Jason Levine on 2014-02-02.
6 | //
7 | //
8 |
9 | #pragma once
10 | #include "ofxCv.h"
11 | #include "ofMain.h"
12 |
13 | class flowManager {
14 | public:
15 |
16 | void setup();
17 | void update(ofPixels &maskPix);
18 | void draw(int x, int y, int w, int h);
19 | ofxCv::FlowPyrLK pyrLk;
20 |
21 | vector features;
22 | vector current;
23 | vector motion;
24 |
25 | };
26 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/managers/openNIManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // openNIManager.h
3 | // openNiSample007
4 | //
5 | // Created by Jason Levine on 2014-02-02.
6 | //
7 | //
8 | #pragma once
9 |
10 | #include "ofxOpenNI.h"
11 | #include "ofxCvGrayscaleImage.h"
12 | #include "ofMain.h"
13 |
14 | class openNIManager {
15 | public:
16 | void setup();
17 | void update();
18 | void draw(float x, float y, float scale);
19 | void exit();
20 |
21 | bool isNewFrame();
22 | bool isFound();
23 | bool isSkeleton();
24 | void setDepthThresh();
25 |
26 | ofVec3f getLeftElbowPos() { return leftElbowPos; }
27 | ofVec3f getLeftHandPos() { return leftHandPos; }
28 |
29 |
30 | void keyPressed(int key);
31 | void userEvent(ofxOpenNIUserEvent & event);
32 |
33 | ofxOpenNI openNIDevice;
34 |
35 | ofTrueTypeFont verdana;
36 |
37 | ofPixels maskPix;
38 |
39 | bool bUseDepth;
40 |
41 | int nearThresh, farThresh;
42 |
43 | ofxCvGrayscaleImage grayImage; // grayscale depth image
44 | ofxCvGrayscaleImage grayThreshNear; // the near thresholded image
45 | ofxCvGrayscaleImage grayThreshFar; // the far thresholded image
46 |
47 | //center
48 |
49 | ofVec3f headPos, neckPos, torsoPos;
50 |
51 | //upper body
52 | ofVec3f leftShoulderPos, rightShoulderPos;
53 |
54 | ofVec3f leftElbowPos, rightElbowPos;
55 |
56 | ofVec3f leftHandPos, rightHandPos;
57 |
58 | //lower body
59 |
60 | ofVec3f leftHipPos, rightHipPos;
61 |
62 | ofVec3f leftKneePos, rightKneePos;
63 |
64 | ofVec3f leftFootPos, rightFootPos;
65 |
66 |
67 | };
68 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/managers/postProcManager.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // postProcManager.cpp
3 | // ETD_system
4 | //
5 | // Created by Jason Levine on 2014-02-04.
6 | //
7 | //
8 |
9 | #include "postProcManager.h"
10 |
11 | void postProcManager::setup() {
12 | width = 1024;
13 | height = 768;
14 | ppWidth = ofNextPow2(width);
15 | ppHeight = ofNextPow2(height);
16 |
17 |
18 | ofFbo::Settings s;
19 | s.width = ppWidth;
20 | s.height = ppHeight;
21 | s.textureTarget = GL_TEXTURE_2D;
22 | s.useDepth = true;
23 | s.depthStencilInternalFormat = GL_DEPTH_COMPONENT24;
24 | s.depthStencilAsTexture = true;
25 | s.internalformat = GL_RGBA32F;
26 |
27 | fbo.allocate(s);
28 |
29 | fbo.begin();
30 | ofClear(0);
31 | fbo.end();
32 |
33 | fadeAmt = 0.1;
34 |
35 | post.init(ppWidth, ppHeight);
36 |
37 | post.createPass()->setEnabled(false);
38 | post.createPass()->setEnabled(false);
39 | post.createPass()->setEnabled(false);
40 | post.createPass()->setEnabled(false);
41 | post.createPass()->setEnabled(true);
42 |
43 | renderPasses = post.getPasses();
44 | post.setFlip(false);
45 | }
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/managers/postProcManager.h:
--------------------------------------------------------------------------------
1 | //
2 | // postProcManager.h
3 | // ETD_system
4 | //
5 | // Created by Jason Levine on 2014-02-04.
6 | //
7 | //
8 |
9 | #pragma once
10 |
11 | #include "ofxPostProcessing.h"
12 | #include "ofMain.h"
13 |
14 | class postProcManager {
15 | public:
16 | void setup();
17 |
18 | int width, height, ppWidth, ppHeight;
19 |
20 | ofFbo fbo;
21 | ofxPostProcessing post;
22 | vector renderPasses;
23 |
24 | float fadeAmt;
25 |
26 | void begin(ofFloatColor bgColor, bool bgColorChanged) {
27 | fbo.begin();
28 | if (!bgColorChanged) {
29 | bgColor.a = fadeAmt;
30 | bgColorChanged = false;
31 | }
32 | ofSetColor(bgColor);
33 | ofRect(0,0,ofGetWidth(),ofGetHeight());
34 | }
35 |
36 | void end() { fbo.end(); post.process(fbo); }
37 |
38 | void draw() { ofSetColor(255); post.draw(0,0); }
39 | };
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/ofApp.h:
--------------------------------------------------------------------------------
1 | #ifndef _TEST_APP
2 | #define _TEST_APP
3 |
4 | #include "ofMain.h"
5 |
6 | #include "openNIManager.h"
7 | #include "flowManager.h"
8 | #include "postProcManager.h"
9 |
10 | #include "laserScene.h"
11 | #include "smokeScene.h"
12 | #include "particleScene.h"
13 | #include "lineScene.h"
14 |
15 | class ofApp : public ofBaseApp{
16 |
17 | public:
18 |
19 | void setup();
20 | void update();
21 | void draw();
22 | void exit();
23 |
24 | void setupGUI();
25 | void guiEvent(ofxUIEventArgs &e);
26 |
27 | void keyPressed (int key);
28 | void keyReleased(int key);
29 | void mouseMoved(int x, int y );
30 | void mouseDragged(int x, int y, int button);
31 | void mousePressed(int x, int y, int button);
32 | void mouseReleased(int x, int y, int button);
33 | void windowResized(int w, int h);
34 |
35 | openNIManager oni;
36 | flowManager flow;
37 | postProcManager ppm;
38 |
39 | ofxUICanvas * gui;
40 | ofxUICanvas * gui2;
41 | ofxUICanvas * gui3;
42 | ofxUIDropDownList *ddl;
43 |
44 | float brightness, contrast;
45 |
46 | bool bDebug;
47 | bool bCalibrate;
48 |
49 | int currentScene;
50 | int numScenes;
51 | vector scenes;
52 |
53 | int currentPreset;
54 | string presetName;
55 | int cueNum;
56 |
57 | ofFloatColor bgColor;
58 | bool bgColorChanged;
59 |
60 | //mapping
61 | float scale;
62 | ofPoint offset;
63 |
64 | };
65 |
66 | #endif
67 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/scenes/laserScene/laserScene.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // laserScene.cpp
3 | // openNiSample007
4 | //
5 | // Created by Jason Levine on 2014-02-02.
6 | //
7 | //
8 |
9 | #include "laserScene.h"
10 |
11 | void laserScene::setup(openNIManager * _oni, flowManager * _flow ){
12 | oni = _oni;
13 | flow = _flow;
14 |
15 | threshold = 1;
16 | lineScale = 50;
17 | lineWidth = 1;
18 | lineWidthMult = 1;
19 |
20 | // bgColor.set(0.,0.,0.,1.0);
21 | lineColor.set(1.,1.,1.,0.5);
22 | // bgColorChanged = true;
23 |
24 | //init gui dims
25 | float dim = 16;
26 | float xInit = OFX_UI_GLOBAL_WIDGET_SPACING;
27 | float length = 255-xInit;
28 |
29 | //gui!
30 | gui = new ofxUICanvas(0, 0, length+xInit, ofGetHeight());
31 |
32 | gui->addFPSSlider("FPS SLIDER", length-xInit, dim*.25, 60);
33 |
34 | gui->addSpacer(length-xInit, 1);
35 | gui->addSlider("threshold", 0.0, 10.0, &threshold, length-xInit, dim);
36 | gui->addSlider("line scale", 1.0, 100.0, &lineScale, length-xInit, dim);
37 | gui->addSlider("line width", 1.0, 20.0, &lineWidth, length-xInit, dim);
38 | gui->addSlider("line width mult", 0.0, 2.0, &lineWidthMult, length-xInit, dim);
39 | gui->addSpacer(length-xInit, 1);
40 | // gui->addLabel("BACKGROUND");
41 | // gui->addSlider("bgred", 0.0, 1.0, &bgColor.r, length-xInit, dim);
42 | // gui->addSlider("bggreen", 0.0, 1.0, &bgColor.g, length-xInit, dim);
43 | // gui->addSlider("bgblue", 0.0, 1.0, &bgColor.b, length-xInit, dim);
44 | gui->addLabel("LASERS");
45 | gui->addSlider("red", 0.0, 1.0, &lineColor.r, length-xInit, dim);
46 | gui->addSlider("green", 0.0, 1.0, &lineColor.g, length-xInit, dim);
47 | gui->addSlider("blue", 0.0, 1.0, &lineColor.b, length-xInit, dim);
48 | gui->addSlider("alpha", 0.0, 1.0, &lineColor.a, length-xInit, dim);
49 |
50 | gui->setDrawBack(false);
51 | gui->setVisible(false);
52 |
53 |
54 | // ofAddListener(gui->newGUIEvent,this,&laserScene::guiEvent);
55 | }
56 |
57 | //void laserScene::guiEvent(ofxUIEventArgs &e){
58 | // string name = e.widget->getName();
59 | // int kind = e.widget->getKind();
60 | //
61 | // if(name == "bgred" || name == "bggreen" || name == "bgblue" ) {
62 | // bgColorChanged = true;
63 | // }
64 | //}
65 |
66 | void laserScene::update(int width, int height){
67 |
68 | }
69 |
70 | void laserScene::draw(float x, float y, float scale){
71 | ofPushStyle();
72 | ofSetColor(lineColor);
73 |
74 | ofPushMatrix();
75 | ofTranslate(x, y);
76 | ofTranslate(160, 120);
77 | ofScale(scale, scale);
78 | ofTranslate(-160, -120);
79 |
80 | for (int i = 0; i < flow->current.size(); i++) {
81 | if (flow->motion[i + flow->motion.size()/2].lengthSquared() > threshold) {
82 |
83 | ofVec2f featMotion = flow->motion[i + flow->motion.size()/2];
84 | ofSetLineWidth(lineWidth + featMotion.lengthSquared() * lineWidthMult);
85 |
86 | ofLine((flow->features[i] - featMotion * lineScale),
87 | (flow->features[i] + featMotion * lineScale));
88 | }
89 | }
90 |
91 | ofPopMatrix();
92 | ofPopStyle();
93 | }
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/scenes/laserScene/laserScene.h:
--------------------------------------------------------------------------------
1 | //
2 | // laserScene.h
3 | // openNiSample007
4 | //
5 | // Created by Jason Levine on 2014-02-02.
6 | //
7 | //
8 |
9 | #pragma once
10 |
11 | #include "scene.h"
12 |
13 | class laserScene : public scene {
14 | public:
15 | void setup(openNIManager * _oni, flowManager * _flow );
16 | void update(int width, int height);
17 | void draw(float x, float y, float scale);
18 |
19 |
20 |
21 | openNIManager * oni;
22 | flowManager * flow;
23 |
24 | ofxUICanvas *gui;
25 | // void guiEvent(ofxUIEventArgs &e);
26 | void toggleGUI(){ gui->toggleVisible(); }
27 | void hideGUI(){ gui->setVisible(false); }
28 | void saveGUI( string filename ) { gui->saveSettings(filename); }
29 | void loadGUI( string filename ) { gui->loadSettings(filename); }
30 |
31 | float threshold;
32 | float lineScale;
33 | float lineWidth;
34 | float lineWidthMult;
35 |
36 | ofFloatColor lineColor;
37 | // bool bgColorChanged;
38 |
39 | };
40 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/scenes/lineScene/lineScene.h:
--------------------------------------------------------------------------------
1 | //
2 | // lineScene.h
3 | // openNiSample007
4 | //
5 | // Created by Jason Levine on 2014-02-03.
6 | //
7 | //
8 |
9 | #include "scene.h"
10 |
11 | class lineScene : public scene {
12 | public:
13 | void setup(openNIManager * _oni, flowManager * _flow );
14 | void update(int width, int height);
15 | void draw(float x, float y, float scale);
16 |
17 | openNIManager * oni;
18 | flowManager * flow;
19 |
20 | ofxUICanvas *gui;
21 | void toggleGUI(){ gui->toggleVisible(); }
22 | void hideGUI(){ gui->setVisible(false); }
23 | void saveGUI( string filename ) { gui->saveSettings(filename); }
24 | void loadGUI( string filename ) { gui->loadSettings(filename); }
25 |
26 | //------------------------------------------------------------
27 |
28 | void drawLine(ofVec3f jointA, ofVec3f jointB);
29 | void drawLines(ofVec3f jointA, ofVec3f jointB, float spacing);
30 | void drawBodyLines();
31 | void drawMoire();
32 |
33 | float width, height;
34 | float lineWidth, lineLength;
35 | float linesWidth, linesLength;
36 | float distanceScale;
37 |
38 | bool llArm, rlArm,
39 | luArm, ruArm,
40 | llLeg, rlLeg,
41 | luLeg, ruLeg;
42 |
43 | bool bDrawBody, bDrawMoire;
44 | float skeletonSmoothing;
45 |
46 | // ofFloatColor bgColor;
47 | ofFloatColor lineColor;
48 |
49 | };
50 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/scenes/particleScene/particle.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 |
5 | class particle
6 | {
7 | public:
8 | ofVec2f pos;
9 | vector posHistory;
10 | ofVec2f vel;
11 | ofVec2f frc;// frc is also know as acceleration (newton says "f=ma")
12 |
13 | float alpha;
14 | float size;
15 |
16 | particle();
17 | virtual ~particle(){};
18 |
19 | void resetForce();
20 | void addForce(float x, float y);
21 | void addRepulsionForce(float x, float y, float radius, float scale);
22 | void addAttractionForce(float x, float y, float radius, float scale);
23 | void addRepulsionForce(particle &p, float radius, float scale);
24 | void addAttractionForce(particle &p, float radius, float scale);
25 |
26 | void addDampingForce();
27 |
28 | void setInitialCondition(float px, float py, float vx, float vy);
29 | void update(int tailLength);
30 | void draw(ofFloatColor col);
31 |
32 | void bounceOffWalls(float minx, float miny, float maxx, float maxy);
33 | void wrapAround(float minx, float miny, float maxx, float maxy);
34 |
35 | float damping;
36 | };
37 |
38 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/scenes/particleScene/particleScene.h:
--------------------------------------------------------------------------------
1 | //
2 | // particleScene.h
3 | // openNiSample007
4 | //
5 | // Created by Jason Levine on 2014-02-03.
6 | //
7 | //
8 |
9 | #pragma once
10 |
11 | #include "scene.h"
12 | #include "particleSystem.h"
13 |
14 | class particleScene : public scene {
15 | public:
16 | void setup(openNIManager * _oni, flowManager * _flow );
17 | void update(int width, int height);
18 | void draw(float x, float y, float scale);
19 |
20 | openNIManager * oni;
21 | flowManager * flow;
22 |
23 | ofxUICanvas * gui;
24 | void toggleGUI(){ gui->toggleVisible(); }
25 | void hideGUI(){ gui->setVisible(false); }
26 | void saveGUI( string filename ) { gui->saveSettings(filename); }
27 | void loadGUI( string filename ) { gui->loadSettings(filename); }
28 |
29 | //----------------------------------
30 | particleSystem particles;
31 |
32 | bool bDebug, bGenerate, bReverse;
33 |
34 | float threshold, velMult;
35 |
36 | int alpha;
37 |
38 | ofFloatColor particleColor;
39 | };
40 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/scenes/particleScene/particleSystem.h:
--------------------------------------------------------------------------------
1 | //
2 | // particleSystem.h
3 | // 2_particle_particle_manyAreSlow
4 | //
5 | // Created by Jason Levine on 2013-10-25.
6 | //
7 | //
8 | #pragma once
9 |
10 | #include "particle.h"
11 |
12 | class particleSystem {
13 | public:
14 | void setup(int _maxParticles, float _width, float _height, bool _wrap, bool _bounce);
15 | void update(int mouseX, int mouseY);
16 | void draw(ofFloatColor col);
17 |
18 | void add(ofVec2f pos, ofVec2f vel);
19 |
20 | static bool sortOnX(const particle *a, const particle *b);
21 | vector particles;
22 |
23 | int attractionRadius, repulsionRadius;
24 | float attractionForce, repulsionForce;
25 |
26 | float width, height;
27 | int maxParticles;
28 |
29 | bool wrap, bounce;
30 |
31 | float baseSize;
32 | float sizeMod;
33 |
34 | int alpha;
35 |
36 | bool drawCircles;
37 | bool drawLines;
38 |
39 | int tailLength;
40 | };
41 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/scenes/scene.h:
--------------------------------------------------------------------------------
1 | //
2 | // scene.h
3 | // just_you_AA_NI_GLSL
4 | //
5 | // Created by Jason Levine on 2013-11-11.
6 | //
7 | //
8 | #include "flowManager.h"
9 | #include "openNIManager.h"
10 | #include "ofxUI.h"
11 |
12 |
13 | #pragma once
14 |
15 | class scene {
16 | public:
17 | virtual void setup(openNIManager * _oni, flowManager * _flow ){}
18 | virtual void update(int width, int height){}
19 | virtual void draw(float x, float y, float scale){}
20 | virtual void toggleGUI(){}
21 | virtual void hideGUI(){}
22 | virtual void saveGUI(string filename){}
23 | virtual void loadGUI(string filename){}
24 |
25 | openNIManager * oni;
26 | flowManager * flow;
27 |
28 | ofxUICanvas *gui;
29 |
30 | // ofFloatColor bgColor;
31 | // bool bgColorChanged;
32 |
33 | };
34 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/scenes/smokeScene/fluid particles/FluidParticle.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Particle.cpp
3 | * ofxMSAFluid Demo
4 | *
5 | * Created by Mehmet Akten on 02/05/2009.
6 | * Copyright 2009 MSA Visuals Ltd.. All rights reserved.
7 | *
8 | */
9 |
10 | #include "FluidParticle.h"
11 |
12 | static const float MOMENTUM = 0.5f;
13 | static const float FLUID_FORCE = 0.6f;
14 |
15 | void fluidParticle::init(float x, float y) {
16 | pos = ofVec2f( x, y );
17 | vel = ofVec2f(0, 0);
18 | radius = 5;
19 | alpha = msa::Rand::randFloat( 0.3f, 1 );
20 | mass = msa::Rand::randFloat( 0.1f, 1 );
21 | }
22 |
23 | void fluidParticle::update( const msa::fluid::Solver &solver, const ofVec2f &windowSize, const ofVec2f &invWindowSize ) {
24 | // only update if particle is visible
25 | if( alpha == 0 )
26 | return;
27 |
28 | vel = solver.getVelocityAtPos( pos * invWindowSize ) * (mass * FLUID_FORCE ) * windowSize + vel * MOMENTUM;
29 | pos += vel;
30 |
31 | // bounce of edges
32 | if( pos.x < 0 ) {
33 | pos.x = 0;
34 | vel.x *= -1;
35 | }
36 | else if( pos.x > windowSize.x ) {
37 | pos.x = windowSize.x;
38 | vel.x *= -1;
39 | }
40 |
41 | if( pos.y < 0 ) {
42 | pos.y = 0;
43 | vel.y *= -1;
44 | }
45 | else if( pos.y > windowSize.y ) {
46 | pos.y = windowSize.y;
47 | vel.y *= -1;
48 | }
49 |
50 | // hackish way to make particles glitter when the slow down a lot
51 | // if( vel.squareLength() < 1 ) {
52 | // vel += msa::Rand::randVec2f() * 0.5f;
53 | // }
54 |
55 | // fade out a bit (and kill if alpha == 0);
56 | alpha *= 0.999f;
57 | if( alpha < 0.01f )
58 | alpha = 0;
59 | }
60 |
61 |
62 |
63 | void fluidParticle::updateVertexArrays( bool drawingFluid, const ofVec2f &invWindowSize, int i, float* posBuffer, float* colBuffer, ofFloatColor particleColor) {
64 | int vi = i * 4;
65 | posBuffer[vi++] = pos.x - vel.x;
66 | posBuffer[vi++] = pos.y - vel.y;
67 | posBuffer[vi++] = pos.x;
68 | posBuffer[vi++] = pos.y;
69 |
70 | int ci = i * 6;
71 | if( drawingFluid ) {
72 | // if drawing fluid, draw lines as black & white
73 | colBuffer[ci++] = particleColor.r;
74 | colBuffer[ci++] = particleColor.g;
75 | colBuffer[ci++] = particleColor.b;
76 | colBuffer[ci++] = particleColor.r;
77 | colBuffer[ci++] = particleColor.g;
78 | colBuffer[ci++] = particleColor.b;
79 | // colBuffer[ci++] = alpha;
80 | // colBuffer[ci++] = alpha;
81 | // colBuffer[ci++] = alpha;
82 | // colBuffer[ci++] = alpha;
83 | // colBuffer[ci++] = alpha;
84 | // colBuffer[ci++] = alpha;
85 | } else {
86 | // otherwise, use color
87 | float vxNorm = vel.x * invWindowSize.x;
88 | float vyNorm = vel.y * invWindowSize.y;
89 | float v2 = vxNorm * vxNorm + vyNorm * vyNorm;
90 | #define VMAX 0.013f
91 | if(v2>VMAX*VMAX) v2 = VMAX*VMAX;
92 | float satInc = mass > 0.5 ? mass * mass * mass : 0;
93 | satInc *= satInc * satInc * satInc;
94 | ofColor color;
95 | color.setHsb(0, v2 * 255.0f / ( VMAX * VMAX ) + satInc, ofLerp(0.5, 1, mass) * alpha * 255.0f);
96 |
97 | colBuffer[ci++] = color.r;
98 | colBuffer[ci++] = color.g;
99 | colBuffer[ci++] = color.b;
100 | colBuffer[ci++] = color.r;
101 | colBuffer[ci++] = color.g;
102 | colBuffer[ci++] = color.b;
103 | }
104 | }
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/scenes/smokeScene/fluid particles/FluidParticle.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Particle.h
3 | * ofxMSAFluid Demo
4 | *
5 | * Created by Mehmet Akten on 02/05/2009.
6 | * Copyright 2009 MSA Visuals Ltd.. All rights reserved.
7 | *
8 | */
9 |
10 | #pragma once
11 |
12 | #include "MSACore.h"
13 | #include "MSAFluidSolver.h"
14 |
15 | class fluidParticle {
16 | public:
17 | ofVec2f pos, vel;
18 | float radius;
19 | float alpha;
20 | float mass;
21 |
22 | void init(float x, float y);
23 | void update( const msa::fluid::Solver &solver, const ofVec2f &windowSize, const ofVec2f &invWindowSize );
24 | void updateVertexArrays( bool drawingFluid, const ofVec2f &invWindowSize, int i, float* posBuffer, float* colBuffer, ofFloatColor particleColor);
25 | };
26 |
27 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/scenes/smokeScene/fluid particles/FluidParticleSystem.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * ParticleSystem.cpp
3 | * ofxMSAFluid Demo
4 | *
5 | * Created by Mehmet Akten on 02/05/2009.
6 | * Copyright 2009 MSA Visuals Ltd.. All rights reserved.
7 | *
8 | */
9 |
10 | #include "FluidParticleSystem.h"
11 |
12 | fluidParticleSystem::fluidParticleSystem() {
13 | curIndex = 0;
14 | }
15 |
16 | void fluidParticleSystem::updateAndDraw(const msa::fluid::Solver &solver, ofVec2f windowSize, bool drawingFluid, ofFloatColor particleColor) {
17 | ofVec2f invWindowSize(1.0f / windowSize.x, 1.0f / windowSize.y);
18 |
19 | glEnable(GL_BLEND);
20 | glDisable(GL_TEXTURE_2D);
21 | glBlendFunc(GL_ONE,GL_ONE);
22 | // glEnable(GL_LINE_SMOOTH);
23 | ofSetLineWidth(1);
24 |
25 | for(int i=0; i 0) {
27 | particles[i].update(solver, windowSize, invWindowSize);
28 | particles[i].updateVertexArrays(drawingFluid, invWindowSize, i, posArray, colArray, particleColor);
29 | }
30 | }
31 | glEnableClientState(GL_VERTEX_ARRAY);
32 | glVertexPointer(2, GL_FLOAT, 0, posArray);
33 |
34 | glEnableClientState(GL_COLOR_ARRAY);
35 | glColorPointer(3, GL_FLOAT, 0, colArray);
36 |
37 | glDrawArrays(GL_LINES, 0, MAX_PARTICLES * 2);
38 |
39 | glDisableClientState(GL_VERTEX_ARRAY);
40 | glDisableClientState(GL_COLOR_ARRAY);
41 |
42 | glDisable(GL_BLEND);
43 | }
44 |
45 |
46 | void fluidParticleSystem::addParticles(const ofVec2f &pos, int count){
47 | for(int i=0; i= MAX_PARTICLES) curIndex = 0;
56 | }
57 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/scenes/smokeScene/fluid particles/FluidParticleSystem.h:
--------------------------------------------------------------------------------
1 | /*
2 | * ParticleSystem.h
3 | * ofxMSAFluid Demo
4 | *
5 | * Created by Mehmet Akten on 02/05/2009.
6 | * Copyright 2009 MSA Visuals Ltd.. All rights reserved.
7 | *
8 | */
9 | #pragma once
10 |
11 | #include "FluidParticle.h"
12 |
13 | #define MAX_PARTICLES 50000
14 |
15 | class fluidParticleSystem {
16 | public:
17 |
18 | float posArray[MAX_PARTICLES * 2 * 2];
19 | float colArray[MAX_PARTICLES * 3 * 2];
20 | int curIndex;
21 |
22 | fluidParticle particles[MAX_PARTICLES];
23 |
24 | fluidParticleSystem();
25 |
26 | void updateAndDraw(const msa::fluid::Solver &aSolver, ofVec2f windowSize, bool drawingFluid, ofFloatColor particleColor);
27 | void addParticles(const ofVec2f &pos, int count);
28 | void addParticle(const ofVec2f &pos);
29 | };
30 |
31 |
--------------------------------------------------------------------------------
/OpenFrameworks/JasonDanceSystem/src/scenes/smokeScene/smokeScene.h:
--------------------------------------------------------------------------------
1 | //
2 | // smokeScene.h
3 | // openNiSample007
4 | //
5 | // Created by Jason Levine on 2014-02-03.
6 | //
7 | //
8 |
9 | #pragma once
10 |
11 | #include "scene.h"
12 |
13 | #include "MSAFluid.h"
14 | #include "FluidParticleSystem.h"
15 |
16 | class smokeScene : public scene {
17 | public:
18 | void setup(openNIManager * _oni, flowManager * _flow );
19 | void update(int width, int height);
20 | void draw(float x, float y, float scale);
21 |
22 | openNIManager * oni;
23 | flowManager * flow;
24 |
25 | ofxUICanvas * gui;
26 | void toggleGUI(){ gui->toggleVisible(); }
27 | void hideGUI(){ gui->setVisible(false); }
28 | void saveGUI( string filename ) { gui->saveSettings(filename); }
29 | void loadGUI( string filename ) { gui->loadSettings(filename); }
30 |
31 | //----------------------------
32 |
33 | void fadeToColor(float r, float g, float b, float speed);
34 | void addToFluid(ofVec2f pos, ofVec2f vel, bool addColor, bool addForce);
35 | float colorMult;
36 | float velocityMult;
37 | int fluidCellsX;
38 | bool resizeFluid;
39 | bool drawFluid;
40 | bool drawParticles;
41 |
42 | msa::fluid::Solver fluidSolver;
43 | msa::fluid::DrawerGl fluidDrawer;
44 |
45 | fluidParticleSystem particleSystem;
46 |
47 | ofVec2f pMouse;
48 |
49 | float threshold;
50 |
51 | // ofFloatColor bgColor;
52 | ofFloatColor fluidColor;
53 | ofFloatColor particleColor;
54 |
55 |
56 | };
57 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_BgLines/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_BgLines/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_BgLines/addons.make:
--------------------------------------------------------------------------------
1 | ofxGui
2 | ofxOpenCv
3 | ofxCv
4 | ofxKinectProjectorToolkit
5 | ofxOpenNI
6 | ofxSecondWindow
7 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_BgLines/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/operatoolkit/OperaToolkit/2059ad0f24bf3fa1b00f392a380902b0e603ee56/OpenFrameworks/KinectProjector_BgLines/bin/data/.gitkeep
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_BgLines/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | cc.openFrameworks.ofapp
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_BgLines/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7 |
8 | // this kicks off the running of my app
9 | // can be OF_WINDOW or OF_FULLSCREEN
10 | // pass in width and height too:
11 | ofRunApp(new ofApp());
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_BgLines/src/ofApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxGui.h"
5 | #include "ofxOpenCv.h"
6 | #include "ofxCv.h"
7 | #include "ofxOpenNI.h"
8 | #include "ofxSecondWindow.h"
9 | #include "ofxKinectProjectorToolkit.h"
10 |
11 |
12 | // this must match the display resolution of your projector
13 | #define PROJECTOR_RESOLUTION_X 1280
14 | #define PROJECTOR_RESOLUTION_Y 1024
15 |
16 | using namespace ofxCv;
17 | using namespace cv;
18 |
19 |
20 | struct Contour
21 | {
22 | Contour(vector & points, ofPoint center, int label);
23 | void setPoints(vector & points, ofPoint center);
24 | void draw();
25 | int getNumPoints();
26 |
27 | vector points;
28 | ofPoint center;
29 | int label;
30 | int age;
31 | ofColor color;
32 | };
33 |
34 |
35 | class ofApp : public ofBaseApp
36 | {
37 | public:
38 | void setup();
39 | void update();
40 | void draw();
41 | void keyPressed(int key);
42 |
43 | private:
44 |
45 | void getCalibratedContour(ofShortPixels & depthPixels, vector & points, vector & calibratedPoints);
46 | void clean();
47 |
48 | ofxSecondWindow projector;
49 | ofxPanel gui;
50 |
51 | // kinect
52 | ofxOpenNI kinect;
53 | ofxKinectProjectorToolkit kpt;
54 | ofShortPixels depthPixels;
55 | ofxCvGrayscaleImage grayImage;
56 | ofxCvGrayscaleImage grayThreshNear;
57 | ofxCvGrayscaleImage grayThreshFar;
58 | ofxCv::ContourFinder contourFinder;
59 | bool hadUsers;
60 |
61 | map users;
62 | ofParameter useUserImage;
63 | ofParameter minArea;
64 | ofParameter maxArea;
65 | ofParameter smoothness;
66 | ofParameter nearThreshold;
67 | ofParameter farThreshold;
68 | ofParameter refreshAlpha;
69 | ofParameter color;
70 | ofParameter skip;
71 | ofParameter numPoints;
72 | ofParameter offset;
73 | ofParameter strokeWeight;
74 | ofParameter alpha;
75 | ofParameter lerpRate;
76 | ofParameter dilation;
77 | vector points;
78 | };
79 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Calibration/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Calibration/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Calibration/addons.make:
--------------------------------------------------------------------------------
1 | ofxOpenCv
2 | ofxCv
3 | ofxKinectProjectorToolkit
4 | ofxOpenNI
5 | ofxSecondWindow
6 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Calibration/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/operatoolkit/OperaToolkit/2059ad0f24bf3fa1b00f392a380902b0e603ee56/OpenFrameworks/KinectProjector_Calibration/bin/data/.gitkeep
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Calibration/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | cc.openFrameworks.ofapp
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Calibration/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7 |
8 | // this kicks off the running of my app
9 | // can be OF_WINDOW or OF_FULLSCREEN
10 | // pass in width and height too:
11 | ofRunApp(new ofApp());
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Calibration/src/ofApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxKinectProjectorToolkit.h"
5 | #include "ofxOpenNI.h"
6 | #include "ofxOpenCv.h"
7 | #include "ofxCv.h"
8 | #include "ofxSecondWindow.h"
9 |
10 |
11 | // this must match the display resolution of your projector
12 | #define PROJECTOR_RESOLUTION_X 1280
13 | #define PROJECTOR_RESOLUTION_Y 1024
14 |
15 |
16 | class ofApp : public ofBaseApp
17 | {
18 | public:
19 | void setup();
20 | void update();
21 | void draw();
22 |
23 | void keyPressed(int key);
24 | void mousePressed(int x, int y, int button);
25 |
26 | void drawChessboard(int x, int y, int chessboardSize);
27 | void drawTestingPoint(ofVec2f projectedPoint);
28 | void addPointPair();
29 |
30 | ofxOpenNI kinect;
31 | ofxKinectProjectorToolkit kpt;
32 |
33 | ofxSecondWindow secondWindow;
34 | ofFbo fboChessboard;
35 | ofxCvColorImage rgbImage;
36 | cv::Mat cvRgbImage;
37 | ofShortPixels depthPixels;
38 |
39 | vector currentProjectorPoints;
40 | vector cvPoints;
41 | vector pairsKinect;
42 | vector pairsProjector;
43 |
44 | string resultMessage;
45 | ofColor resultMessageColor;
46 | ofVec2f testPoint;
47 |
48 | int chessboardSize;
49 | int chessboardX;
50 | int chessboardY;
51 | bool testing;
52 | bool saved;
53 |
54 | bool foundChessboard;
55 | };
56 |
57 |
58 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Explosions/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Explosions/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Explosions/addons.make:
--------------------------------------------------------------------------------
1 | ofxOpenCv
2 | ofxBox2d
3 | ofxCv
4 | ofxKinectProjectorToolkit
5 | ofxOpenNI
6 | ofxSecondWindow
7 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Explosions/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/operatoolkit/OperaToolkit/2059ad0f24bf3fa1b00f392a380902b0e603ee56/OpenFrameworks/KinectProjector_Explosions/bin/data/.gitkeep
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Explosions/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | cc.openFrameworks.ofapp
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Explosions/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7 |
8 | // this kicks off the running of my app
9 | // can be OF_WINDOW or OF_FULLSCREEN
10 | // pass in width and height too:
11 | ofRunApp(new ofApp());
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Explosions/src/ofApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxGui.h"
5 | #include "ofxGifDecoder.h"
6 | #include "ofxOpenCv.h"
7 | #include "ofxCv.h"
8 | #include "ofxOpenNI.h"
9 | #include "ofxSecondWindow.h"
10 | #include "ofxKinectProjectorToolkit.h"
11 | #include "ofxBox2d.h"
12 |
13 |
14 | // this must match the display resolution of your projector
15 | #define PROJECTOR_RESOLUTION_X 1280
16 | #define PROJECTOR_RESOLUTION_Y 1024
17 |
18 | using namespace ofxCv;
19 | using namespace cv;
20 |
21 |
22 | class ItemData {
23 | public:
24 | int t;
25 | bool bHit;
26 | ItemData() {
27 | bHit = false;
28 | t = 0;
29 | }
30 | };
31 |
32 |
33 | struct Contour
34 | {
35 | Contour(vector & points, ofPoint center, int label);
36 | void setPoints(vector & points, ofPoint center);
37 | void draw();
38 | int getNumPoints();
39 |
40 | vector points;
41 | ofPoint center;
42 | int label;
43 | int age;
44 | ofColor color;
45 | };
46 |
47 |
48 | class ofApp : public ofBaseApp
49 | {
50 | public:
51 | void setup();
52 | void update();
53 | void draw();
54 | void keyPressed(int key);
55 |
56 | private:
57 |
58 | void contactStart(ofxBox2dContactArgs &e);
59 |
60 | struct IdCircle
61 | {
62 | ofPtr circle;
63 | int idx;
64 | IdCircle(ofPtr circle, int idx);
65 | };
66 |
67 | void addImage(string path);
68 | void addCircle(int index);
69 | void spurt(int index, int amount);
70 |
71 | void getCalibratedContour(ofShortPixels & depthPixels, vector & points, vector & calibratedPoints);
72 | void clean();
73 |
74 | ofxSecondWindow projector;
75 | ofxPanel gui;
76 |
77 | // kinect
78 | ofxOpenNI kinect;
79 | ofxKinectProjectorToolkit kpt;
80 | ofShortPixels depthPixels;
81 | ofxCvGrayscaleImage grayImage;
82 | ofxCvGrayscaleImage grayThreshNear;
83 | ofxCvGrayscaleImage grayThreshFar;
84 | ofxCv::ContourFinder contourFinder;
85 | bool hadUsers;
86 |
87 | map users;
88 | ofxBox2d box2d;
89 | vector circles;
90 | vector lines;
91 | vector > edges;
92 | vector img;
93 | bool hasSpurted;
94 | float spurtHack;
95 |
96 | ofParameter useUserImage;
97 | ofParameter nearThreshold;
98 | ofParameter farThreshold;
99 | ofParameter minArea;
100 | ofParameter maxArea;
101 | ofParameter smoothness;
102 | ofParameter contourColor;
103 | ofParameter rate;
104 | ofParameter isFalling;
105 | ofParameter tolerance;
106 | ofParameter circleDensity;
107 | ofParameter circleBounce;
108 | ofParameter circleFriction;
109 |
110 |
111 |
112 | //////
113 | int explosionTime = 30;
114 | int explosionRadius = 100;
115 |
116 | ofxGifDecoder decoder;
117 | ofxGifFile file;
118 | };
119 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Fluids/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Fluids/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Fluids/addons.make:
--------------------------------------------------------------------------------
1 | ofxGui
2 | ofxOpenCv
3 | ofxCv
4 | ofxFluid
5 | ofxFX
6 | ofxKinectProjectorToolkit
7 | ofxOpenNI
8 | ofxSecondWindow
9 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Fluids/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/operatoolkit/OperaToolkit/2059ad0f24bf3fa1b00f392a380902b0e603ee56/OpenFrameworks/KinectProjector_Fluids/bin/data/.gitkeep
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Fluids/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | cc.openFrameworks.ofapp
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Fluids/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7 |
8 | // this kicks off the running of my app
9 | // can be OF_WINDOW or OF_FULLSCREEN
10 | // pass in width and height too:
11 | ofRunApp(new ofApp());
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Fluids/src/ofApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxGui.h"
5 | #include "ofxOpenCv.h"
6 | #include "ofxCv.h"
7 | #include "ofxOpenNI.h"
8 | #include "ofxSecondWindow.h"
9 | #include "ofxKinectProjectorToolkit.h"
10 | #include "ofxFluid.h"
11 |
12 |
13 | // this must match the display resolution of your projector
14 | #define PROJECTOR_RESOLUTION_X 1280
15 | #define PROJECTOR_RESOLUTION_Y 1024
16 |
17 | using namespace ofxCv;
18 | using namespace cv;
19 |
20 |
21 | struct Contour
22 | {
23 | Contour(vector & points, ofPoint center, int label);
24 | void setPoints(vector & points, ofPoint center);
25 | void draw();
26 | int getNumPoints();
27 |
28 | vector points;
29 | ofPoint center;
30 | int label;
31 | int age;
32 | ofColor color;
33 | };
34 |
35 |
36 | class ofApp : public ofBaseApp
37 | {
38 | public:
39 | void setup();
40 | void update();
41 | void draw();
42 | void keyPressed(int key);
43 |
44 | private:
45 |
46 | void getCalibratedContour(ofShortPixels & depthPixels, vector & points, vector & calibratedPoints);
47 | void clean();
48 |
49 | ofxSecondWindow projector;
50 | ofxPanel gui;
51 |
52 | // kinect
53 | ofxOpenNI kinect;
54 | ofxKinectProjectorToolkit kpt;
55 | ofShortPixels depthPixels;
56 | ofxCvGrayscaleImage grayImage;
57 | ofxCvGrayscaleImage grayThreshNear;
58 | ofxCvGrayscaleImage grayThreshFar;
59 | ofxCv::ContourFinder contourFinder;
60 | bool hadUsers;
61 |
62 | map users;
63 | ofxFluid fluid;
64 | vector > pContourPoints;
65 | vector > displace;
66 | ofParameter simplify;
67 | ofParameter displaceLerp;
68 | ofParameter numContourPts;
69 | ofParameter skip;
70 | ofParameter maxUsers;
71 | ofParameter dissipation, velDissipation;
72 | ofParameter displacement;
73 | ofParameter strength;
74 | ofParameter gravityX, gravityY;
75 | ofParameter useUserImage;
76 | ofParameter nearThreshold;
77 | ofParameter farThreshold;
78 | ofParameter minArea;
79 | ofParameter maxArea;
80 | ofParameter smoothness;
81 | };
82 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Mask/KinectProjector_Mask.xcodeproj/xcshareddata/xcschemes/KinectProjector_Mask Debug.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Mask/KinectProjector_Mask.xcodeproj/xcshareddata/xcschemes/KinectProjector_Mask Release.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Mask/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Mask/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Mask/addons.make:
--------------------------------------------------------------------------------
1 | ofxGui
2 | ofxOpenCv
3 | ofxCv
4 | ofxKinectProjectorToolkit
5 | ofxLayerMask
6 | ofxOpenNI
7 | ofxSecondWindow
8 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Mask/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/operatoolkit/OperaToolkit/2059ad0f24bf3fa1b00f392a380902b0e603ee56/OpenFrameworks/KinectProjector_Mask/bin/data/.gitkeep
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Mask/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | cc.openFrameworks.ofapp
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Mask/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7 |
8 | // this kicks off the running of my app
9 | // can be OF_WINDOW or OF_FULLSCREEN
10 | // pass in width and height too:
11 | ofRunApp(new ofApp());
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Mask/src/ofApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxGui.h"
5 | #include "ofxOpenCv.h"
6 | #include "ofxCv.h"
7 | #include "ofxOpenNI.h"
8 | #include "ofxSecondWindow.h"
9 | #include "ofxKinectProjectorToolkit.h"
10 | #include "ofxLayerMask.h"
11 |
12 | // this must match the display resolution of your projector
13 | #define PROJECTOR_RESOLUTION_X 1280
14 | #define PROJECTOR_RESOLUTION_Y 1024
15 |
16 | using namespace ofxCv;
17 | using namespace cv;
18 |
19 |
20 | struct Contour
21 | {
22 | Contour(vector & points, ofPoint center, int label);
23 | void setPoints(vector & points, ofPoint center);
24 | void draw();
25 | int getNumPoints();
26 |
27 | vector points;
28 | ofPoint center;
29 | int label;
30 | int age;
31 | ofColor color;
32 | };
33 |
34 |
35 | class ofApp : public ofBaseApp
36 | {
37 | public:
38 | void setup();
39 | void update();
40 | void draw();
41 | void keyPressed(int key);
42 |
43 | private:
44 | void eventRefreshMask();
45 |
46 | void getCalibratedContour(ofShortPixels & depthPixels, vector & points, vector & calibratedPoints);
47 | void clean();
48 |
49 | ofxSecondWindow projector;
50 | ofxPanel gui;
51 |
52 | // kinect
53 | ofxOpenNI kinect;
54 | ofxKinectProjectorToolkit kpt;
55 | ofShortPixels depthPixels;
56 | ofxCvGrayscaleImage grayImage;
57 | ofxCvGrayscaleImage grayThreshNear;
58 | ofxCvGrayscaleImage grayThreshFar;
59 | ofxCv::ContourFinder contourFinder;
60 | bool hadUsers;
61 |
62 | ofxLayerMask masker;
63 | ofVideoPlayer video;
64 |
65 | map users;
66 | ofParameter useUserImage;
67 | ofParameter nearThreshold;
68 | ofParameter farThreshold;
69 | ofParameter minArea;
70 | ofParameter maxArea;
71 | ofParameter smoothness;
72 | ofParameter cumulative;
73 | ofxButton refreshMask;
74 | };
75 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Ribbons/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Ribbons/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Ribbons/addons.make:
--------------------------------------------------------------------------------
1 | ofxGui
2 | ofxOpenCv
3 | ofxCv
4 | ofxKinectProjectorToolkit
5 | ofxOpenNI
6 | ofxSecondWindow
7 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Ribbons/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/operatoolkit/OperaToolkit/2059ad0f24bf3fa1b00f392a380902b0e603ee56/OpenFrameworks/KinectProjector_Ribbons/bin/data/.gitkeep
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Ribbons/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | cc.openFrameworks.ofapp
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Ribbons/src/Ribbons.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 |
5 |
6 | struct Contour
7 | {
8 | Contour(vector & points, ofPoint center, int label);
9 | void setPoints(vector & points, ofPoint center);
10 | void draw();
11 | int getNumPoints();
12 |
13 | vector points;
14 | ofPoint center;
15 | int label;
16 | int age;
17 | ofColor color;
18 | };
19 |
20 |
21 | class Ribbon
22 | {
23 | public:
24 | Ribbon(Contour *contour,
25 | int maxAge, int speed, int length, int skip,
26 | int margin, float noiseFactor, float ageFactor,
27 | float lineWidth, int maxAlpha, int updateRate,
28 | float lerpRate, float dilate, int colorMargin, bool curved, bool match);
29 |
30 | void update();
31 | void addPoint(int p);
32 | void draw();
33 |
34 | Contour * getContour() {return contour;}
35 | bool getActive() {return active;}
36 |
37 | private:
38 |
39 | int idx, idxMatched;
40 | int age, maxAge;
41 | int speed;
42 | int length;
43 | int skip;
44 | bool active;
45 | int margin;
46 | float lineWidth;
47 | int maxAlpha;
48 | float noiseFactor, ageFactor;
49 | int updateRate;
50 | float lerpRate;
51 | float dilate;
52 | bool curved, match;
53 | int colorMargin;
54 | int offRed, offGreen, offBlue;
55 |
56 | Contour *contour;
57 | vector points;
58 | vector lookup;
59 | vector lookupMatched;
60 | };
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Ribbons/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7 |
8 | // this kicks off the running of my app
9 | // can be OF_WINDOW or OF_FULLSCREEN
10 | // pass in width and height too:
11 | ofRunApp(new ofApp());
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Ribbons/src/ofApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxGui.h"
5 | #include "ofxOpenCv.h"
6 | #include "ofxCv.h"
7 | #include "ofxOpenNI.h"
8 | #include "ofxSecondWindow.h"
9 | #include "ofxKinectProjectorToolkit.h"
10 | #include "Ribbons.h"
11 |
12 |
13 | // this must match the display resolution of your projector
14 | #define PROJECTOR_RESOLUTION_X 1280
15 | #define PROJECTOR_RESOLUTION_Y 1024
16 |
17 | using namespace ofxCv;
18 | using namespace cv;
19 |
20 | class ofApp : public ofBaseApp
21 | {
22 | public:
23 | void setup();
24 | void update();
25 | void draw();
26 | void keyPressed(int key);
27 |
28 | private:
29 |
30 | void getCalibratedContour(ofShortPixels & depthPixels, vector & points, vector & calibratedPoints);
31 | void clean();
32 |
33 | ofxSecondWindow projector;
34 | ofxPanel gui;
35 |
36 | // kinect
37 | ofxOpenNI kinect;
38 | ofxKinectProjectorToolkit kpt;
39 | ofShortPixels depthPixels;
40 | ofxCvGrayscaleImage grayImage;
41 | ofxCvGrayscaleImage grayThreshNear;
42 | ofxCvGrayscaleImage grayThreshFar;
43 | ofxCv::ContourFinder contourFinder;
44 | bool hadUsers;
45 |
46 | ofParameter useUserImage;
47 | ofParameter nearThreshold;
48 | ofParameter farThreshold;
49 | ofParameter minArea;
50 | ofParameter maxArea;
51 | ofParameter smoothness;
52 |
53 | map > ribbons;
54 | map users;
55 | ofParameter maxAgeMin, maxAgeMax;
56 | ofParameter speedMin, speedMax;
57 | ofParameter lengthMin, lengthMax;
58 | ofParameter skipMin, skipMax;
59 | ofParameter marginMin, marginMax;
60 | ofParameter noiseFactorMin, noiseFactorMax;
61 | ofParameter ageFactorMin, ageFactorMax;
62 | ofParameter lineWidthMin, lineWidthMax;
63 | ofParameter maxAlphaMin, maxAlphaMax;
64 | ofParameter lerpRateMin, lerpRateMax;
65 | ofParameter colorMarginMin, colorMarginMax;
66 | ofParameter updateRateMin, updateRateMax;
67 | ofParameter dilate;
68 | ofParameter curved, match;
69 | ofParameter numNew;
70 | ofParameter frameSkip;
71 | };
72 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Stars/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Stars/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Stars/addons.make:
--------------------------------------------------------------------------------
1 | ofxGui
2 | ofxOpenCv
3 | ofxBox2d
4 | ofxCv
5 | ofxKinectProjectorToolkit
6 | ofxOpenNI
7 | ofxSecondWindow
8 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Stars/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/operatoolkit/OperaToolkit/2059ad0f24bf3fa1b00f392a380902b0e603ee56/OpenFrameworks/KinectProjector_Stars/bin/data/.gitkeep
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Stars/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | cc.openFrameworks.ofapp
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Stars/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7 |
8 | // this kicks off the running of my app
9 | // can be OF_WINDOW or OF_FULLSCREEN
10 | // pass in width and height too:
11 | ofRunApp(new ofApp());
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_Stars/src/ofApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxGui.h"
5 | #include "ofxOpenCv.h"
6 | #include "ofxCv.h"
7 | #include "ofxOpenNI.h"
8 | #include "ofxSecondWindow.h"
9 | #include "ofxKinectProjectorToolkit.h"
10 | #include "ofxBox2d.h"
11 |
12 |
13 | // this must match the display resolution of your projector
14 | #define PROJECTOR_RESOLUTION_X 1280
15 | #define PROJECTOR_RESOLUTION_Y 1024
16 |
17 | using namespace ofxCv;
18 | using namespace cv;
19 |
20 |
21 | struct Contour
22 | {
23 | Contour(vector & points, ofPoint center, int label);
24 | void setPoints(vector & points, ofPoint center);
25 | void draw();
26 | int getNumPoints();
27 |
28 | vector points;
29 | ofPoint center;
30 | int label;
31 | int age;
32 | ofColor color;
33 | };
34 |
35 |
36 | class ofApp : public ofBaseApp
37 | {
38 | public:
39 | void setup();
40 | void update();
41 | void draw();
42 | void keyPressed(int key);
43 |
44 | private:
45 |
46 | struct IdCircle
47 | {
48 | ofPtr circle;
49 | int idx;
50 | IdCircle(ofPtr circle, int idx);
51 | };
52 |
53 | void addImage(string path);
54 | void addCircle(int index);
55 | void spurt(int index, int amount);
56 |
57 | void getCalibratedContour(ofShortPixels & depthPixels, vector & points, vector & calibratedPoints);
58 | void clean();
59 |
60 | ofxSecondWindow projector;
61 | ofxPanel gui;
62 |
63 | // kinect
64 | ofxOpenNI kinect;
65 | ofxKinectProjectorToolkit kpt;
66 | ofShortPixels depthPixels;
67 | ofxCvGrayscaleImage grayImage;
68 | ofxCvGrayscaleImage grayThreshNear;
69 | ofxCvGrayscaleImage grayThreshFar;
70 | ofxCv::ContourFinder contourFinder;
71 | bool hadUsers;
72 |
73 | map users;
74 | ofxBox2d box2d;
75 | vector circles;
76 | vector lines;
77 | vector > edges;
78 | vector img;
79 | bool hasSpurted;
80 | float spurtHack;
81 |
82 | ofParameter useUserImage;
83 | ofParameter nearThreshold;
84 | ofParameter farThreshold;
85 | ofParameter minArea;
86 | ofParameter maxArea;
87 | ofParameter smoothness;
88 | ofParameter contourColor;
89 | ofParameter rate;
90 | ofParameter isFalling;
91 | ofParameter tolerance;
92 | ofParameter circleDensity;
93 | ofParameter circleBounce;
94 | ofParameter circleFriction;
95 | };
96 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_VannaWhite/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_VannaWhite/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_VannaWhite/addons.make:
--------------------------------------------------------------------------------
1 | ofxGui
2 | ofxOpenCv
3 | ofxCv
4 | ofxKinectProjectorToolkit
5 | ofxOpenNI
6 | ofxSecondWindow
7 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_VannaWhite/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/operatoolkit/OperaToolkit/2059ad0f24bf3fa1b00f392a380902b0e603ee56/OpenFrameworks/KinectProjector_VannaWhite/bin/data/.gitkeep
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_VannaWhite/bin/data/settings.xml:
--------------------------------------------------------------------------------
1 |
2 | 890
3 | 595
4 | 0
5 | 1
6 | 255
7 | 189.949
8 | 0
9 | 150000
10 | 23
11 | 42
12 | 209
13 |
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_VannaWhite/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | cc.openFrameworks.ofapp
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_VannaWhite/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7 |
8 | // this kicks off the running of my app
9 | // can be OF_WINDOW or OF_FULLSCREEN
10 | // pass in width and height too:
11 | ofRunApp(new ofApp());
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/KinectProjector_VannaWhite/src/ofApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxGui.h"
5 | #include "ofxOpenCv.h"
6 | #include "ofxCv.h"
7 | #include "ofxOpenNI.h"
8 | #include "ofxSecondWindow.h"
9 | #include "ofxKinectProjectorToolkit.h"
10 |
11 | // display resolution of your projector (default)
12 | #define PROJECTOR_RESOLUTION_X 1280
13 | #define PROJECTOR_RESOLUTION_Y 800
14 | #define DEBUG_MODE true
15 |
16 | using namespace ofxCv;
17 | using namespace cv;
18 |
19 |
20 | struct Contour {
21 | Contour(vector & points, ofPoint center, int label);
22 | void setPoints(vector & points, ofPoint center);
23 | void draw();
24 | int getNumPoints();
25 |
26 | vector points;
27 | ofPoint center;
28 | int label;
29 | int age;
30 | ofColor color;
31 | };
32 |
33 |
34 | class TV {
35 | public:
36 | TV(int x, int y, int w, int h);
37 | void update();
38 | bool setActive(bool active);
39 | void draw();
40 |
41 | int x, y, w, h;
42 | bool active, pActive;
43 | float alph;
44 | ofColor color;
45 | };
46 |
47 |
48 | class ofApp : public ofBaseApp {
49 | public:
50 | void setup();
51 | void update();
52 | void draw();
53 | void keyPressed(int key);
54 | void exit();
55 |
56 | private:
57 | void setupTVs();
58 |
59 | void eventToProject(bool & b);
60 | void eventResizeProjector(int & v);
61 | void eventResizeTVs(int & v);
62 |
63 | void loadPreset();
64 | void savePreset();
65 |
66 | void getCalibratedContour(ofShortPixels & depthPixels, vector & points, vector & calibratedPoints);
67 | void clean();
68 |
69 | ofxSecondWindow projector;
70 | ofxPanel gui;
71 |
72 | // kinect
73 | ofxOpenNI kinect;
74 | ofxKinectProjectorToolkit kpt;
75 | ofShortPixels depthPixels;
76 | ofxCvGrayscaleImage grayImage;
77 | ofxCvGrayscaleImage grayThreshNear;
78 | ofxCvGrayscaleImage grayThreshFar;
79 | ofxCv::ContourFinder contourFinder;
80 | bool hadUsers;
81 |
82 | // app objects
83 | map users;
84 | map tvs;
85 | int nx, ny;
86 |
87 | // parameters, gui
88 | ofParameter projectorWidth;
89 | ofParameter projectorHeight;
90 | ofParameter toProject;
91 |
92 | ofParameter useUserImage;
93 | ofParameter nearThreshold;
94 | ofParameter farThreshold;
95 | ofParameter minArea;
96 | ofParameter maxArea;
97 | ofParameter smoothness;
98 |
99 | ofParameter tvWidth;
100 | ofParameter tvHeight;
101 | };
102 |
--------------------------------------------------------------------------------
/OpenFrameworks/Looper/Looper.xcodeproj/xcshareddata/xcschemes/Looper Debug.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/OpenFrameworks/Looper/Looper.xcodeproj/xcshareddata/xcschemes/Looper Release.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/OpenFrameworks/Looper/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/Looper/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/OpenFrameworks/Looper/addons.make:
--------------------------------------------------------------------------------
1 | ofxOsc
2 | ofxXmlSettings
3 | ofxBpm
4 | ofxSuperCollider
5 | ofxUI
6 |
--------------------------------------------------------------------------------
/OpenFrameworks/Looper/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/operatoolkit/OperaToolkit/2059ad0f24bf3fa1b00f392a380902b0e603ee56/OpenFrameworks/Looper/bin/data/.gitkeep
--------------------------------------------------------------------------------
/OpenFrameworks/Looper/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | cc.openFrameworks.ofapp
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenFrameworks/Looper/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7 |
8 | // this kicks off the running of my app
9 | // can be OF_WINDOW or OF_FULLSCREEN
10 | // pass in width and height too:
11 | ofRunApp(new ofApp());
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/Looper/src/ofApp.cpp:
--------------------------------------------------------------------------------
1 | #include "ofApp.h"
2 |
3 |
4 | //--------------------------------------------------------------
5 | void ofApp::setup(){
6 | looper.setup(&sc3);
7 | }
8 |
9 | //--------------------------------------------------------------
10 | void ofApp::update(){
11 | looper.update();
12 | }
13 |
14 | //--------------------------------------------------------------
15 | void ofApp::draw(){
16 | }
17 |
18 | //--------------------------------------------------------------
19 | void ofApp::keyPressed(int key){
20 | if (key=='1') {
21 | //e->setRecording(true);
22 | }
23 | if (key=='2') {
24 | //e->setPlaying(true);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/OpenFrameworks/Looper/src/ofApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "SuperColliderLooper.h"
5 |
6 |
7 | class ofApp : public ofBaseApp{
8 |
9 | public:
10 | void setup();
11 | void update();
12 | void draw();
13 | void keyPressed(int key);
14 |
15 | SuperCollider sc3;
16 | SuperColliderLooper looper;
17 | };
18 |
--------------------------------------------------------------------------------
/OpenFrameworks/MirrorMesh/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/MirrorMesh/MirrorMesh.xcodeproj/xcshareddata/xcschemes/MirrorMesh Debug.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/OpenFrameworks/MirrorMesh/MirrorMesh.xcodeproj/xcshareddata/xcschemes/MirrorMesh Release.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/OpenFrameworks/MirrorMesh/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/OpenFrameworks/MirrorMesh/addons.make:
--------------------------------------------------------------------------------
1 | ofxGui
2 | ofxMultiKinectV2
3 | ofxTurboJpeg
4 |
--------------------------------------------------------------------------------
/OpenFrameworks/MirrorMesh/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/operatoolkit/OperaToolkit/2059ad0f24bf3fa1b00f392a380902b0e603ee56/OpenFrameworks/MirrorMesh/bin/data/.gitkeep
--------------------------------------------------------------------------------
/OpenFrameworks/MirrorMesh/bin/data/k2.frag:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | void main()
4 | {
5 | // gl_FragColor = gl_Color;
6 | gl_FragColor = gl_Color;
7 | }
--------------------------------------------------------------------------------
/OpenFrameworks/MirrorMesh/bin/data/k2.vert:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | uniform mat4 modelViewProjectionMatrix;
4 |
5 | void main(){
6 | vec4 position = gl_Vertex;
7 | gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * position;
8 | gl_FrontColor = gl_Color;
9 | }
10 |
--------------------------------------------------------------------------------
/OpenFrameworks/MirrorMesh/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | cc.openFrameworks.ofapp
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenFrameworks/MirrorMesh/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7 |
8 | // this kicks off the running of my app
9 | // can be OF_WINDOW or OF_FULLSCREEN
10 | // pass in width and height too:
11 | ofRunApp(new ofApp());
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/MirrorMesh/src/ofApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxMultiKinectV2.h"
5 |
6 |
7 | #define STRINGIFY(x) #x
8 |
9 | static string depthFragmentShader =
10 | STRINGIFY(
11 | uniform sampler2DRect tex;
12 | void main()
13 | {
14 | vec4 col = texture2DRect(tex, gl_TexCoord[0].xy);
15 | float value = col.r;
16 | float low1 = 500.0;
17 | float high1 = 5000.0;
18 | float low2 = 1.0;
19 | float high2 = 0.0;
20 | float d = clamp(low2 + (value - low1) * (high2 - low2) / (high1 - low1), 0.0, 1.0);
21 | if (d == 1.0) {
22 | d = 0.0;
23 | }
24 | gl_FragColor = vec4(vec3(d), 1.0);
25 | }
26 | );
27 |
28 | static string irFragmentShader =
29 | STRINGIFY(
30 | uniform sampler2DRect tex;
31 | void main()
32 | {
33 | vec4 col = texture2DRect(tex, gl_TexCoord[0].xy);
34 | float value = col.r / 65535.0;
35 | gl_FragColor = vec4(vec3(value), 1.0);
36 | }
37 | );
38 |
39 | #include "GpuRegistration.h"
40 |
41 |
42 |
43 | class ofApp : public ofBaseApp{
44 |
45 | public:
46 | void setup();
47 | void update();
48 | void draw();
49 |
50 | void keyPressed(int key);
51 | void keyReleased(int key);
52 | void mouseMoved(int x, int y );
53 | void mouseDragged(int x, int y, int button);
54 | void mousePressed(int x, int y, int button);
55 | void mouseReleased(int x, int y, int button);
56 | void windowResized(int w, int h);
57 | void dragEvent(ofDragInfo dragInfo);
58 | void gotMessage(ofMessage msg);
59 |
60 | ofxMultiKinectV2 kinect0;
61 | ofTexture colorTex0;
62 | ofTexture depthTex0;
63 | ofTexture irTex0;
64 |
65 | bool process_occlusion;
66 |
67 | ofEasyCam ecam;
68 | ofVboMesh mesh;
69 |
70 | ofShader shader;
71 |
72 | ofShader depthShader;
73 | ofShader irShader;
74 |
75 | GpuRegistration gr;
76 |
77 | ofPixels pixels;
78 |
79 | };
80 |
--------------------------------------------------------------------------------
/OpenFrameworks/README.md:
--------------------------------------------------------------------------------
1 | # OpenFrameworks apps
2 |
3 | ## Installation
4 |
5 | This parent folder must be copied to the "apps" folder of your OpenFrameworks root folder, i.e. from
6 |
7 | mv Your_Opera_Toolkit_Folder/OpenFrameworks Your_OpenFrameworks_Folder/apps/
8 |
9 | This is a complete list of all addons required to run the applications here.
10 |
11 | - [ofxMultiKinectV2](https://github.com/hanasaan/ofxMultiKinectV2)
12 | - [ofxTurboJpeg](https://github.com/armadillu/ofxTurboJpeg)
13 | - [ofxSecondWindow](https://github.com/genekogan/ofxSecondWindow)
14 |
15 |
16 | ## Application descriptions
17 |
18 | #### ThousandArms
19 |
20 | This app draws records and draws multiple (many!) copies of a performer onto the wall behind them. Requires [Kinect V2](http://www.amazon.com/Microsoft-Kinect-for-Windows-V2/dp/B00KZIVEXO)
21 |
22 | #### ThousandArmsV1
23 |
24 | This app draws records and draws multiple (many!) copies of a performer onto the wall behind them. Requires [original Kinect](http://www.amazon.com/Kinect-Sensor-Adventures-Xbox-360/dp/B002BSA298/ref=sr_1_2?s=videogames&ie=UTF8&qid=1442012505&sr=1-2&keywords=kinect)
25 |
26 |
27 | #### KinectProjector_Calibration
28 |
29 | Application for calibrating Kinect and projector together for use in the following apps.
30 |
31 | #### KinectProjector_Ribbons
32 |
33 | Noisy ribbons tracing the contours around performers bodies.
34 |
35 | #### KinectProjector_BgLines
36 |
37 | Tracing performers bodies on a wall with black and white lines around their contours. This is currently not working yet but will be soon.
38 |
39 | #### MirrorMesh
40 |
41 | Deforming your mesh -- to-do: make audioreactive.
42 |
43 | #### JasonDanceSystem
44 |
45 | Jason Levine's kinect-tracked visuals -- to-do: hook this up to ofxKinectProjectorToolkit.
46 |
47 | #### Doppelganger
48 |
49 | Interact with your own shadow -- a copy of yourself which follows you around. This is currently buggy -- needs to be fixed.
50 |
51 |
52 | ### To-do:
53 |
54 | Apps to add:
55 | - Interacting with own shadow + mirror image
56 | - Fix BgLines
57 | - Add more KinectProjector apps : fluids, falling objects, and more.
58 | - Instructions
59 | - Release binaries for people to run without source code
60 | - Instructions for how to get the openni data files necessary to run in any ofxOpenNi applications.
61 |
62 | Tasks:
63 | - release runnable applications
64 | - pictures/thumbnails
65 | - instructions for each app
66 |
--------------------------------------------------------------------------------
/OpenFrameworks/Reprojection/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=$(realpath ../../..)
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/Reprojection/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/OpenFrameworks/Reprojection/Reprojection.xcodeproj/xcshareddata/xcschemes/Reprojection Debug.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/OpenFrameworks/Reprojection/Reprojection.xcodeproj/xcshareddata/xcschemes/Reprojection Release.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/OpenFrameworks/Reprojection/addons.make:
--------------------------------------------------------------------------------
1 | ofxGui
2 | ofxHomography
3 |
--------------------------------------------------------------------------------
/OpenFrameworks/Reprojection/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/operatoolkit/OperaToolkit/2059ad0f24bf3fa1b00f392a380902b0e603ee56/OpenFrameworks/Reprojection/bin/data/.gitkeep
--------------------------------------------------------------------------------
/OpenFrameworks/Reprojection/bin/data/brcosa.frag:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | uniform vec2 resolution;
4 | uniform float brightness;
5 | uniform float contrast;
6 | uniform float saturation;
7 | uniform float offset;
8 | uniform sampler2DRect texture;
9 |
10 |
11 | void main( void )
12 | {
13 | vec2 st = gl_FragCoord.st;
14 |
15 | vec2 st2 = gl_FragCoord.st / resolution.xy;
16 |
17 |
18 |
19 | st2 = offset * (1.0 - st2) + st2 * (1.0 - offset);
20 |
21 | st = st2 * resolution;
22 |
23 |
24 | vec3 texColor = texture2DRect(texture, st).rgb;
25 |
26 | const vec3 LumCoeff = vec3(0.2125, 0.7154, 0.0721);
27 | vec3 AvgLumin = vec3(0.5, 0.5, 0.5);
28 | vec3 intensity = vec3(dot(texColor, LumCoeff));
29 |
30 | vec3 satColor = mix(intensity, texColor, saturation);
31 | vec3 conColor = mix(AvgLumin, satColor, contrast);
32 | vec4 color = vec4(brightness * conColor, 1.0);
33 | gl_FragColor = color;
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/OpenFrameworks/Reprojection/bin/data/channels.frag:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | uniform sampler2DRect texture;
4 |
5 | uniform vec3 biasx, biasy;
6 | uniform vec3 multx, multy;
7 |
8 | void main(void) {
9 | vec2 st = gl_FragCoord.st;
10 | //vec2 st = pos.xy;
11 | vec2 pr = vec2(multx.x, multy.x) * st + vec2(biasx.x, biasy.x);
12 | vec2 pg = vec2(multx.y, multy.y) * st + vec2(biasx.y, biasy.y);
13 | vec2 pb = vec2(multx.z, multy.z) * st + vec2(biasx.z, biasy.z);
14 |
15 | float r = texture2DRect(texture, pr).r;
16 | float g = texture2DRect(texture, pg).g;
17 | float b = texture2DRect(texture, pb).b;
18 | gl_FragColor = vec4(r, g, b, 1.0);
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/OpenFrameworks/Reprojection/bin/data/hue.frag:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | const vec4 kRGBToYPrime = vec4 (0.299, 0.587, 0.114, 0.0);
4 | const vec4 kRGBToI = vec4 (0.596, -0.275, -0.321, 0.0);
5 | const vec4 kRGBToQ = vec4 (0.212, -0.523, 0.311, 0.0);
6 |
7 | const vec4 kYIQToR = vec4 (1.0, 0.956, 0.621, 0.0);
8 | const vec4 kYIQToG = vec4 (1.0, -0.272, -0.647, 0.0);
9 | const vec4 kYIQToB = vec4 (1.0, -1.107, 1.704, 0.0);
10 |
11 | uniform sampler2DRect texture;
12 | uniform float hue;
13 |
14 | void main ()
15 | {
16 | // Sample the input pixel
17 | vec4 color = texture2DRect(texture, gl_FragCoord.st).rgba;
18 |
19 | // Convert to YIQ
20 | float YPrime = dot (color, kRGBToYPrime);
21 | float I = dot (color, kRGBToI);
22 | float Q = dot (color, kRGBToQ);
23 |
24 | // Calculate the chroma
25 | float chroma = sqrt (I * I + Q * Q);
26 |
27 | // Convert desired hue back to YIQ
28 | Q = chroma * sin (hue);
29 | I = chroma * cos (hue);
30 |
31 | // Convert back to RGB
32 | vec4 yIQ = vec4 (YPrime, I, Q, 0.0);
33 | color.r = dot (yIQ, kYIQToR);
34 | color.g = dot (yIQ, kYIQToG);
35 | color.b = dot (yIQ, kYIQToB);
36 |
37 | // Save the result
38 | gl_FragColor = color;
39 | }
--------------------------------------------------------------------------------
/OpenFrameworks/Reprojection/bin/data/mapping.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 0
4 | 0
5 | 500
6 | 0
7 | 500
8 | 614
9 | 0
10 | 614
11 | 823
12 | 92
13 | 1120
14 | 73
15 | 1195
16 | 589
17 | 800
18 | 588
19 |
20 |
21 | 0
22 | 0
23 | 500
24 | 0
25 | 500
26 | 620
27 | 0
28 | 620
29 | 72
30 | 72
31 | 572
32 | 72
33 | 572
34 | 692
35 | 72
36 | 692
37 |
38 |
39 | 28
40 | 28
41 | 471
42 | 28
43 | 471
44 | 587
45 | 28
46 | 587
47 | 109
48 | 109
49 | 651
50 | 183
51 | 678
52 | 794
53 | 109
54 | 794
55 |
56 |
57 |
--------------------------------------------------------------------------------
/OpenFrameworks/Reprojection/bin/data/neon.frag:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | uniform sampler2DRect texture;
4 | uniform float brt;
5 | uniform float rad;
6 |
7 | //const vec2 texOffset = vec2(1.0, 1.0);
8 |
9 | void main(void) {
10 | float i = 0.0;
11 | float j = 0.0;
12 | vec4 sum = vec4(0.0);
13 |
14 | for( i=-rad;i
2 |
3 | 1.04592
4 | 1
5 | 0.913616
6 | 1
7 | 0.100811
8 | 0.0153061
9 | 1
10 | 0.102387
11 | 10
12 | 0.01
13 | 3
14 | 0.1
15 |
16 |
17 | 1
18 | 1
19 | 0.95446
20 | 1
21 | 0.297845
22 | 0.1
23 | 1
24 | 0.159277
25 | 10
26 | 0.01
27 | 3
28 | 0.1
29 |
30 |
31 | 1
32 | 1
33 | 0.904876
34 | 1
35 | 0.104009
36 | 0.00510204
37 | 2.73469
38 | 0.100013
39 | 36
40 | 0.0020102
41 | 3
42 | 0.0116071
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/OpenFrameworks/Reprojection/bin/data/standard.vert:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | uniform mat4 modelViewProjectionMatrix;
4 |
5 | void main(){
6 | gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;
7 | }
8 |
--------------------------------------------------------------------------------
/OpenFrameworks/Reprojection/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | cc.openFrameworks.ofapp
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenFrameworks/Reprojection/src/ProjectionMapping.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxHomography.h"
5 |
6 |
7 |
8 | class Quad
9 | {
10 | public:
11 | Quad();
12 |
13 | void setDebug(bool debugging, bool debugMe);
14 | void drawDebug();
15 |
16 | void begin();
17 | void end();
18 |
19 | ofPoint getInputCorner(int idx);
20 | ofPoint getOutputCorner(int idx);
21 |
22 | void setInputCorner(int idx, int x, int y);
23 | void setOutputCorner(int idx, int x, int y);
24 |
25 | void moveOutputCorner(int x, int y);
26 | void grabOutputCorner(int x, int y);
27 | void releaseOutputCorner();
28 |
29 | private:
30 |
31 | bool debugging, debugMe;
32 | int selectedCorner;
33 | ofPoint lastGrabbedPoint;
34 | ofPoint inputCorners[4];
35 | ofPoint outputCorners[4];
36 | ofMatrix4x4 homography;
37 | };
38 |
39 |
40 |
41 | class ProjectionMapping
42 | {
43 | public:
44 | ProjectionMapping();
45 |
46 | bool getMouseEventsAuto() {return mouseAuto;}
47 | void setMouseEventsAuto(bool mouseAuto);
48 |
49 | void setMouseResolution(int x, int y);
50 |
51 | void addQuad(int width, int height);
52 | Quad * getQuad(int idx) {return quads[idx];}
53 |
54 | void begin(int idx) { quads[idx]->begin(); }
55 | void end(int idx) { quads[idx]->end(); }
56 |
57 | void mousePressed(ofMouseEventArgs &e);
58 | void mouseDragged(ofMouseEventArgs &e);
59 | void mouseReleased(ofMouseEventArgs &e);
60 | void keyPressed(ofKeyEventArgs &e);
61 | void windowResized(ofResizeEventArgs &e);
62 |
63 | void setDebug(bool debug);
64 | void toggleDebug();
65 | void toggleSelectedQuad(int shift=1);
66 | bool getDebug() { return debug; }
67 |
68 | void loadPreset(string path);
69 | void savePreset(string path);
70 |
71 | void getXml(ofXml &xml);
72 | void setFromXml(ofXml &xml);
73 |
74 | private:
75 |
76 | vector quads;
77 | bool debug;
78 | bool mouseAuto;
79 | int selected;
80 | ofPoint mouseResolution;
81 | bool isManualResolution;
82 | };
83 |
84 |
--------------------------------------------------------------------------------
/OpenFrameworks/Reprojection/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7 |
8 | // this kicks off the running of my app
9 | // can be OF_WINDOW or OF_FULLSCREEN
10 | // pass in width and height too:
11 | ofRunApp(new ofApp());
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArms/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArms/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArms/ThousandArms.xcodeproj/xcshareddata/xcschemes/ThousandArms Debug.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArms/ThousandArms.xcodeproj/xcshareddata/xcschemes/ThousandArms Release.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArms/addons.make:
--------------------------------------------------------------------------------
1 | ofxOpenCv
2 | ofxCv
3 | ofxMultiKinectV2
4 | ofxSecondWindow
5 | ofxTurboJpeg
6 | ofxGui
7 |
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArms/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/operatoolkit/OperaToolkit/2059ad0f24bf3fa1b00f392a380902b0e603ee56/OpenFrameworks/ThousandArms/bin/data/.gitkeep
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArms/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | cc.openFrameworks.ofapp
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArms/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7 |
8 | // this kicks off the running of my app
9 | // can be OF_WINDOW or OF_FULLSCREEN
10 | // pass in width and height too:
11 | ofRunApp(new ofApp());
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArms/src/ofApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #define STRINGIFY(x) #x
4 |
5 | #include "ofMain.h"
6 | #include "ofxMultiKinectV2.h"
7 | #include "ofxGui.h"
8 | #include "ofxSecondWindow.h"
9 | #include "GpuRegistration.h"
10 |
11 |
12 | class ofApp : public ofBaseApp{
13 | public:
14 | void setup();
15 | void update();
16 | void draw();
17 |
18 | void keyPressed(int key);
19 | void keyReleased(int key);
20 | void mouseMoved(int x, int y );
21 | void mouseDragged(int x, int y, int button);
22 | void mousePressed(int x, int y, int button);
23 | void mouseReleased(int x, int y, int button);
24 | void windowResized(int w, int h);
25 | void dragEvent(ofDragInfo dragInfo);
26 | void gotMessage(ofMessage msg);
27 |
28 | ofxSecondWindow projector;
29 |
30 | ofxMultiKinectV2 kinect0;
31 | ofTexture colorTex0;
32 | ofTexture depthTex0;
33 | ofShader depthShader;
34 | GpuRegistration img;
35 | vector fbo;
36 |
37 | ofParameter appFrameSkip;
38 | ofParameter debug;
39 | ofParameter recording;
40 | ofParameter totalNumImages;
41 | ofParameter frameRate;
42 | ofParameter numImages;
43 | ofParameter frameSkip;
44 | ofParameter imageSkip;
45 | ofParameter depthThreshold;
46 |
47 | ofxPanel gui;
48 |
49 | int indexImage;
50 | };
51 |
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArmsV1/Makefile:
--------------------------------------------------------------------------------
1 | # Attempt to load a config.make file.
2 | # If none is found, project defaults in config.project.make will be used.
3 | ifneq ($(wildcard config.make),)
4 | include config.make
5 | endif
6 |
7 | # make sure the the OF_ROOT location is defined
8 | ifndef OF_ROOT
9 | OF_ROOT=../../..
10 | endif
11 |
12 | # call the project makefile!
13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArmsV1/Project.xcconfig:
--------------------------------------------------------------------------------
1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
3 | OF_PATH = ../../..
4 |
5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
7 |
8 | //ICONS - NEW IN 0072
9 | ICON_NAME_DEBUG = icon-debug.icns
10 | ICON_NAME_RELEASE = icon.icns
11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/
12 |
13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to:
14 | //ICON_FILE_PATH = bin/data/
15 |
16 | OTHER_LDFLAGS = $(OF_CORE_LIBS)
17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
18 |
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArmsV1/ThousandArmsV1.xcodeproj/xcshareddata/xcschemes/ThousandArmsV1 Debug.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArmsV1/ThousandArmsV1.xcodeproj/xcshareddata/xcschemes/ThousandArmsV1 Release.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArmsV1/addons.make:
--------------------------------------------------------------------------------
1 | ofxKinect
2 | ofxOpenCv
3 | ofxControl
4 | ofxCv
5 | ofxLayerMask
6 | ofxSecondWindow
7 | ofxOsc
8 | ofxGui
9 |
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArmsV1/bin/data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/operatoolkit/OperaToolkit/2059ad0f24bf3fa1b00f392a380902b0e603ee56/OpenFrameworks/ThousandArmsV1/bin/data/.gitkeep
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArmsV1/openFrameworks-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | cc.openFrameworks.ofapp
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | APPL
15 | CFBundleSignature
16 | ????
17 | CFBundleVersion
18 | 1.0
19 | CFBundleIconFile
20 | ${ICON}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArmsV1/src/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ofMain.h"
2 | #include "ofApp.h"
3 |
4 | //========================================================================
5 | int main( ){
6 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
7 |
8 | // this kicks off the running of my app
9 | // can be OF_WINDOW or OF_FULLSCREEN
10 | // pass in width and height too:
11 | ofRunApp(new ofApp());
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/OpenFrameworks/ThousandArmsV1/src/ofApp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ofMain.h"
4 | #include "ofxGui.h"
5 | #include "ofxOpenCv.h"
6 | #include "ofxKinect.h"
7 | #include "ofxLayerMask.h"
8 | #include "ofxSecondWindow.h"
9 |
10 |
11 | class ofApp : public ofBaseApp {
12 | public:
13 | void setup();
14 | void update();
15 | void draw();
16 | void exit();
17 |
18 | void keyPressed(int key);
19 | void mouseDragged(int x, int y, int button);
20 | void mousePressed(int x, int y, int button);
21 | void mouseReleased(int x, int y, int button);
22 | void windowResized(int w, int h);
23 |
24 | ofxSecondWindow projector;
25 |
26 | ofxKinect kinect;
27 |
28 | ofxCvColorImage colorImg;
29 | ofxCvGrayscaleImage grayImage;
30 | ofxCvGrayscaleImage grayThreshNear;
31 | ofxCvGrayscaleImage grayThreshFar;
32 |
33 | ofxLayerMask masker;
34 | vector fbo;
35 |
36 | ofParameter appFrameSkip;
37 | ofParameter debug;
38 | ofParameter recording;
39 | ofParameter totalNumImages;
40 | ofParameter frameRate;
41 | ofParameter numImages;
42 | ofParameter frameSkip;
43 | ofParameter imageSkip;
44 | ofParameter nearThreshold;
45 | ofParameter farThreshold;
46 | ofParameter translate;
47 | ofParameter scale;
48 |
49 | ofxPanel gui;
50 |
51 | int indexImage;
52 | int indexDraw;
53 | };
54 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Opera Toolkit
2 |
3 | [Opera Toolkit](https://www.operatoolkit.github.io) is a collection of audiovisual tools for performance, specifically dramatic musical narratives, or opera. The toolkit will consist of basic, self-contained software-based modules of audio and visual effects, ranging from straightforward ones like filters and sequencers, to more novel procedures and analytical devices. The interconnectedness of the toolkit components will be akin to a modular synthesizer, encouraging rapid prototyping and giving imaginative users the ability to arrange modules into sequences and networks of arbitrary complexity, accelerating the discovery of unexpected and serendipitous results, and reducing tension between technological and aesthetic impulses
4 |
5 | The motivation for the toolkit is reducing the knowledge gap between technologists and performance artists which persists in contemporary new media production. Just as knowledge of electromagnetism is not required to play an electric guitar, we take the position that technical barriers should be reduced for tasteful integration of technology within the performing arts. We hope the toolkit will be accessible to artists and creatives who do not necessarily specialize in technology. We also hope the toolkit will assist in facilitating collaboration between parties who use different software and hardware set ups to produce work, including but not limited to openFrameworks, Max/MSP, Ableton Live, Processing, various DAWs.
6 |
7 | ### Gene Kogan
8 |
9 | Gene Kogan is an artist and programmer based in New York. He integrates emerging technologies into performing contexts including live music, dance, and theatre. His artistic output is characterized by inquiries into the grey areas of computational intelligence, and the application of machine learning to controlling generative and parametric systems. He is a contributor to OpenFrameworks, Processing, and other free and open-source creative software tools.
10 |
11 | ### Lisa Kori Chung
12 |
13 | Lisa Kori Chung is an artist, creative producer and researcher working in the realms of sound art, performance, and the future of fashion. As a 2010-2011 Watson Fellow, she documented various communities that formed around technologically-based art practices. This interest in collaboration and community building, as well as bridging different forms of knowledge, has continued throughout her projects. These include Open Fit (with Kyle McDonald), an open source clothing workflow that brings pattern making knowledge into the Processing environment, Pianokosmos (with Tal Isaac Hadad and Gawid Gorny), a reactive system that illuminates nuances of a performerʻs gestures, and Sway (with Caitlin Morris), an immersive sound installation that aims to connect physical and sonic textures. She is currently a freelance creative producer and an artist-in-residence at Eyebeam Art + Technology Center.
14 |
15 | ### Colin Self
16 |
17 | Colin Self is an artist currently based in New York.
18 |
19 | Colin composes and choreographs music, performance, and environments for expanding consciousness, troubling binaries and boundaries of perception and communication. Working with communities across disciplines and practices, Colin utilizes voice, bodies, and computers to interface with biological and technological software.
20 |
21 | Colin Self is a Bard Milton-Avery MFA Candidate in Music / Sound.
22 |
23 | ### Eyebeam
24 | This project is supported by a residency at Eyebeam Art + Technology Center, Brooklyn, NY.
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Unsorted/Max_OSC_Processing/Max_OSC_Processing.pde:
--------------------------------------------------------------------------------
1 | import oscP5.*;
2 | import netP5.*;
3 |
4 | float time1, time2;
5 | float dt1, dt2;
6 | float val1, val2;
7 |
8 | ArrayList notes;
9 |
10 | OscP5 oscP5;
11 | NetAddress myRemoteLocation;
12 |
13 | void setup() {
14 | size(400,400);
15 | frameRate(25);
16 |
17 | oscP5 = new OscP5(this,12000);
18 | myRemoteLocation = new NetAddress("127.0.0.1",12000);
19 |
20 | notes = new ArrayList();
21 | notes.add(60);
22 | notes.add(62);
23 | notes.add(64);
24 | notes.add(65);
25 | notes.add(67);
26 | notes.add(69);
27 | notes.add(71);
28 | notes.add(72);
29 |
30 | dt1 = 1.0;
31 | dt2 = 1.0;
32 | }
33 |
34 | void draw() {
35 | background(0);
36 |
37 |
38 | ArrayList sampledNotes = new ArrayList();
39 |
40 | int numTimes = (int) val2;
41 | for (int i=0; i