Breath-Powered Mobiles: interacting with Balance + Beauty

OK, here is a recipe for ya….

INGREDIENTS:

(1) iPhone App.Here’s a Tutorial on how to make a simple iPhone App that detects when a user blows into the mic.

(2) Art History Lesson Pt. 1. Kinetic Mobile Art & Alexander Calder. Watch a youtube video or 2 to learn about Alexander Calder’s mobiles….. stay with me here….

(3) Art History Lesson Pt 2 … and keeping in mind Marchel Duchamp‘s first kinetiic art piece in 1913… and well the history of mobile art as kinetic sculpture on Wikipedia...

Marcel DuChamps’ (Bicycle Wheel, 1913) – First Officially Recognized Kinetic Art

Let’s Get Cooking! 🙂

Preparation:

I’m thinking it would be quite cool to create an app, where when a user is in proximity to the motorized mobile, and has paired with it, the intensity of the blowing breath can be mapped to the speed of the motor.

Part of the mobile would be a motorized Jacob’s ladder. Intstructions HERE:

There would be two tiers to this mobile. One would spin according to the user’s breath and the other would spin according to either the scaled solar wind speed or some other dataset with “air” or metaphorical air-like qualities (real time or not?).

How to Make a Motorized Mobile

Perhaps in the middle would be a larger Jacob’s Ladder that was either: (1) constantly going with a simple motor turning the top block to cause the motion; or (2) has some sort of distance sensor and only turns when presence is detected. Maybe there would be gongs or some kind of chimes that would strike each other as the Jacob’s Ladder fell…

Advertisements

And without further ado… Twitter to Pachube, and Pachube to Max!

OK, so now that we have learned how to send tweets from Max, now we can think about storing this data somewhere. I’ve been exploring the Pachube.com (pronounced “patchbay” ?) website. What is Pachube? From the website:

” Pachube essentially stores, retrieves and processes realtime and time-series data from devices, sensors, environments and web-based applications – so here we are using some short cuts to make use of off-the-shelf applications that can already make use of Pachube, so that you don’t have to build anything yourself.

The purpose is for you to understand what a Pachube feed is, how its datastreams get updated, and what you can use the datastreams for, without having to use the Pachube API

Here is a screenshot of the website, so you can see for yourself:

Now, before proceeding further, please check out my 2 posts about “The Internet of Things”: Pachube Research Part 1 and Top 10 “Internet of Things” for 2010.

….. [Insert Wheel of Fortune music here] …

OK when you come back let’s get going!

PART 1 : TWITTER TO PACHUBE

  1. Set up a FREE Pachube account at http://Pachube.com. You will receive an activation link and you should be good to go.
  2. Create an Alternate Key. In your welcome mailer you will receive a Master API key, but we will create another key for use in this tutorial. When you Log In, there are a bunch of Menu options on the right-most column. Click on the “My Keys” link under ‘Secure sharing keys’ . You will see your Master API key in a box.
  3. At the bottom of the white box, click on <Create a new API key> and under ‘Permissions’ choose <get> and <put> (retrieve and update streams). Leave the rest blank and click on “Create New API Key”. The new key will appear in your list. To see it, click “Show Key”. Click on it and COPY the key text. You will need it soon.
  4. Log in to your Twitter account. We will be sending inputs to Pachube via twitter, but a sensor or remote device could also be sending the information.
  5. Create a Pachube Manual Feed. On the right column under “Feeds” click Create a Feed and then watch this video to complete the forms (take note of the FEED ID, ie. ‘pachube.com/feeds/1353’): 
  6. Set up PachTweet as decribed here.
  • Log into twitter, and follow @pachtweet by tweeting ‘follow pachtweet’.
  • Then tweet ‘@pachtweet connect’
  • You will receive a private message in a few short minutes to confirm it was a success. Wait for that confirmation before going to step #7

7.  As a private message [DM] reply to patchtweet, send a message that contains the API key you copied earlier, so it should read ‘key [YOUR API KEY HERE]’

8. Let’s send some messages!

  • Ok, so the format to send messages is:  <set> <feed_id> <data> … so for every message you put “set [yourfeedID#] #,#,#,#”  … and each datastream will be updated based on its location in the list of numbers after the feed id, so for example, set 20457 35,467,88.88
  • Give it a try! Open up your feed page and from the twitter private message page, send some info. wait about 60-90 seconds and refresh your pachube feed page a few times. You should see the data update!

9. How will you use this data? Now it’s time for you to brainstorm! 🙂 What data will you log in Pachube? The world is your oyster.

**I’m investigeting how to set up “triggers’ in Pachube to send tweets to Max but it looks like that is in Beta-Testing mode. I’m hoping to hear back from Pachube soon on that one… but until then it’s really simple to get data from Pachube directly to Max!

PART 2 : PACHUBE TO MAX

It is quite easy to get data from Pachube to Max. I have modified a Patch offered on the Pachube site so that you can receive multiple Feeds and multiple data streams. The original was:

My modified version is:

This patch is available for download HERE. As it is updated, I will update the link for you.

But for now, the important things to look for in this patch are:

(1) Your Master API Key…. which can be found when you log into Pachube. On the right side column in the “Secure Sharing Keys” section, click on “My Keys” and then copy the key and paste it into every box that needs an API key in the Max patch.

(2) Choose a Feed… There are many feeds to choose from, but the most interesting for Max are the ones that are real-time and updated at least every few minutes. One that is particularly relevant for us in Tempe is the ASU Weather Tunnel Feed. Take a moment to check it out! https://pachube.com/feeds/26118. As you see the Feed ID = 26118, and the info is updated very often.

(3) Launch Max and open up the Patch you just downloaded.

(4) Add FEED ID + DATASTREAM # into Max… so for the case of the ASU Weather Tunnel feed, you would put in ‘26118’ as the Feed ID in Max, and then choose a DataStream. In this case there are 7 streams, numbered 0-6. So for example, let’s choose datastream 2 (humidity) and 5 (carbon monoxide). Enter your key, feed id, and respective stream numbers into the first two sections of the patch.

(5) When you turn on the toggle at the top, the metro will bang once a second and you should start seeing Output Values, that match the current values on the pachube page!

(6) Explore other Feeds on the Pachube site, and see what kind of interesting values are out there. You can figure out the ranges of the datastreams by changing the graphs to show either 1hour, 24hrs, 1week, 1 month, 6months, or a year. (this is on the right side of every datastream’s graph. More on that soon! 🙂

Voila! Max to Twitter

I will be posting a video soon that accompanies this recipe. But for now enjoy!

(Based off a Sound Plus Design Twitter+Max tutorial)

INGREDIENTS:

(1) Max 6. You will need to have a working copy of Cycling ’74 Max/MSP (Max 6 is the latest version and a 30-day fully functional demo is available, but Max 5 will work.

(2) DOWNLOAD: AJM Max External (click Download button there) & SoundPlus Design’s Max/Live/Twitter Patches

(3) A Twitter Account. If you don’t have one, create one, and note the username and password.

(4) Twitter Access Codes. You will get these by going to the Twitter Developers part of the site to register and create a new application. More on that below…

PREPARATION:

(1) Install AJM Max external components according to the ‘readme’ file

(2) Copy Patches into a Max path folder.

(3) Go to the Twitter Developers page

  • Click on the blue button to <Create a new application>.  -You are required to enter the <Name:> <Description:> <Website: (you can use your twitter website, ie.’http://twitter.com/%5Byourusername%5D’  ; -then you need to click the checkbox <Yes, I agree> to agree to Terms of Service, and enter the “captcha” at the bottom. Then create your Twitter App!
  • If successful, you will then be take to the App’s main development (dev) page. You can check out the ‘Details’ tab, will see that you have a few aplhanumerics under ‘OAth Settings’, but you have no Access Tokens yet. This is because you need to set your permissions.
  • Before clicking on the <Create my access token> button, go to the ‘Settings’ tab and under “Application Type”, choose ‘Read and Write’ and scroll to the bottom and click the blue button <Update this Twitter application’s settings>.
  • Wait about 10 seconds and refresh the page once or twice, and you will see the Access Token, Access Token Secret, and Access Level are now listed.

(4) Launch Max software:

  • Open the ‘MaxToTwitter.maxpat’ in the folder you just downloaded.
  • Make sure the patch is locked and then Double click the “Enter Access Codes”
  • Copy and Paste the codes from your Twitter Apps main page under ‘Details.’ (You will need the Consumer Key, Consumer Secret, Access Token, and Access Token Secret)
  • Use ‘Save As’ to save another version of this patch. This new version will have the keys and tokens saved for when you reopen. You can now close the pop up window
  • Now you can test this app! 😀 Type in a message in the grey box that is 140 characters or less and then click the yellow ‘Tweet’ button.
  • Oh yes, and hold down Command+M so that you can see the Max message window and if it is a success, a message will confirm this.
  • Now you can go back to your twitter home page ‘http://twitter.com/%5Byourusernamehere%5D&#8217; and within seconds you will see the message you typed in Max appear on twitter!

Now the fun begins! 🙂 What would you like Max to post? Will you set a threshold and have it only set a message when it hits this threshold. Will you send a message when it bangs (that could get annoying)….. the world is your oyster, but here is Campbell’s diagram for Creating Art (+ a Sound/Frequency/MIDI chart) to inspire you:

Pachube Graph – real-time updating….

Update. I finally got the Twitter to Pachube data stuff working. So excited! Next I will be posting the Max to Twitter portion of the systsm. Am quite excited for this…… And This is a test…. of my graph. it’s supposed to be linked with this datastream from one my Twitter>Pachube test feeds…. we will see!

Top 10 Internet of Things for 2010…

Since we are probably very close to an article on the “Internet of Things 2011”, I thought I would post a link and a breakdown of some interconnected web trends of 2010 that were highlighted in this article. This includes:

> HP’s CENSE Network (Central Nervous System to the Earth)

among 9 others. VERY interesting stuff..

Mobile Phones + Max

Turns out, someone created a ToolKit of fresh new patches for interfacing Mobile Phones (iPhone, iPod, iPad, Android) with Max using TouchOSC

Check it and DOWNLOAD the patches HERE!

Nathan Bowen who presented these at the 2011 Cycling ’74 Expo in NYC in October, writes on the cycling74 site:

“This is a bundle of patches intended to help get you off the ground in using mobile phones to control Max.

As I like to have several phones connecting to Max in a network setup, I use of udpreceive and udpsend so that ports can be dedicated to specific devices. I don’t know how to make use of Bonjour, so feedback is welcome!

For Android users, I have created a patch that interfaces seamlessly with the TouchOSC ‘Simple’ layout, so even if you cannot add custom layouts, you can still make use of some these patches.

Currently the best setup is either an iPhone, iPod Touch, or iPad on TouchOSC, but hopefully this will change as Android becomes more robust.”