DiY/Noize #2

One thing that is probably obvious is that the ATTINY is not really up to the task of synthesising waveforms at the required rate (ideally, I’d like to run a sample rate of over 40kHz so that something approaching full-frequency audio can be generated), so wavetable-synthesis is required. This is a pretty straightforward way of generating arbitrary waveforms, but requires them to be calculated in advance. The ATTINY85 has 8k of flash memory, so that puts a limit on the size of wavetable – further still if we want to output other waveshapes.

All of the experiments I’ve done so far have two main sources for the Arduino code:

  • The main program (usually named after the project itself) containing code to perform setup and processing
  • A generated part (often called calc.ino) containing the precalculated wavetables etc.

I have used Ruby to create the generated part (it’s preinstalled on my macbook, and I use it at work so I know a bit about it). Actually, two files are generated: the source file and a header file (so that the main program has some idea about what’s in the generated part).

Experiment 1 (basiccode here) was intended to get the fundamentals in place:

  • Configuring the Pulse-Width Modulation (PWM) output to the highest rate
  • Sample-rate interrupt routine for outputting audio data (as PWM)
  • Configuring Analogue-to-Digital Converters (ADCs)

(Something I have learned from my day-job, is that straight-line code is to be preferred over conditional code; that way the code is less prone to jitter. Especially in the output of audio, this stuff is audible and can give rise to nasty audio artefacts. Because of this, I concentrated on making the code (especially the audio-output stuff) as streamlined as possible, but this is something which is a process of continual improvement — it ain’t perfect yet!)

The first idea was to try and perform all processing inside the audio-output Interrupt Service Routine (ISR), which is what this does. Two oscillator output seemed like a reasonable goal (sine wave only). Using a control block to hold information about the current state of each oscillator meant that the timer ISR runs at twice the speed of the required sample rate, but flips between oscillators. The ISR reads the oscillator’s ADC channel, updates the phase pointer of the wavetable oscillator, outputs the sample and flips to the other oscillator.

Although this looked like it was working, I later discovered (around the third experiment – coming soon!) that I had misconfigured the PWM (it wasn’t running at the correct speed), and that the ADC was fundamentally not fast enough (the code actually stops the conversion short, so I wasn’t getting the full 10-bit resolution). Still, I had fun with audio-rate FM synthesis (routing the output of one oscillator to the frequency control of the other), and I was at least making some semi-interesting noises…

Here’s what the FM output looks like (it turned out the apparent AM is due to badly-chosen output filter!):
FM basic

The benefit of doing this stuff in software is that, from an electronics point of view, the schematic is very simple:
Basic schematic

Ok for a start, but I wanted MORE!

DiY/Noize #1

Well, it’s been a long time — not sure what’s been going on, but something must have happened since the last post… … ?

Anyway, I’ve been idly thinking about getting back into doing things with electronics, and this finally got triggered into action after a visit to Leeds Modular Meet on August 15th. I’d been playing with a Microchip PIC32 (a fairly powerful little processor), but also became intrigued at the other end of the spectrum by the ATTINY85, an 8-pin, 8-bit micro which nonetheless offers some interesting possibilities; and sometimes limitations are the things which bring out the most creative solutions…

Since there was going to be software involved, I thought I’d also try and get my head around using git, and follow the current trend of making projects available to all (at least at this early stage). Therefore I created a repo on github and installed Sourcetree on my computer (I’ve become too used to using GUI-based tools for source-control, so forgive me for not going all hair-shirt on git).

My basic idea is to create a sound-generating device which would be capable of making interesting drones and textures with a few controls (Ash and I have been considering using DiY devices for our Orlando Ferguson project, so this would be an ideal fit. However I need to get some fundamentals straight first, as well as remembering/relearning the digital audio basics I learned in through the ’90s.

The first step of course was to get acquainted with the device. I have an Arduino Uno, so I configured that as a programmer for the ATTINY and began using the Arduino IDE for playing with the code.

I configured a breadboard such that the connections to the programmer were at one end of the board, with ‘prototyping’ areas elsewhere (that way I wasn’t continually (dis)connecting wires, but rather just shifting the ATTINY from one board location to another.

Anyway, that’s the intro written — more to come (hopefully soon).

A New Toy…

Earlier this week I bought myself a Novation Circuit (as a kind-of-belated-birthday present) since I’d read interesting things about it on CDM amongst other places. Anyway, here’s my first track recorded purely on the circuit. I will be sporadically updating the bandcamp album as an ongoing project (although not a full time one like my 365 project of 2015).

field memory recorder (1)

I’ve had the phrase field memory recorder running through my head ever since I saw an ebay item of the same name (it’s a solid-state field recorder from Fostex btw). Just that phrase conjures up sounds/images which I’ve been mulling over for a few months now.

Finally, over the last week or so, I’ve had a chance to make a start on the project (including writing various sound-mangling processes within Reaktor 5), and now here’s the first track under that pseudonym.

I made a video utilising some footage I found on my hard drive of the old sugar beet factory in York (long since disappeared) which you can see on the youtube clip above.

Enjoy!

back in the saddle…

Back in 2015, I embarked on a (possibly misjudged) project: produce a piece of music (aka organised sound) every day for a year. That’s 365 new pieces of sound in a year.

It felt like a good idea on January 1st, but it became more of a burden as the year progressed. Some days were easy, some not so easy, but I got to the end of the year having produced over 40 hours of organised sound in 2015…

Flatteringly, Radio Free Midwich declared it their album of 2015 and, as a prize, I got to have the sole 2016 release on the legendary Fencing Flatworm Recordings. My response was One Year; Two Days a four-track EP which was produced over the period of two days. It’s available for purchase and download on bandcamp and I also made a video for the lead track:

It’s been a long time…

After a long (long, long) while I’ve started doing a bit of music again. Initially re-inspired by Robert Hayler (over at Radio Free Midwich), I’m almost up and running again.

Anyway, two tracks over at SoundCloud:

  • Laid Waste the first ‘new’ track – overdubbed guitars and synth textures;
  • Bass/exp something long and rambling (20 minutes) – completely live, created using a bass guitar, drum machines and a little something I knocked up in Reaktor

Enjoy!

It’s gig time again…

Craig and I were chatting on new year’s eve, bemoaning the fact that we haven’t felt particularly musically-creative of late. So we decided that we’d do something together. I felt that a more loose, improvised thing would be good to do (in the past, my live performances have always had a certain improvised nature to them – tracks are broken down into their component parts, fed into some sort of sequencer and then ‘mashed up’ live).

So anyway, after two rehearsals (which ended up being pretty different in their musical output), we have our first gig.

March 14th, 9pm -> 10pm Thomas’s Bar (near York Library). We have a slot at BoomChik, a regular night put on by some friends of ours.

Excellent. Let’s see what happens ‘eh?