Thursday, November 13, 2008

A True Rompler (1): Raw Digital Audio

Introduction
I wanted to make a device that plays back digital audio, without the use of any programming or a microcontroller or a computer. In other words, the most basic rompler, as a hardware-only device.


Overview
A 32KB EPROM is used to store some digital audio. A counting circuit is used to sequentially (or otherwise) recall the samples from the memory byte-by-byte. These bytes are then converted to an analog waveform, ready for amplification and listening.


Preparing and Transferring the Audio
I sequenced a two bar loop at 240 bpm. This equals 2 seconds of audio. This was then converted to a sample quality of 8 bit / 16,384 Hz, so that two seconds' worth fits into the 32KB memory space exactly.

I made a Max/MSP patch that converts floating numbers to 8 bit decimal values. You can download it here: http://milkcrate.com.au/_other/downloads/projects/eprom_music/samplefloat2int.maxpat



The dumped output from the Max/MSP patch was then fed into a spreadsheet that transformed the data into an Intel HEX file. There are more details about this process here: http://little-scale.blogspot.com/2008/11/formatting-intel-hex-files-from.html.

This spreadsheet is quite large and it may appear that the computer is freezing up; give it time to do its work, you are copying and transforming 32,768 values after all. Get an example of such a spreadsheet for Open Office here: http://milkcrate.com.au/_other/downloads/projects/eprom_music/data2hex.ods.

I then copied the cell range C4:H32771 and pasted it into a new plain text document. I then went and did a Find and Replace for all tab characters (ie. deleting them), and added the END FILE record of :00000001F as the very last line of the text file. I then saved the file with the extension .txt, and opened it in the program used to put the data onto EPROM chips. As a data type, I chose hex file.

The data was then burnt onto a 27C256 model EPROM made by ST electronics.

Schematic and Breadboard

IC Pinouts
Here are the pinouts for the three types of ICs used. I used four NiMH batteries as the power supply.

40106


40106


27C256



Direct Digital Audio Manipulations
Okay, so that was all the boring parts. Now comes the fun fun fun!

Some basic manipulations are very straightforward and easy to achieve:
• The sample clock (P1 input on IC1) controls the pitch / speed of playback. By controlling the frequency applied to this pin, the pitch can be made to go very low and slow and grainy, or very high and fast and loud.

• The address lines on the EPROM A0 to A14 can be manipulated and swapped to produce interesting effects, from repetitions stutters to what sounds like re-sampling artifacts and grainy sort of glitches.

• Similarly, the clock lines that are feeding those fifteen address lines can be interrupted and held either only high or only low, resulting in some interesting structural changes to the loop.

• The digital outputs from the EPROM can be routed back to control one or more of the address inputs.

• The audio output is normally taken from the very right upper junction, coming off of the junction between R19 and R8 in the schematic. However, by taking the output from the junctions between R7 and R8, R6 and R7 and so on, varying levels of distortion are heard that can sometimes give an interesting effect .


Examples

8 comments:

nak said...

Awesome project!

Sam said...

holy cow you make it seem so simple, I want to be able to do this now! wow!

thegoodbutcher said...

ahhh...a simple and elegant project - nice!

it's the building block of the Linn drum and all it's progeny.

WOW GOLD said...

WOW GOLD, nice blog. its worth reading. I liked it very much

fengland said...

This is very cool - I'm inspired. I bumped into this as I'm working on replacing the sample rom in my kawai r-100 drum machine with a custom one - makes me want to make my own digital instrument from scratch. The sample preparation process sounds overly tedious though - it would be easy to write a little program to do it faster and more efficiently

Pixel Form said...

Beautifully elegant! Great project and excellent post. Inspired not only try out the eprom rompler but to post my work with an instrument built from massive pseudo-random noise generator.

---Phil

Custom Logo Design said...

This is really a great post awesome project.Thanks for sharing it with us good job keep keep it up.

Harriette said...

Quite helpful piece of writing, thanks so much for your post.