More coding, more gigs

Andrew Booker 2008-07-08 17:02:25

A month or so ago I finally entered the 1990s and began recording my own samples for my sampling drum unit (Roland SPD-S). Getting the sounds connected to the pads involved exactly as much tedious button-pushing admin as I was expecting, but it made a big difference to the range of sounds I had available at the gigs.

Since then I haven't added any more. This may seem a pathetic thing for a technologically creative musician to say, but... I can't think of other sounds to add. Remember I do not want an ever-increasing cache of realistic drum sounds. Unlike my taste in visuals, which I always want to base on real rather than computer-generated images, and unlike Roland, the manufacturer of all my electronic drum gear, I like my percussion sounds to be unidentifiable. I reckoned I should be able to come up with my own by writing some software to generate them.

I haven't got very far with this yet, but I have started with some C++ code to generate some one-second WAV files. It took me a couple of leisurely hours piecing together the three or four header/data chunks to build an empty readable 16 bit 44.1KHz WAV file. Despite WAV being a native Windows file format, Microsoft don't give you much C++ library support with them, unlike their visual counterparts (bitmaps and AVIs). In fact I have had a bit of experience with WAVs before, but not creating them.

My first audible WAV was a 500Hz squarewave. Yuck, but not nearly yuck enough. I've now descended to building nastier waveforms using a simple additive method of superimposing several squarewaves of different amplitude and frequency. I can also modulate the envelope of the sample by multiplying with linear ramps. I'm using random number generators to control the variables, and repeating over 18 iterations. This is because the SPD-S has 9 pads (not including the two external), each of which can select between two samples to trigger using velocity sensitivity.

I must confess making sounds in this way is all very... easy. Months, nay years of my previous life were sacrificed in the name of doing this with analogue electronics. The trouble with using op-amps and circuits is that if you want to sum the output of two oscillators, you have to go ahead and make two oscillators. Adding the signals is easy. God help you if you want to multiply them, it is horror difficult. But in code, if you want two signals, just call the function twice. Want to multiply? Use the multiply operator (*). Same as algebra.

So far I've been creating additive waves whose components are of fixed frequency over the one-second sample duration. One I idea I'll try next is to modulate those frequencies over the sample duration. This will be a bit more fiddly to code. But then there is plenty of red wine in my house. I have until the next gigs to experiment with generating new waveforms and audition them in Audacity, all of which is great fun, but eventually I have to get them into the SPD-S. There are about ten button pushes between loading a sample on the CompactFlash card and triggering from a pad. I noticed in the SPD-S manual that it appears to be possible to back up a patch onto the card. If it is, and it's a really good wine, I might look into reverse engineering the patch file format. That way, I can prepare new patches myself on the laptop. One SPD-S instruction to copy the new samples into RAM, another to load the new patches, and it's all done. That would be nice, but probably impossible.

I mentioned the next gig back there. In fact there are two, both at The Plough, on consecutive Wednesdays. This means I only need to put up one poster, the first draft of which I'm showing you here. Pictured are the four Plough regulars, who may or may not be the people doing these gigs. I just like to put them on the posters anyway, in case they are, and because nobody who looks at a poster in advance really does rip it off the wall on the night and hold it up against the players to check we're all who we're supposed to be. Exactly who is playing, I'll know nearer the time. Like, on the night. However, I do know that for the 30 July 08 we'll be welcoming Chris Cook, aka Same Actor on sitar and electronics. I've never played music with a sitar player before, his MySpace page sounds fun, and he lives in nearby Chingford. Any of those three reasons would be enough.

After the success of the visuals at the last gig, and having tried out my phone as the playback apparatus at the last Aimless Mules gigs, I'll be switching it offline and using it again to play through three hours of visuals that I continue to amass by dint of wandering around with a half-decent video-camera-phone in my pocket. Also I did a few more time-lapse shoots several weeks ago using my camcorder. I am now thoroughly sick of standing on the footbridge over the North Circular watching sunsets, no matter how pretty they look. I never had the guts to leave the camera alone on the bridge, lest one of the six whole separate individual people that crossed it during the 1.5hr shoot felt inclined to walk off with it. I should really be doing time-lapse by leaving my laptop and a webcam somewhere. The main issue there was powering it, and I've being doing some experiments with solar power for that, to tell you about next time.

Recent June 08 gigs: Rick Walker and Aimless Mules << | >> How to power a laptop with a solar panel