Sunday, November 30, 2008

Java without the Caffeine

I'm writing this sitting by a river in darkest Essex, mid-way through a winter's afternoon. The river is running slow, brown and deep; further down it has overflowed the banks and submerged the footpath.

To my right the water runs through a weir, adding a pleasant background chatter to the silence otherwise only broken by the odd crow and a group of Explorer scouts mucking about in kayaks further upstream. On the opposite bank a lone fisherman freezes over his rod - he doesn't appear to be having a very successful afternoon.



It's about five degrees above freezing and I've been sitting here on a bench for nearly two hours writing some Java to traverse and manipulate an XML DOM tree. There's no Wi-fi or cellular connectivity here, no e-mail, IM or Twitter - the only tweets are coming from a blackbird in the hedge behind me and a Jay in a tree across the way.

Fingers and toes are beginning to feel a bit cold now, but it feels good to coding productively without the constant need for caffeine!

Monday, November 24, 2008

How to Migrate to Thunderbird Portable

I've been keeping my life on Flash storage since around 2004. I started off using an old SD card in a cheap USB reader as a lightweight method of carrying my daybook and notes between work and home. Over the years 600 web pages of technical notes, my personal journal, plans and action lists migrated to a series of ever larger replacement thumb drives. Today nearly everything I work on lives on a single 8 GByte Sandisk drive.

As the drives have got larger I've slowly migrated to a portable software environment running off the same thumb drive, so that whether at a work PC, with a notebook on the train, or one of the bigger laptops at home I have consistent access to applications and data. Most of the thirty applications I regularly use come from PortableApps.com with a smattering of others configured with the help of PortableFreeware.com.

PortableApps.com recently released a new version of Thunderbird Portable and given my son's assertion that playing The Sims is rather more mission critical than my e-mail it seemed clear that now was a good time to move that last application off of the family laptop and onto the thumb drive. However with an archive of more that 16,000 e-mails I was somewhat concerned at how straightforward that would be.

Like all downloads from PortableApps.com installing Thunderbird Portable 2.0.0.18 was easy, just double click, point it at the correct drive and stand well back. Once installed, I started Thunderbird from the PortableApps menu (well the geek.menu fork, truth be told) and went through its initial set up, supplying dummy data when prompted. Delving around on the thumb drive then revealed that Thunderbird had created a folder of profile information at:

E:\PortableApps\Thunderbird Portable\Data\profile\

This folder is easily identified as it contains 'Mail' and 'extensions' sub-folders and a variety of ini, dat, rdf, js and db files.

Going back to my original Thunderbird installation the profile data was in the default:

C:\Documents and Settings\frog\Application Data\Thunderbird\Profiles\xxxxxxxx.default

folder (where xxxxxxxx is a random string of characters that, no doubt, hashes my password, inside leg measurement and all my credit card numbers.) Deleting the contents of the profile folder on the thumb drive, I copied the contents of the old

C:\Documents and Settings\frog\Application Data\Thunderbird\Profiles\xxxxxxxx.default

into the now empty

E:\PortableApps\Thunderbird Portable\Data\profile\

ignoring the fact that the two pathnames are structured rather differently.

Starting Thunderbird Portable appeared to work correctly, with all the old messages and folders appearing. However the status line seemed to indicate it was struggling to open a particular message. Exiting Thunderbird, which probably caused it to rewrite its config data, and restarting it solved the problem.

In total it took about ten minutes to move 16,000 archived messages, folder structures, and account settings to the thumb drive. Despite the difference in folder path structure it worked first time and I was impressed by how smoothly Thunderbird handled the change in profile.

Wednesday, November 5, 2008

Initial impressions of the Korg DS-10 for the Nintendo DS

The Korg MS-10 was an entry-level monophonic synthesizer from the 70's. It had a 32-note keyboard and a control wheel driving a single VCO, VCF and VCA.

Perhaps a little background may help here. The keyboard and control wheel each generated a voltage that could be fed as input to the various modules. The Voltage Controlled Oscillator (VCO) generated a number of different waveforms with a frequency dependent on the input voltage. So given the voltage from a particular key on the keyboard it would generate the relevant frequency.

The Voltage Controlled Filter (VCF) worked in a similar way. The voltage, from the Control Wheel for example, would effect the frequencies passed by the filter.

The Voltage Controlled Amplifier (VCA) could vary the amplitude of its input signal depending on a control voltage.

Finally the Envelope Generator shaped the amplitude of a note through time. Imagine hitting a piano key. The amplitude of the note increases from zero to its peak very quickly as the string is struck. It then drops down to a level at which the note is sustained before finally decaying back to silence. The Envelope Generator is responsible for generating a control signal that models such an envelope. This can be fed into the VCA to simulate the sound of a conventional instrument.

Now the thing that really fascinates me about analogue synthesizers is that all the parameters of these modules are fully adjustable (there are lots of knobs to twiddle). The various modules can also be connected together in different ways via a patch panel. For example feeding the output of one VCO into the input of another will generate vibrato effects.

That was 1978. Fast forward to thirty years later and the introduction of the Korg DS-10 on the Nintendo DS. This is not a 100% perfect emulation of the Korg MS-10. But in many ways it is so much more. It emulates two mono synthesizers loosely based on the MS-10. In addition each has a 16-step sequencer, roughly equivalent to a Korg SQ-10. Finally there is a four pad drum machine with its own sequencer, a six channel mixer and an FX unit (delay, flanger and chorus).

Each synthesizer has a 24-note keyboard and a Kaoss Pad. This is a X-Y touch pad where the coordinates of a finger touching the pad generate an X and a Y voltage that can be mapped to parameters such as note, volume, pan etc. Sweeping a finger tip in patterns around the pad can produce control signals simply not possible from the keyboard.

So how well does the Korg DS-10 work in practice? Is is a toy or a serious musical instrument? Initial impressions are very favourable. Emulating two MS-10's gives the possibility of richer, deeper sounds and for stereo effects. Add in the drum machine and reasonably complex compositions can be attempted. Incidentally the original MS-10 manual recommends combining two synthesizers for a richer sound.

Sound quality seems pretty good, though limitations of the DS hardware means that bass notes are perhaps not as good as they could be. With very complicated patches and absolutely everything running there were occasional hints that the processor was struggling to keep up. But this would not be a problem in normal usage.

What is a slight problem in normal usage is the size of the font used for the menus. The graphics are gorgeous but with my 48 year old eyes the menu text is quite hard to read in places.

Creating a song from a series of sequencer patterns is not particular intuitive for someone not used to sequencer programming. Here, the manual could have done with more examples and tutorials, including a walkthrough of a typical workflow. However once you have a mental model of how a song is built up the system is powerful, flexible and easy to edit.

In summary this is a fantastic software package. However it has a steep ramp-up and is one Nintendo DS program where it really pays to read the manual in detail. You'll need to do a lot of experimenting to get something really musical out of the DS-10, but the end result can be absolutely fantastic.

Monday, November 3, 2008

Korg DS-10 Synthesizer

Stumbling on the Korg DS-10 emulator for the Nintendo DS on Amazon sent me spiraling back to the early seventies. As a thirteen-year old brought up on late 60's synth-pop I was fascinated by the thirteen part series in Practical Electronics magazine to build your own analogue Sound Synthesizer.

The series began in the February 1973 issue and each month a new module was added; voltage controlled oscillators, ring modulators, noise generators etc. I remember pouring over the circuit diagrams and dreaming of vast arrays of pots to twiddle and spaghetti like patch leads. Unfortunately my schoolboy pocket money didn't stretch to that many 741 op amps and by the time a DIY keyboard and one VCO had been built I was out of funds. Another youthful dream horribly dashed on the rocks of reality.

Sound on Sound have an interesting article on DIY synthesizer projects that describes the PE Sound Synthesizer and its descendents. One phrase, describing the original article's audience:
"aimed at the anal-retentive schoolboy with no interest in girls or sports. The schoolboy would have had to have some kind of qualification in either physics or maths to complete such a task, and few did!"

gave my wife much amusement for some reason.

And now there's an emulator for the classic Korg MS-10 running on the Nintendo handheld. According to the spec sheet it is not an 100% emulation and adds enhancements such as a sequencer. It's unlikely that the DS will get close to reproducing the famous MS-10 fat bass sounds but in a few days time I'll be able to live my boyhood dreams and find out.