Index ¦ Archives ¦ Atom

The Closure Problem in Python

I’ve seen several posts now with people complaining about the following python code:

>>> funcs = []
>>> for i in range(11):
        def func(x):
            return x + i
        funcs.append(func)

>>> funcs[1](5)
15

Most people first looking at the code would expect the value of funcs[1](5) to be ...


Haskell Spectrograms 2: Array Slicing and Dicing’

Spectrogram of a short string loop

So we have a vector

Given a vector of audio, the first step in making a spectrogram is to slice up the audio into frames. This slicing process is defined by the frame size and the hop. The frame size is the number of samples in each frame, the hop ...


Haskell Spectrograms 1: Loading a Sound File’

Spectrogram of a short string loop

Intro

So I took it up as a challenge to generate a spectrogram in Haskell. How hard could it be? Turns out that what’s a few lines of python code using numpy and matplotlib took me down quite a rabbit hole.

For the impatient, you can find the finished ...


libmanta released!

Snyderphonics Manta

(photo nabbed from MusicRadar)

After more than a year(sporadically), several re-writes, and much learning about USB, cross-platform threading, concurrency, OSX device driver loading, and many more, the libmanta library and the included PD and Max/MSP objects are finally ready for release.

Get The Source Read The Documentation

libmanta ...


gendy~ PD + Max/MSP object and libgendy 0.6.0 released!

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 ...


LTSpice Tutorial #1 - Basic Schematic Capture and Simulation

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 ...


A cute python scheduler

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 ...


Back from Tour!

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 ...


Volume management without Nautilus

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 ...


My first openembedded image

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 ...


Installing PDa to the beagle board

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 ...


the arrival of the beagle board

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 ...


official launch!

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 ...


recent/upcoming performances

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 ...


it is finished(sort of)

I finished the hardware portion of my sensor array right before I left for a tour and recording session with Capillary Action, but didn’t get a chance to post pictures, so here they are, only a month late. In the coming weeks I’ll be working on refining the ...


paper pattern

I successfully printed out my pattern onto a bunch of 8.5x11 sheets of paper, taped them together and cut them out. I taped the patterns onto my bass to make sure that it all fits the way my model said it should, and so far so good. This also ...


bib design

I’ve been playing around in Blender and QCad to figure out how I want to mount the sensors onto my bass, and I’ve come up with a design for a cloth covering that will house the sensors in pockets on the bass. Much thanks to Chromo for reminding ...


video with 5 sensors

So now that I’m mostly done with the physical design part of this project, I thought it would be a good time to whip up another video demo to show it in action. I’m using a couple of custom abstractions that I’ve made make the sensor data ...


5 boxes done

I built 5 more sensor circuits and boxed them all up in these snazzy black boxes you can see in the picture. They even match my ThinkPad! I’ve been working on PD patches to explore different ways to map the sensor streams onto parameters. On Douglas Repetto’s suggestion ...


enclosed

Nearing some sort of finality in this design, I’ve put the circuit in a box. I also put my arduino board in a box, which involved de-soldering the power connector and the header sockets, as well as cutting off the corners with a bandsaw, so I would probably advise ...


new pcbs!

I received my 10 PCBs from Advanced Circuits today. They’re a big step up from the ones I’ve been making on the CNC machine, mostly because I don’t have to worry about solder bridges. The completed circuit you see in the picture worked the first time after ...


new audio demo

I put together something a bit more sonically interesting than the video that I posted earlier. I recorded myself improvising on double bass, and then processed the recording with a puredata patch that I wrote to use the 3 sensors that I have built so far. It’s pretty bass-heavy ...


New video up

Here’s a quick video I made of me waving my hands around the MouseTrap sensors, and sending the data through an arduino board into my laptop running puredata. The video footage was pretty out of sync with the audio, which is why there’s more screen capture than video ...


3 sensors built

I’ve got 3 of the MouseTrap distance sensors built, and I have just a little bit more tweaking before the the design will be ready. The blue board that you see the sensors connected to is an Arduino, which converts the analog signals to digital numbers and sends them ...


rev3 board milled and stuffed

Today I milled out Revision 3 of my MouseTrap board, after realizing some mistakes in Rev. 2. After stuffing the board I’m happy to announce that it seems to be working great! I had to change some component values because the PCB acts differently than the breadboard, but performance ...

© Spencer Russell. Built using Pelican. Theme by Giulio Fidente on github. .