├── .gitignore ├── README.md ├── art-code-c++ ├── README.md ├── funks ├── funkshuns.cpp ├── hello ├── hello.cpp ├── if-then-so-what.cpp ├── ifthen ├── loops-huh.cpp ├── loopshuh ├── variables └── variables.cpp ├── cooking ├── README.md └── kimchi.jpg └── openFrameworks ├── 3DboxSketch ├── 3DboxSketch.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcuserdata │ │ │ └── danbuzzo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── xcschemes │ │ ├── 3DboxSketch Debug.xcscheme │ │ └── 3DboxSketch Release.xcscheme ├── Makefile ├── Project.xcconfig ├── addons.make ├── bin │ └── data │ │ ├── .gitkeep │ │ ├── human-eye-texture-002.jpg │ │ └── human-eye-texture-003.jpg ├── boxSketch.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcuserdata │ │ │ └── danbuzzo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── xcschemes │ │ ├── boxSketch Debug.xcscheme │ │ └── boxSketch Release.xcscheme ├── config.make ├── openFrameworks-Info.plist ├── screenshot.png └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── README.md ├── belligerentClock ├── Makefile ├── Project.xcconfig ├── addons.make ├── belligerentClock .xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcuserdata │ │ │ └── danbuzzo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── xcschemes │ │ ├── fontExample Debug.xcscheme │ │ └── fontExample Release.xcscheme ├── belligerentClock-screenshot.png ├── belligerentClock.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcuserdata │ │ │ └── danbuzzo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── xcschemes │ │ ├── belligerentClock Debug.xcscheme │ │ └── belligerentClock Release.xcscheme ├── bin │ └── data │ │ ├── .gitkeep │ │ └── terminal-grotesque_open.otf ├── config.make ├── openFrameworks-Info.plist └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── boxCV kinect ├── Makefile ├── Project.xcconfig ├── README.md ├── addons.make ├── bin │ └── data │ │ ├── .gitkeep │ │ ├── lines.txt │ │ └── sfx │ │ ├── 0.mp3 │ │ ├── 1.mp3 │ │ ├── 2.mp3 │ │ ├── 3.mp3 │ │ └── 4.mp3 ├── boxCV kinect.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcuserdata │ │ │ └── danbuzzo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── xcschemes │ │ ├── boxCV kinect Debug.xcscheme │ │ └── boxCV kinect Release.xcscheme ├── config.make ├── of.entitlements ├── openFrameworks-Info.plist ├── screenshot 1.png ├── screenshot 2.png ├── screenshot-1.png ├── screenshot-2.png └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── boxScape ├── Makefile ├── Project.xcconfig ├── addons.make ├── bin │ └── data │ │ ├── .gitkeep │ │ └── camera_position ├── boxScape.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcuserdata │ │ │ └── danbuzzo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── xcschemes │ │ ├── boxScape Debug.xcscheme │ │ └── boxScape Release.xcscheme ├── config.make ├── of.entitlements ├── openFrameworks-Info.plist └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── dirty-electro-sample-player ├── Makefile ├── Project.xcconfig ├── addons.make ├── bin │ └── data │ │ ├── .gitkeep │ │ ├── Dirty-electronic-samples │ │ ├── sample1.aif │ │ ├── sample10.aif │ │ ├── sample11.aif │ │ ├── sample12.aif │ │ ├── sample13.aif │ │ ├── sample14.aif │ │ ├── sample15.aif │ │ ├── sample16.aif │ │ ├── sample17.aif │ │ ├── sample2.aif │ │ ├── sample3.aif │ │ ├── sample4.aif │ │ ├── sample5.aif │ │ ├── sample6.aif │ │ ├── sample7.aif │ │ ├── sample8.aif │ │ └── sample9.aif │ │ ├── VocalSamples_StayOnBeat │ │ ├── StayOnBeat.com.txt │ │ ├── VocalSamples_10_StayOnBeat.com.wav │ │ ├── VocalSamples_11_StayOnBeat.com.wav │ │ ├── VocalSamples_12_StayOnBeat.com.wav │ │ ├── VocalSamples_13_StayOnBeat.com.wav │ │ ├── VocalSamples_14_StayOnBeat.com.wav │ │ ├── VocalSamples_15_StayOnBeat.com.wav │ │ ├── VocalSamples_16_StayOnBeat.com.wav │ │ ├── VocalSamples_17_StayOnBeat.com.wav │ │ ├── VocalSamples_1_StayOnBeat.com.wav │ │ ├── VocalSamples_2_StayOnBeat.com.wav │ │ ├── VocalSamples_3_StayOnBeat.com.wav │ │ ├── VocalSamples_4_StayOnBeat.com.wav │ │ ├── VocalSamples_5_StayOnBeat.com.wav │ │ ├── VocalSamples_6_StayOnBeat.com.wav │ │ ├── VocalSamples_7_StayOnBeat.com.wav │ │ ├── VocalSamples_8_StayOnBeat.com.wav │ │ ├── VocalSamples_9_StayOnBeat.com.wav │ │ └── www.StayOnBeat.com.url │ │ ├── live for just these 20 years-slow -low.aiff │ │ ├── live for just these 20 years-slow.aiff │ │ └── live for just these 20 years.aiff ├── config.make ├── dirty-electro-sample-player.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcuserdata │ │ │ └── danbuzzo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── xcschemes │ │ ├── 20Years Debug.xcscheme │ │ └── 20Years Release.xcscheme ├── openFrameworks-Info.plist └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── dof-example ├── Makefile ├── Project.xcconfig ├── addons.make ├── bin │ └── data │ │ ├── dof │ │ ├── dof.frag │ │ ├── dof.vert │ │ ├── doffocusassist.frag │ │ └── doffocusassist.vert │ │ └── dof_gl3 │ │ ├── dof.frag │ │ ├── dof.vert │ │ ├── doffocusassist.frag │ │ └── doffocusassist.vert ├── config.make ├── dof-example.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcuserdata │ │ │ └── danbuzzo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── xcschemes │ │ ├── dof-example Debug.xcscheme │ │ └── dof-example Release.xcscheme ├── example-dof.xcodeproj │ └── project.pbxproj ├── openFrameworks-Info.plist └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── emojiTest ├── Makefile ├── Project.xcconfig ├── README.md ├── addons.make ├── bin │ └── data │ │ └── .gitkeep ├── config.make ├── emojiTest.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcuserdata │ │ │ └── danbuzzo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── xcschemes │ │ ├── emojiTest Debug.xcscheme │ │ └── emojiTest Release.xcscheme ├── openFrameworks-Info.plist ├── screenshot-emojitest.png └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── fontExample └── belligerentClock .xcodeproj │ └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ └── danbuzzo.xcuserdatad │ └── UserInterfaceState.xcuserstate ├── generativeDrawing Catmull Rom curves ├── Makefile ├── Project.xcconfig ├── addons.make ├── bin │ └── data │ │ └── .gitkeep ├── config.make ├── generativeDrawing Catmull Rom curves.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcuserdata │ │ │ └── danbuzzo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── xcschemes │ │ ├── generativeDrawing Catmull Rom curves Debug.xcscheme │ │ └── generativeDrawing Catmull Rom curves Release.xcscheme ├── of.entitlements ├── openFrameworks-Info.plist └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── kinect2-NI-ParticlePainter ├── Makefile ├── Project.xcconfig ├── addons.make ├── bin │ ├── PS1080.ini │ └── data │ │ ├── .gitkeep │ │ ├── test.blend │ │ └── test.dae ├── config.make ├── icon.rc ├── kinect2-NI-ParticlePainter.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcuserdata │ │ │ └── danbuzzo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── xcschemes │ │ ├── kinect2-NI-ParticlePainter Debug.xcscheme │ │ └── kinect2-NI-ParticlePainter Release.xcscheme ├── openFrameworks-Info.plist ├── screenshot-kinect2-particle-painter.png └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── kinect2-NI-ParticlePainterMirror ├── Makefile ├── Project.xcconfig ├── addons.make ├── bin │ ├── PS1080.ini │ └── data │ │ ├── .gitkeep │ │ ├── test.blend │ │ └── test.dae ├── config.make ├── icon.rc ├── kinect2-NI-ParticlePainterMirror.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcuserdata │ │ │ └── danbuzzo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── xcschemes │ │ ├── kinect2-NI-ParticlePainterMirror Debug.xcscheme │ │ └── kinect2-NI-ParticlePainterMirror Release.xcscheme ├── openFrameworks-Info.plist ├── screenshot-1.png ├── screenshot-2.png └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── kinectPhotoBooth ├── Makefile ├── Project.xcconfig ├── README.md ├── addons.make ├── bin │ └── data │ │ ├── .gitkeep │ │ ├── Beep_Short.mp3 │ │ ├── Camera-shutter-sound-effect.mp3 │ │ ├── Camera-shutter-sound-effect.txt │ │ └── frabk.ttf ├── config.make ├── kinectPhotoBooth.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcuserdata │ │ │ └── danbuzzo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── xcschemes │ │ ├── kinectPhotoBooth Debug.xcscheme │ │ └── kinectPhotoBooth Release.xcscheme ├── openFrameworks-Info.plist ├── screenshot-kinectphotobooth.png └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── meshExample ├── Makefile ├── Project.xcconfig ├── README.md ├── addons.make ├── bin │ └── data │ │ └── .gitkeep ├── config.make ├── mesh-example-screenshot.png ├── mesh-example-screenshot2.png ├── meshExample-compiled-osx-binary.zip ├── meshExample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcuserdata │ │ │ └── danbuzzo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ ├── xcshareddata │ │ └── xcschemes │ │ │ ├── meshExample Debug.xcscheme │ │ │ └── meshExample Release.xcscheme │ └── xcuserdata │ │ └── danbuzzo.xcuserdatad │ │ └── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist ├── openFrameworks-Info.plist ├── screenshot.png └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── music-for-homemade-airports ├── Makefile ├── Project.xcconfig ├── addons.make ├── bin │ └── data │ │ ├── .gitkeep │ │ ├── Choir-cut │ │ ├── Eno-Choir-01.wav │ │ ├── Eno-Choir-02.wav │ │ ├── Eno-Choir-03.wav │ │ ├── Eno-Choir-04.wav │ │ ├── Eno-Choir-05.wav │ │ ├── Eno-Choir-06.wav │ │ └── Eno-Choir-07.wav │ │ ├── Piano-cut │ │ ├── Eno-Piano-01.wav │ │ ├── Eno-Piano-02.wav │ │ ├── Eno-Piano-03.wav │ │ ├── Eno-Piano-04.wav │ │ ├── Eno-Piano-05.wav │ │ ├── Eno-Piano-06.wav │ │ ├── Eno-Piano-07.wav │ │ └── Eno-Piano-08.wav │ │ └── README.md ├── config.make ├── music for homemade airports.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcuserdata │ │ │ └── danbuzzo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── xcschemes │ │ ├── music for homemade airports Debug.xcscheme │ │ └── music for homemade airports Release.xcscheme ├── openFrameworks-Info.plist ├── screenshot-randomAudio.png ├── screenshot.png └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── particleSystem ├── Makefile ├── Project.xcconfig ├── addons.make ├── bin │ └── data │ │ └── .gitkeep ├── config.make ├── openFrameworks-Info.plist ├── particleSystem.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcuserdata │ │ │ └── danbuzzo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── xcschemes │ │ ├── particleSystem Debug.xcscheme │ │ └── particleSystem Release.xcscheme └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── slitScan ├── Makefile ├── Project.xcconfig ├── README.md ├── addons.make ├── config.make ├── openFrameworks-Info.plist ├── slitScan.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcuserdata │ │ │ └── danbuzzo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── xcschemes │ │ ├── slitScan Debug.xcscheme │ │ └── slitScan Release.xcscheme └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── slitscan-example ├── Makefile ├── Project.xcconfig ├── README.md ├── addons.make ├── bin │ └── data │ │ └── .gitkeep ├── config.make ├── openFrameworks-Info.plist ├── slitscan-example-osx.zip ├── slitscan-example-screenshot.png ├── slitscan-example.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ ├── slitscan-example Debug.xcscheme │ │ └── slitscan-example Release.xcscheme └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── videoSketch ├── Makefile ├── Project.xcconfig ├── addons.make ├── bin │ └── data │ │ ├── .gitkeep │ │ └── tiu keng leng platform walk1080.mov ├── config.make ├── openFrameworks-Info.plist ├── screenshot.jpg ├── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h └── videoSketch.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings │ └── xcuserdata │ │ └── danbuzzo.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ └── xcschemes │ ├── videoSketch Debug.xcscheme │ └── videoSketch Release.xcscheme └── zachBlobs ├── Makefile ├── Project.xcconfig ├── addons.make ├── bin └── data │ ├── .gitkeep │ ├── dof │ ├── dof.frag │ ├── dof.vert │ ├── doffocusassist.frag │ └── doffocusassist.vert │ └── dof_gl3 │ ├── dof.frag │ ├── dof.vert │ ├── doffocusassist.frag │ └── doffocusassist.vert ├── config.make ├── openFrameworks-Info.plist ├── src ├── main.cpp ├── ofApp.cpp └── ofApp.h └── zachBlobs.xcodeproj ├── project.pbxproj ├── project.xcworkspace ├── contents.xcworkspacedata ├── xcshareddata │ ├── IDEWorkspaceChecks.plist │ └── WorkspaceSettings.xcsettings └── xcuserdata │ └── danbuzzo.xcuserdatad │ └── UserInterfaceState.xcuserstate └── xcshareddata └── xcschemes ├── zachBlobs Debug.xcscheme └── zachBlobs Release.xcscheme /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | 34 | #fonts 35 | *.ttc 36 | *.ttf 37 | 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # art-and-code 2 | Demo code from youtube video tutorials and how-tos 3 | 4 | http://youtube.com/danbuzzo 5 | 6 | @danbz@mastodon.social 7 | 8 | 9 | http://twitter.com/danb_zzo 10 | 11 | ## coding for artists 12 | A super simple introduction to c++ ideas and concepts aimed at artists and designers. Short example code in individual files 13 | 14 | ## Using openFrameworks 15 | ### kinectPhotoBooth 16 | photobooth using kinect 1 sensor to record, colour, triangulate and save to disc 3D images 17 | 18 | ### kinect2 NI Particle Painter 19 | using kinect2 and the openNI natural interaction, skeletal tracking toolkit and a particle system to paint with your hands. 20 | 21 | ### emoji test 22 | example code in response to questions on the youtube channel, taking the ascii video transform example from the openframeworks creative technology toolkit series and making it work with emojis instead. 23 | 24 | ### slitscan examples 25 | 26 | ### dirty electro sample player 27 | 28 | ### remaking 'music for airports' generative ambient music sample player 29 | 30 | ### videoSketch psychedelic video player 31 | 32 | ### generative 3d box clouds 33 | 34 | ### 3D mesh gerenation and animation and distortion with random noise and perlin noise 35 | 36 | ### generative drawing with Catmull Rom Curves 37 | 38 | ![screenshot](openFrameworks/kinectPhotoBooth/screenshot-kinectphotobooth.png) 39 | ![screenshot](openFrameworks/kinect2-NI-ParticlePainter/screenshot-kinect2-particle-painter.png) 40 | ![screenshot](openFrameworks/emojiTest/screenshot-emojitest.png) 41 | ![screenshot](openFrameworks/slitscan-example/slitscan-example-screenshot.png) 42 | ![screenshot](openFrameworks/videoSketch/screenshot.jpg) 43 | ![screenshot](openFrameworks/3DboxSketch/screenshot.png) 44 | ![screenshot](openFrameworks/meshExample/screenshot.png) 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /art-code-c++/README.md: -------------------------------------------------------------------------------- 1 | # art-and-code 2 | Demo code from youtube video tutorials and how-tos 'Programming for Artists' 3 | 4 | http://youtube.com/danbuzzo 5 | 6 | http://twitter.com/danb_zzo 7 | 8 | ## coding for artists 9 | A super simple introduction to c++ ideas and concepts aimed at artists and designers. Short example code in individual files. A ground-up introduction to programming concepts and ideas for artists. This code is a simple write and compile all the C++ ideas from series 1. Aimed at people who want alternative ways to explain ideas of starting to work creatively with code. This series of short videos moves from ideas and founding principles into easy C++ programming. Building on these ideas using the openFrameworks C++ toolkit toward creative code projects. 10 | 11 | simple C++ programs looking at 12 | 13 | * variables 14 | * loops 15 | * vectors 16 | * conditional statements 17 | * input and output 18 | * functions 19 | * etc 20 | 21 | see the intro ideas and concepts playlist 22 | * https://www.youtube.com/playlist?list=PL6QF0yo3Zj7C6IB6qFpc4UcO0SvVbyc0H 23 | 24 | and the coding playlist 25 | 26 | * https://www.youtube.com/playlist?list=PL6QF0yo3Zj7DlRpQlfBULd3ngzi-qbLCY -------------------------------------------------------------------------------- /art-code-c++/funks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/art-code-c++/funks -------------------------------------------------------------------------------- /art-code-c++/funkshuns.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | 5 | float calculateTotalWeight(int numPeeps, float weight); // this is the function prototype 6 | 7 | vector names; 8 | 9 | int main(){ 10 | int numOfPeople; 11 | float weightOfStuff; 12 | 13 | weightOfStuff = 3.7; 14 | 15 | cout << "how many people are coming to the BBQ?" << endl; 16 | cin >> numOfPeople; 17 | for (int i=0; i < numOfPeople; i++){ 18 | string newName; 19 | cin >> newName; 20 | names.push_back(newName); 21 | } 22 | 23 | for (int i =0; i < numOfPeople; i++){ 24 | cout << "person " << i << " is coming to the BBQ" << endl; 25 | cout << "their name is " << names[i] << endl; 26 | } 27 | cout << "total weight is " << calculateTotalWeight(numOfPeople, weightOfStuff) << "kg" << endl; 28 | } 29 | 30 | float calculateTotalWeight(int numPeeps, float weight){ 31 | float totalWeight; 32 | totalWeight = numPeeps * weight; 33 | return totalWeight; 34 | } 35 | 36 | -------------------------------------------------------------------------------- /art-code-c++/hello: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/art-code-c++/hello -------------------------------------------------------------------------------- /art-code-c++/hello.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace std; 4 | 5 | int main(){ 6 | cout << "hello moon \n" ; 7 | } 8 | 9 | -------------------------------------------------------------------------------- /art-code-c++/if-then-so-what.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace std; 4 | 5 | int main(){ 6 | int numOfPeople; 7 | 8 | cout << "how many people are coming to the BBQ?" << endl; 9 | cin >> numOfPeople; 10 | 11 | if (numOfPeople == 0){ 12 | cout << "watch tv instead!" << endl; 13 | } else { 14 | cout << "prepare for an awesome BBQ" << endl; 15 | } 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /art-code-c++/ifthen: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/art-code-c++/ifthen -------------------------------------------------------------------------------- /art-code-c++/loops-huh.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | 5 | 6 | // void calculateTotalWeight(int numPeeps, float weight); // this is the function prototype 7 | 8 | int main(){ 9 | int numOfPeople; 10 | vector names; 11 | 12 | // float weightOfStuff; 13 | 14 | // weightOfStuff = 3.7; 15 | 16 | cout << "how many people are coming to the BBQ?" << endl; 17 | cin >> numOfPeople; 18 | for (int i=0; i < numOfPeople; i++){ 19 | string newName; 20 | cin >> newName; 21 | names.push_back(newName); 22 | } 23 | 24 | for (int i =0; i < numOfPeople; i++){ 25 | cout << "person " << i << " is coming to the BBQ" << endl; 26 | cout << "their name is " << names[i] << endl; 27 | } 28 | 29 | // calculateTotalWeight(numOfPeople, weightOfStuff); 30 | } 31 | 32 | // void calculateTotalWeight(int numPeeps, float weight){ 33 | // float totalWeight; 34 | // totalWeight = numPeeps * weight; 35 | // } 36 | 37 | -------------------------------------------------------------------------------- /art-code-c++/loopshuh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/art-code-c++/loopshuh -------------------------------------------------------------------------------- /art-code-c++/variables: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/art-code-c++/variables -------------------------------------------------------------------------------- /art-code-c++/variables.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | 6 | int main(){ 7 | 8 | vector names; 9 | string name; 10 | name = "jeff"; 11 | names.push_back(name); 12 | 13 | name = "mahir"; 14 | names.push_back(name); 15 | cout << "the first name is " << names[0] << endl; 16 | cout << "the second name is " << names[1] << endl;; 17 | 18 | } 19 | 20 | -------------------------------------------------------------------------------- /cooking/README.md: -------------------------------------------------------------------------------- 1 | # art-and-cooking 2 | Recipes from youtube video tutorials and how-tos 3 | 4 | http://youtube.com/danbuzzo 5 | 6 | http://twitter.com/danb_zzo 7 | 8 | ## cooking for artists 9 | A super simple introduction to recipes and concepts aimed at artists and designers. Short example code in individual files 10 | 11 | ## Making Kimchi 12 | 13 | you will need some; 14 | 15 | • carrots 16 | • daikon / mooli white radish radish 17 | • spring onions 18 | • an onion 19 | • ginger root 20 | • napa / chinese leaves cabbage 21 | • sesame seeds 22 | • fish sauce 23 | • garlic cloves 24 | • chili pepper / dried chili flakes / Korean red pepper flakes (Gochujang) 25 | • rice flour (or plain flour) 26 | • brown sugar (or whatever yoiu have) 27 | • jars or tupperware for storing our Kimchi 28 | 29 | ![screenshot](kimchi.jpg) -------------------------------------------------------------------------------- /cooking/kimchi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/cooking/kimchi.jpg -------------------------------------------------------------------------------- /openFrameworks/3DboxSketch/3DboxSketch.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/3DboxSketch/3DboxSketch.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/3DboxSketch/3DboxSketch.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Latest 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/3DboxSketch/3DboxSketch.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/3DboxSketch/3DboxSketch.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/3DboxSketch/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/3DboxSketch/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_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /openFrameworks/3DboxSketch/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/3DboxSketch/addons.make -------------------------------------------------------------------------------- /openFrameworks/3DboxSketch/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/3DboxSketch/bin/data/.gitkeep -------------------------------------------------------------------------------- /openFrameworks/3DboxSketch/bin/data/human-eye-texture-002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/3DboxSketch/bin/data/human-eye-texture-002.jpg -------------------------------------------------------------------------------- /openFrameworks/3DboxSketch/bin/data/human-eye-texture-003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/3DboxSketch/bin/data/human-eye-texture-003.jpg -------------------------------------------------------------------------------- /openFrameworks/3DboxSketch/boxSketch.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/3DboxSketch/boxSketch.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/3DboxSketch/boxSketch.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Latest 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/3DboxSketch/boxSketch.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/3DboxSketch/boxSketch.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/3DboxSketch/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | ${ICON} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | APPL 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSHighResolutionCapable 24 | 25 | NSMicrophoneUsageDescription 26 | This app needs to access the microphone 27 | 28 | 29 | -------------------------------------------------------------------------------- /openFrameworks/3DboxSketch/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/3DboxSketch/screenshot.png -------------------------------------------------------------------------------- /openFrameworks/3DboxSketch/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/3DboxSketch/src/ofApp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Project Title: 3 | Description: 4 | ©Daniel Buzzo 2021 5 | dan@buzzo.com 6 | http://buzzo.com 7 | https://github.com/danbz 8 | http://youtube.com/danbuzzo 9 | */ 10 | 11 | #pragma once 12 | 13 | #include "ofMain.h" 14 | 15 | class ofApp : public ofBaseApp{ 16 | 17 | public: 18 | void setup(); 19 | void update(); 20 | void draw(); 21 | 22 | void keyPressed(int key); 23 | void keyReleased(int key); 24 | void makeABox(); 25 | 26 | vector boxes; 27 | vector spheres; 28 | 29 | ofEasyCam cam; 30 | ofLight light; 31 | int spaceRange ; 32 | ofImage eye; 33 | 34 | }; 35 | -------------------------------------------------------------------------------- /openFrameworks/README.md: -------------------------------------------------------------------------------- 1 | # art-and-code 2 | demo code from the youtube video tutorials and how-tos 3 | 4 | using openFrameworks C++ creative coding framework 5 | http://openframeworks.cc 6 | 7 | http://youtube.com/danbuzzo 8 | 9 | http://twitter.com/danb_zzo 10 | 11 | ## Using openFrameworks 12 | 13 | ### kinectPhotoBooth 14 | photobooth using kinect 1 sensor to record, colour, triangulate and save to disc 3D images 15 | 16 | ### kinect2 NI Particle Painter 17 | using kinect2 and the openNI natural interaction, skeletal tracking toolkit and a particle system to paint with your hands. 18 | 19 | ### emoji test 20 | example code in response to questions on the youtube channel, taking the ascii video transform example from the openframeworks creative technology toolkit series and making it work with emojis instead. 21 | 22 | ### slitscan-example 23 | ### slitscan 24 | 25 | two slitscan projects - slitscan example gives a simple overview with a splitsceen view, slitscan is a little more involved showing a different technique to 'push' a ribbon of scan from the centre of the screen to one side, keeping the other side of the screen running as normal video. 26 | 27 | ### ofZachBlobs 28 | 29 | an example of using sine waves for generative animations based on an exmaple by Zach Lieberman 30 | 31 | ### 3D Box sketch 32 | 33 | using 3D primitives to make a generative, interactive 3D cloud 34 | 35 | ### mesh Example 36 | 37 | making an ofMesh object and constructing a mesh from scratch 38 | distotring and animating the mesh live with random noise and perlin noise using ofNoise() function 39 | 40 | ![screenshot](kinectPhotoBooth/screenshot-kinectphotobooth.png) 41 | ![screenshot](kinect2-NI-ParticlePainter/screenshot-kinect2-particle-painter.png) 42 | ![screenshot](emojiTest/screenshot-emojitest.png) 43 | ![screenshot](slitscan-example/slitscan-example-screenshot.png) 44 | ![screenshot](3DboxSketch/screenshot.png) 45 | ![screenshot](meshExample/screenshot.png) 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /openFrameworks/belligerentClock/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/belligerentClock/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_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /openFrameworks/belligerentClock/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/belligerentClock/addons.make -------------------------------------------------------------------------------- /openFrameworks/belligerentClock/belligerentClock .xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/belligerentClock/belligerentClock .xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/belligerentClock/belligerentClock .xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Latest 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/belligerentClock/belligerentClock .xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/belligerentClock/belligerentClock .xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/belligerentClock/belligerentClock-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/belligerentClock/belligerentClock-screenshot.png -------------------------------------------------------------------------------- /openFrameworks/belligerentClock/belligerentClock.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/belligerentClock/belligerentClock.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/belligerentClock/belligerentClock.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Latest 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/belligerentClock/belligerentClock.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/belligerentClock/belligerentClock.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/belligerentClock/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/belligerentClock/bin/data/.gitkeep -------------------------------------------------------------------------------- /openFrameworks/belligerentClock/bin/data/terminal-grotesque_open.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/belligerentClock/bin/data/terminal-grotesque_open.otf -------------------------------------------------------------------------------- /openFrameworks/belligerentClock/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | ${ICON} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | APPL 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSHighResolutionCapable 24 | 25 | NSMicrophoneUsageDescription 26 | This app needs to access the microphone 27 | 28 | 29 | -------------------------------------------------------------------------------- /openFrameworks/belligerentClock/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/belligerentClock/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Project Title: belligerentClock 3 | Description: from the openFrameworks superbasics youtube tutorial series 4 | ©Daniel Buzzo 2021 5 | dan@buzzo.com 6 | http://buzzo.com 7 | https://github.com/danbz 8 | http://youtube.com/danbuzzo 9 | */ 10 | 11 | #include "ofApp.h" 12 | 13 | //-------------------------------------------------------------- 14 | void ofApp::setup(){ 15 | ofSetBackgroundColor(0); 16 | ofSetFrameRate(1); 17 | // font.load("frabk.ttf", 90); 18 | font.load("terminal-grotesque_open.otf", 60); 19 | words = {"love", "hate", "clean", "make", "smash", "stop", "f*ck", "like", "bump", "fix", "burn", "smoke", "toast", "roast", "cook", "mash", "kick", "hack", "smack", "check", "forget" }; 20 | } 21 | 22 | //-------------------------------------------------------------- 23 | void ofApp::update(){ 24 | } 25 | 26 | //-------------------------------------------------------------- 27 | void ofApp::draw(){ 28 | // this is the seconds loop 29 | 30 | ofSetColor(255,0,0); 31 | string word = words[ ofRandom( words.size() ) ]; 32 | for (int i = 0; i <360; i+=10){ 33 | ofPushMatrix(); 34 | ofTranslate(ofGetWidth()/2,ofGetHeight()/2); 35 | ofRotateDeg( (ofGetSeconds() * 6) -90 ); 36 | ofRotateDeg(i); 37 | font.drawString( "F*ck", 120, 0 ); 38 | // font.drawString( word , 120, 0 ); // to use a word from our list 39 | ofSetColor(255, 255, 255, i - 100); 40 | ofPopMatrix(); 41 | } 42 | // this is the minutes loop 43 | ofSetColor(0,255,0); 44 | for (int i = 0; i <360; i+=10){ 45 | ofPushMatrix(); 46 | ofTranslate(ofGetWidth()/2,ofGetHeight()/2); 47 | ofRotateDeg( (ofGetMinutes() * 6) - 90 ); 48 | ofRotateDeg(i); 49 | if (ofGetMinutes()%2 == 0){ 50 | font.drawString("this", 260,0 ); 51 | } else { 52 | font.drawString("that", 260,0 ); 53 | } 54 | 55 | ofSetColor(255, 255, 255, i -100); 56 | ofPopMatrix(); 57 | } 58 | // this is the minutes loop 59 | 60 | ofSetColor(0,0,255); 61 | for (int i = 0; i <360; i+=10){ 62 | ofPushMatrix(); 63 | ofTranslate(ofGetWidth()/2,ofGetHeight()/2); 64 | ofRotateDeg( (ofGetHours() * 30 ) - 90 ); 65 | ofRotateDeg(i); 66 | font.drawString("sh*t", 400,0 ); 67 | ofSetColor(255, 255, 255, i - 100); 68 | ofPopMatrix(); 69 | } 70 | } 71 | 72 | //-------------------------------------------------------------- 73 | void ofApp::keyPressed(int key){ 74 | switch (key) { 75 | case 'f': 76 | case 'F': 77 | ofToggleFullscreen(); 78 | break; 79 | 80 | default: 81 | break; 82 | } 83 | } 84 | 85 | //-------------------------------------------------------------- 86 | -------------------------------------------------------------------------------- /openFrameworks/belligerentClock/src/ofApp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Project Title: belligerentClock 3 | Description: from the openFrameworks superbasics youtube tutorial series 4 | ©Daniel Buzzo 2021 5 | dan@buzzo.com 6 | http://buzzo.com 7 | https://github.com/danbz 8 | http://youtube.com/danbuzzo 9 | */ 10 | 11 | #pragma once 12 | 13 | #include "ofMain.h" 14 | 15 | class ofApp : public ofBaseApp{ 16 | 17 | public: 18 | void setup(); 19 | void update(); 20 | void draw(); 21 | 22 | void keyPressed(int key); 23 | 24 | ofTrueTypeFont font; 25 | vector words; 26 | }; 27 | -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/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/boxCV kinect/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 | //UNCOMMENT BELOW TO ENABLE C++ 17 and std::filesystem 9 | CLANG_CXX_LANGUAGE_STANDARD = c++17 10 | MACOSX_DEPLOYMENT_TARGET = 10.15 11 | 12 | // App Settings 13 | PRODUCT_NAME = $(TARGET_NAME) 14 | PRODUCT_NAME[config=Debug] = $(TARGET_NAME)Debug 15 | PRODUCT_BUNDLE_IDENTIFIER = cc.openFrameworks.${TARGET_NAME:rfc1034identifier} 16 | //PRODUCT_BUNDLE_IDENTIFIER[config=Debug] = cc.openFrameworks.$(TARGET_NAME)Debug 17 | VERSION = 1.0 18 | DEVELOPMENT_LANGUAGE = English 19 | CODE_SIGN_IDENTITY = - 20 | INFOPLIST_FILE = openFrameworks-Info.plist 21 | 22 | //ICONS - NEW IN 0072 23 | //ICON_NAME = icon.icns 24 | //ICON_NAME[config=Debug] = icon-debug.icns 25 | ICON_NAME = of.icns 26 | ICON_NAME[config=Debug] = of_debug.icns 27 | ICON_FILE = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/$(ICON_NAME) 28 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 29 | //ICON_FILE_PATH = bin/data/ 30 | 31 | //FOR AV ENGINE SOUND PLAYER UNCOMMENT TWO LINES BELOW 32 | //OF_NO_FMOD=1 33 | //USER_PREPROCESSOR_DEFINITIONS="OF_NO_FMOD=1" 34 | GCC_PREPROCESSOR_DEFINITIONS=$(inherited)$(USER_PREPROCESSOR_DEFINITIONS) 35 | 36 | //APPSTORE, uncomment next lines to bundle data folder and code sign 37 | //OF_CODESIGN = 1 38 | //OF_BUNDLE_DATA_FOLDER = 1 39 | //OF_BUNDLE_DYLIBS = 1 40 | 41 | // BOOST - UNCOMMENT BELOW TO ENABLE BOOST 42 | //HEADER_BOOST = "$(OF_PATH)/libs/boost/include" 43 | //LIB_BOOST_SYSTEM = "$(OF_PATH)/libs/boost/lib/osx/boost_system.a" 44 | //LIB_BOOST_FS = "$(OF_PATH)/libs/boost/lib/osx/boost_filesystem.a" 45 | //OF_CORE_LIBS = $(inherited) $(LIB_BOOST_FS) $(LIB_BOOST_SYSTEM) 46 | //OF_CORE_HEADERS = $(inherited) $(HEADER_BOOST) 47 | 48 | // Optional include to keep any permanent settings as CODE_SIGN_IDENTITY. 49 | #include? "App.xcconfig" 50 | 51 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 52 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 53 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 54 | -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/README.md: -------------------------------------------------------------------------------- 1 | # art-and-code 2 | demo code from the youtube video tutorials and how-tos 3 | 4 | Building a 2D physics and openCV example woth with microsoft XBox Kinect sensor 5 | 6 | using openFrameworks C++ creative coding framework 7 | http://openframeworks.cc 8 | 9 | http://youtube.com/danbuzzo 10 | 11 | http://twitter.com/danb_zzo 12 | 13 | ### kinect with Box @D and opemnCV 14 | * using kinect depth sensors to capture RGB & depth data 15 | * constructing point clouds from depth data 16 | * cropping then passing threshholded depth image to openCV for coutour finding 17 | * using the contours extracted by openCV to pass to box2D physics engine 18 | * detecting collisions with Box2D with particles and our extracted kinect countour line 19 | * adding sounds triggered by box2D collisions 20 | 21 | 22 | #### controls 23 | * check onkeypressed routine or onscreen text for current controls 24 | * f toggle fullscreen 25 | * l switch between debug views of kinect and live screen 26 | * c clear contours from screen 27 | * up / down keys tilt kinect up down 28 | * + / - increase and decrease near threshold on kinect capture 29 | * < / > increase and decrease far threshold on kinect capture 30 | 31 | 32 | ![screenshot](screenshot-1.png) 33 | ![screenshot](screenshot-2.png) 34 | 35 | 36 | /* 37 | If you are struggling to get the device to connect ( especially Windows Users ) 38 | please look at the ReadMe: in addons/ofxKinect/README.md 39 | */ -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/addons.make: -------------------------------------------------------------------------------- 1 | ofxBox2d 2 | ofxOpenCv 3 | ofxCv 4 | ofxKinect 5 | -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/boxCV kinect/bin/data/.gitkeep -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/bin/data/lines.txt: -------------------------------------------------------------------------------- 1 | 12,62,12,93,13,95,13,97,14,99,14,102,15,104,16,109,18,113,20,120,22,122,23,125,23,127,25,131,26,135,28,139,30,146,34,154,46,167,59,177,68,186,80,195,87,199,92,203,104,210,119,216,123,219,128,221,141,224,145,224,148,225,152,225,155,226,176,226,180,227,232,227,245,224,255,219,265,209,267,208,269,206,270,206,273,203,273,202,274,202, 2 | 340,261,341,260,351,258,358,256,365,252,371,250,389,237,391,233,406,221,425,207,429,203,434,199,446,187,459,169,463,165,465,161,468,158,470,155,470,154,472,152,472,150, 3 | 225,267,231,273,236,277,241,279,246,282,250,286,253,288,260,292,269,296,271,298,283,304,299,309,305,310,321,316,331,317,351,321,382,321, 4 | 387,357,388,357,389,356,391,356,393,354,395,353,398,352,405,351,513,351,520,352,527,352,534,353,546,356,551,356,553,357,560,359,564,361,573,363,578,365,610,372,612,373,618,374,623,376,674,386,687,389,690,389,692,390,694,390,697,391,699,391,699,392,702,392,704,393,705,393,705,394,706,394, 5 | 932,303,930,305,928,310,926,313,917,323,913,329,897,346,893,348,888,352,879,357,874,361,865,365,861,369,857,371,853,375,838,386,834,388,829,392,817,398,812,402,808,403,803,405,798,406,789,410,785,413,781,415,776,417,769,419,763,422,753,426,740,430,731,434,726,435,717,439,697,444,689,444,683,445,674,445,671,446,563,446,557,445,545,445,539,444,523,444,518,443,434,443,426,444,421,444,410,446,404,446,392,448,388,448,379,450,375,450,373,451,370,451,369,452,367,452,366,453,365,453,363,454, 6 | -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/bin/data/sfx/0.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/boxCV kinect/bin/data/sfx/0.mp3 -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/bin/data/sfx/1.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/boxCV kinect/bin/data/sfx/1.mp3 -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/bin/data/sfx/2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/boxCV kinect/bin/data/sfx/2.mp3 -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/bin/data/sfx/3.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/boxCV kinect/bin/data/sfx/3.mp3 -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/bin/data/sfx/4.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/boxCV kinect/bin/data/sfx/4.mp3 -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/boxCV kinect.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/boxCV kinect.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/boxCV kinect.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/boxCV kinect/boxCV kinect.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/of.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.device.audio-input 8 | 9 | com.apple.security.device.bluetooth 10 | 11 | com.apple.security.device.camera 12 | 13 | com.apple.security.device.usb 14 | 15 | com.apple.security.files.user-selected.read-write 16 | 17 | com.apple.security.network.client 18 | 19 | com.apple.security.network.server 20 | 21 | com.apple.security.print 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | $(ICON_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(TARGET_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleShortVersionString 22 | $(VERSION) 23 | CFBundleVersion 24 | $(VERSION) 25 | LSApplicationCategoryType 26 | public.app-category.graphics-design 27 | NSCameraUsageDescription 28 | This app needs to access the camera 29 | NSMicrophoneUsageDescription 30 | This app needs to access the microphone 31 | NSHighResolutionCapable 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/screenshot 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/boxCV kinect/screenshot 1.png -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/screenshot 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/boxCV kinect/screenshot 2.png -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/boxCV kinect/screenshot-1.png -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/boxCV kinect/screenshot-2.png -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | 7 | //Use ofGLFWWindowSettings for more options like multi-monitor fullscreen 8 | ofGLWindowSettings settings; 9 | settings.setSize(1024, 768); 10 | settings.windowMode = OF_WINDOW; //can also be OF_FULLSCREEN 11 | 12 | auto window = ofCreateWindow(settings); 13 | 14 | ofRunApp(window, make_shared()); 15 | ofRunMainLoop(); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /openFrameworks/boxCV kinect/src/ofApp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Project Title: 3 | Description: 4 | ©Daniel Buzzo 2023, 2024 portions adapted form openFrameworks demo examples 5 | see https://openframeworks.cc 6 | dan@buzzo.com 7 | http://buzzo.com 8 | https://github.com/danbz 9 | https://youtube.com/danbuzzo 10 | */ 11 | 12 | #pragma once 13 | 14 | #include "ofMain.h" 15 | #include "ofxBox2d.h" 16 | #include "ofxOpenCv.h" 17 | #include "ofxKinect.h" 18 | 19 | #define N_SOUNDS 5 20 | 21 | class SoundData { 22 | public: 23 | int soundID; 24 | bool bHit; 25 | }; 26 | 27 | class ofApp : public ofBaseApp{ 28 | 29 | public: 30 | void setup(); 31 | void update(); 32 | void draw(); 33 | void exit(); 34 | 35 | void drawPointCloud(); 36 | 37 | void keyPressed(int key); 38 | void mouseMoved(int x, int y ); 39 | void mouseDragged(int x, int y, int button); 40 | void mousePressed(int x, int y, int button); 41 | void mouseReleased(int x, int y, int button); 42 | void windowResized(int w, int h); 43 | 44 | void faceToLine(); 45 | 46 | vector lines; 47 | ofxBox2d box2d; 48 | vector > circles; 49 | vector > edges; 50 | 51 | ofxKinect kinect; 52 | 53 | #ifdef USE_TWO_KINECTS 54 | ofxKinect kinect2; 55 | #endif 56 | 57 | ofxCvColorImage colorImg; 58 | ofxCvGrayscaleImage grayImage; // grayscale depth image 59 | ofxCvGrayscaleImage grayThreshNear; // the near thresholded image 60 | ofxCvGrayscaleImage grayThreshFar; // the far thresholded image 61 | ofxCvContourFinder contourFinder; 62 | 63 | bool bThreshWithOpenCV; 64 | bool bDrawPointCloud, b_live; 65 | int nearThreshold; 66 | int farThreshold; 67 | int angle; 68 | 69 | // used for viewing the point cloud 70 | ofEasyCam easyCam; 71 | 72 | // this is the function for contacts 73 | void contactStart(ofxBox2dContactArgs &e); 74 | void contactEnd(ofxBox2dContactArgs &e); 75 | 76 | // when the ball hits we play this sound 77 | ofSoundPlayer sound[N_SOUNDS]; 78 | }; 79 | -------------------------------------------------------------------------------- /openFrameworks/boxScape/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/boxScape/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 | //UNCOMMENT BELOW TO ENABLE C++ 17 and std::filesystem 9 | CLANG_CXX_LANGUAGE_STANDARD = c++17 10 | MACOSX_DEPLOYMENT_TARGET = 10.15 11 | 12 | // App Settings 13 | PRODUCT_NAME = $(TARGET_NAME) 14 | PRODUCT_NAME[config=Debug] = $(TARGET_NAME)Debug 15 | PRODUCT_BUNDLE_IDENTIFIER = cc.openFrameworks.$(TARGET_NAME) 16 | //PRODUCT_BUNDLE_IDENTIFIER[config=Debug] = cc.openFrameworks.$(TARGET_NAME)Debug 17 | VERSION = 1.0 18 | DEVELOPMENT_LANGUAGE = English 19 | CODE_SIGN_IDENTITY = - 20 | INFOPLIST_FILE = openFrameworks-Info.plist 21 | 22 | //ICONS - NEW IN 0072 23 | //ICON_NAME = icon.icns 24 | //ICON_NAME[config=Debug] = icon-debug.icns 25 | ICON_NAME = of.icns 26 | ICON_NAME[config=Debug] = of_debug.icns 27 | ICON_FILE = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/$(ICON_NAME) 28 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 29 | //ICON_FILE_PATH = bin/data/ 30 | 31 | 32 | //APPSTORE, uncomment next lines to bundle data folder and code sign 33 | //OF_CODESIGN = 1 34 | //OF_BUNDLE_DATA_FOLDER = 1 35 | 36 | // BOOST - UNCOMMENT BELOW TO ENABLE BOOST 37 | //HEADER_BOOST = "$(OF_PATH)/libs/boost/include" 38 | //LIB_BOOST_SYSTEM = "$(OF_PATH)/libs/boost/lib/osx/boost_system.a" 39 | //LIB_BOOST_FS = "$(OF_PATH)/libs/boost/lib/osx/boost_filesystem.a" 40 | //OF_CORE_LIBS = $(inherited) $(LIB_BOOST_FS) $(LIB_BOOST_SYSTEM) 41 | //OF_CORE_HEADERS = $(inherited) $(HEADER_BOOST) 42 | 43 | // Optional include to keep any permanent settings as CODE_SIGN_IDENTITY. 44 | #include? "App.xcconfig" 45 | 46 | OTHER_CFLAGS = $(OF_CORE_CFLAGS) 47 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 48 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 49 | -------------------------------------------------------------------------------- /openFrameworks/boxScape/addons.make: -------------------------------------------------------------------------------- 1 | ofxCameraSaveLoad 2 | -------------------------------------------------------------------------------- /openFrameworks/boxScape/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/boxScape/bin/data/.gitkeep -------------------------------------------------------------------------------- /openFrameworks/boxScape/bin/data/camera_position: -------------------------------------------------------------------------------- 1 | --------------ofNode parameters-------------- 2 | position 3 | -100.629, 24.0898, 65.3737 4 | scale 5 | 1, 1, 1 6 | orientation 7 | 0.85024, 0.0035319, -0.482623, -0.210131 8 | --------------ofCamera parameters-------------- 9 | fov 10 | 60 11 | near 12 | 6.65108 13 | far 14 | 6651.08 15 | lensOffset 16 | 0, 0 17 | forceAspectRatio 18 | 0 19 | aspectRatio 20 | 1.33333 21 | isOrtho 22 | 0 23 | vFlip 24 | 0 25 | --------------ofEasyCam parameters-------------- 26 | target 27 | 0, 0, 0 28 | bEnableMouseMiddleButton 29 | 1 30 | bMouseInputEnabled 31 | 1 32 | drag 33 | 0.9 34 | doTranslationKey 35 | m 36 | relativeYAxis 37 | 0 38 | doInertia 39 | 0 40 | upAxis 41 | 0, 1, 0 42 | controlArea 43 | 0, 0, 0, 1024, 768 44 | -------------------------------------------------------------------------------- /openFrameworks/boxScape/boxScape.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/boxScape/boxScape.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/boxScape/boxScape.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/boxScape/boxScape.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/boxScape/boxScape.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/boxScape/of.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.device.audio-input 8 | 9 | com.apple.security.device.bluetooth 10 | 11 | com.apple.security.device.camera 12 | 13 | com.apple.security.device.usb 14 | 15 | com.apple.security.files.user-selected.read-write 16 | 17 | com.apple.security.network.client 18 | 19 | com.apple.security.network.server 20 | 21 | com.apple.security.print 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /openFrameworks/boxScape/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | $(ICON_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(TARGET_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleSignature 20 | ???? 21 | CFBundleShortVersionString 22 | $(VERSION) 23 | CFBundleVersion 24 | $(VERSION) 25 | LSApplicationCategoryType 26 | public.app-category.graphics-design 27 | NSCameraUsageDescription 28 | This app needs to access the camera 29 | NSMicrophoneUsageDescription 30 | This app needs to access the microphone 31 | NSHighResolutionCapable 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /openFrameworks/boxScape/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | 7 | //Use ofGLFWWindowSettings for more options like multi-monitor fullscreen 8 | ofGLWindowSettings settings; 9 | settings.setSize(1024, 768); 10 | settings.windowMode = OF_WINDOW; //can also be OF_FULLSCREEN 11 | 12 | auto window = ofCreateWindow(settings); 13 | 14 | ofRunApp(window, make_shared()); 15 | ofRunMainLoop(); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /openFrameworks/boxScape/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxCameraSaveLoad.h" 5 | 6 | class circularMeshBuffer{ 7 | // adapted from code by Gil_Fuser https://forum.openframeworks.cc/t/error-regarding-unknown-of-pixel-format/27191 8 | 9 | public: 10 | circularMeshBuffer(){ 11 | currentIndex = 0; 12 | } 13 | void setup(int numBoxes){ 14 | boxes.resize(numBoxes); 15 | currentIndex = numBoxes -1; 16 | } 17 | void pushMesh(ofMesh& box){ 18 | currentIndex--; 19 | if (currentIndex < 0) { 20 | currentIndex = boxes.size() -1; 21 | } 22 | boxes[currentIndex] = box; 23 | } 24 | ofMesh& getDelayedMesh(size_t delay){ 25 | if(delay < boxes.size()){ 26 | return boxes[ofWrap(delay + currentIndex, 0, boxes.size())]; 27 | } 28 | return boxes[0]; 29 | } 30 | 31 | int getCurrentIndex() { 32 | return currentIndex; 33 | } 34 | 35 | protected: 36 | int currentIndex; 37 | deque boxes; 38 | }; 39 | 40 | class circularIntBuffer{ 41 | // adapted from code by Gil_Fuser https://forum.openframeworks.cc/t/error-regarding-unknown-of-pixel-format/27191 42 | public: 43 | circularIntBuffer(){ 44 | currentIndex = 0; 45 | } 46 | void setup(int numBoxes){ 47 | boxes.resize(numBoxes); 48 | currentIndex = numBoxes -1; 49 | } 50 | void pushMesh(float& box){ 51 | currentIndex--; 52 | if (currentIndex < 0) { 53 | currentIndex = boxes.size() -1; 54 | } 55 | boxes[currentIndex] = box; 56 | } 57 | float& getDelayedMesh(size_t delay){ 58 | if(delay < boxes.size()){ 59 | return boxes[ofWrap(delay + currentIndex, 0, boxes.size())]; 60 | } 61 | return boxes[0]; 62 | } 63 | 64 | int getCurrentIndex() { 65 | return currentIndex; 66 | } 67 | 68 | protected: 69 | int currentIndex; 70 | deque boxes; 71 | }; 72 | 73 | class ofApp : public ofBaseApp{ 74 | 75 | public: 76 | void setup(); 77 | void update(); 78 | void draw(); 79 | 80 | void keyPressed(int key); 81 | 82 | int scapeWidth, scapeDepth, boxSize, maxHeight; 83 | // circularMeshBuffer boxes; 84 | circularIntBuffer boxes; 85 | ofEasyCam cam; 86 | ofLight light; 87 | // ofBoxPrimitive box; 88 | bool b_rotate, b_march; 89 | }; 90 | -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/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/dirty-electro-sample-player/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_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/addons.make -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/.gitkeep -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample1.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample1.aif -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample10.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample10.aif -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample11.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample11.aif -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample12.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample12.aif -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample13.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample13.aif -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample14.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample14.aif -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample15.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample15.aif -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample16.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample16.aif -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample17.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample17.aif -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample2.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample2.aif -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample3.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample3.aif -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample4.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample4.aif -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample5.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample5.aif -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample6.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample6.aif -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample7.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample7.aif -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample8.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample8.aif -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample9.aif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/Dirty-electronic-samples/sample9.aif -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/StayOnBeat.com.txt: -------------------------------------------------------------------------------- 1 | www.stayonbeat.com 2 | ----------------------------------------------------------------------------- 3 | 4 | The Number one source for music producers, artists & Film Makers! 5 | 6 | Free drum kits, samples, vst's & sounds! 7 | 8 | ----------------------------------------------------------------------------- 9 | Get more FREE sounds @ www.stayonbeat.com 10 | ----------------------------------------------------------------------------- 11 | 12 | 13 | 14 | Legal Disclaimer: This information is provided "As-Is" with no warranties. 15 | All of these "sample kits" were provided free-ware and stayonbeat.com 16 | does not assume any ownership or claim to the intellectual property included 17 | herein. 18 | 19 | 20 | ----------------------------------------------------------------------------- 21 | www.stayonbeat.com -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_10_StayOnBeat.com.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_10_StayOnBeat.com.wav -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_11_StayOnBeat.com.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_11_StayOnBeat.com.wav -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_12_StayOnBeat.com.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_12_StayOnBeat.com.wav -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_13_StayOnBeat.com.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_13_StayOnBeat.com.wav -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_14_StayOnBeat.com.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_14_StayOnBeat.com.wav -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_15_StayOnBeat.com.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_15_StayOnBeat.com.wav -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_16_StayOnBeat.com.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_16_StayOnBeat.com.wav -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_17_StayOnBeat.com.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_17_StayOnBeat.com.wav -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_1_StayOnBeat.com.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_1_StayOnBeat.com.wav -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_2_StayOnBeat.com.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_2_StayOnBeat.com.wav -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_3_StayOnBeat.com.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_3_StayOnBeat.com.wav -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_4_StayOnBeat.com.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_4_StayOnBeat.com.wav -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_5_StayOnBeat.com.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_5_StayOnBeat.com.wav -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_6_StayOnBeat.com.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_6_StayOnBeat.com.wav -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_7_StayOnBeat.com.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_7_StayOnBeat.com.wav -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_8_StayOnBeat.com.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_8_StayOnBeat.com.wav -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_9_StayOnBeat.com.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/VocalSamples_9_StayOnBeat.com.wav -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/VocalSamples_StayOnBeat/www.StayOnBeat.com.url: -------------------------------------------------------------------------------- 1 | [{000214A0-0000-0000-C000-000000000046}] 2 | Prop3=19,2 3 | [InternetShortcut] 4 | URL=http://www.stayonbeat.com/ 5 | IDList= 6 | -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/live for just these 20 years-slow -low.aiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/live for just these 20 years-slow -low.aiff -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/live for just these 20 years-slow.aiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/live for just these 20 years-slow.aiff -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/bin/data/live for just these 20 years.aiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/bin/data/live for just these 20 years.aiff -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/dirty-electro-sample-player.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/dirty-electro-sample-player.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/dirty-electro-sample-player.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Latest 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/dirty-electro-sample-player.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dirty-electro-sample-player/dirty-electro-sample-player.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | ${ICON} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | APPL 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSHighResolutionCapable 24 | 25 | NSMicrophoneUsageDescription 26 | This app needs to access the microphone 27 | 28 | 29 | -------------------------------------------------------------------------------- /openFrameworks/dirty-electro-sample-player/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/dirty-electro-sample-player/src/ofApp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Project Title: dirty-electro-sample-player 3 | Description: 4 | ©Daniel Buzzo 2021 5 | dan@buzzo.com 6 | http://buzzo.com 7 | https://github.com/danbz 8 | http://youtube.com/danbuzzo 9 | */ 10 | 11 | #pragma once 12 | 13 | #include "ofMain.h" 14 | 15 | class ofApp : public ofBaseApp{ 16 | 17 | public: 18 | void setup(); 19 | void update(); 20 | void draw(); 21 | 22 | void keyPressed(int key); 23 | void keyReleased(int key); 24 | void mouseMoved(int x, int y ); 25 | void mouseDragged(int x, int y, int button); 26 | void mousePressed(int x, int y, int button); 27 | void mouseReleased(int x, int y, int button); 28 | 29 | 30 | ofSoundPlayer sound; 31 | ofPoint newTarget, oldTarget; // target volume and pan 32 | float counter, maxCounter; 33 | }; 34 | -------------------------------------------------------------------------------- /openFrameworks/dof-example/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/dof-example/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_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /openFrameworks/dof-example/addons.make: -------------------------------------------------------------------------------- 1 | ofxDOF 2 | -------------------------------------------------------------------------------- /openFrameworks/dof-example/bin/data/dof/dof.frag: -------------------------------------------------------------------------------- 1 | #version 110 2 | #extension GL_ARB_texture_rectangle : enable 3 | 4 | uniform sampler2DRect tex; 5 | uniform sampler2DRect range; 6 | uniform vec2 sampleOffset; 7 | uniform float focalDistance; 8 | uniform float focalRange; 9 | 10 | float weights[21]; 11 | 12 | //converts depth value to normalized, linear, between near and far plane 13 | float LinearizeDepth(float zoverw){ 14 | //todo: take near and far as uniforms 15 | float n = 1.0; // camera z near 16 | float f = 20000.0; // camera z far 17 | return (2.0 * n) / (f + n - zoverw * (f - n)); 18 | } 19 | 20 | //translate a Depth texel into a focal value based on our 21 | float FocalValue(vec2 pos) 22 | { 23 | float depth = LinearizeDepth( texture2DRect(range, pos).r ) * 20000.; 24 | return min( abs(depth - focalDistance) / focalRange, 1.0); 25 | } 26 | 27 | void main() 28 | { 29 | //Gaussian Kernel 30 | weights[0] = 0.0091679276560113852; 31 | weights[1] = 0.014053461291849008; 32 | weights[2] = 0.020595286319257878; 33 | weights[3] = 0.028855245532226279; 34 | weights[4] = 0.038650411513543079; 35 | weights[5] = 0.049494378859311142; 36 | weights[6] = 0.060594058578763078; 37 | weights[7] = 0.070921288047096992; 38 | weights[8] = 0.079358891804948081; 39 | weights[9] = 0.084895951965930902; 40 | weights[10] = 0.086826196862124602; 41 | weights[11] = 0.084895951965930902; 42 | weights[12] = 0.079358891804948081; 43 | weights[13] = 0.070921288047096992; 44 | weights[14] = 0.060594058578763092; 45 | weights[15] = 0.049494378859311121; 46 | weights[16] = 0.0386504115135431; 47 | weights[17] = 0.028855245532226279; 48 | weights[18] = 0.020595286319257885; 49 | weights[19] = 0.014053461291849008; 50 | weights[20] = 0.00916792765601138; 51 | 52 | vec3 sum = vec3(0.0, 0.0, 0.0); 53 | float rangeTexel = FocalValue( gl_TexCoord[0].st); 54 | vec2 blurOffset = sampleOffset * rangeTexel; 55 | vec2 baseOffset = -10.0 * blurOffset; 56 | vec2 offset = vec2( 0.0, 0.0 ); 57 | // int samples = (fast == 1) ? 11 : 21; 58 | int samples = 21; 59 | //iterato through a number of samples 60 | for( int s = 0; s < samples; ++s ) { 61 | //sample the surrounding pixels and blend them into the total with the gaussian weight 62 | //if fast is off, we weight the blur amount by the focal difference from the center point 63 | //which helps make in focus items 'pop' and avoid color bleeding between focal depths 64 | vec4 texel = texture2DRect( tex, gl_TexCoord[0].st + baseOffset + offset ) * (1. - abs( FocalValue(gl_TexCoord[0].st + baseOffset + offset) - rangeTexel) ); 65 | sum += texel.rgb * weights[s]; 66 | offset += blurOffset; 67 | } 68 | 69 | gl_FragColor.rgb = sum * gl_Color.rgb; 70 | gl_FragColor.a = gl_Color.a; 71 | } -------------------------------------------------------------------------------- /openFrameworks/dof-example/bin/data/dof/dof.vert: -------------------------------------------------------------------------------- 1 | void main(void) 2 | { 3 | gl_FrontColor = gl_Color; 4 | gl_Position = ftransform(); 5 | gl_TexCoord[0] = gl_MultiTexCoord0; 6 | } 7 | -------------------------------------------------------------------------------- /openFrameworks/dof-example/bin/data/dof/doffocusassist.frag: -------------------------------------------------------------------------------- 1 | #version 110 2 | #extension GL_ARB_texture_rectangle : enable 3 | 4 | 5 | //Shader for visualizing a depth texture as a focal distance map 6 | //paired with dofblur for debugging purposes 7 | 8 | uniform sampler2DRect depthTex; 9 | uniform float focalDistance; 10 | uniform float focalRange; 11 | 12 | float LinearizeDepth(float zoverw){ 13 | float n = 1.0; // camera z near 14 | float f = 20000.0; // camera z far 15 | return (2.0 * n) / (f + n - zoverw * (f - n)); 16 | } 17 | 18 | void main() 19 | { 20 | float depth = LinearizeDepth( texture2DRect(depthTex, gl_TexCoord[0].st).r ) * 20000.; 21 | gl_FragColor = vec4(min( abs(depth - focalDistance) / focalRange, 1.0) ); 22 | gl_FragColor.a = 1.0; 23 | } -------------------------------------------------------------------------------- /openFrameworks/dof-example/bin/data/dof/doffocusassist.vert: -------------------------------------------------------------------------------- 1 | void main(void) 2 | { 3 | gl_FrontColor = gl_Color; 4 | gl_Position = ftransform(); 5 | gl_TexCoord[0] = gl_MultiTexCoord0; 6 | } 7 | -------------------------------------------------------------------------------- /openFrameworks/dof-example/bin/data/dof_gl3/dof.frag: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | // OF default uniforms and attributes 4 | uniform vec4 globalColor; 5 | 6 | // App uniforms and attributes 7 | uniform sampler2DRect tex; 8 | uniform sampler2DRect range; 9 | uniform vec2 sampleOffset; 10 | uniform float focalDistance; 11 | uniform float focalRange; 12 | 13 | in vec4 vColor; 14 | in vec2 vTexCoord; 15 | 16 | out vec4 vFragColor; 17 | 18 | float weights[21]; 19 | 20 | //converts depth value to normalized, linear, between near and far plane 21 | float LinearizeDepth(float zoverw){ 22 | //todo: take near and far as uniforms 23 | float n = 1.0; // camera z near 24 | float f = 20000.0; // camera z far 25 | return (2.0 * n) / (f + n - zoverw * (f - n)); 26 | } 27 | 28 | //translate a Depth texel into a focal value based on our 29 | float FocalValue(vec2 pos) 30 | { 31 | float depth = LinearizeDepth( texture(range, pos).r ) * 20000.; 32 | return min( abs(depth - focalDistance) / focalRange, 1.0); 33 | } 34 | 35 | void main() 36 | { 37 | //Gaussian Kernel 38 | weights[0] = 0.0091679276560113852; 39 | weights[1] = 0.014053461291849008; 40 | weights[2] = 0.020595286319257878; 41 | weights[3] = 0.028855245532226279; 42 | weights[4] = 0.038650411513543079; 43 | weights[5] = 0.049494378859311142; 44 | weights[6] = 0.060594058578763078; 45 | weights[7] = 0.070921288047096992; 46 | weights[8] = 0.079358891804948081; 47 | weights[9] = 0.084895951965930902; 48 | weights[10] = 0.086826196862124602; 49 | weights[11] = 0.084895951965930902; 50 | weights[12] = 0.079358891804948081; 51 | weights[13] = 0.070921288047096992; 52 | weights[14] = 0.060594058578763092; 53 | weights[15] = 0.049494378859311121; 54 | weights[16] = 0.0386504115135431; 55 | weights[17] = 0.028855245532226279; 56 | weights[18] = 0.020595286319257885; 57 | weights[19] = 0.014053461291849008; 58 | weights[20] = 0.00916792765601138; 59 | 60 | vec3 sum = vec3(0.0, 0.0, 0.0); 61 | float rangeTexel = FocalValue( vTexCoord ); 62 | vec2 blurOffset = sampleOffset * rangeTexel; 63 | vec2 baseOffset = -10.0 * blurOffset; 64 | vec2 offset = vec2( 0.0, 0.0 ); 65 | // int samples = (fast == 1) ? 11 : 21; 66 | int samples = 21; 67 | //iterato through a number of samples 68 | for( int s = 0; s < samples; ++s ) { 69 | //sample the surrounding pixels and blend them into the total with the gaussian weight 70 | //if fast is off, we weight the blur amount by the focal difference from the center point 71 | //which helps make in focus items 'pop' and avoid color bleeding between focal depths 72 | vec4 texel = texture( tex, vTexCoord + baseOffset + offset ) * (1. - abs( FocalValue(vTexCoord + baseOffset + offset) - rangeTexel) ); 73 | sum += texel.rgb * weights[s]; 74 | offset += blurOffset; 75 | } 76 | 77 | vFragColor.rgb = sum * globalColor.rgb; 78 | vFragColor.a = globalColor.a; 79 | } -------------------------------------------------------------------------------- /openFrameworks/dof-example/bin/data/dof_gl3/dof.vert: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | // OF default uniforms and attributes 4 | uniform mat4 modelViewProjectionMatrix; 5 | 6 | in vec4 position; 7 | in vec2 texcoord; 8 | 9 | // App uniforms and attributes 10 | out vec4 vColor; 11 | out vec2 vTexCoord; 12 | 13 | void main(void) 14 | { 15 | gl_Position = modelViewProjectionMatrix * position; 16 | vTexCoord = texcoord; 17 | } 18 | -------------------------------------------------------------------------------- /openFrameworks/dof-example/bin/data/dof_gl3/doffocusassist.frag: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | //Shader for visualizing a depth texture as a focal distance map 4 | //paired with dofblur for debugging purposes 5 | 6 | uniform sampler2DRect depthTex; 7 | uniform float focalDistance; 8 | uniform float focalRange; 9 | 10 | in vec4 vColor; 11 | in vec2 vTexCoord; 12 | 13 | out vec4 vFragColor; 14 | 15 | float LinearizeDepth(float zoverw){ 16 | float n = 1.0; // camera z near 17 | float f = 20000.0; // camera z far 18 | return (2.0 * n) / (f + n - zoverw * (f - n)); 19 | } 20 | 21 | void main() 22 | { 23 | float depth = LinearizeDepth( texture(depthTex, vTexCoord).r ) * 20000.; 24 | vFragColor.rgb = vec3(min( abs(depth - focalDistance) / focalRange, 1.0) ); 25 | vFragColor.a = 1.0; 26 | } -------------------------------------------------------------------------------- /openFrameworks/dof-example/bin/data/dof_gl3/doffocusassist.vert: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | // OF default uniforms and attributes 4 | uniform mat4 modelViewProjectionMatrix; 5 | 6 | in vec4 position; 7 | in vec4 color; 8 | in vec2 texcoord; 9 | 10 | // App uniforms and attributes 11 | out vec4 vColor; 12 | out vec2 vTexCoord; 13 | 14 | void main(void) 15 | { 16 | gl_Position = modelViewProjectionMatrix * position; 17 | vColor = color; 18 | vTexCoord = texcoord; 19 | } -------------------------------------------------------------------------------- /openFrameworks/dof-example/dof-example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/dof-example/dof-example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/dof-example/dof-example.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Latest 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/dof-example/dof-example.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/dof-example/dof-example.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/dof-example/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | ${ICON} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | APPL 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSHighResolutionCapable 24 | 25 | NSMicrophoneUsageDescription 26 | This app needs to access the microphone 27 | 28 | 29 | -------------------------------------------------------------------------------- /openFrameworks/dof-example/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | //-------------------------------------------------------------- 4 | int main(){ 5 | ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context 6 | 7 | // this kicks off the running of my app 8 | // can be OF_WINDOW or OF_FULLSCREEN 9 | // pass in width and height too: 10 | ofRunApp(new ofApp()); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /openFrameworks/dof-example/src/ofApp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Project Title: 3 | ©Daniel Buzzo 2021 4 | dan@buzzo.com 5 | http://buzzo.com 6 | https://github.com/danbz 7 | http://youtube.com/danbuzzo 8 | */ 9 | 10 | #pragma once 11 | 12 | #include "ofMain.h" 13 | #include "ofxDOF.h" 14 | 15 | class ofApp : public ofBaseApp{ 16 | public: 17 | void setup(); 18 | void update(); 19 | void draw(); 20 | 21 | void keyPressed(int key); 22 | void keyReleased(int key); 23 | void mouseMoved(int x, int y); 24 | void mouseDragged(int x, int y, int button); 25 | void mousePressed(int x, int y, int button); 26 | void mouseReleased(int x, int y, int button); 27 | void windowResized(int w, int h); 28 | void dragEvent(ofDragInfo dragInfo); 29 | void gotMessage(ofMessage msg); 30 | 31 | 32 | vector< ofBoxPrimitive > boxPrims; 33 | ofxDOF depthOfField; 34 | ofEasyCam camera; 35 | int spaceRange; 36 | bool b_wireFrame, b_swimDof, b_gui; 37 | }; 38 | -------------------------------------------------------------------------------- /openFrameworks/emojiTest/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/emojiTest/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_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /openFrameworks/emojiTest/README.md: -------------------------------------------------------------------------------- 1 | # art-and-code 2 | demo code from the youtube video tutorials and how-tos 3 | 4 | ### emoji test 5 | example code in response to questions on the youtube channel, taking the ascii video transform example from the "openFrameworks creative coding: Video input and manipulation" openframeworks creative technology toolkit series and making it work with emojis instead. 6 | 7 | you can see the original video here; 8 | 9 | https://youtu.be/S0ZBDbNddm4 10 | 11 | ![screenshot](screenshot-emojitest.png) 12 | 13 | /* 14 | add your own emoji truetype font into the bin/data folder and update the name of the font you are using in the 'setup' routine in the ofApp.cpp file 15 | */ -------------------------------------------------------------------------------- /openFrameworks/emojiTest/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/emojiTest/addons.make -------------------------------------------------------------------------------- /openFrameworks/emojiTest/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/emojiTest/bin/data/.gitkeep -------------------------------------------------------------------------------- /openFrameworks/emojiTest/emojiTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/emojiTest/emojiTest.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/emojiTest/emojiTest.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/emojiTest/emojiTest.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/emojiTest/emojiTest.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/emojiTest/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /openFrameworks/emojiTest/screenshot-emojitest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/emojiTest/screenshot-emojitest.png -------------------------------------------------------------------------------- /openFrameworks/emojiTest/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/emojiTest/src/ofApp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Project Title: 3 | Description: 4 | ©Daniel Buzzo 2020 5 | dan@buzzo.com 6 | http://buzzo.com 7 | https://github.com/danbz 8 | */ 9 | 10 | #pragma once 11 | 12 | #include "ofMain.h" 13 | 14 | class ofApp : public ofBaseApp{ 15 | 16 | public: 17 | void setup(); 18 | void update(); 19 | void draw(); 20 | 21 | void keyPressed(int key); 22 | void keyReleased(int key); 23 | void mouseMoved(int x, int y ); 24 | void mouseDragged(int x, int y, int button); 25 | void mousePressed(int x, int y, int button); 26 | void mouseReleased(int x, int y, int button); 27 | void mouseEntered(int x, int y); 28 | void mouseExited(int x, int y); 29 | void windowResized(int w, int h); 30 | void dragEvent(ofDragInfo dragInfo); 31 | void gotMessage(ofMessage msg); 32 | 33 | ofTrueTypeFont ttf; 34 | 35 | 36 | 37 | // here we declare a new instance of the ofVideoGrabber object and call it vidGrabber 38 | ofVideoGrabber vidGrabber; 39 | 40 | // we set up two variables of type integer (int), these are whole numbers, as opposed to type float that are floating point numbers with decimal places. 41 | // These variables are set up in our header file so have program 'scope'. That means that every part of our program we write in the ofApp.cpp file can look inside these variables and put and get the numbers there. 42 | 43 | int camWidth; 44 | int camHeight; 45 | 46 | // these parts are used in our super cool ASCII video hack. 47 | // // uncomment them to declare a new variable or type 'string' and also to set the typeface we are using 48 | string asciiCharacters; 49 | ofTrueTypeFont font; 50 | 51 | 52 | // // these parts are for our inverted video hack 53 | // // a pixels object to contain our inverted pixels 54 | ofPixels videoInverted; 55 | // // a texture object 56 | ofTexture videoTexture; 57 | }; 58 | -------------------------------------------------------------------------------- /openFrameworks/fontExample/belligerentClock .xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/fontExample/belligerentClock .xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/fontExample/belligerentClock .xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/generativeDrawing Catmull Rom curves/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/generativeDrawing Catmull Rom curves/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_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /openFrameworks/generativeDrawing Catmull Rom curves/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/generativeDrawing Catmull Rom curves/addons.make -------------------------------------------------------------------------------- /openFrameworks/generativeDrawing Catmull Rom curves/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/generativeDrawing Catmull Rom curves/bin/data/.gitkeep -------------------------------------------------------------------------------- /openFrameworks/generativeDrawing Catmull Rom curves/generativeDrawing Catmull Rom curves.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/generativeDrawing Catmull Rom curves/generativeDrawing Catmull Rom curves.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/generativeDrawing Catmull Rom curves/generativeDrawing Catmull Rom curves.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Latest 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/generativeDrawing Catmull Rom curves/generativeDrawing Catmull Rom curves.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/generativeDrawing Catmull Rom curves/generativeDrawing Catmull Rom curves.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/generativeDrawing Catmull Rom curves/of.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.device.audio-input 8 | 9 | com.apple.security.device.bluetooth 10 | 11 | com.apple.security.device.camera 12 | 13 | com.apple.security.device.usb 14 | 15 | com.apple.security.files.user-selected.read-write 16 | 17 | com.apple.security.network.client 18 | 19 | com.apple.security.network.server 20 | 21 | com.apple.security.print 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /openFrameworks/generativeDrawing Catmull Rom curves/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | ${ICON} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | APPL 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSHighResolutionCapable 24 | 25 | NSMicrophoneUsageDescription 26 | This app needs to access the microphone 27 | 28 | 29 | -------------------------------------------------------------------------------- /openFrameworks/generativeDrawing Catmull Rom curves/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | 7 | //Use ofGLFWWindowSettings for more options like multi-monitor fullscreen 8 | ofGLWindowSettings settings; 9 | settings.setSize(1024, 768); 10 | settings.windowMode = OF_WINDOW; //can also be OF_FULLSCREEN 11 | 12 | auto window = ofCreateWindow(settings); 13 | 14 | ofRunApp(window, make_shared()); 15 | ofRunMainLoop(); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /openFrameworks/generativeDrawing Catmull Rom curves/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Project Title: catmull rom drawing 3 | Description: 4 | ©Daniel Buzzo 2023 5 | dan@buzzo.com 6 | http://buzzo.com 7 | https://github.com/danbz 8 | https://youtube.com/danbuzzo 9 | */ 10 | #include "ofApp.h" 11 | 12 | //-------------------------------------------------------------- 13 | void ofApp::setup(){ 14 | startPoint = glm::vec2(ofRandomWidth(), ofRandomHeight()); 15 | endPoint = glm::vec2(ofRandomWidth(), ofRandomHeight()); 16 | startCurve = glm::vec2(ofRandomWidth(), ofRandomHeight()); 17 | endCurve = glm::vec2(ofRandomWidth(), ofRandomHeight()); 18 | 19 | timeNow = ofGetSystemTimeMillis(); 20 | timer = 5000; 21 | ofSetBackgroundAuto(false); 22 | ofSetBackgroundColor(0); 23 | ofSetFrameRate(120); 24 | } 25 | 26 | 27 | //-------------------------------------------------------------- 28 | void ofApp::update(){ 29 | if (ofGetSystemTimeMillis() > timeNow + timer){ 30 | timeNow = ofGetSystemTimeMillis(); 31 | startPoint = endPoint; 32 | endPoint = glm::vec2(ofRandomWidth(), ofRandomHeight()); 33 | startCurve = endCurve; 34 | endCurve = glm::vec2(ofRandomWidth(), ofRandomHeight()); 35 | } 36 | 37 | // drunkards walk version 38 | // if (ofGetSystemTimeMillis() > timeNow + timer){ 39 | // timeNow = ofGetSystemTimeMillis(); 40 | // startPoint = endPoint; 41 | // endPoint = glm::vec2(startPoint.x + ofRandom(-200, 200), startPoint.y + ofRandom(-200, 200)); 42 | // startCurve = endCurve; 43 | // endCurve = glm::vec2(startCurve.x + ofRandom(-200, 200), startCurve.y + ofRandom(-200, 200)); 44 | // } 45 | } 46 | 47 | //-------------------------------------------------------------- 48 | void ofApp::draw(){ 49 | float time = ofGetElapsedTimef() ; 50 | ofColor drawColor; 51 | glm::vec2 drawPoint; 52 | // drawColor.set(255, 255, 255, 20); 53 | // drawColor.setHsb(127 + 127 * sin(0.1 * time), 255, 255); 54 | drawColor.setHsb(20 + 20 * sin(0.1 * time), 200, 170); 55 | // drawColor.setHsb(127 + 127 * sin(0.1 * time), 127 + 127 * sin(time *0.15), 127 + 127 * sin(time*0.2)); 56 | ofSetColor(drawColor); 57 | 58 | float t = ofNormalize(ofGetSystemTimeMillis(), timeNow, timeNow + timer ); 59 | drawPoint= glm::vec2 ( ofCurvePoint(startPoint, startCurve, endCurve, endPoint, t ) ); 60 | // ofDrawCircle(drawPoint, 5); 61 | 62 | ofDrawCircle(drawPoint, 5 + 6 * sin(0.5 * time)); 63 | } 64 | 65 | //-------------------------------------------------------------- 66 | void ofApp::keyPressed(int key){ 67 | switch(key){ 68 | case 'f': 69 | ofToggleFullscreen(); 70 | break; 71 | 72 | default: 73 | break; 74 | 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /openFrameworks/generativeDrawing Catmull Rom curves/src/ofApp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Project Title: catmull rom drawing 3 | Description: 4 | ©Daniel Buzzo 2023 5 | dan@buzzo.com 6 | http://buzzo.com 7 | https://github.com/danbz 8 | https://youtube.com/danbuzzo 9 | */ 10 | #pragma once 11 | 12 | #include "ofMain.h" 13 | 14 | class ofApp : public ofBaseApp{ 15 | 16 | public: 17 | void setup(); 18 | void update(); 19 | void draw(); 20 | 21 | void keyPressed(int key); 22 | 23 | 24 | float timer, timeNow, curvePos; 25 | glm::vec2 startPoint, endPoint, startCurve, endCurve; 26 | }; 27 | -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainter/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/kinect2-NI-ParticlePainter/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_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainter/addons.make: -------------------------------------------------------------------------------- 1 | ofxNI2 2 | -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainter/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/kinect2-NI-ParticlePainter/bin/data/.gitkeep -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainter/bin/data/test.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/kinect2-NI-ParticlePainter/bin/data/test.blend -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainter/icon.rc: -------------------------------------------------------------------------------- 1 | // Icon Resource Definition 2 | #define MAIN_ICON 102 3 | 4 | #if defined(_DEBUG) 5 | MAIN_ICON ICON "icon_debug.ico" 6 | #else 7 | MAIN_ICON ICON "icon.ico" 8 | #endif 9 | -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainter/kinect2-NI-ParticlePainter.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainter/kinect2-NI-ParticlePainter.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainter/kinect2-NI-ParticlePainter.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainter/kinect2-NI-ParticlePainter.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/kinect2-NI-ParticlePainter/kinect2-NI-ParticlePainter.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainter/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | NSHighResolutionCapable 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainter/screenshot-kinect2-particle-painter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/kinect2-NI-ParticlePainter/screenshot-kinect2-particle-painter.png -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainter/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1280,960,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/kinect2-NI-ParticlePainter/src/ofApp.h: -------------------------------------------------------------------------------- 1 | // dan buzzo 2020 github/danbz 2 | // buzzo.com 3 | // adapted from the ofxNI2 tracker example 4 | // depends upon ofxNI2 https://github.com/roymacdonald/ofxNI2 5 | // possibly originally from https://github.com/satoruhiga 6 | 7 | #pragma once 8 | 9 | #include "ofMain.h" 10 | #include "ofxNI2.h" 11 | #include "ofxNiTE2.h" 12 | 13 | 14 | class particle{ 15 | // our particle class 16 | public: 17 | particle(ofVec3f startPoint, ofColor col); 18 | ~particle(); 19 | void update(); 20 | void draw(); 21 | ofVec3f location, direction, velocity; 22 | int size; 23 | ofColor col; 24 | float speed; 25 | }; 26 | 27 | 28 | class ofApp : public ofBaseApp 29 | { 30 | public: 31 | void setup(); 32 | void exit(); 33 | 34 | void update(); 35 | void draw(); 36 | 37 | ofxNI2::Device device; 38 | ofxNiTE2::UserTracker tracker; 39 | ofPixels depthPixels; 40 | ofTexture depthTexture; 41 | 42 | 43 | ofEasyCam cam; 44 | ofLight light; 45 | 46 | 47 | // for our particle system 48 | vector particles; 49 | int maxAge, maxParticles; 50 | 51 | bool b_drawParticles; 52 | }; 53 | 54 | -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainterMirror/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/kinect2-NI-ParticlePainterMirror/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_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainterMirror/addons.make: -------------------------------------------------------------------------------- 1 | ofxNI2 2 | -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainterMirror/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/kinect2-NI-ParticlePainterMirror/bin/data/.gitkeep -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainterMirror/bin/data/test.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/kinect2-NI-ParticlePainterMirror/bin/data/test.blend -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainterMirror/icon.rc: -------------------------------------------------------------------------------- 1 | // Icon Resource Definition 2 | #define MAIN_ICON 102 3 | 4 | #if defined(_DEBUG) 5 | MAIN_ICON ICON "icon_debug.ico" 6 | #else 7 | MAIN_ICON ICON "icon.ico" 8 | #endif 9 | -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainterMirror/kinect2-NI-ParticlePainterMirror.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainterMirror/kinect2-NI-ParticlePainterMirror.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainterMirror/kinect2-NI-ParticlePainterMirror.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainterMirror/kinect2-NI-ParticlePainterMirror.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/kinect2-NI-ParticlePainterMirror/kinect2-NI-ParticlePainterMirror.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainterMirror/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainterMirror/screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/kinect2-NI-ParticlePainterMirror/screenshot-1.png -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainterMirror/screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/kinect2-NI-ParticlePainterMirror/screenshot-2.png -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainterMirror/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | // ofSetupOpenGL(1280,960,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 | ofGLWindowSettings settings; 14 | settings.setGLVersion(3, 2); // try also 2, 1 15 | // settings.width = 1024; 16 | // settings.height = 768; 17 | settings.windowMode = OF_WINDOW; 18 | ofCreateWindow(settings); 19 | ofRunApp( new ofApp()); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /openFrameworks/kinect2-NI-ParticlePainterMirror/src/ofApp.h: -------------------------------------------------------------------------------- 1 | // dan buzzo 2020 github/danbz 2 | // buzzo.com 3 | // adapted from the ofxNI2 tracker example 4 | // depends upon ofxNI2 https://github.com/roymacdonald/ofxNI2 5 | // possibly originally from https://github.com/satoruhiga 6 | 7 | #pragma once 8 | 9 | #include "ofMain.h" 10 | #include "ofxNI2.h" 11 | #include "ofxNiTE2.h" 12 | 13 | 14 | class particle{ 15 | 16 | public: 17 | particle(ofVec3f startPoint, ofColor col); 18 | ~particle(); 19 | void update(); 20 | void draw(); 21 | ofVec3f location, direction, velocity; 22 | float size; 23 | ofColor col; 24 | float speed; 25 | }; 26 | 27 | 28 | class ofApp : public ofBaseApp 29 | { 30 | public: 31 | void setup(); 32 | void exit(); 33 | void keyPressed(int key); 34 | void update(); 35 | void draw(); 36 | 37 | ofxNI2::Device device; 38 | ofxNiTE2::UserTracker tracker; 39 | ofPixels depthPixels; 40 | ofTexture depthTexture; 41 | 42 | // for particles 43 | vector particles; 44 | int maxParticles; 45 | 46 | bool b_drawParticles, b_drawDebug; 47 | 48 | ofImage userMask; 49 | 50 | // ofxNI2::DepthStream depth; 51 | ofxNI2::ColorStream color; 52 | 53 | ofFbo fbo; 54 | }; 55 | 56 | -------------------------------------------------------------------------------- /openFrameworks/kinectPhotoBooth/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/kinectPhotoBooth/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_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /openFrameworks/kinectPhotoBooth/README.md: -------------------------------------------------------------------------------- 1 | # art-and-code 2 | demo code from the youtube video tutorials and how-tos 3 | 4 | Building a 3D photo booth with microsft XBox Kinect sensor 5 | 6 | using openFrameworks C++ creative coding framework 7 | http://openframeworks.cc 8 | 9 | http://youtube.com/danbuzzo 10 | 11 | http://twitter.com/danb_zzo 12 | 13 | ### kinectPhotoBooth 14 | * using kinect depth sensors to capture RGB & depth data 15 | * constructing point clouds from depth data 16 | * colouring point clouds with RGB data and with HSB colour gradients 17 | * traingulating vertices with indices to form surfaced mesh 18 | * recording and saving 3D data to files on disk 19 | * adding sounds and onscreen countdown for photobooth 20 | * adding unique filenames to exported .ply files 21 | 22 | #### controls 23 | * 'p' show or hide point cloud rendering 24 | * 'f' toggle fullscreen' 25 | * 'g' show or hide the gui palette 26 | * 's' save 3D file to disk 27 | 28 | 29 | ![screenshot](screenshot-kinectphotobooth.png) 30 | 31 | 32 | /* 33 | If you are struggling to get the device to connect ( especially Windows Users ) 34 | please look at the ReadMe: in addons/ofxKinect/README.md 35 | */ -------------------------------------------------------------------------------- /openFrameworks/kinectPhotoBooth/addons.make: -------------------------------------------------------------------------------- 1 | ofxGui 2 | ofxKinect 3 | -------------------------------------------------------------------------------- /openFrameworks/kinectPhotoBooth/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/kinectPhotoBooth/bin/data/.gitkeep -------------------------------------------------------------------------------- /openFrameworks/kinectPhotoBooth/bin/data/Beep_Short.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/kinectPhotoBooth/bin/data/Beep_Short.mp3 -------------------------------------------------------------------------------- /openFrameworks/kinectPhotoBooth/bin/data/Camera-shutter-sound-effect.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/kinectPhotoBooth/bin/data/Camera-shutter-sound-effect.mp3 -------------------------------------------------------------------------------- /openFrameworks/kinectPhotoBooth/bin/data/Camera-shutter-sound-effect.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/kinectPhotoBooth/bin/data/Camera-shutter-sound-effect.txt -------------------------------------------------------------------------------- /openFrameworks/kinectPhotoBooth/bin/data/frabk.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/kinectPhotoBooth/bin/data/frabk.ttf -------------------------------------------------------------------------------- /openFrameworks/kinectPhotoBooth/kinectPhotoBooth.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/kinectPhotoBooth/kinectPhotoBooth.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/kinectPhotoBooth/kinectPhotoBooth.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/kinectPhotoBooth/kinectPhotoBooth.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/kinectPhotoBooth/kinectPhotoBooth.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/kinectPhotoBooth/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /openFrameworks/kinectPhotoBooth/screenshot-kinectphotobooth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/kinectPhotoBooth/screenshot-kinectphotobooth.png -------------------------------------------------------------------------------- /openFrameworks/kinectPhotoBooth/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/kinectPhotoBooth/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxKinect.h" 5 | #include "ofxGui.h" 6 | 7 | class ofApp : public ofBaseApp{ 8 | 9 | public: 10 | void setup(); 11 | void update(); 12 | void draw(); 13 | 14 | void keyPressed(int key); 15 | void keyReleased(int key); 16 | void mouseMoved(int x, int y ); 17 | void mouseDragged(int x, int y, int button); 18 | void mousePressed(int x, int y, int button); 19 | void mouseReleased(int x, int y, int button); 20 | void mouseEntered(int x, int y); 21 | void mouseExited(int x, int y); 22 | void windowResized(int w, int h); 23 | void dragEvent(ofDragInfo dragInfo); 24 | void gotMessage(ofMessage msg); 25 | 26 | void drawPointCloud(); 27 | 28 | // int nearClip, farClip; 29 | ofxKinect kinect; 30 | 31 | bool b_drawPointCloud, b_drawGui, b_saving; 32 | 33 | ofEasyCam cam; 34 | 35 | // declare our GUI items 36 | ofxPanel gui; 37 | ofParameter nearClip; 38 | ofParameter farClip; 39 | 40 | ofMesh pointCloud; 41 | vector pointIndex; 42 | 43 | float counter; 44 | int countDown; 45 | 46 | ofSoundPlayer beep; 47 | ofSoundPlayer click; 48 | ofTrueTypeFont font; 49 | }; 50 | -------------------------------------------------------------------------------- /openFrameworks/meshExample/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/meshExample/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_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /openFrameworks/meshExample/README.md: -------------------------------------------------------------------------------- 1 | # Dan buzzo art and code 2 | 3 | Dan Buzzo, May 2021 4 | 5 | https://github.com/danbz 6 | https://youtube.com/danbuzzo 7 | 8 | https://buzzo.com 9 | 10 | #Mesh, noise and perlin noise Example with animation and color 11 | 12 | Simple example to 13 | • generate an openFrameworks (openframeworks.cc) mesh object 14 | • use ofEasyCam to view our 3D scene 15 | • populate it with vertices 16 | • triangulate vertices and add indices to create triangle mesh 17 | • use ofRandom() function to change the vertices z co-ordinates to distort the Mesh 18 | • use 2 dimensional Perlin Noise() function to change the vertices z co-ordinates to distort the Mesh 19 | 20 | ##key controls 21 | • f: toggle full screen 22 | • spacebar: random z-value in meshvertices 23 | • w: draw wireframe or point cloud 24 | • p: use PerlinNoise for z-value in meshvertices 25 | • Up-key Down-key: increase/decrease PerlinNoise input range 26 | • Right-key Left-key: increase/decrease amplitude of Perlin Noise distortion 27 | • click and drag in window to move camera 28 | 29 | 30 | ![screenshot](mesh-example-screenshot.png) 31 | ![screenshot](mesh-example-screenshot2.png) 32 | ![screenshot](screenshot.png) -------------------------------------------------------------------------------- /openFrameworks/meshExample/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/meshExample/addons.make -------------------------------------------------------------------------------- /openFrameworks/meshExample/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/meshExample/bin/data/.gitkeep -------------------------------------------------------------------------------- /openFrameworks/meshExample/mesh-example-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/meshExample/mesh-example-screenshot.png -------------------------------------------------------------------------------- /openFrameworks/meshExample/mesh-example-screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/meshExample/mesh-example-screenshot2.png -------------------------------------------------------------------------------- /openFrameworks/meshExample/meshExample-compiled-osx-binary.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/meshExample/meshExample-compiled-osx-binary.zip -------------------------------------------------------------------------------- /openFrameworks/meshExample/meshExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/meshExample/meshExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/meshExample/meshExample.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/meshExample/meshExample.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/meshExample/meshExample.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/meshExample/meshExample.xcodeproj/xcuserdata/danbuzzo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /openFrameworks/meshExample/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | NSHighResolutionCapable 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /openFrameworks/meshExample/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/meshExample/screenshot.png -------------------------------------------------------------------------------- /openFrameworks/meshExample/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/meshExample/src/ofApp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Project Title: 3 | Description: Mesh generation example with random and perlin noise distortion 4 | ©Daniel Buzzo 2021 5 | dan@buzzo.com 6 | http://buzzo.com 7 | https://github.com/danbz 8 | http://youtube.com/danbuzzo 9 | */ 10 | #pragma once 11 | 12 | #include "ofMain.h" 13 | 14 | 15 | class ofApp : public ofBaseApp{ 16 | public: 17 | void setup(); 18 | void update(); 19 | void draw(); 20 | 21 | void keyPressed(int key); 22 | void keyReleased(int key); 23 | 24 | // make a new mesh object 25 | ofMesh mainMesh; 26 | ofEasyCam mainCam; 27 | 28 | int width, height; 29 | bool b_messyMesh, b_perlinMesh, b_drawWireFrame, b_marchMesh; 30 | float perlinRange, perlinHeight; 31 | }; 32 | -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/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/music-for-homemade-airports/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_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/addons.make -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/bin/data/.gitkeep -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/bin/data/Choir-cut/Eno-Choir-01.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/bin/data/Choir-cut/Eno-Choir-01.wav -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/bin/data/Choir-cut/Eno-Choir-02.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/bin/data/Choir-cut/Eno-Choir-02.wav -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/bin/data/Choir-cut/Eno-Choir-03.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/bin/data/Choir-cut/Eno-Choir-03.wav -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/bin/data/Choir-cut/Eno-Choir-04.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/bin/data/Choir-cut/Eno-Choir-04.wav -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/bin/data/Choir-cut/Eno-Choir-05.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/bin/data/Choir-cut/Eno-Choir-05.wav -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/bin/data/Choir-cut/Eno-Choir-06.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/bin/data/Choir-cut/Eno-Choir-06.wav -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/bin/data/Choir-cut/Eno-Choir-07.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/bin/data/Choir-cut/Eno-Choir-07.wav -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/bin/data/Piano-cut/Eno-Piano-01.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/bin/data/Piano-cut/Eno-Piano-01.wav -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/bin/data/Piano-cut/Eno-Piano-02.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/bin/data/Piano-cut/Eno-Piano-02.wav -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/bin/data/Piano-cut/Eno-Piano-03.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/bin/data/Piano-cut/Eno-Piano-03.wav -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/bin/data/Piano-cut/Eno-Piano-04.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/bin/data/Piano-cut/Eno-Piano-04.wav -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/bin/data/Piano-cut/Eno-Piano-05.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/bin/data/Piano-cut/Eno-Piano-05.wav -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/bin/data/Piano-cut/Eno-Piano-06.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/bin/data/Piano-cut/Eno-Piano-06.wav -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/bin/data/Piano-cut/Eno-Piano-07.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/bin/data/Piano-cut/Eno-Piano-07.wav -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/bin/data/Piano-cut/Eno-Piano-08.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/bin/data/Piano-cut/Eno-Piano-08.wav -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/bin/data/README.md: -------------------------------------------------------------------------------- 1 | # art and code 2 | youube.com/danbuzzo 3 | Generative Systems for Art and Design 4 | 5 | 6 | Eno-esque 'Music for Airports' loop sound samples created by 7 | ©Dan Carr : care of https://reverbmachine.com/blog/deconstructing-brian-eno-music-for-airports 8 | 9 | Dirty Electronic samples by Dan Buzzo 10 | @danb_zzo -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/music for homemade airports.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/music for homemade airports.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/music for homemade airports.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Latest 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/music for homemade airports.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/music for homemade airports.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | NSCameraUsageDescription 20 | This app needs to access the camera 21 | NSHighResolutionCapable 22 | 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/screenshot-randomAudio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/screenshot-randomAudio.png -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/music-for-homemade-airports/screenshot.png -------------------------------------------------------------------------------- /openFrameworks/music-for-homemade-airports/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1200,800,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/music-for-homemade-airports/src/ofApp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Project Title: 3 | Description: Music for home made airports: RandomAudio 4 | ©Daniel Buzzo 2021 5 | dan@buzzo.com 6 | http://youtube.com/danbuzzo 7 | 8 | http://buzzo.com 9 | https://github.com/danbz 10 | 11 | sounds samples © Dan Carr : care of https://reverbmachine.com/blog/deconstructing-brian-eno-music-for-airports 12 | */ 13 | 14 | #pragma once 15 | 16 | #include "ofMain.h" 17 | 18 | class ofApp : public ofBaseApp{ 19 | 20 | public: 21 | void setup(); 22 | void update(); 23 | void draw(); 24 | 25 | void keyPressed(int key); 26 | void keyReleased(int key); 27 | 28 | void loadVocal(); 29 | void loadPiano(); 30 | 31 | vector voices; 32 | ofSoundPlayer voice1, voice2, voice3, voice4, voice5, voice6, voice7; 33 | bool b_autoPlay; 34 | float tempo, currTime; 35 | int totalVoices; 36 | bool b_Gui; 37 | ofSoundPlayer drums; 38 | 39 | }; 40 | -------------------------------------------------------------------------------- /openFrameworks/particleSystem/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/particleSystem/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_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /openFrameworks/particleSystem/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/particleSystem/addons.make -------------------------------------------------------------------------------- /openFrameworks/particleSystem/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/particleSystem/bin/data/.gitkeep -------------------------------------------------------------------------------- /openFrameworks/particleSystem/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | ${ICON} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | APPL 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSHighResolutionCapable 24 | 25 | NSMicrophoneUsageDescription 26 | This app needs to access the microphone 27 | 28 | 29 | -------------------------------------------------------------------------------- /openFrameworks/particleSystem/particleSystem.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/particleSystem/particleSystem.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/particleSystem/particleSystem.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Latest 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/particleSystem/particleSystem.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/particleSystem/particleSystem.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/particleSystem/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/particleSystem/src/ofApp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Project Title: 3 | Description: 4 | ©Daniel Buzzo 2021 5 | dan@buzzo.com 6 | http://buzzo.com 7 | https://github.com/danbz 8 | http://youtube.com/danbuzzo 9 | */ 10 | 11 | #pragma once 12 | 13 | #include "ofMain.h" 14 | 15 | class particle { 16 | public: 17 | // our new particle class 18 | // with each object containing an x and y position, and a vector direction as vx and vy and a size 19 | ofColor color; 20 | float size; 21 | glm::vec3 force, position, direction; 22 | 23 | // we also define two methods that the particle object understands 24 | void update(); 25 | void draw(); 26 | 27 | // and define a particle contructor and a destructor (the destructor is denoted by the tilde (~) character prefix 28 | // the contructor is expecting to be passed an initial x and y co-ordinate for the new particle 29 | particle(int x, int y, int z, int hue); 30 | ~particle(); 31 | }; 32 | 33 | class ofApp : public ofBaseApp{ 34 | 35 | public: 36 | void setup(); 37 | void update(); 38 | void draw(); 39 | 40 | void keyPressed(int key); 41 | void keyReleased(int key); 42 | void mouseMoved(int x, int y ); 43 | void mouseDragged(int x, int y, int button); 44 | void mousePressed(int x, int y, int button); 45 | void mouseReleased(int x, int y, int button); 46 | 47 | 48 | // define a vector containing our new particle class objects 49 | vector particles; 50 | int hue; 51 | ofEasyCam cam; 52 | ofLight light; 53 | int maxParticles; 54 | }; 55 | -------------------------------------------------------------------------------- /openFrameworks/slitScan/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/slitScan/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_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /openFrameworks/slitScan/README.md: -------------------------------------------------------------------------------- 1 | # halfPushScan 2 | half push slitscan 3 | 4 | A simple slitscan camera routine that mixes a live camera on half the screen and a continuous slit-scan 'push' ribbon image taken from a fixed slitscan at the centre of the screen/camera image 5 | -------------------------------------------------------------------------------- /openFrameworks/slitScan/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/slitScan/addons.make -------------------------------------------------------------------------------- /openFrameworks/slitScan/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /openFrameworks/slitScan/slitScan.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/slitScan/slitScan.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/slitScan/slitScan.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/slitScan/slitScan.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/slitScan/slitScan.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/slitScan/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/slitScan/src/ofApp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Project Title: SlitScan half push scan 3 | Description: 4 | ©Daniel Buzzo 2020 5 | dan@buzzo.com 6 | http://buzzo.com 7 | https://github.com/danbz 8 | */ 9 | 10 | #pragma once 11 | 12 | #include "ofMain.h" 13 | 14 | class ofApp : public ofBaseApp{ 15 | 16 | public: 17 | 18 | void setup(); 19 | void update(); 20 | void draw(); 21 | 22 | void keyPressed(int key); 23 | 24 | // initiate a videograbber object and objects to put image pixel data into 25 | ofVideoGrabber vidGrabber; 26 | ofPixels videoPixels, pixels; 27 | ofTexture videoTexture; 28 | ofColor color; 29 | int xSteps, ySteps, scanStyle, speed; 30 | int sWidth, sHeight; 31 | bool b_drawCam, b_smooth; 32 | float camWidth, camHeight; 33 | 34 | ofTrueTypeFont font; 35 | vector minuteThumbs, hourThumbs; 36 | }; 37 | -------------------------------------------------------------------------------- /openFrameworks/slitscan-example/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/slitscan-example/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_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /openFrameworks/slitscan-example/README.md: -------------------------------------------------------------------------------- 1 | # Creative Technology Toolkit sessions 2 | 3 | 4 | video walk throughs of all code examples here can be found on YouTube at 5 | 6 | https://www.youtube.com/playlist?list=PL6QF0yo3Zj7ALxV4MyOJ9oSFsV-Mo39R2 7 | 8 | 9 | Dan Buzzo, September 2019 10 | 11 | https://github.com/danbz 12 | 13 | https://buzzo.com 14 | 15 | #Slitscan Example 16 | 17 | Simple example to retrieve live image data from a webcam and re-draw a line at a time to the screen 18 | 19 | included is a compiled binary for OSX 20 | 21 | ![screenshot](slitscan-example-screenshot.png) 22 | -------------------------------------------------------------------------------- /openFrameworks/slitscan-example/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/slitscan-example/addons.make -------------------------------------------------------------------------------- /openFrameworks/slitscan-example/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/slitscan-example/bin/data/.gitkeep -------------------------------------------------------------------------------- /openFrameworks/slitscan-example/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /openFrameworks/slitscan-example/slitscan-example-osx.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/slitscan-example/slitscan-example-osx.zip -------------------------------------------------------------------------------- /openFrameworks/slitscan-example/slitscan-example-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/slitscan-example/slitscan-example-screenshot.png -------------------------------------------------------------------------------- /openFrameworks/slitscan-example/slitscan-example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/slitscan-example/slitscan-example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/slitscan-example/slitscan-example.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/slitscan-example/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1280,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/slitscan-example/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | //-------------------------------------------------------------- 4 | void ofApp::setup(){ 5 | camWidth = 640; // try to grab at this size from the camera. 6 | camHeight = 480; 7 | xSteps = 0; 8 | 9 | // ask the video grabber for a list of attached camera devices. 10 | // put it into a vector of devices 11 | vector devices = vidGrabber.listDevices(); 12 | 13 | // loop through and print out the devices to the console log 14 | for(int i = 0; i < devices.size(); i++){ 15 | if(devices[i].bAvailable){ 16 | ofLogNotice() << devices[i].id << ": " << devices[i].deviceName; 17 | }else{ 18 | ofLogNotice() << devices[i].id << ": " << devices[i].deviceName << " - unavailable "; 19 | } 20 | } 21 | 22 | // set the ID of the camera we will use 23 | vidGrabber.setDeviceID(0); 24 | // set how fast we will grab frames from the camera 25 | vidGrabber.setDesiredFrameRate(30); 26 | // set the width and height of the camera 27 | vidGrabber.initGrabber(camWidth, camHeight); 28 | // set up our pixel object to be the same size as our camera object 29 | videoInverted.allocate(camWidth,camHeight, OF_PIXELS_RGB); 30 | videoTexture.allocate(videoInverted); 31 | ofSetVerticalSync(true); 32 | 33 | ofBackground(100, 100, 100); // set the background colour to dark grey 34 | } 35 | 36 | //-------------------------------------------------------------- 37 | void ofApp::update(){ 38 | 39 | vidGrabber.update(); 40 | ofPixels & pixels = vidGrabber.getPixels(); 41 | 42 | for (int y=0; y= camHeight ) { 50 | xSteps = 0; // if we are on the bottom line of the image then start at the top again 51 | } 52 | xSteps += 1; // step on to the next line. increase this number to make things faster 53 | 54 | } 55 | 56 | //-------------------------------------------------------------- 57 | void ofApp::draw(){ 58 | vidGrabber.draw(0, 0); // draw our plain image 59 | videoTexture.draw( camWidth, 0, camWidth, camHeight); // draw the video texture we have constructed 60 | } 61 | 62 | //-------------------------------------------------------------- 63 | void ofApp::keyPressed(int key){ 64 | 65 | if(key == 'f' || key == 'F'){ 66 | ofToggleFullscreen(); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /openFrameworks/slitscan-example/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | class ofApp : public ofBaseApp{ 6 | 7 | public: 8 | 9 | void setup(); 10 | void update(); 11 | void draw(); 12 | 13 | void keyPressed(int key); 14 | 15 | // initiate a videograbber object and objects to put image pixel data into 16 | ofVideoGrabber vidGrabber; 17 | ofPixels videoInverted; 18 | ofTexture videoTexture; 19 | 20 | int camWidth, camHeight, xSteps; 21 | 22 | }; 23 | -------------------------------------------------------------------------------- /openFrameworks/videoSketch/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/videoSketch/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_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /openFrameworks/videoSketch/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/videoSketch/addons.make -------------------------------------------------------------------------------- /openFrameworks/videoSketch/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/videoSketch/bin/data/.gitkeep -------------------------------------------------------------------------------- /openFrameworks/videoSketch/bin/data/tiu keng leng platform walk1080.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/videoSketch/bin/data/tiu keng leng platform walk1080.mov -------------------------------------------------------------------------------- /openFrameworks/videoSketch/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | NSHighResolutionCapable 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /openFrameworks/videoSketch/screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/videoSketch/screenshot.jpg -------------------------------------------------------------------------------- /openFrameworks/videoSketch/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/videoSketch/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Project Title: Video Manipulation demo 3 | Description: 4 | ©Daniel Buzzo 2021 5 | dan@buzzo.com 6 | http://buzzo.com 7 | https://github.com/danbz 8 | http://youtube.com/danbuzzo 9 | */ 10 | 11 | #include "ofApp.h" 12 | 13 | //-------------------------------------------------------------- 14 | void ofApp::setup(){ 15 | threshHold = 120; 16 | video.load("tiu keng leng platform walk1080.mov"); 17 | video.setVolume(0); 18 | video.setSpeed(1.0); 19 | video.setLoopState(OF_LOOP_NORMAL); 20 | video.play(); 21 | image = video.getPixels(); 22 | } 23 | 24 | //-------------------------------------------------------------- 25 | void ofApp::update(){ 26 | video.update(); 27 | image = video.getPixels(); 28 | image.update(); 29 | 30 | ofColor col; 31 | for (int y = 0; y < image.getHeight(); y++ ){ 32 | for (int x = 0; x < image.getWidth(); x++ ){ 33 | col = image.getColor( x, y ); 34 | if (col.r > threshHold ){ 35 | // col.set(255); 36 | col.setHsb( ofMap( x, 0, image.getWidth(), 0, 255), 255, 255 ); 37 | } else { 38 | col.set( 0 ); 39 | } 40 | image.setColor(x, y, col); 41 | } 42 | } 43 | image.update(); 44 | } 45 | 46 | //-------------------------------------------------------------- 47 | void ofApp::draw(){ 48 | // video.draw(0,0, ofGetWidth(), ofGetHeight()); 49 | image.draw(0,0, ofGetWidth(), ofGetHeight()); 50 | } 51 | 52 | //-------------------------------------------------------------- 53 | void ofApp::keyPressed(int key){ 54 | switch (key) { 55 | case 'f': 56 | case 'F': 57 | ofToggleFullscreen(); 58 | break; 59 | 60 | case OF_KEY_UP: 61 | if( threshHold < 250){ 62 | threshHold += 5; 63 | } 64 | break; 65 | 66 | case OF_KEY_DOWN: 67 | if (threshHold > 10){ 68 | threshHold -= 5; 69 | } 70 | break; 71 | 72 | case OF_KEY_LEFT: 73 | video.setSpeed( video.getSpeed() - 0.1 ); 74 | break; 75 | 76 | case OF_KEY_RIGHT: 77 | video.setSpeed( video.getSpeed() + 0.1 ); 78 | break; 79 | 80 | default: 81 | break; 82 | } 83 | } 84 | 85 | //-------------------------------------------------------------- 86 | void ofApp::keyReleased(int key){ 87 | 88 | } 89 | -------------------------------------------------------------------------------- /openFrameworks/videoSketch/src/ofApp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Project Title: Video Manipulation demo 3 | Description: 4 | ©Daniel Buzzo 2021 5 | dan@buzzo.com 6 | http://buzzo.com 7 | https://github.com/danbz 8 | http://youtube.com/danbuzzo 9 | */ 10 | 11 | #pragma once 12 | 13 | #include "ofMain.h" 14 | 15 | class ofApp : public ofBaseApp{ 16 | 17 | public: 18 | void setup(); 19 | void update(); 20 | void draw(); 21 | 22 | void keyPressed(int key); 23 | void keyReleased(int key); 24 | 25 | ofVideoPlayer video; 26 | int threshHold; 27 | ofImage image; 28 | }; 29 | -------------------------------------------------------------------------------- /openFrameworks/videoSketch/videoSketch.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/videoSketch/videoSketch.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/videoSketch/videoSketch.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/videoSketch/videoSketch.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/videoSketch/videoSketch.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/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/zachBlobs/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_CFLAGS = $(OF_CORE_CFLAGS) 17 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 18 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 19 | -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/zachBlobs/addons.make -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/bin/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/zachBlobs/bin/data/.gitkeep -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/bin/data/dof/dof.frag: -------------------------------------------------------------------------------- 1 | #version 110 2 | #extension GL_ARB_texture_rectangle : enable 3 | 4 | uniform sampler2DRect tex; 5 | uniform sampler2DRect range; 6 | uniform vec2 sampleOffset; 7 | uniform float focalDistance; 8 | uniform float focalRange; 9 | 10 | float weights[21]; 11 | 12 | //converts depth value to normalized, linear, between near and far plane 13 | float LinearizeDepth(float zoverw){ 14 | //todo: take near and far as uniforms 15 | float n = 1.0; // camera z near 16 | float f = 20000.0; // camera z far 17 | return (2.0 * n) / (f + n - zoverw * (f - n)); 18 | } 19 | 20 | //translate a Depth texel into a focal value based on our 21 | float FocalValue(vec2 pos) 22 | { 23 | float depth = LinearizeDepth( texture2DRect(range, pos).r ) * 20000.; 24 | return min( abs(depth - focalDistance) / focalRange, 1.0); 25 | } 26 | 27 | void main() 28 | { 29 | //Gaussian Kernel 30 | weights[0] = 0.0091679276560113852; 31 | weights[1] = 0.014053461291849008; 32 | weights[2] = 0.020595286319257878; 33 | weights[3] = 0.028855245532226279; 34 | weights[4] = 0.038650411513543079; 35 | weights[5] = 0.049494378859311142; 36 | weights[6] = 0.060594058578763078; 37 | weights[7] = 0.070921288047096992; 38 | weights[8] = 0.079358891804948081; 39 | weights[9] = 0.084895951965930902; 40 | weights[10] = 0.086826196862124602; 41 | weights[11] = 0.084895951965930902; 42 | weights[12] = 0.079358891804948081; 43 | weights[13] = 0.070921288047096992; 44 | weights[14] = 0.060594058578763092; 45 | weights[15] = 0.049494378859311121; 46 | weights[16] = 0.0386504115135431; 47 | weights[17] = 0.028855245532226279; 48 | weights[18] = 0.020595286319257885; 49 | weights[19] = 0.014053461291849008; 50 | weights[20] = 0.00916792765601138; 51 | 52 | vec3 sum = vec3(0.0, 0.0, 0.0); 53 | float rangeTexel = FocalValue( gl_TexCoord[0].st); 54 | vec2 blurOffset = sampleOffset * rangeTexel; 55 | vec2 baseOffset = -10.0 * blurOffset; 56 | vec2 offset = vec2( 0.0, 0.0 ); 57 | // int samples = (fast == 1) ? 11 : 21; 58 | int samples = 21; 59 | //iterato through a number of samples 60 | for( int s = 0; s < samples; ++s ) { 61 | //sample the surrounding pixels and blend them into the total with the gaussian weight 62 | //if fast is off, we weight the blur amount by the focal difference from the center point 63 | //which helps make in focus items 'pop' and avoid color bleeding between focal depths 64 | vec4 texel = texture2DRect( tex, gl_TexCoord[0].st + baseOffset + offset ) * (1. - abs( FocalValue(gl_TexCoord[0].st + baseOffset + offset) - rangeTexel) ); 65 | sum += texel.rgb * weights[s]; 66 | offset += blurOffset; 67 | } 68 | 69 | gl_FragColor.rgb = sum * gl_Color.rgb; 70 | gl_FragColor.a = gl_Color.a; 71 | } -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/bin/data/dof/dof.vert: -------------------------------------------------------------------------------- 1 | void main(void) 2 | { 3 | gl_FrontColor = gl_Color; 4 | gl_Position = ftransform(); 5 | gl_TexCoord[0] = gl_MultiTexCoord0; 6 | } 7 | -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/bin/data/dof/doffocusassist.frag: -------------------------------------------------------------------------------- 1 | #version 110 2 | #extension GL_ARB_texture_rectangle : enable 3 | 4 | 5 | //Shader for visualizing a depth texture as a focal distance map 6 | //paired with dofblur for debugging purposes 7 | 8 | uniform sampler2DRect depthTex; 9 | uniform float focalDistance; 10 | uniform float focalRange; 11 | 12 | float LinearizeDepth(float zoverw){ 13 | float n = 1.0; // camera z near 14 | float f = 20000.0; // camera z far 15 | return (2.0 * n) / (f + n - zoverw * (f - n)); 16 | } 17 | 18 | void main() 19 | { 20 | float depth = LinearizeDepth( texture2DRect(depthTex, gl_TexCoord[0].st).r ) * 20000.; 21 | gl_FragColor = vec4(min( abs(depth - focalDistance) / focalRange, 1.0) ); 22 | gl_FragColor.a = 1.0; 23 | } -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/bin/data/dof/doffocusassist.vert: -------------------------------------------------------------------------------- 1 | void main(void) 2 | { 3 | gl_FrontColor = gl_Color; 4 | gl_Position = ftransform(); 5 | gl_TexCoord[0] = gl_MultiTexCoord0; 6 | } 7 | -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/bin/data/dof_gl3/dof.frag: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | // OF default uniforms and attributes 4 | uniform vec4 globalColor; 5 | 6 | // App uniforms and attributes 7 | uniform sampler2DRect tex; 8 | uniform sampler2DRect range; 9 | uniform vec2 sampleOffset; 10 | uniform float focalDistance; 11 | uniform float focalRange; 12 | 13 | in vec4 vColor; 14 | in vec2 vTexCoord; 15 | 16 | out vec4 vFragColor; 17 | 18 | float weights[21]; 19 | 20 | //converts depth value to normalized, linear, between near and far plane 21 | float LinearizeDepth(float zoverw){ 22 | //todo: take near and far as uniforms 23 | float n = 1.0; // camera z near 24 | float f = 20000.0; // camera z far 25 | return (2.0 * n) / (f + n - zoverw * (f - n)); 26 | } 27 | 28 | //translate a Depth texel into a focal value based on our 29 | float FocalValue(vec2 pos) 30 | { 31 | float depth = LinearizeDepth( texture(range, pos).r ) * 20000.; 32 | return min( abs(depth - focalDistance) / focalRange, 1.0); 33 | } 34 | 35 | void main() 36 | { 37 | //Gaussian Kernel 38 | weights[0] = 0.0091679276560113852; 39 | weights[1] = 0.014053461291849008; 40 | weights[2] = 0.020595286319257878; 41 | weights[3] = 0.028855245532226279; 42 | weights[4] = 0.038650411513543079; 43 | weights[5] = 0.049494378859311142; 44 | weights[6] = 0.060594058578763078; 45 | weights[7] = 0.070921288047096992; 46 | weights[8] = 0.079358891804948081; 47 | weights[9] = 0.084895951965930902; 48 | weights[10] = 0.086826196862124602; 49 | weights[11] = 0.084895951965930902; 50 | weights[12] = 0.079358891804948081; 51 | weights[13] = 0.070921288047096992; 52 | weights[14] = 0.060594058578763092; 53 | weights[15] = 0.049494378859311121; 54 | weights[16] = 0.0386504115135431; 55 | weights[17] = 0.028855245532226279; 56 | weights[18] = 0.020595286319257885; 57 | weights[19] = 0.014053461291849008; 58 | weights[20] = 0.00916792765601138; 59 | 60 | vec3 sum = vec3(0.0, 0.0, 0.0); 61 | float rangeTexel = FocalValue( vTexCoord ); 62 | vec2 blurOffset = sampleOffset * rangeTexel; 63 | vec2 baseOffset = -10.0 * blurOffset; 64 | vec2 offset = vec2( 0.0, 0.0 ); 65 | // int samples = (fast == 1) ? 11 : 21; 66 | int samples = 21; 67 | //iterato through a number of samples 68 | for( int s = 0; s < samples; ++s ) { 69 | //sample the surrounding pixels and blend them into the total with the gaussian weight 70 | //if fast is off, we weight the blur amount by the focal difference from the center point 71 | //which helps make in focus items 'pop' and avoid color bleeding between focal depths 72 | vec4 texel = texture( tex, vTexCoord + baseOffset + offset ) * (1. - abs( FocalValue(vTexCoord + baseOffset + offset) - rangeTexel) ); 73 | sum += texel.rgb * weights[s]; 74 | offset += blurOffset; 75 | } 76 | 77 | vFragColor.rgb = sum * globalColor.rgb; 78 | vFragColor.a = globalColor.a; 79 | } -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/bin/data/dof_gl3/dof.vert: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | // OF default uniforms and attributes 4 | uniform mat4 modelViewProjectionMatrix; 5 | 6 | in vec4 position; 7 | in vec2 texcoord; 8 | 9 | // App uniforms and attributes 10 | out vec4 vColor; 11 | out vec2 vTexCoord; 12 | 13 | void main(void) 14 | { 15 | gl_Position = modelViewProjectionMatrix * position; 16 | vTexCoord = texcoord; 17 | } 18 | -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/bin/data/dof_gl3/doffocusassist.frag: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | //Shader for visualizing a depth texture as a focal distance map 4 | //paired with dofblur for debugging purposes 5 | 6 | uniform sampler2DRect depthTex; 7 | uniform float focalDistance; 8 | uniform float focalRange; 9 | 10 | in vec4 vColor; 11 | in vec2 vTexCoord; 12 | 13 | out vec4 vFragColor; 14 | 15 | float LinearizeDepth(float zoverw){ 16 | float n = 1.0; // camera z near 17 | float f = 20000.0; // camera z far 18 | return (2.0 * n) / (f + n - zoverw * (f - n)); 19 | } 20 | 21 | void main() 22 | { 23 | float depth = LinearizeDepth( texture(depthTex, vTexCoord).r ) * 20000.; 24 | vFragColor.rgb = vec3(min( abs(depth - focalDistance) / focalRange, 1.0) ); 25 | vFragColor.a = 1.0; 26 | } -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/bin/data/dof_gl3/doffocusassist.vert: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | // OF default uniforms and attributes 4 | uniform mat4 modelViewProjectionMatrix; 5 | 6 | in vec4 position; 7 | in vec4 color; 8 | in vec2 texcoord; 9 | 10 | // App uniforms and attributes 11 | out vec4 vColor; 12 | out vec2 vTexCoord; 13 | 14 | void main(void) 15 | { 16 | gl_Position = modelViewProjectionMatrix * position; 17 | vColor = color; 18 | vTexCoord = texcoord; 19 | } -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | ${ICON} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | APPL 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | NSCameraUsageDescription 22 | This app needs to access the camera 23 | NSMicrophoneUsageDescription 24 | This app needs to access the microphone 25 | 26 | 27 | -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | ofSetupOpenGL(1024,800,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/zachBlobs/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Project Title: 3 | Description: from a demo by zach lieberman 4 | https://www.youtube.com/watch?v=bmztlO9_Wvo 5 | ©Daniel Buzzo 2021 6 | dan@buzzo.com 7 | http://buzzo.com 8 | https://github.com/danbz 9 | http://youtube.com/danbuzzo 10 | */ 11 | 12 | #include "ofApp.h" 13 | 14 | //-------------------------------------------------------------- 15 | void ofApp::setup(){ 16 | ofSetBackgroundColor(0); 17 | ofSetCircleResolution(100); 18 | ofSetDepthTest(false); // disable this for smooth colour // enable for shards of colour 19 | } 20 | 21 | //-------------------------------------------------------------- 22 | void ofApp::update(){ 23 | } 24 | 25 | //-------------------------------------------------------------- 26 | void ofApp::draw(){ 27 | 28 | float time = ofGetElapsedTimef(); 29 | 30 | for (int x = 1; x < 40; x ++){ 31 | 32 | for (int i=0; i < 900; i+=5){ 33 | // ofSetCircleResolution(53 + 50 * sin(i *0.001 + time )); // makes sure the smallest resolution is 3side (for triangles) 34 | 35 | ofSetColor(127 + 127 * sin(i * 0.01 + time + x ), 36 | 127 + 127 * sin(i * 0.011 + time ), 37 | 127 + 127 * sin(i * 0.012 + time )); 38 | 39 | // take your pick 40 | // ofDrawCircle( ofGetWidth()/2 , i, 100 ); 41 | // ofDrawCircle( ofGetWidth()/2 + 100 * sin( i * 0.01 + time ), i , 50 + 40 * sin( i * 0.005 + time ) ) ; 42 | 43 | // ofDrawCircle( 50 * x + 100 * sin( i * 0.01 + time + x), 50 + i , 50 + 40 * sin( i * 0.005 + time + x) ) ; 44 | ofDrawSphere(50 * x + 100 * sin( i * 0.01 + time + x), 50 * x + 100 * sin( i * 0.01 + time + x), 50 + i , 50 + 40 * sin( i * 0.005 + time + x) ) ; // draw spheres in 3D 45 | } 46 | } 47 | } 48 | 49 | //-------------------------------------------------------------- 50 | void ofApp::keyPressed(int key){ 51 | switch (key) { 52 | case 'f': 53 | case 'F': 54 | ofToggleFullscreen(); 55 | break; 56 | 57 | default: 58 | break; 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/src/ofApp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Project Title: 3 | Description: 4 | ©Daniel Buzzo 2021 5 | dan@buzzo.com 6 | http://buzzo.com 7 | https://github.com/danbz 8 | http://youtube.com/danbuzzo 9 | */ 10 | 11 | #pragma once 12 | 13 | #include "ofMain.h" 14 | 15 | class ofApp : public ofBaseApp{ 16 | 17 | public: 18 | void setup(); 19 | void update(); 20 | void draw(); 21 | 22 | void keyPressed(int key); 23 | 24 | }; 25 | -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/zachBlobs.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/zachBlobs.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/zachBlobs.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Latest 7 | 8 | 9 | -------------------------------------------------------------------------------- /openFrameworks/zachBlobs/zachBlobs.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danbz/art-and-code/da076479f986a6b92b5adf7fa5067cb3d1358cdb/openFrameworks/zachBlobs/zachBlobs.xcodeproj/project.xcworkspace/xcuserdata/danbuzzo.xcuserdatad/UserInterfaceState.xcuserstate --------------------------------------------------------------------------------