From cc9e8c8be45767207e09c434bad100b0156877e6 Mon Sep 17 00:00:00 2001 From: Ben Morrow Date: Wed, 19 Feb 2014 23:20:47 -0800 Subject: [PATCH] messy first pass at processing2 port messy first pass at processing2 port --- AntonK.pde | 3 ++- _DebugUI.pde => DebugUI.pde | 0 _Internals.pde => Internals.pde | 10 +++++++--- JR.pde | 2 ++ JackieBavaro.pde | 1 + _MIDI.pde => MIDI.pde | 8 ++++---- _Mappings.pde => Mappings.pde | 2 ++ MarkSlee.pde | 3 ++- _PandaDriver.pde => PandaDriver.pde | 0 _Presets.pde => Presets.pde | 0 SugarCubes.pde | 4 ++-- _UIFramework.pde => UIFramework.pde | 0 _UIImplementation.pde => UIImplementation.pde | 0 13 files changed, 22 insertions(+), 11 deletions(-) rename _DebugUI.pde => DebugUI.pde (100%) rename _Internals.pde => Internals.pde (99%) rename _MIDI.pde => MIDI.pde (99%) rename _Mappings.pde => Mappings.pde (99%) rename _PandaDriver.pde => PandaDriver.pde (100%) rename _Presets.pde => Presets.pde (100%) rename _UIFramework.pde => UIFramework.pde (100%) rename _UIImplementation.pde => UIImplementation.pde (100%) diff --git a/AntonK.pde b/AntonK.pde index f5b2edf..33f4f5d 100644 --- a/AntonK.pde +++ b/AntonK.pde @@ -1,7 +1,8 @@ /************************************************************** * WORKING PATTERNS **************************************************************/ - +import java.util.List; +import java.util.LinkedList; class AKPong extends SCPattern { private final BasicParameter speed = new BasicParameter("Speed", 0); diff --git a/_DebugUI.pde b/DebugUI.pde similarity index 100% rename from _DebugUI.pde rename to DebugUI.pde diff --git a/_Internals.pde b/Internals.pde similarity index 99% rename from _Internals.pde rename to Internals.pde index 425ea0e..a1b8baf 100644 --- a/_Internals.pde +++ b/Internals.pde @@ -27,6 +27,7 @@ import ddf.minim.analysis.*; import processing.opengl.*; import rwmidi.*; import java.lang.reflect.*; +import javax.media.opengl.*; final int VIEWPORT_WIDTH = 900; final int VIEWPORT_HEIGHT = 700; @@ -479,11 +480,14 @@ void drawBox(float x, float y, float z, float rx, float ry, float rz, float xd, popMatrix(); } + + void drawUI() { camera(); - javax.media.opengl.GL gl = ((PGraphicsOpenGL)g).beginGL(); - gl.glClear(javax.media.opengl.GL.GL_DEPTH_BUFFER_BIT); - ((PGraphicsOpenGL)g).endGL(); + PGraphicsOpenGL gl = (PGraphicsOpenGL) g; + + //gl.glClear(javax.media.opengl.GL.GL_DEPTH_BUFFER_BIT); + //((PGraphicsOpenGL)g).endGL(); strokeWeight(1); if (uiOn) { diff --git a/JR.pde b/JR.pde index 025d74f..b1d8a43 100644 --- a/JR.pde +++ b/JR.pde @@ -1,3 +1,5 @@ +import java.util.Map; +import java.util.TreeMap; color BLACK = #000000; class Gimbal extends SCPattern { diff --git a/JackieBavaro.pde b/JackieBavaro.pde index fc1576a..dc5922f 100644 --- a/JackieBavaro.pde +++ b/JackieBavaro.pde @@ -1,3 +1,4 @@ +import java.util.Iterator; class JackieSquares extends SCPattern { private BasicParameter rateParameter = new BasicParameter("RATE", 0.25); private BasicParameter attackParameter = new BasicParameter("ATTK", 0.3); diff --git a/_MIDI.pde b/MIDI.pde similarity index 99% rename from _MIDI.pde rename to MIDI.pde index 4e1f20a..2716494 100644 --- a/_MIDI.pde +++ b/MIDI.pde @@ -264,7 +264,7 @@ public class VirtualKeyMidiInput extends SCMidiInput { } else { mapKeys(); } - registerKeyEvent(this); + //registerKeyEvent(this); } private void mapAPC() { @@ -321,7 +321,7 @@ public class VirtualKeyMidiInput extends SCMidiInput { if (!enabled) { return; } - char c = Character.toLowerCase(e.getKeyChar()); + /* char c = 0;//0Character.toLowerCase(e.getKeyChar()); NoteMeta nm = keyToNote.get(c); if (nm != null) { switch (e.getID()) { @@ -342,7 +342,7 @@ public class VirtualKeyMidiInput extends SCMidiInput { octaveShift = constrain(octaveShift+1, -4, 4); break; } - } + }*/ } } @@ -522,7 +522,7 @@ public class APC40MidiInput extends GenericDeviceMidiInput { return true; case 83: // scene 2 - effects.flash.trigger(); + //effects.flash.trigger(); return true; case 84: // scene 3 diff --git a/_Mappings.pde b/Mappings.pde similarity index 99% rename from _Mappings.pde rename to Mappings.pde index 171ff13..d1c51b2 100644 --- a/_Mappings.pde +++ b/Mappings.pde @@ -13,6 +13,8 @@ * when physical changes or tuning is being done to the structure. */ +import java.util.Arrays; + final int MaxCubeHeight = 6; final int NumBackTowers = 16; diff --git a/MarkSlee.pde b/MarkSlee.pde index 62a474d..0976d57 100644 --- a/MarkSlee.pde +++ b/MarkSlee.pde @@ -1,3 +1,4 @@ +import java.util.Stack; class Cathedrals extends SCPattern { private final BasicParameter xpos = new BasicParameter("XPOS", 0.5); @@ -222,7 +223,7 @@ class MidiMusic extends SCPattern { effects.boom.trigger(); break; case 40: - effects.flash.trigger(); + //effects.flash.trigger(); break; } } diff --git a/_PandaDriver.pde b/PandaDriver.pde similarity index 100% rename from _PandaDriver.pde rename to PandaDriver.pde diff --git a/_Presets.pde b/Presets.pde similarity index 100% rename from _Presets.pde rename to Presets.pde diff --git a/SugarCubes.pde b/SugarCubes.pde index ff85065..fbaccc3 100644 --- a/SugarCubes.pde +++ b/SugarCubes.pde @@ -22,7 +22,7 @@ * If you're an artist, create a new tab in the Processing environment with * your name. Implement your classes there, and add them to the list below. */ - + LXPattern[] patterns(GLucose glucose) { return new LXPattern[] { @@ -152,7 +152,7 @@ LXTransition[] transitions(GLucose glucose) { // Handles to globally triggerable effects class Effects { - FlashEffect flash = new FlashEffect(lx); + //FlashEffect flash = new FlashEffect(lx); BoomEffect boom = new BoomEffect(glucose); BlurEffect blur = new BlurEffect(glucose); QuantizeEffect quantize = new QuantizeEffect(glucose); diff --git a/_UIFramework.pde b/UIFramework.pde similarity index 100% rename from _UIFramework.pde rename to UIFramework.pde diff --git a/_UIImplementation.pde b/UIImplementation.pde similarity index 100% rename from _UIImplementation.pde rename to UIImplementation.pde -- 2.34.1