TEK STAK updated proposal + sound&image assign

TEK STAK WEBPAGE

I made this webpage as a proposal and project piece for tek stak.

The assignment was to combine still image and sound. I was interested in playing with speed. I wanted to create a jarring, disoriented feeling.

Shot with a Luminex, recorded with a DIY contact microphone into M-audio recorded.
Sound and images edited in final cut pro.

glart. lighting

lighting examplined;
as summarized from this article

The light source has two main properties; light color and surface color.
The light color is comprised of diffuse light, specular light and ambient light. Each of these components have material properties comprised of color values. These values determine how light is reflected off of the material surface. Besides color value, there is a shininess material setting that defines the amount of reflection from a material surface.

The surface color further defines the light by “filtering” the light color. The light source directs light color through the surface color. Once the light color has passed through the surface color, the light color carries the properties of the surface color. If a light source is white, and it is passing through a dim green surface color, the diffuse, specular and ambient lights will appear a brighter green.
Diffuse light is best described as light rays direct from the source;
Ambient light is light reflected off a shiny surface;
Specular light is light scattered from the environment.

“”"”"”
How to simplify light and material:
To define a light:
set diffuse to the color you want the light to be
set specular equal to diffuse
set ambient to 1/4 of diffuse.
To define a material:
set diffuse to the color you want the material to be,
set specular to a gray (white is brightest reflection, black is no reflection)
set ambient to 1/4 of diffuse
“”"”"”"”

I was just messing around,, I have a lot of questions::

code for first image::
package classwork;

import javax.media.opengl.*;

import jocode.*;
import jomodel.*;

/**

*
* Use glEnable(GL.GL_NORMALIZE) to force all normals to a length of 1.
* This is critical to insure consistent lighting when spheres are
* scaled to different sizes (normals will be scaled too!).
*
* Use the EMISSIVE material property to create a glowing sphere.
*
* Use a display list to optimize the sphere rendering.
*/
public class ClemmoLight extends JOApp {
float rotation = 0f;

// Material for planet
JOMaterial material = new JOMaterial();

// Material, glowing (for “light”)
JOMaterial materialE = new JOMaterial();
//JOMaterial materialLeft = new JOMaterial();
//JOMaterial materialRight = new JOMaterial();

// Light position: if last value is 0, then this describes light direction. If 1, then light position.
float lightPosition1[]= { 0f, 0f, -5f, 1f }; //position
float lightPosition2[]= { 0f, 10f, -5f, 0f }; //direction
float lightPosition3[]= { 5f, 0f, -5f, 0f }; //direction
float lightPosition4[]= { 5f, 10f, -5f, 1f }; //direction
//position vs direction? if I want the lighton the left to shine on the left side, would I make this a directional light that is calculated with a negative x axis number?

int goldTextureHandle = 0;

/**
* Main function just creates and runs the application.
*/
public static void main(String args[]) {
ClemmoLight app = new ClemmoLight();
app.run();
}

/**
* Initialize OpenGL
*
*/
public void setup() {
// load gold texture
goldTextureHandle = makeTexture(“images/soapColor.jpg”);
// Set a basic perspective view
setPerspective();

// turn depth testing on
gl.glEnable(GL.GL_DEPTH_TEST);

// turn lighting on (does not create a light, have to do that below)
gl.glEnable(GL.GL_LIGHTING);
gl.glEnable(GL.GL_LIGHT1);
gl.glEnable(GL.GL_LIGHT2);
gl.glEnable(GL.GL_LIGHT3);
gl.glEnable(GL.GL_LIGHT4);

// How to shade faces:
// GL_FLAT — each face has same lighting (looks faceted)
// GL_SMOOTH — lighting is blended across face
gl.glShadeModel(GL.GL_FLAT);

// Tell OpenGL to force all normal lengths to 1,
// so light illuminates all surfaces evenly
gl.glEnable(GL.GL_NORMALIZE);

//———————————————–
// Create light
//———————————————–
// Create a point light (white)middle sphere
setLight(GL.GL_LIGHT1,
new float[] { 1.0f, 1.0f, 1.0f, 1.0f }, // diffuse color
new float[] { 0.2f, 0.2f, 0.2f, 1.0f }, // ambient
new float[] { 1.0f, 1.0f, 1.0f, 1.0f }, // specular
lightPosition1); // position

// Create a point light (Green+Blue)left sphere
setLight(GL.GL_LIGHT2,
new float[] { 0f, 1.0f, 1.0f, 1.0f }, // diffuse color
new float[] { 0.2f, 0.2f, 0.2f, 1.0f }, // ambient
new float[] { 0f, 1.0f, 1.0f, 1.0f }, // specular
lightPosition2); // position

// Create a point light (Red) right sphere
setLight(GL.GL_LIGHT3,
new float[] { 1.0f, 0f, 0f, 1.0f }, // diffuse color
new float[] { 0.2f, 0.2f, 0.2f, 1.0f }, // ambient
new float[] { 1.0f, 0f, 1.0f, 1.0f }, // specular
lightPosition3);

// Create a point light (Red) right sphere
setLight(GL.GL_LIGHT4,
new float[] { 1.0f, 1f, 1f, 1.0f }, // diffuse color
new float[] { 0.5f, 0.5f, 0.5f, 1.0f }, // ambient
new float[] { 1.0f, 1f, 1.0f, 1.0f }, // specular
lightPosition4);
// overall scene lighting
float ambient[] = new float[] { 1f, 1f, 1f, 0f };
setAmbientLight(ambient);

//———————————————–
// Create 2 Materials
//———————————————–

// Red material settings
float mtlDiffuse[] = { 1f, 1f, 1f, 1f }; //blue
float mtlAmbient[] = { 0f, .5f, 0f, 1f }; // red
float mtlSpecular[] = { 1f, 1f, 1f, 1f }; // light gray: reflective
float mtlShininess = 127f; // 0=no highlight, 127=sharp highlight
material.setDiffuse(mtlDiffuse);//reflecting off what is directly lit
material.setAmbient(mtlAmbient);
material.setSpecular(mtlSpecular);
material.setShininess(mtlShininess);
material.apply();

// make a glowing material for the “light”
float mtlEmissive[] = { 1f, 1f, 1f, 1f }; // yellow/white
materialE.setEmission(mtlEmissive);

}

/**
* Render the scene.
*/
public void draw() {
rotation += .5f;

// Clear screen and depth buffer
gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);

// Select The Modelview Matrix (controls model orientation)
gl.glMatrixMode(GL.GL_MODELVIEW);

// Reset the Modelview matrix
// this resets the coordinate system to center of screen
gl.glLoadIdentity();

// Where is the ‘eye’
glu.gluLookAt(
0f, 2f, 20f, // eye position
0f, 0f, 0f, // target to look at
0f, 1f, 0f); // which way is up
////////////////////////////////////////////////////////////////////////middle sphere

gl.glPushMatrix();
// shiny dark blue material
setMaterial(new float[] {0f, 1f, 1f, 1.0f}, .9f);

// set blue light at same spot as blue sphere
//setLightPosition(GL.GL_LIGHT1, lightPosition1);
{ gl.glTranslatef(0f, 0f, -5f);
gl.glScalef(4f, 4f, 4f);
renderSphere(50);

}
gl.glPopMatrix();

///////////////////////////////////////////////////////////////////////left sphere

gl.glPushMatrix();

// shiny dark blue material
setMaterial(new float[] {1f, 1f, 0f, 1.0f}, 1f);

// set blue light at same spot as blue sphere
setLightPosition(GL.GL_LIGHT2, lightPosition2);
{ gl.glTranslatef(-10f, 0f, -10f);
gl.glScalef(3f, 3f, 3f);
renderSphere(50);

}
gl.glPopMatrix();

///////////////////////////////////////////////////////////////////////right sphere

gl.glPushMatrix();

setMaterial(new float[] {1f, 0f, 1f, 1.0f}, .9f);

// set blue light at same spot as blue sphere
setLightPosition(GL.GL_LIGHT3, lightPosition3);

{ gl.glTranslatef(10f, 0f, -10f);
gl.glScalef(3f, 3f, 3f);
renderSphere(50);
}
gl.glPopMatrix();

///////////////////////////////////////////////////////////////////////table

gl.glBindTexture(GL.GL_TEXTURE_2D, 0);
gl.glPushMatrix();

// shiny dark blue material
setMaterial(new float[] {.5f, 1f, .5f, 1f}, .9f);

// set blue light at same spot as blue sphere
setLightPosition(GL.GL_LIGHT1, lightPosition1);

{ gl.glTranslatef(0f, -70f, -150f);
gl.glScalef(3f, 3f, 10f);
renderCube(10,40);
}
gl.glPopMatrix();

gl.glPushMatrix();

//shiny dark blue material
setMaterial(new float[] {1f, .5f, 1f, 1f}, .9f);

//set blue light at same spot as blue sphere
setLightPosition(GL.GL_LIGHT3, lightPosition3);

{ gl.glTranslatef(80f, -70f, -170f);
gl.glScalef(3f, 3f, 7f);
renderCube(10,40);
}
gl.glPopMatrix();

gl.glPushMatrix();

//shiny dark blue material
setMaterial(new float[] {.7f, .7f, .2f, 1f}, .9f);

//set blue light at same spot as blue sphere
setLightPosition(GL.GL_LIGHT4, lightPosition4);

{ gl.glTranslatef(-80f, -70f, -170f);
gl.glScalef(3f, 3f, 7f);
renderCube(10,40);
}
gl.glPopMatrix();

}

/**
* Reshape() is called when window is resized. Reset the viewport to the new window
* dimensions and call setPerspective() to reset the perspective view. This will use
* the new aspect ratio of the window so the scene will not be squashed or stretched.
*/
public void reshape(int newDisplayWidth, int newDisplayHeight) {
setViewport(0,0,newDisplayWidth,newDisplayHeight);
setPerspective();
}
}

pd.arrays+tabplay

This week we focused on storing data into arrays. We made some patches in class using the tabplay object which allows us to playback the data stored into an array.
There a number of choices you can use for data, depending on the intent of your patch.
You can::
Playback samples
Record from an external or internal computer microphone
(which translates the sound into data, then stores it in an array).
Use load data from a text file
(either using random numbers, or numbers that represent some kind of pre-complied information).
Use your cursor to set points in an array
(basically, you can draw points to manually choose numbers).
Use data from an external application
(sensors+arduino or wii controllers for example).
////////////////////////////////////////////////////////////
My assignment is a combination of three arrays using sound recorded from the internal mic.
Each array is used with different combinations of counters, noise and oscillators. I also experimented with cancellation waves by using information from the same array in combination with one increasing counter and one decreasing counter.

I am currently working on giving these counters conditionals so they can remain in a more specific range.
pd. arrays + tabplay

vlog 3

I dig vlogging for documentation::
making of a stop motion by zak loyd
///////////////////////////////////

vlog 2

here is an example of a vlog dedicated to documentation::

FAMILY DINNER FEBRUARY 21, 2010
///////////////////////////////////////

vlog1

I have an aversion to the word vlog and I am not sure why.
I also am unsure of the style I would like to employ with vlogging so I tried a few things out.
The first vlog is a clip from a longer video I am in the process of making titled “comp_war” a short epic I am making about the internet.

segment one ruff ruff ruff cut/////////////////////////////////

I have a lot of cleaning to do. I wanted to do some green screening tests,

[Sound&&theCity] SELF DESTRUCT

me during my proposal
I destroyed my proposal. I had no confidence and completed a self-fulling prophecy that it was not going to go well.
I can successfully say that it was one of the most ridiculously-intensely dramatic moments I haven never wanted to experience. I am so completely ashamed of myself and simultaneously don’t give a fuck. I cannot believe I behaved so childishly. I don’t know why I have such intense physical reactions in response to public speaking.

I know what I want to do. I know it will be rad. I just don’t know how to explain it, yet.

pd.synthesis+filtering

Week four = digital signal processing.
The topic was digital sound and we got messy with filters ( band pass, hi-pass, low-pass).
The assignment provided an opportunity to make a composition stricly using synthesis and filtering.
I did all of obiwannabe’s elemental forces tutorials and used the fire generator with route, select and moses objects to trigger the sound.


I used subpatches to organize the 12 different ’streams’ of sound that correpsond to the crackling, popping and lapping of fire.
The metronome is used as my control clock which counts to ten and then restarts using conditionals.

OPENGL. ortho and perspective.

assignment

I failed miserably. I was only able to slightly alter the demo code. I experimented with texture mapping for a more psychedelic looking city and altered the plane coordinates in ortho mode as well as the frustum coordinate in perspective mode. Also I changed the color for the rectanglular frame.

One part of the democode asks ;

// ??? what happens if we comment out this glViewport line:
gl.glViewport(20,95, getWidthWindow()/2, getHeightWindow()/2);

I found out that the line resets the viewport, so the result of commenting it out is a maligned viewport. (I also experimented with the these numbers to position the viewports slightly left of the center.

///////////////////My key events do not seem to be working?
The console informs me that I am missing a JOApp.cfg (config) file.
I was able to use the keys as commands in another project though, so I think my code is the issue.

I am also missing the democode for JavaDrawaCircle?

PD.sequencer+cursor control.

click for full size
SIMPLY PUT—
Moving the cursor up and down controls a phasor sound.
Moving the cursor left and right controls an oscillator sound.
Right-clicking triggers a .wav file.

MORE EXPLANATION–
This patch demonstrates cursor control for objects. I initialize the cursor reading with a cursor object and send the information to a route object which helps to organize the information read. Since cursors contain multiple sets of information (i.e. the mouse x position, the mouse y position, if the right button is clicked, if the left button is clicked) we need to separate the information. We can do this using the route object, which checks incoming information against the defined creation arguments. When information matches the creation argument, the information is passed through the corresponding outlet. In this patch, I have connected a number to the outlet for the mouse X position as well as for the mouse Y position. These numbers are then connected to an oscillator object for the X position number and a phasor for the Y position number. When these sound objects are connected to the dac~ speaker object, the sound is changed according the the x and y position of the cursor.
Additionally, I am using the right-click information to trigger a sound file using a select object. Cursor button information is read using either 1 for left click or 0 for right click. The select object works similarly to route in that it checks incoming information against its creation arguments and passes information to corresponding outlets. In this case, if a right-click is detected, a 0 is passed from cursor to route to button to the select objects’s 0 outlet to a bang to trigger a .wav file.