Talk less, experience more.

Archives
About

Projects

Oh Apple, if only I could... | September 10, 2008

Geniussss

Update: save the script below as an application and place it in your iTunes scripts directory. Assign a keyboard shortcut to the genius script's menu item (in your keyboard system preference pane) and you can trigger the script from the DarwiinRemote application. Ultra geekness with a genius :-)
__________________________________________

and that's why I slapped together a less than elegant Applescript 'solution' to activate the Genius function on the currently playing track through an Applescript so I can try and activate it from my Wiimote (Genius needs direct, one-button access in order to be truly great). The problem is that Apple does not support GUI scripting very well in iTunes, with the result that you have to activate the iTunes window so that we can use a 'click' applescript command to activate the button. Here's the script:

-- initialise
global iTunesHidden
global frontApp

set iTunesHidden to 0
-- store the name of the active application (fast)
set frontApp to my getFrontApp()
on getFrontApp()
set colon to ":" as Unicode text
set dot to "." as Unicode text
set appPath to (path to frontmost application as Unicode text)
considering case
if (appPath ends with colon) then
set n to -2
else
set n to -1
end if
set astid to AppleScript's text item delimiters
set AppleScript's text item delimiters to colon
set appname to text item n of appPath
if (appname contains dot) then
set AppleScript's text item delimiters to dot
set appname to text 1 thru text item -2 of appname
end if
set AppleScript's text item delimiters to astid
end considering

return appname
end getFrontApp

-- check if iTunes is hidden and active
tell application "System Events"
if visible of process "iTunes" is false then
set iTunesHidden to 1
end if
end tell
if frontApp is not "iTunes" then
tell application "iTunes"
activate
reveal current track
end tell
end if

-- activate Genius
tell application "System Events"
get properties
get every process
if UI elements enabled then
tell process "iTunes" to click button 10 of window "iTunes"
end if
--hide iTunes if it was hidden
if iTunesHidden is 1 then
set visible of process "iTunes" to false
end if
end tell

-- restore previous application
if frontApp is not "iTunes" then
tell application frontApp
activate
end tell
end if

Wonderful... Now I need to figure out how to integrate this into the iTunes script menu (which requires me to most likely remove half of the code in this masterpiece).

Ikea Speaker Lamp | April 27, 2008

Ikea Speaker Lamp

Yesterday we did a small half-a-day project to modify 2 Ikea lamps into a speaker set for the bedroom using 2 old speaker components from our old Philips widescreen TV. I used the amplifier of a broken set of pc speakers to power the speakers. It not the kind of thing for audiophiles, but we're satisfied with the result.

Continue reading "Ikea Speaker Lamp" »

Wireless speaker - quest for the right speakers | December 16, 2007

Helms Portable Mini Speaker

I bought this Helms portable mini speaker at the airport in Singapore. It's about the same diameter as the Hama bluetooth headphones, but I probably will not use it for the wireless speaker due to the weak sound quality. I have been looking for the Altec Lansing Orbit-mp3 speaker in Asia, but had no luck finding it. The quest continues...

Wireless speaker - phase 1 completed | November 11, 2007

Wireless speaker breadboard control test

This has been siting on our desk for a while, but finally the time has come to roll up our sleeves and get it over with. We want to build a wireless bluetooth speaker that we can use throughout the house and that allows us to skip tracks and adjust the volume in a playful way. It is beyond me that no major or obscure electronics brand has taken it upon them to at least build a wireless speaker that controls music playback when there are various wireless headphones on the market that already do this. This is the one and only feature that makes a wireless speaker useful. So please build a low-cost, small and portable speaker with this feature, then we'll take care of the playful part... This was our personal motto for a while, but after almost 3 years of waiting we have given up.

Soldered wireless speaker

Today we completed the first phase of this project, soldering wires to the the contact points for the tact switches on the pcb of the headphones. Bit of a suspense thriller given the size of the connections, but we managed. Now we can start to focus on the fun part, the interaction with the playback control using tilt switches, IR sensors and capacitive sensors. We have not really figured out which one it will be in the end, but we have some ideas. For the speaker part we have our eyes on the new Altec Lansing Orbit-MP3 speaker, which seems to provide the perfect solution.

Continue reading "Wireless speaker - phase 1 completed" »

Processing on rails | October 10, 2007


To view this content, you'll need to install Java from java.com



Not ruby, but me and my laptop on the train to work. My daily trip from Milano to Monza takes 17 minutes. I like to devote these 17 minutes to 'discovery time' and set myself the challenge to create something within that timespace. Tuesday's task was: play around with OpenGL rendering in Processing while a 14 year-old boy is asking you why the white logo on the back of the laptop lights up (I did not plan the latter).

Click and drag you mouse around in the above Processing sketch to see Tuesday's 17-minute creation.

IR Philips Webcam and IR Mag Lite | October 07, 2007

Universal USB Charger

A modification of a Mag Lite by replacing the light with an IR LED. We intend to use this in combination with a IR-enabled webcam and the excellent Touchlib library for another project.

Continue reading "IR Philips Webcam and IR Mag Lite" »

DIY IKEA Ambilight | July 09, 2007

IKEA Mansken Ambilight

The detailed instructions on how to build your own Ambilight system using a set of 2 IKEA Mansken LED lamps. Note that the final result does not completely match the effect of the real Philips Ambilight as the original is more intense and only projects the light on the wall behind the television, not towards you.

Continue reading "DIY IKEA Ambilight" »