Showing posts with label ICM. Show all posts
Showing posts with label ICM. Show all posts

12.14.2018

A reflection

It's here, the end of the semester.  Although it feels more like the start.  I never thought I would be able to code to this capacity at all.  Things sort of just clicked.

My "Business Fan", as it is deemed now, is a working reflection of my experience in ICM and Physical computing.  I was working on the digital aspect in ICM and the tangible interactions and movement in Pcomp.

One early morning I was working off the old interface i've made to control my fan (Interface_v1).  It was a simple sketch made to represent the angle of the fan digitally and vise-versa.  It was plain to look at but I knew I had something there.  I wanted my physical fan to have a direct connection with the javascript I was writing.  So I made them share the same value.  mouseX was the easiest to have a immediate impact to the input and was very precise.  So for weeks I've been controlling both aspects of my project with the swipe of my fingers.

As the physical component of my project changed.  So did the interface to match.  The physical movement of my version 1,2,3 fans are different and needed a digital interface to support these motions.  Here is how different the arc opens up in Interface_v2.

In my previous assignments, I kept using this ARC pattern to create a visual component.  It was something I was clearly trying to understand.  The timelines I created and shifting colors, also resurfaced from past projects.  If I had time, of course there would be sound.  But the sound of whirring servos and the paper fins brushing past each other will have to do for now.

Oh and arrays, if you look back to the blog post about arrays I made a comment about how it would eventually make sense.  And well, sure enough, it makes sense to me now and is what created this visualization pattern. Interface_v3

It is hard to be completely satisfied with my work here.  Once I enter a new territory and gain a grasp of my surroundings my mind starts to spit out the possibilities.  Paraphrasing here, but I will keep to heart what my professor Dano said during our presentations "...keep your whimsical approach to coding..."  And you know what, I will continue to play in the vast playground of digital functions and objects.  Who knows what I can stumble on through my travels?











11.07.2018

Well Rested.

I've been taking some time away from the floor recently.  Last weekend I didn't set foot at school.  Probably because I was on the brink of losing it on Friday.  Multiple people asked me if I was doing ok, even the ones I don't normally converse with.  While I thought I appeared fine on the outside, perhaps the stress was emanating gamma rays from my soul.

During ICM Madness we decided to take a calm route.  IF we had time we would integrate more fun tricks we learned in class.  But, aside from that we played some music and paced ourselves to fulfill the assignment.  Ideally, I wanted to incorporate machine learning into the sketch for reasons that it would also take care of my this weeks assignment but alas, no time.  Also I was so hungry I chose the dumplings by color and my diet has been largely Pescatarian for over a year.  Sooo, that threw an interesting loop to digestive system later.

A little touch base on my final project.  So it's a definite yes that I want to combine pcomp and icm.  I also have been doing so many accelerated group projects recently so I'd prefer to work alone and control my own pace.  I'm also pretty far a long my concept where I just want to build!  I've been spending the past week sourcing parts that I need, for the cheapest option possible (Bidding on Ebay, or Haggling for that best price.)

It may come to a time where my pcomp and icm blog posts will become more of the same.  And in that case I might combine those as well once the project becomes a functioning concept.  I'm all here for efficiency. 

To go back on machine learning, I started by setting up the example sketch from the ML5 site.  I wanted to use the style transfer program using the webcam  to create a collage of these altered photos.  However, after setting up everything in p5, I get an endless load when I begin the style transfer.  Not sure how to diagnose the problem, but no errors are being thrown. 

10.30.2018

A reintroduction into music

There is always a sense of time travel when I go back into my old music logs.  It reminds me of a time and place that is no longer present to me, just a fading memory.  Like how light dims as the power drains, so do the images in my brain.

Speaking of old times here is a song I recorded in my old apartment while I had a couple beers.  It was by far the most creative my lyrics have been to date.  And I'm proud to say they weren't all sad stories about how I was staring at the ceiling one day thinking about heartbreak or something equally upsetting:


Anyway, looking for sound inspiration.  I think I fried my brain a little last weekend with thoughts of a normal quiet life by a pond of koi fish.  Maybe it was the image of temperatures hitting the lower 70s, sun on my face and the breeze blowing over my shaven head.  Tantalizing.

This Monday proved difficult as I started my animation class and felt the burden of my workload just exponentially increase.  Ha yea, let's do paper cut-outs.  Which, I hope I don't end up doing the bulk of.  I'll keep that part out of my animation post.

So back to p5 and finding inspiration.  I thought I could build off the fan concept that I first started when I had this confident Epiphany of this beautifully elegant fan that would open like like a flower blossoming on adrenaline.  I still dream about it but I feel tired everyday thinking about it and just want to dive in.  Am I putting too much thought on trying to make these assignments relevant to me?  Maybe I should just learn a small function and, you know, if I run into a project where I have to use some of these skills I'll be like, "I kinda know that shit..." and then go to "maybe I should research it more".  I think that's how I'll truly learn the material, when there is a bit more passion behind it.

So here I am trying to find passionate portals of my past life in recordings of old music that I made in either my bedroom in Jersey with my parents outside probably thinking "he should be practicing computer science and become a wealthy programmer so we don't have to worry about bailing him out of debt when we are too old.  Least that's what my self-confidence told me.

 I feel like typing these keys is like dancing on those colored arrows on Dance Dance Revolution.  I was never good at that arcade game.  Well, I was good at the finger one using the keyboard arrows, because let's be real, pressing four keys on a keyboard is far easier than moving your feet in this weird pattern that only robots walk like.  Am I some kind of robot? No, I am a sleep deprived grad student with a job he doesn't quite want to be in but he has to because life is expensive and I like to eat food.


But enough with my sad blabber into the wind.  I want to make a visualizer to my music.  But there is already so much code available to make a visualizer.  I could copy it and change a few variable names and it would be mine.  Isn't that what we are suppose to do?  Or do we have to make things unreasonably difficult to come up with a lackluster result.  I tried making my nice little fan arc interface react to the music.  Which, I got it to work but it somehow changed how the arc reacted.  I'm not complaining, it looks pretty cool for being so simple.  However, I couldn't progress any farther than that.  What if I wanted to add another layer?  Like...mids?  Highs?  All the other elements to sound that would add more tantalizing visual effects like a digital LSD trip.

I'm going to digress again for a moment and say that a lot of the younger IMA students like to say the word "trippy".  I found this was common with one of my friends younger sisters who is slightly older than these new undergrads.  Is trippy a juvenile way of saying something they cannot comprehend?  I don't use that word anymore...I mean I did, when I was 18. I think?  But I wouldn't remember when I dropped that phrase.  I dated a woman then who liked to use the word groovy.  So I tried to bring "far out" back.  But I digress.  I went to Ithaca.  That should explain a lot to whoever is familiar with that area.


After taking Visual Language I have a lot of gripes with this blogger format.  It makes me feel dated, but I like to keep the Intergalactic Shoe Store alive with my late night rants and the potential for some great project ideas in this one weird slightly damp area of the internet.

View my Sketch


10.10.2018

Bee-lieve in Yourself

I went to a K-pop concert over the weekend.  A friend of mine had an extra ticket and I thought to myself that would be a new experience.  Why not?  BTS was playing and this was the first time a major artist from Korea had a tour here in the states.  Gotta represent my Asian brethren.

My mom is Filipino.

Well, after the trek to Queens Citi Field we grabbed a bite to eat because I was so hungry I could of had a small hotdog eating contest.  I settled with the 'shroom burger at Shake Shack and wayyy to manny fries.  I even kept eating other peoples fries after they turned cold.  I couldn't stop.  It was a french fry loop with no stop condition.

Then the band emerged with fireworks, smoke, dazzling lights.  The audience purchased these handheld light objects that seemed to work in sync.  I'm guessing, location sensor to run a coordinated light show.  All I kept thinking was ICM ICM P COMP P COMP.





So back to bees.  Bees are objects, flowers are objects....I am an object?  Sounds a little lacking when I use it to describe real life things.  I started this assignment in last class knowing I wanted to control the direction of the bee.  MouseX and Y was the easiest to program.  While it would be fun to turn the orientation of the bee with the keys, change speed based on how long each key was pressed, and then add some cool effects, my main focus was to make my object look like something familiar and not turn my brain into mash potatoes this week.  The initial bee was easy to create.  But I wanted something extra –moving wings.  This is where my brain was tested in math, for 2 hours before I found the eureka moment and made the wings stay on the bee for one, then I could change the speed they flapped at with a few tweaks.

(I wish I could insert my reaction to when it finally worked, maybe I should set up a reaction cam while I code to capture these moments)

The rest was the flowers the bee would interact with.  Originally nice purple orbs, I wanted something to look like a flower.  Aha! I'll just use an image of one.





While I knew how to call a single object.  To call multiple ones in an array was a little abstract for me.  My previous projects did not have a need for "For Loops" but with creating multiples of one object, it was kind of unavoidable. 


I looked at previous examples of arrays, and got it to work for my program.  But...looking at it... I get it, but it still needs some time to sink in.  I decided to backtrack a bit and relearn the foundation.  Breaking it back down to a "While Loop" on a notepad seemed to help me visualize what-did-what.  I re-watched some of the earlier video tutorials and it cleared it up a little more.  I just need to keep using arrays until it becomes a muscle memory.  They make my life easier and they are important.  Right?

Anyway, I'm pretty happy with what I accomplished.  It's got a little of a story.  I named the variables some fun terminology to help me remember what did what.  As the game progresses it kind of makes a beautiful picture full of flowers.

My Bee Program

I like it!

As a bonus here is a bunch of girls losing their shit at this neat dance move:

10.02.2018

Clean up

You'd think JavaScript would only teach you fun things on a computer.  There is always that personality type that is drawn to fractal imagery and colors oozing into those pixels.  But what did I do this week?

Clean up your code, maybe clean up your life too?

When looking at code it is easy to keep adding more ifs, thats, when-whatevers to make it do unusual things.  But you know, I'm starting to equate this to a kid who took too many drugs at a music festival because they knew all the "right" people.  Those sporadic movements and otherworldly expressions start to lose meaning to the outside world, and thus a very internal pleasure.

While you mule over the phrase internal pleasure, let me tell you about my days off.  I've found that I have so little time during the week to accomplish anything for myself.  Then I look at my room, with clothes thrown around and objects that were stuffed in my pockets laid out on every elevated surface I could find.

I'm looking at it this way, yes my room serves a purpose to house me for a few hours of sleep and gives me tools necessary to change my appearance...but are those little crumpled receipts under the table, or the lone army of single socks growing in the alcoves affecting me?  Like, pieces of incomplete code or variables so ambiguous they start to play hide-and-seek with your mind.

These past two weeks I've invested time to organize.  It seems counter intuitive to have a clutter following around in your wake because one way or another you are going to have to deal with it.  Starting with my closet I put dividers IN my drawers.  My socks have a place, my underwear, my shirts organized by type, baskets containing scarves, and another bin for towels.  What breeze it has been to wake up and pull open a drawer and be like "ahh" like a Sprite commercial.  This is the only time I feel like Lebron.

Clearing the stuff lurking beyond the folds of my brain leaves refreshed spirit.  Instead of, wow my room I should clean it or wow this bathroom...what world did you emerge from?  It can be like, oh shit, I have to pay rent and clean up my code.

Whatever the deal is with how we think, we all reach a capacity.  Thoughts are energy and you only have so much.  So why not invest in not having to think about the mundane to make something brilliant?

I appreciate clean code as much as clean room.  I want that fluidity and fresh air in everything I do.

So here's the code I wrote previously.  To try and clean up each function I used the comments I made for their names.  I wanted three:

fish_turnaround();
background_grad();
fish_touch_sand();

I started off on the wrong foot and put the functions in set-up and would get an error:

But looking at the example we did in class, I was able to put the functions in set-up.  I'm guessing is that they were objects?  I looked at another classmate's example and they put their functions in draw so I tried that.

And eureka I got it to work!  Well, the first two functions.  Once I put the fish_touch_sand(); I got only the gradient screen.  Which confuses me.  The other two work fine on their own...am I missing something?


I commented out the background command and found where my things were hiding...sorta




Haha, just fixed it.  Go me, real time troubleshooting:


Order matters!  Organize Organize Organize.

9.25.2018

Coding is Better with Friends



It's dark and rainy, but spirits are high!  After a weekend spent with an infected piercing drooling out puss and my newly renovated closet that looks like a Muji ad I feel refreshed and renewed (minus Saturday morning where I thought my lip would fall off my face).

I hung out at the floor Monday afternoon after work and decided to wait until my partner arrived to work on ICM.  I watched a little of the movie "Black Panther" while picking at a microwaved bento box.

When Mary Ann arrived, she articulated how she was a little behind and how we shouldn't bother on her code.  I was like, nonsense, that's more code than I have.  Let's work on that!  Her goal was to get the background to shift from these different sea greens and have seaweed wave in the foreground.  I found it relaxing and we dove into figuring out how to make the color shift.

Using the knowledge we learned from IF statements I thought we could make a set to cover the color changing background:



We started to make variables for each background, and found that it might have been too much information for the variable, or we just using it the wrong way.

So back to her basic background colors, she wanted to cycle through 3 colors, so we backtracked just trying to make each background appear once.

Once we figured out the backgrounds, now was the IF statement.  What could we use as IF? That was the mind numbing question.  We dug through the internet and asked a few peers but none of the answers seemed to ingest.

I thought about the draw function, and how that is a loop.  So if we can have something to count each time it loops, we will have something to use for our IF statement.  I decided to use the good old X++ variable type.  Each time draw was utilized, X would increase by one.  And depending on the frame rate, we could control how often X increases by 1.  I was reluctant to use something based on frame rate because that might hinder the code if it gets more vast.  But then I was like I'm overthinking this, I'm not writing code for an OS.

So we adjusted the frame rate and wrote IF and Else statements.  If x was between these values then it the background color is this, so on.  Until we get to the end of the IF statement, we reset X back to the 1 so it starts the whole IF statement over again.  SO WE GOT A LOOP.




The excitement was real when I threw my hands up after 2 hours of looking at complex functions and code to do what seemed a simple task.

The next step is how do we shift the colors subtly like a gradient.  This seemed easier as we just had to give the background some variables that shift every time the Draw loop is initiated.

Once Mary Ann left for work, I found myself lost in a hole trying to get a very simplified goldfish to turn around once it reaches the edge of the frame.

I got it to turn around in many ways, all were quite entertaining but not my image of turn this 2d object around slowly along it's Y axis so it looks 3D.

After becoming brain dead from this 2D ellipse I decided to time the gradient changes to some nice deep breathes.  If all else fails this will be a nice meditative color-shift with, perhaps, a sporadic fish of sorts.

 
Just kidding, I added more and I kept crashing my computer with my sound loop.

9.18.2018

ICM week two

You know, it's easy to burn yourself out.  I found that out pretty quickly when I went to the floor to work on my assignment right after class.  "I'm going to be the model student", I thought.

I stared at my monitor and the code.  I know what it meant, and I understood it, but my brain refused to take action.  A wall so imaginary I couldn't even picture it, but my body felt it.

Behind this wall I sat, thinking of what I could do?  What I wanted to do with the lines of text in front of me?  I shut my laptop and had a cigarette.  Another drink of water.  Used the restroom.  Another cigarette.  I was still stuck.

That is when I decided to roam the room and check in with other people.  Many of them were faced down in their assignments working hard to make their image a reality.  I asked them what they're doing, and what they wanted to accomplish.  They were so interesting, and enthused, I'd offer my perspective to break the driving focus they had and look up and around.  An electronic glove, a puzzle crafted of wood, a sound journey, an animation cut from paper.

All of them filled me with inspiration, fuel that I realized I lost when I dove into my work head first without getting up to breathe some air.  I walked home and decided I needed a break too.

Fill in Friday–Sunday with good friends and slight irresponsibility.

When I came in on Monday I rushed to the ICM help session after work.  It was there too I realized that most the questions came from people who already started their projects.  I got a feel for the if function though.

I decided to scrap thinking of something new and picked up with a project I was messing around with in class.

This was built just to use the mouseY and mouseX to dictate the green and blue colors of the shapes.  In effect, it was reactive to the user input.



Here is me trying to figure out an "and" statement for the first time.  I wanted make a less than or equal to 400 but p5js didn't seem to like both symbols next to each other like that.  And i tried multiple versions of && but could not get it right.



Here is me trying if statements and not getting the expected result.  You can also see I switched to dark mode, because you know...my eyeballs.


Back to more fun things I just made more shapes to satisfy me.


Trying to make an if statement but it wasn't responding how I wanted it to.


 Andddd this is where I found the Z axis and rotating function most pleasing.  Put everything at random and let the computer do the fun calculations for you.



Mesmerizing



End!

9.11.2018

Computation and Brain Farts

Computation to me always seemed like an unreachable part of my brain hidden behind many doors and locks.  Much like if you eat too much of the wrong type of burrito it churns me around and spits me out to a place with no sense of gravity.  The challenge of navigating this way of thinking is what entices me.  While growing up I had a fascination with hardware and took things apart, because that was easy.  The software tweaks I explored that helped me fry six computers and countless hard drives became a result of my endless putzing in an unfamiliar zone.  Efficient, no?

Anyway, after settling into the daily grind of corporate work and being more immersed with software to this day, I wanted to know how to utilize hardware in a way that doesn't turn it into a glorified paperweight. Bridging my worlds of hands on creativity with a thought process to compliment it was a goal I've always had, but never committed to.  (Except myspace, cause that was my jam). RIP to my angsty teenage phase and clothes that never fit me right.  I also thought hacking was cool, and still do.

So my goal is to code a supplement to my expression.  I want to bring my interests in music, dance, performance, paint, language and cultures together.  How can I evoke emotions through functions written on a computer?  The stress of learning to write codes and programs is something I want to endure to help me out in the long run.  It's all so broad now but the more I learn I know I'll fall into the path I was looking for the entire time.

___


Starting this assignment, I recognized some patterns I've learned from *light* coding over the years.  So a sigh to relief as I wasn't starting from 0, more like a 1.  I'm still far from attaining a perception that will allow me to know what the code does before I have to run it, and run it again, and again.  Until I'm like, what happens if I add another value here?  Or more zeros there?  And then everything crashes because I didn't know 1000000 was too big of a number for that function.

And here it is, my "what started out as a portrait" turned into something else!

Sort of a face...


Playing around with different sizes, trying to figure out how to put objects in front of each other.  Started to define areas with // because it got confusing the more code I put in.


Tried to make a color palette to use instead of typing in the values each time...maybe define another variable besides C?


I highlighted this, probably because I still had to put a value in, just any number really and it worked?


This looks like something.  I had to put a triangle, so I did.


I kind of know what this function does, but, also I do not.  It looks cool and I had fun messing around with the variables.


Started messing around with it more, and oh... it crashed the page. 1 million is too much after all.


Annnnnd, I started over again from just the eyes (auto save wasn't working) and got this.  I'm especially proud of the eyebrows.

Overall, I found the p5js editor to be easier to use.  With a tiny background in coding I was able to pick up things fast.  The biggest hardship I faced was finding where to define my coordinates for shapes and lines.  I trialed and error many number combinations until I got to the place I wanted, or the shape I wanted.  While successful, it seemed a bit inefficient.  My brain was staring at a blank square and had to imagine a grid system overlaying it all.

I'd like to explore the full capabilities of this software, and even just seeing lesson 2's videos I believe we will be doing some pretty cool things soon!

–till next time
JB