Tuesday, September 30, 2008
higher
Higher-order shell - How UNIX commands in scripts are like higher-order commands in functional languages like Haskell.
By the way, I was volunteering at ICFP 2008 (International Conference in Functional Programming) last week, and got to meet many of the luminaries in functional programming. Some smart people there, let me tell you.
acm
I'm going to be presenting a talk at a workshop coming up:
The Many Faces of Multimedia Semantics
MS08
It used to be called Robust Multimedia Learning in Broad Domains.
Monday, September 29, 2008
Friday, September 26, 2008
android
Android
Android documentation
Getting started with Android
Android FAQs
Installing the Android SDK - The API is Java
Developing and Debugging Android - You use Eclipse as the SDK
Hello world app with Android
package com.android.hello;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class HelloAndroid extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);
}
}
Android uses ALSA for audio
Android media API
Recording audio with Android:
Start recording:
recorder = new MediaRecorder();
ContentValues values = new ContentValues(3);
values.put(MediaStore.MediaColumns.TITLE, SOME_NAME_HERE);
values.put(MediaStore.MediaColumns.TIMESTAMP, System.currentTimeMillis());
values.put(MediaStore.MediaColumns.MIME_TYPE, recorder.getMimeContentType());
ContentResolver contentResolver = new ContentResolver();
Uri base = MediaStore.Audio.INTERNAL_CONTENT_URI;
Uri newUri = contentResolver.insert(base, values);
if (newUri == null) {
// need to handle exception here - we were not able to create a new
// content entry
}
String path = contentResolver.getDataFilePath(newUri);
// could use setPreviewDisplay() to display a preview to suitable View here
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setOutputFile(path);
recorder.prepare();
recorder.start();
Stop recording
recorder.stop();
recorder.release();
Location-based Service APIs
locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
Location location = locationManager.getCurrentLocation("gps");
How to Program Google Android
Wednesday, September 24, 2008
Tuesday, September 23, 2008
latex helvetica
I get very bored of Times New Roman in Latex, so to switch things up to Helvetica, just add the following after \documentclass:
\usepackage{helvet}
And then right after "\begin{document}" go:
\fontfamily{phv}\selectfont
Much better.
enactive
The general objective of the ENACTIVE Network is the creation of a multidisciplinary research community with the aim of structuring the research on a new generation of human-computer interfaces called Enactive Interfaces.
Wow.
Monday, September 22, 2008
ex
Computers have exquisite ears. A report about the recent ISMIR 2008 (Ninth International Conference on Music Information Retrieval).
Friday, September 19, 2008
erdos
I wonder what my Erdos number is. I have worked with some math people, so perhaps it's not extremely high.
Thursday, September 18, 2008
ir track
freetrack
FreeTrack at wikipedia
FreeTrack versus TrackIR
wii Sensor bar
wii mote
libwiimote - Wii mote for Linux API
Linux Wii-Mote Driver
wii homebrew
How to Transform a Webcam Into an Infrared Camera
johnny wii - Fantastic resource site
Wednesday, September 17, 2008
Tuesday, September 16, 2008
Monday, September 15, 2008
blogging
**NB** : Blogging output has slowed considerably due to me starting my M.Sc. in Computer Science at the University of Victoria.
newmedia
Near Future Laboratory Top 15 Criteria That Define Interactive or New Media Art
The Near Future Laboratory Top-15 Criteria for New or Interactive Media Art are...
15. It doesn't work
14. It doesn't work because you couldn't get a hold of a 220-to-110 volt converter/110-to-220 volt converter/PAL-to-NTSC/NTSC-to-PAL scan converter/serial-to-usb adapter/"dongle" of any sort..and the town you're in is simply not the kind of place that has/cares about such things
13. Your audience looks under/behind your table/pedestal/false wall/drop ceiling or follows wires to find out "where the camera is"
12. Someone either on their blog or across the room is prattling on about the shifting relations between producers and consumers..and mentions your project
11. Your audience "interacts" by clapping/hooting/making bird calls/flapping their arms like a duck or waving their arms wildly while standing in front of a wall onto which is projected squiggly lines
10. Your audience asks amongst themselves, "how does it work?"
9. The exhibition curators insist that you spend hours standing by your own wall text so that you can explain to attendees "how it works"
8. It's just like using your own normal, human, perfectly good eyeballs, only the resolution sucks and the colors are really lousy..plus the heat from the CPU fan is blowing on your forehead which makes you really uncomfortable and schvitz-y
7. Someone in your audience wearing a Crumpler bag, slinging a fancy digital SLR and/or standing with their arms folded smugly says, "Yeah..yeah, I could've done that too..c'mon dude..some Perlin Noise? And Processing/Ruby-on-Rails/AJAX/Blue LEDs/MaxMSP/An Infrared Camera/Lots of Free Time/etc.? Pfft..It's so easy..."
6. Someone in your audience, maybe the same guy with the Crumpler bag and digital SLR excitedly says, "Oh, dude. That should totally be a Facebook app!"
5. It's called a "project" and not a "piece of art"
4. You saw the "project" years ago...and here it is again...now with multi-touch interaction and other fancy digital bells and Web 2.0-y whistles
3. Your audience cups their hands over various proturbances/orifices at or nearby your project attempting to confuse/interact with the camera/sensor/laser beam, even if it uses no such technology
2. There's a noticeable preponderance of smoothly shifting red, green and blue lighting effects
1. People wonder if it wasn't all really done in Photoshop, anyway
3 Bonus Criteria!
0. There are instructions on how to experience the damn thing
-1. You can't "collect" or buy it. Heck, if you did, you'd need to get AppleCare or hire an IT guy in the bargain
-2. Crumpler guy says, "Oh, I thought of that already.."
mcipa
MCIpa: A music Content Information Player and Annotator for Music Discovery. Done in Flash, very cool.
Friday, September 12, 2008
Wednesday, September 10, 2008
Tuesday, September 09, 2008
reload
If you are running a Python interpreter and you change a source file on disk, you need to reload it by doing:
reload(modulename)
You can also reload all modules with:
for mod in sys.modules.values():
reload(mod)
But this is probably the wrong thing to do. Read Reloading Python modules for more info.
Saturday, September 06, 2008
Friday, September 05, 2008
javascript tree
A really nice little tree view widget in Javascript. Such a better API than the YUI TreeView widget. I love the YUI, but some of their javascript APIs pretty suck, this one is so nice because you mark up your tree with HTML lists.
Wednesday, September 03, 2008
Monday, September 01, 2008
sequence
Sequence - provides a unified api for access to sequential data types, like Strings, Arrays, Files, IOs, and Enumerations. Each sequence encapsulates some data and a current position within it. Some operations apply to data at (or relative to) the position, others are independant of position. The api contains operations for moving the position, reading and writing data (with or without moving the position) forward or backward from the current position or anywhere, scanning for patterns (like StringScanner, but it works in Files too, among others), and saving a position that will remain valid even after data is deleted or inserted elsewhere within the sequence.
Subscribe to:
Posts (Atom)