I’ve been working off and on for a bit on a C++ library to implement a variant of Dynamic Stochastic Synthesis, a technique developed by Iannis Xenakis. (For a great history and more details check out Sergio Luque’s thesis.

The library is still pretty rough around the edges and more or less completely undocumented, but the PD object that uses it should be pretty functional. Included with the code is a helpfile (gendy~-help.pd), as well as a gui (gendy-gui.pd) that should make it pretty easy to jump right in.

The basic idea of DSS is to describe a waveform with a set of “breakpoints” and interpolate between them to generate the actual audio signal. The set of breakpoints forms a single cycle of a waveform, and each time one cycle gets played, the breakpoints each move for the next cycle. So each breakpoint ends up on a two-dimensional random walk.

One improvement I’ve made to some traditional DSS implementations is the use of cubic spline interpolation instead of linear, which improves the aliasing considerably. It’s not a truly bandlimited signal, but is differentiable.

The other modification is the introduction of selectable center waveforms that the breakpoints will gravitate towards. Right now I only have flat, square, and sine implemented, but I’m planning on including basic triangle and sawtooth as well. The “h_pull” and “v_pull” controls effect how much the breakpoints are pulled towards the center waveform.

The external requires Thomas Grill’s Flext library. Once you have it installed simply run

FLEXTDIR/build.sh pd gcc

From the base gendy directory (Where FLEXTDIR is the location of your flext install) and you should have a shiny new binary in the pd-linux directory. The arguments to build.sh will vary depending on your system.

Downloads:
Source Tarball
x86_64 PD Binary

a voltage divider in LTSpice

This is the first in a series of tutorials intended to introduce LTSpice to the uninitiated. LTSpice has some rather unusual interface conventions that take some getting used to, but it’s an incredibly powerful tool that’s available for free!

The first step is to download it from Linear Technology’s website.

Unfortunately it’s a windows-only application, but the main developer, Mike Engelhardt has gone out of his way to make it work well under WINE, so Linux users aren’t left out of the fun.

In these tutorials I’m going to spend more time talking about using LTspice specifically rather than about the electronics themselves, so I will sometimes assume a certain level of circuit design knowledge.

I should also note that I wrote the bulk of these tutorials about 3 years ago, and am now in the process of migrating them over to this site and improving them. You can see the originals here until the material is fully migrated.
Read more »

The Python Logo

I spent a couple of hours on Sunday whipping up this little scheduler in python.

It was mostly to have something fun to do in Python, and doesn’t do much that’s useful, but it does demonstrate some general process scheduling concepts.

It provides base classes for “Processes” and “Events”. Subclass a process to do something when it’s “run()” function is called. A process can also tell the scheduler that it wants to wait on an an “Event”. Any event that has a process waiting on it gets its “occured()” function polled, which returns true when the event has occurred, and the process that was waiting on it wakes up(it’s run() function starts being called again).

I’ve got some examples of a timer event that goes off after a time interval. There’s also a filewatcher event that goes off when a given file is created.

This is meant to simulate a scheduler that would run at the root of an OS, so it loops through as fast as it can and will take up %100 CPU while it’s running.

git clone http://git.airwav.es/pysched.git pysched

or

Download the tarball

Just a quick announcement that Capillary Action has finally returned from our ridiculous 4-month US-UK-Europe-US tour (except for 5 more east coast dates in another week and a half).

It was long and amazing and draining and eye-opening, and now I’m glad to be home.

My next project is to stop starting new projects and work on documenting the work I’ve already done, so check in soon for updated/better info!

So I’ve been playing around with WMII for a while now, soaking in the glory of tiling window managers. One thing that’s a bit inconvienient is easy automounting. I don’t want to have to manually create a directory in /media and mount each and every teeny-tiny usb drive I might plug into my system.

Turns out that recently the Ubuntu/Gnome folks have decided that Nautilus will be handling the automounting of drives and such instead of the gnome-volume-manager. This is all well and good if you’re using nautilus, but for console-junkies it’s not so helpful.

The gnome-volume-manager package in the repo is compiled with the “–disable-automount” configure option, so to enable it we have to recompile:

First make sure you have all the required libraries to build:

sudo aptitude build-dep gnome-volume-manager

Then download the source:

apt-get source gnome-volume-manager

configure:

cd gnome-volume-manager-2.24.0
./configure --enable-automount --disable-dependency-tracking

build and install:

make
sudo make install

Then just add to your startup script and you should be up and running.

Don’t forget to use gnome-volume-properties to configure the volume manager to actually automount.

After installing openembedded from these directions, I’ve successfully compiled the helloworld-image target and have it running on my beagleboard! After running bitbake helloworld-image and bitbake virtual/kernel and finding something else to do for a few hours while everything compiled, I had a usable rootfs and kernel image. I already had my SD card partitioned, so I just erased the old Ångstrom image and copied the new stuff over.

To install the image to the SD card (Where BUILDDIR is the directory form which you ran bitbake, MMC_BOOT is the boot partition on your MMC card, and MMC_ROOT is the root partition:

  1. Go to BUILDDIR/tmp/deploy/glibc/images/beagleboard
  2. cp MLO-beagleboard /media/MMC_BOOT/MLO
  3. cp u-boot-beagleboard.bin /media/MMC_BOOT/u-boot.bin
  4. cp uImage-beagleboard.bin /media/MMC_BOOT/uImage
  5. cd /media/MMC_ROOT
  6. sudo tar -xvf BUILDDIR/tmp/deploy/glibc/images/beagleboard/helloworld-image-beagleboard.tar

Boot time is about 8 seconds from when it starts to unpack the kernel to executing userspace code.

Well, today I got Günter Geiger’s PDa version of Pure Data compiled on the Beagle Board. I haven’t gotten HDMI output to work properly to my TV so I’m relying on X-forwarding for the GUI, which is pretty painfully slow at the moment, but I did get some sound out. Here are the steps I took:

  1. Install libtk-dev and libtcl-dev packages using opkg. I had to use the -force-depends option because opkg complained about some missing dependencies. Hope it doesn’t come back to bite me later.
  2. Install the compiler packages gcc and gcc-symlinks
  3. Download the source code from here.
  4. Unpack the source into a directory of your choosing
  5. Edit the makefile in the src subdirectory and change libtk8.4.a to libtk8.4.so and libtcl8.4.a to libtcl8.4.so
  6. type “make”
  7. You should now have a pd executable in the bin subdirectory.


I have just received a beagleboard, flyswatter JTAG, 4GB SD card, USB ethernet adapter, and USB hub. Everything I should need to get started with embedded development.

I created the proper filesystem setup on the SD card as per these instructions, and installed koen’s demo image for the Ångstrom embedded linux distribution.

After hooking up the Flyswatter to the serial connector through the Flyswatter/Beagleboard adapter I got a boot prompt. My TV is complaining that it doesn’t recognize the input format, so I’m probably going to have to figure out a custom modeline in the xorg.conf, but I can live with a command prompt for now.

For those unfamiliar, the Beagle Board is a platform for embedded development based on Texas Instruments’ OMAP3530 System-on-chip board. Basically it’s a computer three inches square. It has handy input and output connectors for easy experimentation. Stay tuned for updates.

As of 4:00pm today my old Columbia site has been decommissioned and redirected to this one. The site is dead, long live the site.

Stay tuned for more frequent posting, now that I’m getting a couple projects off the ground and I’m pretty much done futzing around with the site layout/architecture.

So it’s been a while since I’ve posted any info here. Since a recent re-wire of the sensorBib to switch all solid-core wiring with stranded(a mistake I will not make again), I’ve been working on putting music together to perform on my new sensor-augmented upright bass. My premier performance in Columbia University’s Dodge Hall was a smashing success. I was also able to do an in-class demonstration for George Lewis’s course “Jazz in the Global Imagination” that included a short group improvisation alongside George, with Mario Diaz de Leon and Steve Lehman. A video of the event will be posted soon to Columbia’s new jazz website, Jazz Studies Online.

On Thursday March 27th I’ll be performing alongside New York jazz drumming psychopath Kevin Shea, with a possible third member as yet undetermined. We’ll be performing as part of the Columbia Computer Music Center’s “CMC Fün Nite,” a monthly concert series to perform new electronic music. If you’re in New York City you should come on up to Prentis Hall at 632 W. 125th St.