Blog

18Feb/130

Digital Sound Design on Coursera

Coursera

Well, I stumbled upon this course as I was checking out the courses on Coursera, which is an online portal for free education. Honestly, this has been a great discovery for me, since there are many great courses from various universities and instructors.

Although I enrolled the course on 3rd week out of the 4 week schedule, it didn't take long for me to realize that it wouldn't be hard to catch on. For those who are curious about sound design should definetely check out this course.

Share
10Feb/130

Recent News

I am embarrassed to confess that I did not have an online portfolio until now.Now that I had some free time in my semester break, I managed to finish and polish it. Now you can jump to my brand new online portfolio. Thank you, Indexhibit.

Share
27Nov/120

Jungle Story

I recently made a new recording called Jungle Story. As the name implies, it is a story that takes place in a jungle and the narration is made by the sounds. It is merely a soundscape actually.

Here is the link on my soundcloud. Oh and, I'd suggest you to listen to it with a pair of headphones, since there are panning effects, which are part of the narration.

Share
19Sep/120

Zen and the Art of Motorcycle Maintenance

Zen and the Art of Motorcycle Maintenance

Seems silly at first glance, eh? Well, at this point I shall tell you that it's one of the most amazing books I've read so far.

It's one of those books you should take your time to read and digest. You will be amazed by this (un)usual journey and how the narrator relates these two seemingly different subjects. I want to tell much more about this book, however no matter what I type, I feel that I'm not presenting the book good enough. Probably because Mr. Pirsig is much better with words and sentences than me.

Share
8Sep/120

Bikeshed painting

Even hackers and DIY'ers might get hard to get along with sometimes when starting to a project, on which others also can find many stuff to say, according to this interesting link. Retrieved from FreeBSD, the writing shows interesting aspects of human planning and e-mailing ethics. Well, it's merely an opinion on those subjects, but a rather worthy one I'd say.

Just remember to press F5 after the web page loads - you'll find it simple, yet charming how the little amusement catches you.

- I've been AFK for some time, because I needed some time off after my summer internship. I came across to interesting stuff during that time but I'll post them later on, sacrificing the chronologic order of my explorations.

Share
26Jul/1212

Processing + Twitter by using Twitter4j

Processing Icon

***RESOLVED*** EDIT: I am updating the info of this post with this edit, since it got a bit outdated. First thanks to Codasign people for their awesome tutorial, you can take a look at it here. The current version of Twitter4j is 4.0.1 by the time I am writing this post. Below you can find the working tutorial for using Twitter4j within Processing.

Okay, I know that there are many, many tutorials on this subject and I know that it's fairly easy to actually get some output within 2 hours of googling and copy pasta - however, this is a long road for impatient users like me. Also, I have a project on my mind and I want to share my experience before I get it done.

First of all, please do check this tutorial before getting your hands dirty, because it is simply awesome. I just modified it slightly and I believe it's a wonderful starting point.

One issue about the tutorial for me was the authentication part of the twitter API. Below is my (slightly different yet more practical) version of the steps:

1. Visit https://dev.twitter.com/ and login with your twitter username and password
2. Click on the ‘Create an app’ button at the bottom right
3. Fill out the form that follows.
4. Once you’ve agreed to the developer terms, you’ll arrive at a page which shows the first two of the four things that we need: the Consumer key and the Consumer secret. Copy and paste these somewhere so you have them ready to access.

 4,5. Click on settings button. Scroll down to Application Type and select Read and Write. This is important because otherwise for posting a tweet, you'll need the rights to be able to Write. The code provided on the tutorial will NOT post a tweet to your account.

5. To get the other two values that we need, click on the button that says ‘Create my access token’. Copy and paste those two values (Access token and Access token secret) so that we have all four in the same place. These are pretty important so keep them handy, but don't share them with third parties.

So this was what you had to do with twitter authentication. Now we come to Twitter4j and Processing part. If you haven't done yet, please download Twitter4j and install it from here.

For installing, do the following:
1) Unzip the twitter4j-4.0.1.zip
2) Move the unzipped folder to Processing > libraries (This is by default inside Documents on Windows)
3) Rename the folder "twitter4j-4.0.1 " to "twitter4j401"
4) Place all contents of the "twitter4j401" folder into a folder called "library", which is inside the "twitter4j401" folder
5) Rename "twitter4j-core-4.0.1.jar" in the "library" folder to "twitter4j401.jar".  This was our final step and now shut down processing if it's still running and relaunch it. Voila!
Now you should have Twitter4j library ready to use in Processing. Open up a Processing sketch, and select Sketch-> Import Library... -> twitter4j401. If you got it all right, you'll see a bunch of import twitter4j... codes in your sketch. Excellent!

For a quick example (provided %99 by Jer from blog.blprnt.com), copy and paste the code below to your Processing sketch and hit Play button. I'm sure that'll help you get started. By the way, do not forget to replace the asterisks with your own tokens you got from https://dev.twitter.com.
 

import twitter4j.conf.*;
import twitter4j.internal.async.*;
import twitter4j.internal.org.json.*;
import twitter4j.internal.logging.*;
import twitter4j.json.*;
import twitter4j.internal.util.*;
import twitter4j.management.*;
import twitter4j.auth.*;
import twitter4j.api.*;
import twitter4j.util.*;
import twitter4j.internal.http.*;
import twitter4j.*;
import twitter4j.internal.json.*;
//Build an ArrayList to hold all of the words that we get from the imported tweets
ArrayList<String> words = new ArrayList();

void setup() {
//Set the size of the stage, and the background to black.
size(550,550);
background(0);
smooth();

//Credentials
ConfigurationBuilder cb = new ConfigurationBuilder();
cb.setOAuthConsumerKey("*****");
cb.setOAuthConsumerSecret("*****");
cb.setOAuthAccessToken("***-******");
cb.setOAuthAccessTokenSecret("*****");

//Now we’ll make the main Twitter object that we can use to do pretty much anything you can do on the twitter website
//– get status updates, run search queries, find follower information, etc. This Twitter object gets built by something
//called the TwitterFactory, which needs our configuration information that we set above:
Twitter twitter = new TwitterFactory(cb.build()).getInstance();
//Now that we have a Twitter object, we want to build a query to search via the Twitter API for a specific term or phrase.
// This is code that will not always work – sometimes the Twitter API might be down, or our search might not return any results,
//or we might not be connected to the internet. The Twitter object in twitter4j handles those types of conditions by throwing back
//an exception to us; we need to have a try/catch structure ready to deal with that if it happens:
Query query = new Query("#audio");
query.setRpp(100);
//Try making the query request.
try {
QueryResult result = twitter.search(query);
ArrayList tweets = (ArrayList) result.getTweets();

for (int i = 0; i < tweets.size(); i++) {
Tweet t = (Tweet) tweets.get(i);
String user = t.getFromUser();
String msg = t.getText();
Date d = t.getCreatedAt();
println("Tweet by " + user + " at " + d + ": " + msg);

//Break the tweet into words
String[] input = msg.split(" ");
for (int j = 0; j < input.length; j++) {
//Put each word into the words ArrayList
words.add(input[j]);
}
};
}
catch (TwitterException te) {
println("Couldn't connect: " + te);
};
}

void draw() {
//Draw a faint black rectangle over what is currently on the stage so it fades over time.
fill(0,1);
rect(0,0,width,height);

//Draw a word from the list of words that we've built
int i = (frameCount % words.size());
String word = words.get(i);

//Put it somewhere random on the stage, with a random size and colour
fill(255,random(50,150));
textSize(random(10,30));
text(word, random(width), random(height));
}

 

//End of code.

 

Please feel free to share any problems you confront with.

Share
17Jul/120

New Article Revisited

I wrote another Turkish article to BirinciBlog.com - a critique of Ninja Assasin. For the record:

http://www.birinciblog.com/ninja-assassin-hollywood-uzakdoguya-uzaniyor/

Share
Filed under: Film, Personal, Turkish No Comments
9Jul/120

New Article

I recently wrote a new article on Arduino and it got published on a Turkish blog. I hesitated to share it here since I'm keeping this blog in English, but then decided to post the link here, too - just for the records. You can reach the article by clicking below:

http://www.birinciblog.com/elektronik-artik-kolay-ve-eglenceli-arduino/

Share
9Jul/120

A Summer Tale: Engineering Internship

20120709-160509.jpg

Boredom during work? I'd hit that with a crowbar.

Share
23Jun/120

At, Avrat, Remix- new recording

Okay, it has been a while since I last wrote. I was busy with finals and now that they're finally over, I'm working on a project I hope to send to an exhibition and other stuff.

Few days ago I bought the new Boss RC-3 Loop Station effect pedal, and today I received it in a carefully wrapped package. After playing with my new toy for a few minutes, I recorded some loops and sent it to my dear friend, Erk Ucman.

We chatted and recorded new stuff for the whole day, and the result can be found on this link.

You should read the description on the linked page, this was kinda fun.

Notice: Includes avant-garde, glitch, noise, experimental, and kraut. Listen at your own risk.

Share