DiY/Noize #3

Playing catch-up here, so a quick note about a development from the previous experiment – and the first one that I consider to be a properly usable instrument.

dr1.b is a drone-synth based on the ATTINY85 as might be expected (I believe that tight space/speed constraints make for more interesting creative steps!). There are four controls:

  1. Pitch 1 (aka sync pitch): controls the basic pitch of the oscillator by resetting the oscillator at a regular period (i.e. hard sync);
  2. Pitch 2: controls the frequency of the actual waveform generator, it can generally be thought of as controlling the upper harmonics of the output sound. This can make some nice formant-like sounds;
  3. Waveshape: selects between Sine, Triangle, Square and Saw waveshapes, with intermediate settings between each pair (so that we get four compound waveshapes as well as the basic waves, i.e. sin+tri, tri+squ, squ+saw and saw+sin);
  4. Perturbation:  introduces a random switching of waveshape (the more you add, the more often the waveshape will change).

Output is 8 bit PWM running at 250kHz, with an underlying sample rate of 50kHz, theoretically allowing output of frequencies up to 25kHz, but that would need a far more accomplished reconstruction filter than the simple RC LPF which is in place!

dr1.a was put together on perfboard the day before the Orlando Ferguson show on December 17th at Chapel FM in Leeds – the results of which can be seen below (along with a MFOS ‘WSG’, a cracklbox and Ash’s 40106-based construction):

(dr1.a is the thing with four knobs on, just peeking out from behind the coffee cup).

code can be found on github here

Guitar Modification…

(This is a really old topic but I wanted to capture it somewhere).
I have a Japanese reissue Fender Mustang which I love dearly, but I wanted to get a bit more tonal variation (and I was also getting a bit cheesed off with having the sound cut off if I nudged the pickup-selector switches whilst playing). Here’s a short description of the modifications I made to improve things.

Item 1: change the bridge pickup (to a Seymour Duncan Lil’ 59 small humbucker). I figured that with the humbucker in place I’d be able to get a few more tones, especially if I added a coil shunt to get single-coil tones too.

Item 2: rewire the switches. Now this one was a little more tricky. The stock guitar has two 3-position switches wired such that each pickup can be in-phase/off/out-of-phase. This actually only gives 4 different pickup combinations (not counting ‘off’) which is not a great number! And there’s that annoying quirk that it’s very easy to nudge the switches to completely kill the sound…

Pickup wiring for MustangI wired the switch next to the bridge pickup like this, where R, W, G and B stand for the Red, White, Green and Black wires from the pickup. The three positions of the slide switch now give three combinations of the coils (parallel, series, and single coil).

The neck-switch is wired as a simple pickup selector (neck, neck+bridge, bridge), feeding into the regular tone and volume controls. This gives a much wider range of pickup configurations (7 if I can count correctly), and I’m pretty pleased with how it’s come out.

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.


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: