Showing posts with label eprom music. Show all posts
Showing posts with label eprom music. Show all posts

Friday, August 03, 2012

Flash / EPROM Music: Modular Breadboard Setup

Wednesday, July 18, 2012

Anti Laptop Music Night #1 - August 16th - Feat. Dot.AY (Melbourne) + Others

The first Anti Laptop Music Event is here, with four diverse acts from Adelaide and Melbourne.

Sets include anything that has electricity running through it but isn't a laptop.

Dot.AY (MLB)

game boy-based glitch chip bassmusic
http://dot-ay.com/

 

Tristan Louth-Robins
minimalism and drone music through technology
http://www.tristanlouthrobins.com/

 

Areyfu
organic harsh noise performance
http://areyfu.wordpress.com/

 

little-scale + reanimatedocean
handmade digital sounds with feedback and lofi vis
http://little-scale.blogspot.com.au/
http://reanimatedocean.blogspot.com.au/


 
Be there at eight. Listen to some cool music. Hang out with your pals at Format on Peel st.
Bring some cake if you know how to bake. Destroy everything.

$5 entry.



Fabo event is here and stuff: https://www.facebook.com/events/407403619295140/




Thursday, July 12, 2012

Flash / EEPROM Music: Generating VGA Visuals



An Arduino generates H and V sync timing for a VGA signal, whilst the most significant three bits of an Flash chip's DAC audio output is being jammed down the throat of the red, green and blue inputs of the monitor.

More info on how the audio is generated here: http://little-scale.blogspot.com.au/2012/07/flash-eeprom-music-29f010-sample.html

Saturday, July 07, 2012

Flash / EEPROM Music: 29F010 Sample Playback

Video Example: Manipulating Address Lines for Audio Effects





Overview
I am interested in exploring the 29F010 flash chip as a means of audio sample storage and manipulation. This post will describe a basic setup whereby a sample is stored in the 29F010 memory, and is recalled in a loop continuously.

The basic idea is this: A square wave is generated, which in turn generates a set of address bits, which in turn are sent to the 29F010, which recalls each sample located at that address, which is then presented at the digital data outputs of the 29F010, which in turn are sent through a resistor to resistor ladder, which acts as a digital to analog converter.




Preparing Sample Data
The first stage in the process is to prepare the audio sample data. the 29F010 has 128KB of memory, which is 131072 bytes. At a sampling rate of 44.1KHz, 131072 bytes of memory would hold 131072 / 131072 = 2.97215419501134 seconds. At a rate of 161.15 beats per minute, eight beats equals 2.972 seconds.

Once a standard, uncompressed audio file has been created, it's a matter of converting that data to hexadecimal data so that it can be stored as a binary file. I used my audio2bits hex Max patch to do this task. 


Copy and paste the output of the audio 2 bits hex converter to a new binary file. I used Hexfiend for this task.


Next, simply program the 29F010 chip using your E/EPROM/FLASH programmer. 






How the Hardware Works
The three chips that are used in this post are the 74HC14, the 4040 and the 29F010. 

74HC14


4040



 
29F010


A square wave is generated by a 74HC14 hex inverter using a RC type oscillator. This is a very simple oscillator circuit, whereby an inverted feedback signal is used in conjunction with a capacitor and a variable resistor (potentiometer) to generate a square wave. 

This square wave is responsible for the timing of the circuit - in other words, it control the sampling rate of the playback of the audio sample.

This output is sent to the first of two 4040 binary ripple counters. This is a chip that takes a square wave signal, and outputs up to 12 squarewaves, each of which is half of the frequency of the previous. 

The 4040 is a binary counter / divider. Although this may sound daunting, what it actually does is very simple. It has a single input. If a square wave is applied to this input, the outputs (called Q1 to Q12) each oscillate at a rate related to the input freqeuncy. Q1 oscillates at a frequency that is half of the input frequency. Q1 at one quarter. Q3 at one eighth and so on.

If the output frequencies are within the human hearing range, they will sound one octave apart - with Q1 being the highest and Q12 being the lowest (eleven octaves below Q1).
 
This relationship can be represented as a timing diagram, shown below:

CK -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

Q1 --__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__

Q2 ----____----____----____----____----____----____----____----____

Q3 --------________--------________--------________--------________

Q4 ----------------________________----------------________________

Q5 --------------------------------________________________________

and so on


The first eight outputs of the first 4040 are connected to the eight first address inputs of the 29F010. The eighth output of the first 4040 is also connected to the input pin of the second 4040, chaining them together. The first nine outputs of the second 4040 are connected to address inputs nine to sixteen of the 29F010.

If we consider each square wave that is coming out of each 4040 to represent a single bit, whereby 0V is zero and 5V is one, then by combining the two 4040 chips together we can count through the entire address range of the 29F010 - i.e. from 0 (or 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 in binary) to 131071 (or 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 in binary).

In the timing diagram example above, we can count from o (or 0 0 0 0 0) to 31 (or 1 1 1 1 1) - it's simply a matter of extending the number of square wave bits so that we can cover the whole address range!

The output of the 29F010 (i.e. each sample byte) is sent through an eight bit resistor to resistor ladder. This ladder converts each sample into a comparable voltage, thereby acting as a digital to analog converter.



Schematic






Breadboard

Tuesday, October 27, 2009

RAM Music: The Audio Contortionist

Background and Overview
I have started working on what I am calling "RAM Music" after my previous exploration of EPROM Music. In many ways, this is an extension of EPROM Music, as it shares many traits. In particular, this idea of manipulating digital sound directly, without the need for pre-programmed parts, or anything that computes (such as a microcontroller).

What I love about projects like these is the physical nature of the setup - because all of the components are very simple parts, plenty of breadboarding must be done in order to get something work. And when something like this does work nicely, then it is a very satisfying experience. I can see this sort of idea being pushed quite a bit further, with multiple RAM loops that are synced together.

I am thinking of getting some PCBs made up, so that I can more easily use these circuits during performance without getting fearful of everything falling apart. If anyone is interested in getting hold of such a PCB (and perhaps related components), drop me a line.

The circuit can basically record a short section of sampled audio, from an external source (computer / guitar / microphone / whatever). This section of audio is stored in a RAM-based area of memory. The memory is constantly being played back in a loop (unless RECORD is activated). At any point in time, the user can "drop in" a new snippet or chunk of audio by clicking the record button. The input level for the analog to digital converter can be changed via a potentiometer. The sampling rate / speed of the circuit can be changed via a potentiometer. The loop itself can be made longer or shorter by adding or removing address lines from the address bus (up to 512KB). Manipulating the address lines can also hack up and granulate the audio.



How it Works
The circuit is made up of some basic components, as shown below:
• oscillator
• 2 x binary counters
• RAM
• analog to digital converter
• digital to analog converter
• 2 x potentiometers
• 1 x switch
• associated resistors and capacitors

As usual for many of my ideas, the cost of these items is not high at all.


(click to see a larger version)
(click to see a larger version)


Above, there is a basic representation of this circuit. The oscillator (the basic clocking mechanism that sets the sample rate for record and playback) is a 40106 inverter with a resistor / capacitor type configuration. The output of the oscillator is routed to the first binary counter, whereby the lower twelve address bits (A0 - A11) are generated.

The twelfth address bit also acts as a "carry count" for the second binary counter, which then generates the higher address bits (A12 - A18). Both binary counters are 4040 chips. All of these address lines make up the address bus, which is directly connected to the RAM chip (which is a 628512).

The RAM chip has an I/O bus, which means that the input pins are the same pins as the output pins. The I/O bus is eight bits wide. The RAM I/O is simultaneously connected to two places; the digital to analog portion of the circuit (the audio output), and the analog to digital portion of the circuit (the audio input).

There is a switch that switches the circuit to record mode. This is a push-type, normally-open switch. The default (not pushed) position of the switch is the playback mode.

The output pins of the analog to digital converter chip (an ADC801-type chip) are directly connected to the I/O bus of the RAM. When in playback mode, the chip select line of the analog to digital converter is set to deselect the chip, placing the output pins into a high impedance. This is so that the analog to digital output does not interfere with the RAM I/O bus, which is set to read mode.

As the binary counters count from 0 to 524287 (which equals 512 x 1024), each sample is read back from the RAM chip, and presented on the I/O bus, where the pins are in an output mode. Each sample is then sent to the digital to analog converter, which is simply a resistor network.

When in record mode, the chip select line of the analog to digital converter is set to select the chip, making the output pins present the results of the analog to digital conversion to the RAM on its I/O bus. As the RAM is set to write mode, it's I/O pins are set to input. As a result, the RAM samples / records the audio from the analog to digital converter. As the RAM's I/O bus is shared between the ADC and the DAC, the input is monitored on the output during recording.



Contorting the Audio
This circuit currently has a few ways to manipulate audio. These are:
• A record button allows the user to sample incoming audio to a RAM buffer
• A potentiometer sets the input level
• A potentiometer sets the sample rate / pitch for playback. The changing of sample rate can be recorded if desired, by physically changing the position of the pot during recording.
• The address lines A0 - A18 can be manipulated ie. moved around, removed, replaced, giving a wide range of effects such as stuttering, repeating and basic granulation.

Although this does not sound like heaps of manipulation, keep in mind that this circuit can absolutely mangle a sound beyond recognition. The ADC is running at its maximum speed, and as such the sample rate can be varied greatly for example.

Future additions may include additional RAM slots, synchronisation for other devices including EPROMs and more manipulation. Nonetheless, I am very happy with these initial results.




Photos




Video Example

Friday, June 26, 2009

ACMC Poster - "EPROM MUSIC"


Here is the design for my poster for the upcoming Australasian Computer Music Conference 2009 in Brisbane, titled "EPROM MUSIC".

Saturday, November 22, 2008

A True Rompler (3): Synthesis

This is an extension on to a previous post.


Synthesis
So of course it is possible to play back samples on an EPROM without a microcontroller or a computer. But what about some form of synthesis? Well, i built a circuit that loops only a small memory area of the EPROM to form a periodic waveform and then lets you select different waveforms by changing the upper address bits (to move the output of the EPROM to different areas of non-overlapping memory).

The circuit is so simple that i won't draw a schematic at this stage. Instead, here is a basic block diagram of the idea:

I have also added a basic arpeggiator (as seen on the Fun With Sea Moss Page: http://milkcrate.com.au/_other/sea-moss/).



Breadboard Setup



Getting the Waveforms Ready
I made a Max/MSP patch for this synthesis process that allows you to generate and draw in waveforms, and then dump the data as a 32KB text file.

In total, there are 32768 x 8 bits used. In terms of the waveforms that are played back, this area is divided up in the following fashion:

• There are 256 different waveforms
• Each waveform is 128 bytes long
• Each byte is 8 bits wide

Above you can see a snapshot of the promWaver Max/MSP patch. The patch has 32 pages, where each page has eight waveforms that can be edited. It's pretty basic stuff - the patch can generate sine, saw, reverse saw, triangle, pulse and noise waves. The user can also draw waveforms by hand or edit these rendered waveforms by hand.

The gain for each waveform can be set from 0.0 to 100.0 where 1.0 representes using up all eight bits of amplitude. For pulse waves, a width can be set from 0 to 100% in increments of 1/128ths (so this is a sample-accurate pusle width I guess you could say).

You can download the Max/MSP 5 patch here: http://milkcrate.com.au/_other/downloads/projects/eprom_music/promWaver.zip.


Demos and Example
Audio Example
Here is an MP3 of the following waveforms: http://milkcrate.com.au/_other/useless/wave_examples.mp3

Video Example:

Friday, November 21, 2008

EPROM Synthesis Waveform Examples








Friday, November 14, 2008

A True Rompler (2): Drum Machine

Drum Machine Overview
I have decided to extend the ideas i posted earlier by making an EPROM and logic-based drum machine. It's pretty simple, but i quite like the results. Currently, you can play an 8-note phrase that loops. For each step, you can choose one of seven drum sounds or silence. Also, there are two different banks or sets of drum sounds to choose from.

The nice thing is that you can still of course change the pitch as well as play with the address mapping to get some interesting sort of glitchy sounds.


Demo Video



Some Details
The EPROM (27C256) has a memory of 32KB (32768 bytes times by 8 bits). So in order to represent this memory space in terms of an address, we need 15 bits. On the datasheet, these fifteen bits for the address are labelled A0 to A14.

In order to make a drum machine using the EPROM, i had to first load up an appropriate sample. I made a two bar sound file, where i sequenced a different drum sound on every eighth apart from the first eighth of the bar (this will represent our silence). This gives us a total of fourteen drum sounds - seven drum sounds per bank for two banks.

I converted the sample rate of the file, then converted it into data and then a hex file, and then uploaded it to the EPROM as per last time. If you need more details, please see the previous information.

The circuit relies on the fact that we now know that we have a loop that is essentially made up of sixteen parts. Hence, only the lower eleven address bits are used to control the sample playback. The next three bits set an offset from where sample playback starts, giving us eight positions. The final bit switches between our two bars' worth of audio.

A set of three multiplexers move through a set of three DIL eight-way switches at a speed of one note or beat per switch. It is the state of that switch in combination with the other two switches (ie. high or low = 1 or 0) that determines which of the eight drum sounds are being played. Because this is occuring at a tempo related directly to our address map, it is always in time and thus we have a sequencer.


Schematics
I have split the schematic up into two pages. Note that the point labelled Drum Bank Choice should be either high or low (ie. connected to 5V or gnd).




Breadboard Photos



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