PAZ #000002 – Regex, Replace and Shakespeare Part2

Following the last post, finally a workable version of Shakespearing. Following most of the advice from http://www.talklikeshakespeare.org/ was able to change men/man to sirrah; women/woman to mistress; a few common curse words to jackanapes and canker-blossoms; and etc.

ssss

// Scramble what the user enters into a text field

// The scrambled text
var reversed = "";
var input;

function setup() {

  // A text area
  input = createElement("textarea","\"Nearly all men can stand adversity, but if you want to test a man's character, give him power.\" - Abraham Lincoln");
  
  input.attribute("rows",5);
  input.attribute("cols",50);
  input.style('position','absolute');
  input.style('top','50px');
  
  // A button
  var button = createButton("Shakespeare it!");
  button.style('position','absolute');
  button.style('left','416px');
  button.style('top','140px');
  button.mousePressed(doublewords);
  
  // An HTML Element for the resulting text
  reversed = createP("");
    reversed.style('font-size','60px');
	    reversed.style('font-style','bold');
  	  reversed.style('color','#2e2e2e');
	    reversed.style('font-family','Roboto Slab');
	    reversed.style('position','absolute');
  	  reversed.style('top','140px');
	    reversed.style('left','90px');
	    reversed.style('background','0');
}

function doublewords() {
  // What has the user entered?
  var text = input.value();

  var regex = [];
  regex[0] = /(your)|(you)/gi;
  regex[1] = /(y'all)/gi;
  regex[2] = /(women)|(woman)/gi;
  regex[3] = /(men)|(man)/gi;
  regex[4] = /(friend)/gi; 
  regex[5] = /(fuck)|(bitch)/gi
  regex[6] = /(^i|I$)/gi
  
  var out = [];
  out[0] = 'thou';
  out[1] = 'ye';
  out[2] = 'mistress';
  out[3] = 'sirrah';
  out[4] = 'cousin';
  out[5] = either('jackanapes','canker-blossoms');
  out[6] = either(' I ',' methinks ');
  //use of dictionary a better method?  
    
  // Update the HTML Element
   var output = text;
   for(var i=0; i < regex.length; i++){	
     	output = output.replace(regex[i],out[i]);	
  }
  reversed.html(output);  
}

function either(a,b){
  	var p = Math.random()
	   if(p>0.5){
   		  return a
	   }
   	else return b
 }

github & shakespeare it

PAZ #000001 – Regex, Replace and Shakespeare

For the second week I decided to translate writing to Shakespearean Plays… well that sounds a bit drastic. Just replacing a few words by using this site: talklikeshakespeare.org

However, I am failing since the loops goes once and spits out the last iteration of output. The output seems to reset since the input doesn’t really change. I believe I should be using either the Find Links example and Test a Regex example. Now that I think about it maybe I need to use the match method first and then replace.

// Scramble what the user enters into a text field

// The scrambled text
var reversed = "";
var input;

function setup() {
  //noCanvas();

  // A text area
  input = createElement("textarea","Enter some text.");
  input.attribute("rows",10);
  input.attribute("cols",100);

  // A button
  var button = createButton("Shakespeare it!");
  button.mousePressed(doublewords);
    
  // An HTML Element for the resulting text
  reversed = createP("");
}

function doublewords() {
  // What has the user entered?
  var text = input.value();

  // A regex to match any vowel
  // Captured as group #1
  var regexYou = /(you)/gi;
  var regexYe = /(y'all)/gi;
  var regexMen = /(men)/gi;
  var regexWomen = /(women)/gi;
  var regexFriend = /(friend)/gi;
  
  var regex = [];
  regex[0] = /(you)/gi;
  regex[1] = /(y'all)/gi;
  regex[2] = /(men)/gi;
  regex[3] = /(women)/gi;
  regex[4] = /(friend)/gi; 
  
  var out = [];
  out[0] = 'thou';
  out[1] = 'ye';
  out[2] = 'sirrah';
  out[3] = 'mistress';
  out[4] = 'cousin';
   
  
 //var output;
  // Replacing the vowel with two of itself
  var output = text.replace(regexYou,'thou');
  output = text.replace(regexYe,'ye');
  output = text.replace(regexMen,'sirrah');
  output = text.replace(regexWomen,'mistress');
  reversed.html(output);
  output = text.replace(regexFriend, 'cousin');
  // Update the HTML Element
  console.log(output);
  reversed.html(output);
  
/*   for(var i=0; i < regex.length; i++){
	output = (text.match(regex[i],out[i]));
	reversed.html(output);
	console.log(output);
  }
   */
   
}

BNB #000000 – Week 1 Leverage Points 9,8,7 on RunKeeper

Week_1DiagramRunkeeper

Behavior changing apps that try to affect the length of delays seem unsuccessful. As turning on the app itself has a lengthy delay. The time it takes for a user to take a phone out of his/her pocket, turn the phone on, swipe, type in the passcode and find the right application all is part of the delay. In addition to this there are pop-ups for rating apps; apps forcing users to update before any usage; slow internet connection; and decay of phone performance throughout time. But let say this isn’t a problem to most folks, however, the problem lies that behavior change itself takes time. It is a delayed process, there are studies that say that it takes about 3 weeks to change or gain a new habit or behavior to be naturally integrated in our life styles. It takes time to see a change in behavior and most mobile apps are incapable of doing that. RunKeeper keeps track of the distance, the speed, the location, and even has a plan or schedule to turn me into a 5k runner, but all it can do is record daily actions, but can’t do anything about the delay there is to making me a better, healthier runner. Heart rate checking apps, tracking levels of certain chemicals in our system only gives out information, which takes us to the negative feedback loops.

As a user who have used both RunKeeper and Zombies, Run! I specifically have used these to give myself a negative feedback loop. It was a means to check if I was running or not. RunKeeper and on other apps, one that comes in to mind; 8 Cups a Day, themselves are negative feedback loop apps. We know the moment we don’t track ourselves with it, we’re not keeping ourselves in check. We can say that negative feedback loops are a given, it is a reminder to keep self-correcting. And this is great when they are on, on the other hand when they are off it becomes obsolete. Although, I have to say 8 Cups a Day had red notification bubbles with numbers to keep you always in check like Big Brother, yelling to drink that 8 cup of water.. RunKeeper, is not lucky enough to get away from: “useful when only on”, one of the reasons I quit using RunKeeper is not because the app was bad, but it took time to turn it on, there was a physical delay. By the time RunKeeper is running on the phone I myself have lost the incentive to run and gained an appetite for a nice breakfast. I had a specific set of environment to create before running it was to turn on both RunKeeper and Zombies, Run!, and the slow phone did not help. Mobile app are perfect for negative feedback loops as it monitors and displays information on the go, but because it is a mobile app hence stuck on to a phone separate from our bodies and bound by hardware limits it isn’t too effective in helping users change their behavior.

With all this said, let’s say the delay is fine and the negative feedback loop have managed to change the behavior of a user to use it every day and keep themselves in check. How much is too much? There is no alert for overusing the app. A user maybe running too much, but it doesn’t tell anything about the effects the running might be doing to the user. They can run faster, further, longer, but how do you put on the brakes when needed? There is the integration of a schedule which gives you days for rest, but it feels more a guide and not any direct effect on the users’ growth.

PAZ #000000 – The Secret Life of Pronouns

http://secretlifeofpronouns.com/exercise/Bottle/  This is an interesting exercise, although I felt like I didn’t have much to write after 4 minutes and ended it before time. And voila my scores:

Visual Dimension Your data The average response
Words on the label: Verbal thinking 1.02 1.74
Colors and text: Visual sensitivity 3.06 3.74
Bottle contents: Functional thinking 3.06 1.67
The bottle itself: Tactile sensitivity 2.04 2.91
Light and shadow: Contextual thinking 3.06 0.79

Overall, you wrote 98 words in the 5 minutes. 


Generally, the more you write, the better. In this exercise, anything less than about 50 words is not too reliable.


So uh yea, I should have written for a little bit longer. However, even with that said I think I would have only seen a slight increase in visual sensitivity and maybe the tactile sensitivity since I was running out of things to say visually. On the other side, I’ve scored tremendously for functional thinking and contextual thinking (double and triple the average score in less than 5 minutes!) Wished I had scored higher on tactical and visual, good thing I’m in ITP for it. 

Below are the results they’ve given me.

Words on the label: Verbal thinking. People who score high on this dimension tend to focus on the label and what the words actually say. They often report that the letters Oza and Ka referred to Ozarka and that “Thirst Quencher” could be seen on the blue background. Your score is about average. You probably mentioned a couple of the broad features of the words on the label but didn’t dwell on them.

Colors and text: Visual sensitivity. Some people are particularly sensitive to colors and styles associated with writing. People who score high on the visual sensitivity dimension tend to write about colors of the text as well as the backgrounds. Your score on this dimension is close to the average. You are drawn to colors and have a passing interest in layout and design.

Bottle contents: Functional thinking. The purpose of a water bottle is to hold water. Duh. People who score high on this dimension focus on the bottle as a container of something. In other words, they are thinking about the function of the bottle. Your language use in describing the bottle suggests that you are someone who thinks about the functions of objects. When you looked at the picture, your eyes probably wandered to the contents of the bottle. Most people didn’t do this. Perhaps you have deep philosophical thoughts. Perhaps you are an aspiring engineer. Perhaps you are thirsty.

The bottle itself: Tactile sensitivity. Someone who is high in tactile sensitivity likes to touch things. They appreciate the surface, texture, and contours of objects and people. They have an appreciation of the dimensionality of objects. In describing the bottle, high scorers paid attention to the surface and contour of the bottle itself, perhaps thinking of it like a sculpture. Your writing suggests a distinct lack of interest in the form of the bottle itself. Extending this reasoning a bit, you don’t automatically imagine how an object feels. Touch may not be your dominant sense. I just can’t see you as a postmodern architect.

Light and shadow: Contextual thinking. If you look closely at the picture of the bottle, you will see that the lighting casts a shadow on the table through the bottle. People who wrote about this tended to score highly on this dimension. As you can see in the table, your score indicates that you are significantly more appreciative of context than most people. You are able to sense the role of light, depth, and perspective in viewing the bottle. Your artistic sensibilities and broad perspective hints that you could become an artist, a diplomat, or one of those fake vegetarians who eat fish.

I think there are some interesting points about myself that the program has figured out in less than 5 minutes. Most of these characteristics are hard to know about even on a deeper level of social interaction. For the average folks it is almost hard to deduce such traits of someone within 5 minutes or less. So yes kudos to you Mr. Bottle Test!

Can’t think for homework, makerfaire is my excuse. Although now that I think about it, it be interesting to save words of projects and create a text-base description of the project as it gains feedback words. A transforming  description adaptive to live comments of the people.

TTE #000000 – Pumpkins Document

Not knowing what to do, I made a word document on google drive and tried writing things down. I’ll just copy paste.

Pumpkin Document
Date: 9/10

In the subway wrote fictional, obnoxious, marvelous calls on the iphone, which I will re-write:

  1. An institution of Pumpkins with consciousness that are looking for literary pumpkin and kin figures throughout the times to advocate/promote a campaign to bring pumpkin public to awaken from its dormant state.
  2. With the shortage of corn, pumpkins must be the new fuel economics that America should run on.
  3. In the wasteland only pumpkins survive to strive, institution of health is looking for ways to integrate pumpkin as an everyday consumable product enriching our vitamin deficits.
  4. For a public of pumpkin heads where humans have interchanged their heads with a jack-o-lantern need comfort from the atrocities of the the side effects and short-lived outcomes.

-Metaphysical  pumpkins calling for meditative ways to pumpkinize world industries to create everything out of pumpkin chemical.

-The art of Pumpkin heads

-Why Halloween is associated with Pumpkins

-Pumpkin as public.

-Pumpkin as private dead entities swapped for human heads.

Things I want to do with Pumpkin:

-Make Pumpkin Pie

-Make Pumpkin Spice Latte like starbucks

-Make Pumpkin Cookie

-Eat all types of Pumpkin filled desserts and drinks.

Date: 9/15

Mini-Pumpkins, why aren’t there pumpkin pizzas? There’s mashed pumpkins in korean pizzas. Pumpkin salad. Where have the pumpkins come from and why is it so prevalent during autumn?

A pumpkin song: https://www.youtube.com/watch?v=Nz5Kwx74qMc
Giant Pumpkins: https://www.youtube.com/watch?v=hJ4Z_RdgvgU
Pumpkin Facts: http://www.history.com/topics/halloween/pumpkin-facts

Pumpkins originated in central america.

Delaware punkin chunkin championship: http://punkinchunkin.com/

30 different varieties of pumpkin

Connecticut Field Pumpkin

Date: 9/16

  • Call: The Health as Festival Research Group are looking for ways to make Pumpkin as an enjoyable popular food culture for americans to be celebrated for 90 days during the autumn.
  • Call: Bodies of America, solving obesity with Pumpkins. Phytochemicals in pumpkins may improve diabetic conditions (research for scholastic papers for this). Bodies of America is looking for pumpkin food culture from all around the world that may fit into American culture.
  • Institution of Human Defense Mechanism are looking Phytochemical that increase human biological conditions, increasing health benefits as well as mental benefits, with the failure of medicine and surgery the institution is researching ways to live only with natural products.
  • (An era when medical science has a limit and can not improve human conditions, what will people do? Where gene restructuring has been banned, abadoned, inefficient, what are other ways for humans to survive a healthy non-disruptive life? If all knowledge of chemicals have been wiped out what are ways to study organic products and research their effects?)

Above photo Pumpkin juice in Harry Potter

-Bought Mini-Pumpkins but have no idea what to do with them.IMG_6326[1]

MF #000000 – Beginnings, inspiration and prototype

Makerfaire! Yay! Vicci messaged me by surprise if I want in for the Makerfaire and said yes. For those who don’t know we did a Box Instrument Project together: link.

After hearing about doing instruments Vicci started motivating the team (a team of two the other being me) with tuning forks and metallic sounds. We got out to get a Tuning fork and bashed things with it. Then we went to Chinatown to get any metallic parts, but with no avail, though we did buy kitchenware, but they were a bit unfriendly to sound. Later on, I went out to get some metal sheets try cutting them and just made dangerous weapons out of it. However, it did lead us into the world of metal tone-wheels! These are the two video examples where we got direct inspiration.

(Awesome reference, this is the dude who made lsdj)

Wow- cool sounds! They basically made stand alone guitar pickups with a magnet on it. This is connected to a amp to listen to electromagnetism created by the motors and metal objects attached to it. And we get the whoosh-klink-metallic-drone-kewl sound!

So after a bit of small tinkering, a prototype instrument was born! Schematics and code will be updated later, I just need to get this post up so I feel like at ease since I thought it absolutely necessary to document. So here are photos of the setup followed by a video!

IMG_9004 IMG_9005 IMG_9007 IMG_9006

CEI #00000C – DSRlines Collaboration Designing Graphical Scenes

While struggling for coding efficiency as my computer was coming of age, I had to think of narrative as divided parts. I had to think beforehand about introductory scenes, and scenes that build up to the final climax. I sketched out a few in the start, the sketches show different scenes for different types of states. Some are more passive where others are dynamic (only in my mind) Then I had to code out some more and play out the scenes I could create and see which graphical scenes would correspond to which. I had to envision a style, try to code it and if the coding was different I had to match it to the style I had already sketched.
sketch

Also I made a written narrative so I can easily follow what graphics to create as I listened to the music. 1) It is structured with a grid and a soft sin wave form. Black on white Background. Normal Waves. 2) Grid disappears, Amplitude increases, Frequencies change, Addition of another wave. 3) Inverse Colors, add more subtle waves. 4) Rotation of grid, Grid on/off sequence. A play of creativity within rigidity. Increase in ellipse size. 5) Change one color of wave. Grid flickers. 6) Waves change a bit of forms: amp, freq, recursive. 7) Add mouse graph mountains, let it settle in. Play with waves. 8) Increase sizes, change color of waves and do the dragon dance. 9) Perhaps reverse out.

fin_0A fin_08 fin_09

The graphics are amazingly fun to play with, within its own boundaries. Highlight of the graphics will be the pink dragon in the white sky. The combination of exploring what visual ideas I had and using them on the computer created a space for creativity to sip in this visual project.

Designing graphical scenes after testing a few of the drawn sketches or sketches in the mind. It was time to mix match narrative that I have already written down, a storyboard of graphics to the actual coding. In short the narrative is a slow build up.

It is a play of creativity in rigidity. The story tells of the actions to be creative within rules. Through only grids, graphs, and sin waves we are able slowly build it into a creation story of the dances in the sky.
-
music:
DSRlines – Tetragoon
dsrlines.bandcamp.com/track/tetragoon
byunnnn.com
Coding for Emotional Impact

CEI #00000B – DSRlines Collaboration Brainstorming

Went back to the sketches and found a few to study, I quickly tried a style DSRlines has on his recent album. There were simple sine waves and geometry with a grid on the back. So I went back to one sketch and modified it so it looks visually pleasing. I thought of an oscilloscope and perhaps the story of the music can start here. Perhaps in the beginning it be white then suddenly it inverses to allow the audience react to what more will come. Still haven’t received the sample music, but looking forward for it.fin_01
fin_02

I later added modulating properties since it should be able to react the music either manually or automatically. Created a fading keystroke and made the one wave be 10% the amplitude of the other. I can imagine this as more of a VJ tool though. I hoping I can connect several keys for different wave forms and changing of graphic styles from background to the shape of the wave.
fin_03

How the images are crisp, but the moving images not so. I started storyboarding different visualizations and how they come together. Allowing for change in variables becomes a fight between simplicity and complexity in visualization for storytelling. The more one has, the slower the program. Inefficiency of programming adds a layer of different effects, it is the comparison between control and malleability.
fin_04 fin_05


A study for a collaboration with a musician: A Visualization Brainstorming. The visual storytelling of a music depends on the music and how many systems of variations one can add and manipulate. The different wave forms, the weight of the wave, the background grid’s existence: all the little things add value to the storytelling of the music. There is also a tension between efficient programming and controllable items.

I’ve set up a few parameters and tried to work out how simplicity and complexity plays out in storytelling.
-
music:
DSRlines – Cirkelsegment
dsrlines.bandcamp.com/track/cirkelsegment

Playing with recursive properties: for one wave I started to meddle around with the frequency input. The frequency is in itself a sine wave where the output number fluctuates. With different variables changing the look of the waves, it becomes hard to predict what’s controlling what. Because of the unfamiliarity it is hard direct the visualization. Rather than manually controlling it perhaps it would work better with set frequency input waves and divide them into groups of piano, allegro, forte so it becomes easier to represent the music.

Also love these graphical images of the layered waves, they become a landscape in themselves. It would be rather awesome to be able to have different waves at different z-axis or have the screen extend over a few screens. All these ideas of control & simplicity to make a mathematical space landscape is working out pretty well. However, I fear that I am getting close to the threshold of the writers’ block.

fin_06

 

CEI #000009 – Out of Control Voices

At a certain point I forgot that I was in ITP place to have fun and experiment. I’ve been doing homework to show rather than to think, being afraid of failure and of not understanding. This post will be more honest than the other ones.

I’ve been wanting to re-learn curves and waves, but this is going about a bit too fast. I’m trying to make the cubes I have rotate in a certain manner with the voices class, but it’s confusing adding different classes together. I tried with one cube, with a bit of success. I also wanted to use three js with p5, but I think I’ve been dis-concentrated.

cube_voice_01 cube_voice_02

Understanding how to manipulate all of them together is a big challenge now. I’m trying to put it within the arrayList cubes, but just having weird little simulations. I have results but not control over them.

I want to have an ArrayList of cubes rotating in a spiral motion where the color and size fluctuates. Like this diagram, where the orange line is the pathways of the cubes. The path wave has a curve where the amplitude increases then decreases. The x and z orientation of the cubes are constantly in rotating motion and the size of the cubes are also in a sin or cosine wave.

cube_voice_03

And yet I’m running into a problem where when I try to toggle the voices the x or z coordinates for all the cubes resets to zero. Maybe I shouldn’t have erased the curve class. I’m trying to make sense of it, but not recognizing patterns are confusing me, so I may need to go back and go step by step.

cube_voice_05 cube_voice_04 cube_voice_06