Friday, September 28, 2007

Blog Action Day and Some Random Links

October 15th is Blog Action Day, an arbitrary date on the calendar when over five thousand blogs will post on one topic: the environment. I've signed up for this initiative.

Now someone please remind me so I do not forget!

Meanwhile, you may want to read about Teochew Preserved Crab, a dish made by drowning live female crabs in soya sauce, letting them sit for several days and then bathing them in liquefied red roe.

Sounds like the sort of thing a touring rock band might be interested in. If so, you might find it mentioned in their "rider", a contract that stipulates all the stuff they want to be provided with. Chances are you have never read anything as funny as the one provided by Iggy Pop. Spinal Tap's got nothing on this!

If you need to mic yourself up, on stage or off, this guy has a purportedly great-sounding mic preamp that costs only 100 bucks. Catch? You have to build it yourself.

If your audio tendencies run in the direction of scaring customs officials or gallery patrons, you may favour the Suspicious Looking Device, a reactive instrument designed to "appear as suspicious as possible".

If reading is more your thing, you might love curling up in a nice library or searching out a bargain in a back-street book shop. One of the sensory joys of this experience is the distinctive aroma of aging paper. Well, now electronic books can have that musty smell too!

It's a swirl of fantasies and fears, of silly haircuts and ill-chosen snare sounds, of razor guitar and delicious sing-a-long melodies, yes, its Scars first and only album, Author! Author! And it's available to you finally on CD, with a whole slew of bonus tracks previously only available to those, like me, who searched out their each and every single. Actually their very first effort, the delightful "adult/ery" / "Horror Show", is missing, but you can find that elsewhere.

Fans of Gang of Four, Skids, Fire Engines or any of these new young bands that think they know what they're doing (Franz Ferdinand I'm looking at you!) had better run, not walk, to their local retailer to grab this.

Or, if you have no such joyous option, help me out by clicking on the following to patronise Amazon. (Personal takings to date: zero. I guess I'm just not appreciated. Boo hoo.)

buy from Amazon 
Thursday, September 27, 2007

Typefaces On The Web

I am sure we all have our favourite typefaces and others that make us cringe in horror. Me, I like Futura; it's useful in (nearly) all its variants and stays out of the way when you want it to. I'm also rather mad for Fette Engschrift (aka DIN 1451).

In fact I'm the type of idiot who buys typefaces, though I don't think I have bought more than one set in the last few years. Problem is, eventually I have to design a web page, and then all my love for typefaces goes to waste.

That's because only fonts installed on the client computer will be viewable in their browser. Some time ago I decided to look into this sad state of affairs. Just now I tidied up the document and posted it for your edification. Browser Font Samples is over on one of my other websites since I didn't want to adapt the formatting for this blog.

What we need is a technology like that provided by PDF documents, namely, embedded fonts. I remember the days before PDFs, when fonts had to be specified by number and sending a document from one platform to another was a nightmare. If you don't know what I'm talking about you missed a great deal of hell. If you do know what I mean I need only mention one sordid word to make you shiver with horror: Palatino.

But anyway, wouldn't it be nice to embed fonts on web pages? Well, you can, in a manner of speaking.

The simplest way is simply to render the letter shapes you want as images and insert those on the web page. Though a time-tested technique, this has the disadvantage of requiring extra work, plus it constrains the design process -- what to do if the letters are being generated from a dynamic publishing system? If you're not careful with alt attributes you might also reduce the accessibility of the page or its friendliness to search engines. Over-use of images will also decrease the page load time, again, unless you are careful with image optimisation techniques.

And of course every time you decide to change the point size, colour or other attribute it's back to your graphics app.

Sometime in late 2003 a bunch of clever folk came up with sIFR, which just happens to stand for the Scalable Inman Flash Replacement (clever they were but not very good with branding). The technology is based on the fact that most modern browsers are compatible with Javascript and Flash. Simply, a script scans your page for text you've asked it to render. For each area of text it creates a Flash movie of the same size, containing the self-same text but in the font you've asked for.

This can look very nice, as the demo illustrates. The rendering is fast, overhead is small and it degrades properly. Clients without Javascript turned on or without Flash installed will see the original text.

But it does require that you use Flash and post SWF files to your website. Over-used it can appreciably slow down the browsing experience. And it does sacrifice some usability... don't put links in sIFR block please! If all this still sounds good to you and you don't need backwards compatibility with older browsers you can always try the version 3 beta. Just be sure you have $700 on hand for a copy of Flash CS3 Professional.

Prefer a cheaper solution? If you have server-side access you can use Python etc. to render text using whatever imaging library you can get your hands on. That's the sort of solution I'll be looking at for my own requirements.

Anything to save me from a life of Georgia and Tahoma.
Tuesday, September 25, 2007

Deprived Of Images? Thought Not.

Blogger has a new toy that looks at first to appeal to the "sit back and watch TV 'cause you've got nothing better to do" mentality. But then I started thinking that the odd juxtapositions might create a kind of unexpected visual poetry, while revealing insights into how we frame images for consumption.

What am I talking about? Blogger Play, a page that displays a slideshow of images as they are uploaded to people's blogs. You get to see anything that is being added to a public blog from anywhere around the world, unless the owner explicitly opts out.

That's the line anyway, but of course this is not entirely true. Images come with descriptions and links to the blog entries, so they can only be displayed if they are in finished posts. This is no work in progress; we are not getting a glimpse into the act of assembly. That would at least have the frisson of generative art. The truth is that these images are already fixed in context, already finished, already archived.

In fact what Blogger Play does is age the images before their time. After a fraction of a second a picture is old, replaced with another. I find it significant that the default speed of the slideshow is so fast. Nothing here is worth lingering over. It's all dead and gone.

I was thinking of adding an image to this post, but decided against.
Monday, September 17, 2007

Twelve Best Rheostatics Moments

The world's most iconoclastic rock band has called it a day after thirteen albums. Here's what you missed. Bear in mind that most days I don't even like rock music. But every now and then (say every two decades) a band comes along to reaffirm my faith. Did I just say "faith"? Must be the banana beer (not recommended).

"Late nights make me really tired / all this jamming gives me a headache."
"The Ballad of Wendel Clark Parts I and II" brilliantly encapsulates the band's obsession with Canada's national game, lacrosse hockey. It's boppy, it's happy, it's got great guitar bits and silly vocals from all the boys, while quoting from the real national anthem (the "Hockey Night In Canada" theme) and the Sex Pistols. It's the only song they bothered keeping in their set from their debut album Greatest Hits -- a wise decision. The best recorded version is on Double Live, which throws in further references (eg: beer jingles). Even this pales compared to what it could be live. Was I the only one waiting for Parts III and IV?

"There's a Lenny in my Kravitz that must be removed"
Night of the Shooting Stars is the album that most illustrates the band's rockist tendencies -- not something I think needs to be encouraged. "These Days Are Good For the Canadian Conservative Youth Party Alliance" is no different, but lyrics like "when the sun goes down on the flat Edmonton streets / you will seek normal pleasure / there are sports teams with cheerleaders who double as hookers / you will seek normal pleasure" more than redress the balance.

"I tried to sing a simple song / but the metaphor was ten feet long"
"The Latest Attempt On Your Life" is the hilariously self-conscious ditty in which the female BV sings "everyone hates you, you sing like a woman". How brilliant is that? 2067 is the band's most "together" album, one of their finest productions, and the one that makes me sure the world would have been better had Michael Phillip Wojewoda produced all their stuff. He is immaculate and emphasises detail; the Rheostatics' complexity needs that. Unfortunately for us, it was also the final album.

"The sky dreamed a cloud's death / when you spoke I saw your breath"
The Story of Harmelodia is a children's story and album, the kind of thing I would certainly be feeding children if anyone entrusted them to me (which is likely why they don't, now that I think about it). I chose a lyric from "The Sky Dreamed" but this entire album is my pick since everything works, from Janet Morassutti's narration to Sarah Harmer's lead vocals (female lead on a Rheos album -- wow!) to the lovely book with some of Martin Tielli's incredible illustrations.

"I would have used it to paint the picture I'm seeing now."
"Queer" is one of Bidini's finest moment. Actually, he could have died happy after writing this symphony of teen rebellion and family turmoil. I love how he manages to rhythm "arm" and "warm", the cute vocal refrain on "pitch" and the way the drums and piano merge into a single instrument in the middle break. Still, it's hard to pick just one song from the brilliant Whale Music, so I won't.

"Mum and dad are selfless / and they don't do nothing worthless / they just work all day and worry about their son / 'What went wrong with Martin / Is he dumb?'"
"Self-Serve Gas Station" starts with country-tinged pianissimo, capturing the anguish of a dead-end job. Before it finishes it expands it into something far more universal, tightly-controlled melodic guitar squealing out into the night. "No-one said this would be easy / but no-one said this would be hell." Been there, Martin.

"Though I haven't got that drunk yet"
"Dead Is The Drunkest That You Can Get" is a bittersweet satire from Double Live, the album in which The Rheostatics put across some of the very best versions of their songs, many of them much better interpretations than the studio versions. Those who never saw this group live may be amazed that the complex arrangements, violent mood swings and impeccable playing could happen anywhere but in the most sophisticated studio environment. But, yes folks, this really happened. Regularly.

"What is a monster to do, when your teeth are so young and your tongue is for licking?"
"Shaved Head" is chilling, compelling and utterly mystifying in that particular Tielli way. I think it might be about a cancer victim. Don't know. The guitars weave a web of sound, delicate cushions for the naked subject. And like him, this song demands attention. Like pretty well the entirety of "Whale Music".

"Now it's time to close my eyes / to sail away and photosynthesise"
"Earth / Monstrous Hummingbirds" is some sort of apocalyptic ecological nightmare, or maybe a gorgeous evolutionary fable. It is perhaps the fishiest track on Introducing Happiness, swaying between whispered niceties and pounding guitars. How anyone arranges a song (two songs? three songs?) like this is beyond me.

"If someone had won we'd have heard long ago / No-one wins."
"Row" is a simple melodic ditty, including a bit of pseudo-yodeling from Tim Vesely and falsetto Martinisms. It has a beauty that tugs at the heartstrings and, when it loosens them, uses them to construct a kite that is then flown into the silvered night.

"Someone in class called me a loser / decided to skip the day"
"Record Body Count" takes under two minutes of Melville to unfold, but in that time manages to illuminate the issue of teen suicide without explicating anything at all. They revisited this theme more directly on "Beerbash", but "Record Body Count" is so elliptical it comes right back around the curve into realism. After all, who talks about suicide in high school? The song often gets laughs live, but these are the laughs of embedded insecurities. The last song the band ever played -- a noble choice.

"If I be the crane / If you be the site inspector."
With Rheostatics you always get a good epic to close an album. "A Midwinter Night's Dream" is the best of the lot, a dreamy conclusion to The Blue Hysteria, which opens up into some sort of a conspiracy theory about drowning under ice, building sites and sabotage. It chills me to the bone and gets me very happy at the same time. Excuse me, did someone just say genius?

Visit Martin Tielli, Dave Bidini, the official Rheostatics site, the live recordings base or the USA page, which has the lyrics.

You can support this great band and me at the same time by buying from Amazon. Whale Music tops surveys of Canadian Music time after time. Buy it here:
 buy from Amazon buy from Amazon

The Story of Harmelodia is the best children's album/book ever:
 buy from Amazon buy from Amazon

And finally, something available to those in the UK, where the band is completely unknown and mostly unavailable. The final Rheostatics album is the most consistent and palatable, but still taps into their quirky world view and humour. Do yourself a favour -- get 2067:
buy from Amazon buy from Amazon buy from Amazon

"Sweet sweet silence / I'm already gone."
Wednesday, September 12, 2007

escalation 746 Live At Mamuska Dublin

I have been regularly providing the sound environment for Mamuska Limerick, a multi-disciplinary open art evening with a fun and experimental flair. I curated the music for the first ever Mamuska Dublin last Saturday and this weekend join the 2007 Fringe Festival for a live appearance.

As well as DJing an eclectic blend of progressive and atmospheric sounds, I will be playing original electronic music as escalation 746. This will be a premiere performance for Ireland's first city.

Join me for an evening of dance, theatre, music and who-knows-what at the Back Loft, 7-11 St. Augustine Street from 8pm until about 11pm. Best of all, it's free!
Wednesday, September 12, 2007

Sensor Board Update: Eowave and Doepfer

segnoI have advance information on the Eobody 2 that is contrary to my earlier expectations. The device has been made into a standard box form factor with no MIDI controls. It accepts 8 inputs on 1/4" TRS and outputs MIDI on USB. It is USB powered but has a power adaptor jack for when you might need more current.

If you require more inputs you simply connect more Eobody units to your computer... there is no practical limit. The literature states 12-bit resolution which must be for the inputs and internal processing, since MIDI is a 7-bit format. Mac and win32 software allows you to edit the control parameters depending on the sensors you connect.

Eowave have decided to forsake the earlier unit's individuality for a simple plug'n'play solution. But the price is a lot lower than expected: €200 plus VAT. This unit is no longer in the "expensive but worth it" category but should rather be compared to the Doepfer Pocket Electronic.

The PE is €150 cheaper and has 16 inputs. It has MIDI in and out which is handy for controlling non-computer audio gear. The Eobody 2 has a case, standard TRS inputs (less wiring) and a USB out -- meaning you don't need a MIDI interface on your computer.

And speaking of Doepfer, they have a new board imminently available, the USB64 which, true to its name, has a massive 64 inputs and adds a USB port to the I/O. It'll be about 60 x 55 x 30mm in size and will sell for a very reasonable €125.

Which you choose depends on your application.
Wednesday, September 12, 2007

escalation 819 on "Endless Endless" compilation

I am pleased to announce that escalation 819 is included on version 5 of "Endless Endless", an online compilation of ambient music. You can access this by going to the home of Audiobulb Records and choosing Projects. An in-page player will stream the content.

"Endless Endless provides an ever expanding organic arrangement space. Artists are invited to send 120 second tracks of ambient audio to Audiobulb. Tracks are mixed alternatively into the start or the end of the piece in a manner that expands Endless Endless."

The escalation 819 contribution is named "Pack Ice". This may find its way onto a CD eventually.

The participants in order of mix are:
the oo-ray
adcbicycle
ochre
billygomberg
effacer
autistici
ocp
c.cruz
tmns
gintas k
andrew halliday
craque
tom lynn
andrew halliday
john kannenberg
generic
arctic sunrise
minim.all
five step path
escalation 819
jeff sampson
william tomlinson (x2)
btb
mark.nine
francesco rosati

The fact that the pieces are merged and that each version of the compilation has only a short half-life of existence as a streaming medium tickles my radiophonic heart.
Monday, September 10, 2007

Scribus: Open Source Page Layout

I was doing some layout for a client today and needed a quick and easy way of comping together photos with some text. Because the photos needed cropping, exposure compensation and other editing, I ended up using Photoshop. This made me feel so bad. Where was my open source soul now?

The truth is that I've invested thousands of hours into Photoshop. Any graphics programme takes an enormous amount of time to learn to use properly. So I have never got around to learning the best win32 open source alternative, Gimp. When my partner and daughter wanted an image editor I swiftly slapped Gimp on their laptop. I do not want to perpetuate the insanity! But I am still stuck in closed source land.

Another issue is that I don't have anything like a recent version of these programmes. Some time ago I got a student model of PageMaker, an app I've used for just about forever (starting on Mac). I snagged a license for ImageReady when it was going almost free. But there's no way I could afford to get the recent versions of these apps, nor would I want to.

Using a bitmap editor to do layout is obviously wrong. For one thing, everything takes so long to render. There's no way to lay out everything at thumbnail resolution first, before switching to a higher resolution proof. (I do remember some esoteric image editor that would do this automatically using fractal image algorithms. Whatever happened to those? For a few minutes in the late eighties they seemed to be pretty hot.)

So I looked around and found Scribus, which only recently has been ported to win32. It uses Ghostscript for PDF generation, so I know it will produce excellent output. And there's a Portable App version, which is nifty.

I took a look and am impressed! But before I go into details I should state that I am not a designer by training. Nonetheless I've done layout for posters, CD covers and manuals and even a couple of books. By no means would I be a print expert. A decade ago I used FrameMaker. I despise Microsoft Publisher. PageMaker I find wimpy. I've never got my hands on InDesign.

OK, now that you have a little perspective...

The Scribus interface has little in the way of workflow support, betraying its desktop origins. There almost no document or project management. The basic working paradigm is:
1. choose document format (number of pages and size)
2. insert frames into a page
3. populate frames
4. apply styles and properties

It would be better if styles were absolutely mandated, but they are not. One can still create a mess of different characteristics ungoverned by any overall structure.

When importing large text files they automatically flow into linked frames on subsequent pages. Frames can be linked in any order and this may be done before or after they have content. If you give the content a paragraph style you can align columns to a fixed baseline. (This might have better been the default.)

You cannot set margins for a frame itself, which seems like such an oversight I must have missed it somewhere.

There's lots you can do in this app: insert special characters and ligatures; use multiple master pages; produce a table of contents automatically from tagged objects; precisely measure arbitrary distances; angles and point sizes; generate barcodes; and script with Python. It also supports colour management and preflight checking -- necessary professional printing features. Text can be reflected about either axis, arbitrarily rotated, or put on a curve.

There's some useful documentation, like hints for setting up Gimp for proper use with Scribe. You'll also want to peruse the wiki.

I have not done enough testing to determine the quality of the text positioning, hyphenation etc. This is what really distinguishes a first-class layout programme from a run-of-the-mill word processors. The latter have no idea how to properly position one letter after another (or one word after another) so that they look aesthetically pleasing for the given typeface. Version 1.4 of Scribus (we're on 1.3.3.9 now) promises improvements in that area.

That version will also improve bleed and separation support and add the ability to do overprinting and knockouts.

In most similar apps you can add overlapping elements and change their stack order. Scribus goes one further and allows you to create layers as well. Within each layer there can still be stacks of items. Layers provide an easy ways of grouping frames across the document. For example, annotations could all be on one layer, so you can turn them on or off. Along the same lines, frames may be individually print disabled. I am sure there is a way to automate this, so that frames with a certain attribute could be disabled together.

There are some tricks I wouldn't expect to be here, made possible by the fact that Scribus incorporates vector functionality. You can draw shapes, lines and curves directly, altering these at will with styles, colours, gradients and fills. Cooler yet, you can convert text to curves and then use this to cut out images. Or, convert text to a frame and insert an image or other text inside its outline! Scribus imports SVG so it works well with apps like Inkscape. Importing a drawing will add its spot colours to the current document palette -- nice. A collection of Scribus Tips shows how to do some of this magic.

Some things I've noticed are not included: a spell checker, vertically centered text in a frame, indexing and footnote support. This would not be the programme to use for complex text documents. I've also found an annoyance: guidelines are not visible if an image covers the entire page. Also, the properties dialogue does not draw properly. Panels will be too large for the containing window, forcing scrolling within a panel... a pain.

When it comes to output, Scribus supports the prepress standard PDF/X-3 which contains ICC color profiles. PDF transparencies, thumbnails and bookmarks are all available. But the amazing thing is that you can create PDF forms in Scribus, including buttons and other elements with Javascript actions. This might save you the price of Adobe Acrobat.

I should also note that I found the app responsive and clean to use. Supposedly it is very picky about typeface files, but in my minimal usage I have not run into this yet.

My only problem is that I cannot use it for my current project, or indeed any that requires handing off the results to another designer. Until everyone discovers Scribus and makes it a standard, I'll be forced to use a commercial application for compatibility's sake. This is an annoying fact of life.

As a postscript (ahem) I might bring your attention to PoDoFo, an open source PDF editor that lets you see the structure of your document, make changes, and create an updated file. Years ago when I had to write code to hack Postscript files I would have killed for this.
Friday, September 07, 2007

Sensor Computing Summary and Recommendations

segno
We have come to the end of my series of articles on sensors for music production. In the introductory article, Instrument / Device / Sensor: A Continuum I discussed how experimental musicians have taken to using an ever-increasing variety of transducers to shape their sound production. I then took a look at the common types of sensors you might choose to employ. These require controlling with some sort of micro-processor board. The third article looked at the characteristics of these, following which I listed 22 different available boards, ranging from home-built kits for the price of parts to professionally finished gear costing a couple of grand.

Meanwhile, over on my programming blog, diagrammes modernes, I have been looking at the software side of the equation. My study of music control languages began by listing some criteria for choosing between them. I took a look at both specialised tools and those based on the Python language. Then I focused on the intriguing language ChucK, with an introduction and a look at the language features.

Through all of this I have tried to keep a pragmatic tone and make my decisions as explicit and general as possible. Aesthetics has not really entered the discussion; these articles are more technical than artistic.

Put another way, this series is designed to help you quickly answer the technical questions so you can dedicate more time to the artistic particulars of your project. I have also tried to pitch the material to those of you just getting started in this field.

In the future I hope to write about what I have personally done with the knowledge gained through this research. Until then I have a more immediate task: I'd like to narrow down the exhaustive list of controllers, so as to make your decision-making even easier.

Making The Cut

The first part of this process is quite easy. Several of the kits we looked at were, for the most part, quite similar. Some can be eliminated from consideration since they are older technology (The BASIC Stamp, BasicX), others because they are incomplete, under-documented or require extensive assembly (Gainer, MAnMIDI, USB MultI/O-Box, MIDIsense). Those with an educational orientation are either larger than necessary or also require much soldering (The Bare-Bones Board, CUI, BlueSense). Three devices on the high end are distinctly over-priced considering the competition (I-CubeX, MIDIcreator, gluion). And one unit, the "thing", is not available in Europe.

I am fascinated by the SquidBee which intelligently networks to collect environmental data. But given that it is built from Arduino boards, it is possible to recreate the same functionality for less money. The price premium is for the integration.

This leaves nine products for consideration. For ease of comparison I will price these in euro with shipping inclusive to a typical European location.


Expensive But Worth It

On the expensive side of the spectrum I favour two units for those who want fully finished plug'n'play solutions with minimum hassle. The Eobody 2, so far unreleased, can be recommended on the basis of its predecessor. It is unique in providing a small performance interface for real-time tweaking of the received signals. Of course it is easy enough to add some input pots or switches to any of the boards I looked at, but Eowave has done this for you in a rather cool housing. And since it outputs MIDI it can be connected to a plethora of standard gear without hassle. For about €500 it is a handy performance tool.

For those who need ultra-low latency and high bandwidth the Teabox is the ticket. Built like a tank from the best possible components it will cost a lot more in terms of connectors (eg: sensors should be fitted with XLR sockets) and requires specially conditioned sensors for best performance. Consider the €315 spent on the (reasonably priced) base unit as a small part of the investment needed to build up a system around this interface.

Most of us, however, neither need that sort of performance, nor can afford it for one off or experimental projects. At a lower price point, there are two distinct classes of boards, based on their output protocol: MIDI or serial.

MIDI Solutions

MIDI has the advantage of being an accepted standard within the music industry, with thousands of products that can simply plug'n'play. No computer is necessary and no engineer or musician will look at you twice -- it's business as usual. Yet it's also easy to connect to a computer when you need to; computers may not come with MIDI I/O but add-on cards or USB adaptors are commonplace.

We have two MIDI solutions to consider. The Doepfer Pocket Electronic comes ready-made with firmware programmed for most sensors. But if you need to programme the board you must be running Windows as the software supports only that OS. The PE is limited in having no output pins. The website has lots of pictures of cool projects done with this device, but little support and no dedicated community. Still, for about €90 it is a great deal.

The physically larger (183 cm3 compared with 112 cm3) MidiTron is also more expensive at about €132. However it has two advantages. First, it has output pins in case you want to rig up LEDs, displays, or the like. Second, the configuration is done with SYSEX messages, which opens up device programming to any OS (or even non-computer MIDI devices). Of course this doesn't mean that it's easy to write the System Exclusive codes, only that it is possible.

Serial Boards

Serial output on USB ports is completely compatible with any computer system, but not with audio devices. But it has the advantage of 10-bit resolution, equal to what you are likely getting on the analog inputs to the boards. Compare that to the 7-bit of MIDI and you'll see that the serial boards are a lot more sensitive, which is handy if you're rigging up sensors that need smooth responses.

I prefer products that are open source, have a USB port (as opposed to RS-232), support cross-platform development and have an active community of helpful developers. This rules out Ezio, which in any case is expensive for what it does at €175. The PhidgetInterfaceKit is a more reasonable €80 and has an active forum. Though they sell their own line of plug'n'play sensors, one is not necessarily limited to these.

Still, it doesn't make the grade. Based on cost alone I'd prefer the Arduino Diecimila, obtainable for about €32. The development languages are open, cross-platform and purpose-built, unlike the scattershot approach of Phidget. It is proudly open source and international, with one of the best support networks I have seen.

Furthermore, the family of boards supports many different applications. The Arduino Mini is perfect where space is at a premium (its the smallest of all the products under consideration). The Arduino BT has built-in Bluetooth communications. Furthermore the full-sized Arduino can be fitted with one of a number of "shields" to enhance functionality. One of these provides RF communication (so you can build a SquidBee!), another enables motor control (for robotics), and so on.

If you need more I/O pins or on-board memory, consider Wiring, since it too is open source, cross-platform, and well supported. Better yet, the programming languages are similar, so you can easily move from one board to the other with a small learning curve. However, it's about twice the price at €66, so if you don't need the extra features, don't buy them.

Wiring is topped in capabilities and price by the Make Controller Kit, which is notable for its up-to-date technology. It has USB 2 and Ethernet ports and communicates using OSC -- the perfect solution (protocol here). They have a forum and helpful tutorials, though there's less info than for the other two products since this one is newer. But it's physically larger and twice as expensive again at €132. Unless you really must have OSC Arduino and Wiring are more cost effective.

Grand Finale

If you need 12-bit resolution and lightning fast responses get The Teabox.

If you require a MIDI device, don't need more than 7-bit resolution, would like to avoid any sort of assembly, and don't need to control output devices directly, the Doepfer Pocket Electronic will suit you fine.

If you don't mind doing a bit of building and want the most flexible cheapest solution, you won't go wrong with Arduino (adding in the Wiring board as a "big brother" if needs be).

OK, that's all. Now get out there and build something!

I thank the Arts Council for their support in this research.
Thursday, September 06, 2007

Micro-Processor Board Roundup

segno
In the previous article I presented an introduction to micro-processor boards and discussed their characteristics. In this article I present 22 different solutions for building your own sensor device. For each I give a capsule description with only the most pertinent information. I believe that this is the most extensive list on the web, given that I am focusing on hardware suitable for audio applications, and am not about to list every micro-processor in existence.

The list is roughly ordered by price. In order to assist my European friends, I have tried to determine the total cost including shipping to Europe for those units that seem the most interesting. Shipping costs can dramatically change the affordability of the given solution.

Let's get started!

The Arduino is a family of open-source boards. The latest and most capable is the Diecimila (69 x 53 mm), which has 14 digital pins (6 of which allow output) and 6 analog inputs. Output is serial over USB. Power is via USB or an external supply. The firmware language is based on Wiring; the development environment is based on Processing. These run on Mac, win32 and LINUX. The unit can be used standalone (eg: without a computer) and has 8KB of memory. The price for an assembled board is €22 plus VAT from PCB Europe or €27.50 from Libelium. (Unfortunately shipping cannot be determined without logging in. However, shipping from the US is only about $8.) Options include the Zigbee Shield, an RF module with on-board antenna for communication up to 100m. This is €39. Motor kits and Bluetooth add-ons are also available. The community is strong.

A "bread-board friendly" version of the Arduino is available under the name The Bare-Bones Board. It is one-third the size in each dimension, loses the USB interface and is designed for easy assembly by beginners. Fully assembled it's $22, but that likely misses the point.

Gainer is an open source kit based on a simple I/O module. The parts must be obtained separately so the unit can be built (approximate cost $30). It can be configured for a total of 8 analog and digital I/O. It is USB bus-powered. The software is supported for win32 and Mac and is available for Flash, Max/MSP and Processing. The device communicates using a simple ASCII serial protocol over USB. The firmware cannot be modified unless the commercial Cypress C compiler is purchased ($140). The device does not work as a standalone unit. Some of the key documents are in Japanese only.

The BASIC Stamp is a line of controllers popular in robotics. The boards have varying pin numbers, speed, and memory, the popular BASIC Stamp 2 having 16 digital pins and serial I/O on two more. It is programmed in PBASIC (a variation of BASIC) on win32. There is no analog I/O. The Stamp requires fitting with a USB or serial port plus a power regulator circuit. It has a very small amount of internal memory (2KB). Dimensions are 30 x 15 x 10mm and the price is $49.

The BasicX is a similar line, the most recent being the BasicX-24p. This has 32KB memory and 8 additional pins that can be analog I/O or digital. The price is $50.

MIDIsense is a $50 kit that comes complete with all the parts to self-assemble. It provides win32 or Mac software to control a boards that handles resistive sensors only (force, bend, photosensors, etc.). Future board variants will handle different types of sensors. Because it handles a good number of MIDI messages natively, it does not need to be used with a computer. Has 6 inputs but no outputs. The chip is the ATmega8, the same as that used by Arduino; it hence has 8KB of memory. Size is not known.

MAnMIDI provides 10 (or 11) analog inputs to MIDI output. It is a compact 59 x 31 mm and costs $50 assembled (though it is no longer available this way). There is little available information and it does not have a visible user community.

The USB MultI/O-Box is an open source kit providing 88 analogue inputs and 64 outputs, 64 digital I/O, 2 MIDI outputs, a 40 character LCD display, a rotary encoder and a serial output on RS232. It is still in alpha and is not a trivial build project. The author can provide some units built for €40 + €15 shipping + the cost of the parts. The unit is two boards stacked on top of one another and is hence larger than most of the other kit-based options listed here.

The PhidgetInterfaceKit 8/8/8 has, as the name suggests, 8 analog inputs and 8 digital I/O, interfacing with USB. Designed for use on LINUX, win32 or Mac, it has programme interfaces for Visual Basic, VB.NET, C, C++, C#, Flash 9, Flex, Java, LabVIEW, and Matlab. The inputs use 3-pin locking connectors and so are designed to be used with the 20-odd sensors sold by the same company as "phidgets". The unit itself is CND$ 80 but kits with various phidgets (including motors and other output devices) are available as well. Dimensions unknown.

The Create USB Interface (CUI) was developed at U.C. Santa Barbara and includes a breadboard area as an easy project surface. It has 13 A/D inputs, 17 usable general I/O ports and USB out. The firmware development software requires that you write in C on win32 only. However an assembled and loaded board can be obtained for $50 US that is ready to interface to any software that understands Human Interface Device interface (eg: Max/MSP, PD, SuperCollider).

Doepfer is one of the biggest names in modular synth components and custom MIDI controllers. Their Pocket Electronic includes sensor inputs on two 10-pin ribbon cables, and MIDI I/O. A number of presets for different devices are in the firmware, which can be controlled either physically with the provided momentary switch (and LED for feedback) or with incoming MIDI messages. The editor software (win32 only) can be used to reprogramme the presets. Any other data at the MIDI in is merged to the MIDI out, allowing chaining of multiple devices. The PE works on an external power supply, which is provided for European sales. Dimensions are 80 x 56 x 25 mm and price €77 from Thomann, who have reasonable shipping.

Wiring is an open source project consisting of schematics for a board and a control language. The board has 5 ports of 8 digital I/O pins each, 8 analog ins and 6 outs. There are further configuration possibilities, since the analog ins can be used as an extra digital port, some pins are used as interrupts, etc. There are two serial ports, one over USB, the other through pins. The board is USB powered and has an external power adapter connector for when more current is needed. Drivers and the development environment are available for Mac, win32 and LINUX. It has a generous 128KB of memory. The unit can operate standalone; multiple units can be ganged. The best way of obtaining one in Europe is from SparkFun for $83 with shipping starting at $7.40 (depending on method).

The TNG-3B (pronounced "thing") from MindTel has 8 analog and 8 digital inputs but no control outputs. It communicates and draws power over a serial stream on RS-232. It is provided with NeatTools, a visual development app for win32, similar in use and scope to the industry standard LabView, except that it is free, open and has been optimised for use in computer interface design. The unit is finished in a case and sensors connect using standard plugs, 3.5 mm stereo for analog inputs, 2.5 mm mono for analog inputs. This is convenient for those who don't want to do any assembly, though sensors bought from places other than Sensyr will obviously require wiring to the correct plugs. The unit is 72 x 119 x 23 mm and weighs 130g. The Thing costs $88 but is not approved for European sales due to regulatory issues.

MidiTron provides a combination of up to 20 digital or analog I/O pins, with MIDI input and output, powered from a 9V battery (or transformer). SYSEX messages are used for configuring the flash memory; the included software for doing so runs on win32 or Mac. MidiTron can run in stand-alone mode. The connectors are of a screw type so no soldering to the board is required. The size is 63.5 x 76 x 38 mm and cost is $149 + $30 shipping outside the USA.

The Make Controller Kit has 8 analog inputs, 8 digital outputs and 4 servo controllers. It has Ethernet as well as full-speed USB 2, plus a special interface for networking multiple boards. It uses OSC for communication, and thus can be used with any language or tool that uses that protocol. Sensors attach with screw connectors. The board runs off USB power (for testing) or external power (for actually powering connected electronics). A Dip switch and trim pot for manual configuration, jumpers for different voltage settings and four status LEDs complete the package. It can be run standalone. Dimensions unknown. Software and schematics are open source. For users in Europe it is best obtained through Make Magazine for $149 plus $32 shipping.

Ezio is a board developed at the U. of Michigan which has 10 digital I/O and 8 analogue ins powered from a 9V battery or adaptor. Output is to RS-232. The programmer interfaces for win32 and Mac include Director, Max/MXP and Processing. The I/O connectors are screw type, dimensions are unknown. The designer's page has some additional info. The unit is $179 plus $60 international shipping though a $50 educational discount is available.

BlueSense have nine different modular boards ranging in price from €49 to €79 that are tuned to a single function each (analog input, analog output, power supply, etc.) and thus have to be used in combination with each other and further boards for wireless, USB or Ethernet communication. The company also provides sensors, LEDs, motors and so on. In order to provide the functionality of other single-board systems at least four different BlueSense units would need to be bought at a total cost of €199 and size 109 x 154 mm (depth unknown). These units are obviously targeted at the education market, not embedded development, since this form factor is prohibitively unwieldy. Assembly required, as this is the whole point of these boards!

SquidBee is an open source environmental sensor device based on Arduino (11 digital I/O, 6 analog I/O) that can run for months on 2 AA batteries, signaling changes in data via RF. Multiple devices configured as "Sensor Motes" form autonomous networks, sending data and receiving commands from a "Gateway Mote" connected to a computer. Price is €130 and €105 respectively and you need at least one of each.

The Eobody was designed by the clever people at IRCAM. It is a fully finished MIDI I/O device that includes 4 switches and 3 pots on the face of the unit, so that the values from one of the 16 inputs can be tweaked. These connect with 1/4" adaptors; the device is rigged to work with sensors bought from the same company. The included Mac and win32 software stores the configuration in flash memory; the Eobody can be used standalone. The price including the required breakout box for the second half of the inputs, plus VAT, is €540. Or would be, except they have been out of stock for some time, awaiting the successor. Scotto is another possible source.

The Eobody 2 will have a total of 32 inputs that connect through breakout units on RJ45 (telephone) plugs, and will communicate using high-speed USB 2. Power is over USB or through an adapter. Dimensions are approximately 130mm square. A wireless module will be available as an option. This unit has been shown at trade fairs like Musikmesse but is not yet released, although it was scheduled for summer 2007. The price is to be similar to the original unit.

The I-CubeX converts an unspecified number of inputs to MIDI, configured by dedicated Mac or win32 software (or any other that writes to their system exclusive spec). A number of example Max patches are provided. The basic kit has been "reduced to" $600, but this appears to be a permanent state of affairs. A line of over-priced sensors with their own pseudo-standard 3-pin connectors is available.

The gluion is a high-speed unit that communicates via OSC over Ethernet. The 16 analog and 68 digital pins can be programmed with advanced functions. It is available in a number of form factors. The bare board is 75 x 75 x 19mm and weighs only 42g. The price is €466 or €557 (depending on whether you want 12 or 16 bit resolution). The "slipper" (€535 or €626) is the smallest enclosure at 130 x 81 x 31 and 234g, but this comes at the cost of losing half the digital pins. The "sneaker" (€558 or €649) is a 130 x 81 x 48 enclosure weighing 280g and preserving full functionality. Configuring the unit requires the user to send the developer a spec which he turns into a usable configuration file!

The Teabox is a robust device designed for systems where low latency and high bandwidth are particularly important -- video tracking dance for example. Essentially it is 10 times as fast as MIDI and provides 12-bit instead of 7-bit resolution. The half-rack case provides Neutrik connectors that will accept 1/4" or XLR connectors. All other connector types are catered to, the Teabox preferring to group the 16 inputs by 4 on standard telephone jacks, which has the benefit of cheap cabling and very long runs (up to 100 feet). The output is also industrial-strength, using S/PDIF over RCA or optical. One limitation when used with an audio interface is that same must be slaved to the TeaBox. The basic unit is $400.

Finally, the MIDIcreator is a sound module and MIDI interface that takes inputs from 8 different sensors and creates music. For £998 I suppose it had better.

In my next (and final) article in this series, I will cull this list based on my opinions and priorities.

I thank the Arts Council for their support in this research.
Thursday, September 06, 2007

Micro-processor Boards for Sensor Control: An Introduction

segnoFollowing on my look at the types of sensors that are available to convert physical properties to electrical information, I will next present a survey of micro-processor boards. These are specifically designed to facilitate the capture of sensor data, and the massaging of this into a format usable by a computer (or even another device).

Before I do so, however, I need to discuss my methodology and some of the characteristics of these boards, factors you might use to determine which you need for your particular application. The following article will give you the lowdown on the particular boards themselves.

All the information here was first gathered between 12 and 6 months ago, but verified just before publication. Intriguingly, not much had changed over the intervening time. This data is summarised from manufacturers' websites, and so cannot be confirmed by myself to be absolutely true. Nonetheless, I think it provides a good baseline for evaluation. Though there are some other comparisons available on the web, I did not consult them before writing this document, in order to prevent bias. (You may wish to peruse the out-dated info at IRCAM or the more useful table at the sensor wiki.)

I have omitted defunct devices, since I am not interested in a historical perspective, but rather what can practically be achieved today. Nonetheless I have included some units that may be going the way of the dinosaur soon, and note any availability problems.

This is to be a long list of boards. Many individual research programmes into physical computing at universities around the world had the same need for a more-or-less easy interface kit at around the same time. The availability of chips with embedded controllers that were easy to programme encouraged a flood of solutions. The result is that there are perhaps too many possibilities.

There are several characteristics that can help us differentiate these boards; deciding first on your criteria can facilitate the evaluation process. You may wish to consider the following:

* The price of the unit. Not all artists are rich.

* Whether the project is open source or closed. This can be a philosophical issue but has practical importance to the life and vitality of the unit.

* The number of inputs and outputs, plus how many are digital or analog. This determines how extensive the connected sensor network can be. (And not just sensors -- do you wish to drive any actuators from the board? You will need outputs for those.)

* The output communication protocol and connector. The protocol may be OSC, MIDI or serial. Serial data can be carried on USB or RS-232 (colloquially called "serial") cables.

* The size of the device -- important for embedded applications.

* The type of connectors. Some manufacturers enjoy using proprietary plugs. These will require more work to wire, or greater expense as you find yourself locked into one vendor's solution.

* How much electronics is involved. Some kits require you to obtain parts and build from scratch, others give you the parts but require soldering, still other devices work out of the box with simple screw connectors. And some are completely turn-key, but likely require you to buy sensors with the correct connectors directly from the same vendor, limiting your choice and increasing costs.

* What control software is available and on which platforms it runs. Do you have to tweak the firmware? Is this easy to do? How much coding is required?

* The data rate or resolution of the device may be important in particular applications. I haven't explicitly listed these, but the Sensor Wiki table referenced above does.

* The quality of documentation and helpfulness of the developer community. This can be difficult to evaluate, but is especially important for kit projects.

In the next article you get to apply your criteria to 18 22 possible solutions. Ready... Get Set... Go!

I thank the Arts Council for their support in this research.
Wednesday, September 05, 2007

Types of Sensors

segnoThis is a second article in a series, following my introduction to the continuum of instruments, devices and sensors. Here I'll outline the scope and properties of readily obtainable sensors. I hope that the simplicity of this summary will serve to demystify what can be a very jargon-filled field. I also hope that you'll start thinking of innovative ways to use some of this environmental data for music.

To start with, sensors are available in two operational classes, analog or digital, depending on their output. When choosing a sensor one must consider:
* the physical property measured
* the response time (how long it takes from physical change to electrical signal)
* the response range (low to high values) for analog units
* the sensitivity, measured on a response curve (linear, logarithmic)
* whether it is continuous (provides data in a constant stream) or triggered (provides data only on an action)

I will now describe briefly some common types of sensor by physical property. All of these may be obtained in standard kit parts. There are hundreds of other more specialised sensors, as some of the references in the previous article illustrated.

Movement is easily sensed with a switch, such as your bog standard light switch. That's so commonplace as to seem most useless! When switches require minimal force to operate they may be called contacts. Simple switches have half of a circuit on either side; when the switch is thrown the circuit completes. Magnetic switches have the circuit on one side only, connected to an electromagnet. A simple magnet can then complete the circuit.

Photoelectric switches are momentarily detect when a beam of light is broken. Motion detectors are react to changes in infrared light and generally give continuous varying output. Piezoelectric switches are small contact disks that are handy for placing under carpets, etc.

Magnetic motion trackers are used in VR research to track all six degrees of freedom of movement about a person's body.

Position can be determined using infrared sensors. These send out an IR beam and measure how much comes back, and are good for up to 2 meters or so. Ultrasonic sensors do the same with a sound pulse, but can reach ranges of 10 meters.

Stretch sensors, which come in lengths up to about 40cm, change their resistance when longitudinally stretched. Flex or bend sensors do likewise when they deviate from a straight line. Together these are useful when making VR gloves and other responsive clothing.

Rotation or tilt is digitally measured with a mercury switch; these trigger at a certain orientation. An array of them can be used for a more accurate value determination. Continuous rotation potentiometers provide analog readings in cases where it is reasonable to fit a sensor to the axis of rotation. Tilt sensors that use more sophisticated methods are also known as inclinometers.

Electronic compasses determine orientation relative to magnetic North. Accelerometers measure acceleration and also provide knowledge of tilt relative to gravity. Gyroscopes may also be used to measure orientation.

Vibration can also be detected by piezoelectrics, since these are basically audio sensors with high sensitivity at low frequencies.

Light can be sensed using a photoresistor (AKA photocell, photodiode, or LDR). Similarly, one can use a phototransistor, which has greater sensitivity but has a slower response time. Different materials in a phototransistor will make it sensitive to different wavelengths of light. Solar cells come in two basic types: one has current output rated in microamps (indoor use), the other milliamps (outdoor use). Neither are responsive in the least, but can be used to measure cumulative light radiation.

Temperature is measured by a thermistor. These are responsive to different temperatures (commonly available at 25 and 100 degrees C) and have quite different response curves depending on the particular model.

Force sensors can be used to measure either static or dynamic forces, like human touch or the wind.

Humidity can be measured in air or soil by a hygrometer. One type works by comparing the temperature of a dry thermometer to one that is wet. Another (intriguingly) works by stretching a hair (sometimes human), and measuring its length at different humidities.

Radiation can be measured with so-called Geiger counters, which detect alpha, beta, and gamma radiation.

Toxic gas sensors are available in dozens of types, many very expensive.

And finally, let us not forget that sound can be measured by a little device we call a microphone. It too is an environmental sensor!

So where to buy these?

Electronics wholesalers are listed by Ezio. Others that specialise in sensors are SparkFun and Images Scientific Instruments.

Laetitia Sonami has a list of sensor suppliers. So too does the ITP course at NYU.

The commercial amalgamator sensorland gathers data from numerous suppliers with explanatory articles and tutorials. Cooler yet is the dedicated parts search engine, Octopart.

Since most of these references are for the USA, what do you do if you're in Europe? Well, the larger distributors are all used to shipping around the world. Some even have dedicated telephone numbers for contact from overseas. Still, if you prefer a store closer to home, here are some I've found, most of which should offer sensors: Conrad in Germany, Lawicel, Lextronic and Jelu in Sweden, Farnell and Radiospares in France.

In my next article I'll look at inexpensive micro-processor boards which collect the data from your sensors and forward the results to a computer or other device.

I thank the Arts Council for their support in this research.
Tuesday, September 04, 2007

Instrument / Device / Sensor: A Continuum

segnoWhen one thinks of traditional music, the first image that comes to mind would be that of a person playing an instrument. In this case the music is produced by a number of physical means (fingers flexing, mouth blowing, arm moving, foot tapping) directly coupled to a tool (string on fretboard, reed in mouthpiece, bow on string, pedal on kick-drum). When one thinks of electronic music, the image that comes to mind is often of a person sitting behind a laptop. In this case the tool coupling the performer to the music production is a computer keyboard.

But there are other possibilities for creative technically-inclined musicians. This article ruminates on such as an extended introduction to my look at environmental sensors. Along the way I will footnote the best of the many online references on this topic.

First I should make it clear that the spectrum of "instrument" to "device" to "sensor" is a continuum. This is most clearly seen from the axis of adoption and tradition. Instruments are highly standardised in construction and use. The playing of an instrument is strongly shaped by history and cultural context. And of course (most) instruments are not bound to electrical representations of their output. Though they are highly technical, they are grounded in a context that hides the fact they are machines1.

A device, on the other hand, is perceived in terms of an explicit technological decision.

Think of the various input devices available for computer music production. These start with common accessories like mice, touchpads, joysticks and game controllers, then range to esoteric goodies like eye trackers, touch screens, VR gloves and speech recognition2. An entire gamut of specialised MIDI controllers also exist, everything from fader boxes to tape transport controls to knob arrays3.

These are generally too new to be integrated into a widespread cultural or historical perspective. Often they are quite experimental and take a while to gain adoption (for example, the data glove). But sometimes an otherwise novel input device quickly gains popular acceptance, generally through massive publicity. A current example is the Wiimote, born as a game controller via VR research, it has now been converted for use in music creation and control4.

Yet even "devices" may be considered restrictive, since they generally provide a familiar analog interface to a digital world. Also, they are mass produced and so might not fit with an individualistic performer's modus operandi.

But as the references show, there are a myriad ways of using input transducers to convert between the physical world and electrical signals5. Each type of transducer is tuned to sense a particular change in the environment; thus they are also sensors.

Contemporary experimental musicians are using an ever-increasing variety of transducers to create sound. It is not only that they have more choice than with off-the-shelf devices, and not only that they can customise a solution to the artistic or performative problem at hand. Beyond this, the mere fact of building a singular instrument attunes one to its characteristics, in a way similar to how a traditional musician might achieve synergy with a particular instrument after years of use.

In my next article I will give a handy overview of sensors, with references to sources. Then, I will look at micro-controllers that allow you to kit together your own novel instrumental interfaces.

Notes
1 The Durutti Column has an album entitled The Guitar And Other Machines that I find illuminating on this point.

2 Brooke Clarke has an insane list of sensors, some quite esoteric.

3 Bill Buxton's "Directory Of Sources For Input Technologies" covers these thoroughly..

4 A Wiimote library is available for SuperCollider. Wiimote DJing has been accomplished with Traktor. And so on.

5 Transducers also convert the other way around, between electrical signals and physical effects. In the realm of sound, a loudspeaker is the canonical example.

I thank the Arts Council for their support in this research.

Tuesday, September 04, 2007

ChucK Language Features And Limitations

segno
In this second look at ChucK I focus on the language features that makes this system unique and outrageously cool for realtime music production. I also run through the major limitations.

Working with the ChucK language might take some adjustments, depending on what you are used to. It has control structures, strict typing, associative and multi-dimensional arrays, most of which will look familiar enough to any programmer. But a couple of things are strange. To start off with, operators are left-associative. Second, a lot is done with the ChucK operator, including connecting audio components (called Unit Generators or ugens). In this case the operator acts like a patch cable. For example:

Impulse imp => JCRev rev => dac;

This connects an impulse generator to a reverberation unit and then out to the DAC, which abstracts a sound card output. Neat, huh?

The same operator is used for simple assignment. For example, to change some properties:

.95 => rev.gain;
.2 => rev.mix;


This gives us a 20% reverb mix and reduces the gain to 95%.

This operator can also be used to call functions. One might think to use an assignment to capture the result of a function, and this in fact works:

addthese(3, 6) => int result;

But so does the more peculiar:

(3, 6) => addthese => int result;

(And oh yes, semi-colons go at the end of every line and braces must be used to match up indent levels. I hate this after living in the simpler, cleaner Python world. Oh well.)

The coolest thing about ChucK is how it manages concurrency. Each patch (or function) may be run in its own process (called a "shred"). The process of starting one of these is called "sporking". (Did these guys watch too much Mork and Mindy as kids?) Each process refers to local time to make events happen. Then -- and this is the miracle -- all running processes are automatically synchronised at the sample level!

The canonical example is the command chuck foo.ck bar.ck which runs the two shreds "foo" and "bar" concurrently. Need to record the output from these? Simply add in the shred "rec" like so: chuck foo.ck bar.ck rec.ck. Remarkably, the file "rec" is about 10 lines of code that does not refer to the other shreds at all.

The other major innovation is that ChucK is a strongly-timed language. Two native types, "time" and "dur" -- duration are available in convenient units and may be operated upon in a natural fashion. So for example, n should be 50 after this statement:

1::second / 20::ms => float n;

The real magic is due to the explicit handling of the current time using the "now" keyword. The following snippet advances time by one second. The current shred is suspended, audio is generated, and any other shreds keep computing.

1::second => now;

ChucK supports events; keyboard, mouse and joystick support; plus MIDI and OSC communications. It comes with some useful built-in libraries and ugens such as Impulse, Step, Noise, filters (one-pole, two-pole, low-pass, high-pass, band-pass, band-reject, resonance and custom), oscillators (sine, ramp, pulse, square, triangle, saw), panner, mixdown, envelopes, effects (delay, three implementations of rev, chorus, modulation) and loads of instrument simulations (everything from sitar to percussion). It can read and write audio files, and a sparsely documented new LiSa feature supports live sample manipulation for granular synthesis and looping effects.

This leaves very little outside Chuck's scope, though there are definitive limitations in the current implementation.

1. There is no serial I/O functionality, meaning that ChucK cannot be used to talk to boards such as the Arduino.

2. There is no file I/O for reading/writing settings and other data. This also means that custom log files and the like are not possible.

3. Namespace support is limited, so it is not easy to organise code into libraries for reuse. Each file can have only one public class. Files do not have explicit namespaces, though one is created if a file is sporked as a shred. But this is not addressable, it merely keeps private data in each process from colliding.

4. Multiple sound card outputs (eg: more than 2) are supposed to be addressable, but I have not got this to work. ChucK needs a command-line argument to enable this. My problem 'twas but a small syntax error in this argument.

5. Sound file writing is limited to mono files, so in order to get stereo two files have to be written and later combined outside ChucK. See this example.

6. The language contains (almost) no string manipulation functions. In fact strings are barely mentioned in the manual.

7. Garbage collection is not implemented. This means that sporking files eats memory. The workaround is to re-use esisting processes, but this is obviously more work than would be nice.

8. The built-in ugen class cannot be subclassed, so there is no way to inherit behaviour for one's own generators. It is possible to rewrite some of this is a class of one's own devising, but that's redundant. I posted an example of this here.

9. The architecture is not as powerful as the client-server paradigm used in SuperCollider.

I look forward to future versions which remove these limitations, starting with number 1. In the meantime ChucK is fun to fool around with.

I thank the Arts Council for their support in this research.
Sunday, September 02, 2007

Series On Music Control Languages

segnoI have multiple websites that sometimes overlap in their concerns. For example, currently I'm writing a series on specialised music control languages over on my blog diagrammes modernes. I put the series there since it deals with programming, but anyone who reads the Theatre Of Noise out of interest in audio and music will definitely want to have a look.


The series has four articles at present.

More are on the way! In particular I need to write up the research I did on environmental sensors.

All of these are marked with the Segno image you see here, since I hope you will return to them time and time again. Ouch!

The texture of the musical sign I took from a photo of a rock surface down Waterford way.
Sunday, September 02, 2007

Getting Started With ChucK

segno
In my last music technology article I concluded that there were no suitable Python tools for real-time composition and audio processing. In a previous look at specialised music control languages I discovered that some of these offer novel paradigms that might be particularly useful for realtime composition.

As a result, I decided to investigate ChucK. Back in spring 2007, when I initially did this research (sorry to be so tardy writing about it all!) I decided it was yet too immature to warrant deep study. But improvements have been steady, and as of 30 August were dramatically improved with the ASIO patch to version 1.2.1.0.

After downloading this tweaked ChucK executable I tried it with a simple example patch file from the electro-music forum. Wham! Sound! It worked, first time. Amazing OOBE*. Then I tried tweaking it and all sorts of things happened, most of them nice.

I read through some of the list archives and started wondering where all the example files were. Going to the download page I saw that there were two Windows options: "standard command line executable" or miniAudicle , the "experimental integrated editor/VM". So I grabbed these to see what was in them. Both include the docs and examples, not only the components mentioned. Not so clear from the labeling, but maybe obvious in hindsight.

Trying the horrifically named miniAudicle I had a few issues, none of them major. First, it took an awful long time to load. I had thought maybe it was completely broken. Some sort of "loading..." message would reassure.

Next, it detected my RME Fireface drivers but once I changed to these using the preferences dialogue I needed to restart the app. Reasonable perhaps, but annoying considering the aforementioned load time.

Playing back one of the examples I had used before, everything sounded wrong. I determined this was because the sampling rate was very high (192 KHz). I am still not sure why this would have screwed up the sounds, as they were Shakers. Perhaps these are based on samples?

Anyway, setting the rate to 32KHz made things better, but I wonder why these are the only two choices when most audio apps permit standard 44.1KHz, 48KHz etc. Maybe something to do with choosing only the base rates from the sound card.

Editing was nice in the coloured syntax window, especially once I'd set tabs and the font to my liking. I am glad there's a Recent Files list. However, implementing file drag'n'drop from Explorer to the IDE would be a big usability bonus.

The extended keyboard keys do not seem to be supported. This is particularly annoying for my use, since I have a mini keyboard that makes it difficult to use the default Del key (for example).

I started thinking about using miniAudicle in performance. Live coding is one of ChucK's strengths.

The interface lets you start up a virtual ChucK machine and then add files to it individually as Shreds. This is very handy but some sort of global controls for mixing are necessary. Otherwise, the only way to stop a shred (take it out of the mix) is to kill it, which happens abruptly and not always too nicely (in sonic terms). Perhaps the implicit mixer before the DAC could be exposed, along with level and mutes on each channel/shred.

A solution to this might very well be forthcoming on the ChucK mailing list, which has some active and helpful participants.

A further usability issue was revealed when I tried to use a patch from the examples folder that required sound files. These were referred to by relative pathing, but this only works if the script is run in its own folder. It appears there is no way to programmatically specify the root folder. So how does one integrate patches like this into a miniAudicle session? Apparently this is a known issue. And a pretty big one that needs an immediate fix, IMO.

A simple solution would be if a list of paths could be specified in the preferences. The IDE could search these first looking for sound files.

Other deficiencies are evident from the documentation, which is straightforward, honest and comical. Garbage collection is not implemented, so long-running pieces with lots of spawned processes might run out of memory. Some of the sound generators are not yet documented.

But overall I think ChucK is mature enough for anyone interested in experimenting with concurrent audio programming to give it a whirl.

In a follow-on article I'll look at the programming constructs and highlight what makes ChucK so unique.

*Out Of Box Experience

I thank the Arts Council for their support in this research.