Archive for the ‘Modular Synths’ Category

Cheap FPGA Graphics, First Attempt

Sunday, December 30th, 2012

I need to find a better way to record video. An iPhone camera doesn’t do justice to the 70 frames per second of the screen.

This was a weekend project proof-of-concept for a low budget FPGA GPU. To be fair, it took a couple nights beforehand to get the display configured to recognize an RGB interface. That configuration is handled by a PIC at the moment.

The FPGA design is made of several engines running in parallel:

1) Background grid generator

2) Audio data plotter (including a UART receiver for getting data from a computer)

3) Geometry engines (one per shape)

4) Parallel RGB interface (this drives the LCD)

To keep the memory requirements tiny, there is no frame buffering of any kind for the geometry engines. The RGB interface steps through each pixel on the screen and passes the current coordinate location data to the other engines. Each engine returns a 1 (pixel on) or 0 (pixel off). The last step is a mixing block that defines the color and depth for the output of each engine. For example, the lowest layer is the background grid. Next up is the circle, and so on up to the audio plot. Only the highest illuminated pixel is shown for each location on the screen.

The geometry engines store the size and locations of their shapes in registers, so the only memory usage comes from the audio data drawn on top of everything. Audio data is being generated by Max/MSP and sent over a USB > serial cable. The FPGA double buffers it so that there aren’t any glitches due to synchronization issues.

A major downside to this general approach is that the amount of logic scales proportionally to the number of objects on the screen. If there are going to be 5 circles on the screen, this design needs 5 circle generators. One way to improve that is to use a faster clock in geometry calculations. Then each engine could handle multiple shapes per pixel.

Long-term goals: thick lines, anti-aliasing, sprites, and text rendering.

Tech details

The display is 320 * 240 pixels running at 70 fps. The complete design as shown uses 415 logic elements, 8192 bits of memory, and three 9-bit multipliers (for circle calculations). For a reference, the smallest Altera Cyclone IV FPGA has 6272 logic elements, 270 kbit of memory, and thirty 9-bit multipliers.


Sunday, July 29th, 2012

The 2nd version Atari synth prototypes came back from assembly early this week, but something has them bricked.
The worst case is that there might be hardware damage (soldering too hot, static zap during handling, moisture problems), since that leaves little I can prove in a post-mortem. At $500 a run, prototypes are not cheap.

<geek notes>
The power supplies measure fine, and JTAG diagnostic tests on the FPGA pass with flying colors. The configuration pins all check out, too. Yet somehow the FPGA will not run. It is not simply a code issue, because the part won’t even run factory code from the manufacturer.
The 2.5V I/O banks appear to be driving out 0.45V intermittently, which can’t be a good sign of anything.
</geek notes>

So that is unfortunate.

To get back to something that *is* working, the 2A03 synth is coming along. It currently has voltage control of:
Pulse wave 1 pitch
Pulse wave 1 volume
Pulse wave 2 pitch
Pulse wave 2 volume
Triangle wave pitch
Noise wave volume

…and knob controls for:
Pulse wave 1 pitch
Pulse wave 1 volume
Pulse wave 1 duty cycle
Pulse wave 2 pitch
Pulse wave 2 volume
Pulse wave 2 duty cycle
Triangle wave pitch
Noise wave pitch
Noise wave volume

Click here for audio of one pulse wave modulated by a couple envelope generators

One of the downsides to using the actual NES CPU is that it has unobvious quirks. It would be far easier to make an FPGA clone of the 2A03 audio engine and just fix the quirks, but what’s the challenge in that?

The pulse wave pitch control registers are a good example. They are 11 bits wide, which isn’t anything special. On the other hand, any write command to the greatest 3 bits will cause a phase reset in the output waveform. In a videogame soundtrack where each note starts with a volume of 0, it might never be a problem. In a synthesizer where oscillators are “on” constantly, it leads to clicking as pitch changes.

I am experimenting with workarounds. One trick is to use the pitch sweep hardware built into the part to trigger an increase or decrease in the upper 3 bits without issuing a write command. That has two downsides:
1) Worst case, it takes almost 20 times longer than just letting the click happen
2) It is more difficult to keep stable

It takes so much longer because it involves writing several non-pitch registers multiple times. That ends up lowering the sample rate on pitch control voltage. The stability issue is just that I see the pulse wave pitch occasionally lock up and refuse to change for several seconds. It is probably due to some corner case I have not found yet, but it never happens in the clicky version.

I cannot take credit for the clever idea to use the sweep unit, by the way. That came from the forum.

I made a demo to show the difference. The following audio file alternates clicky/smooth/clicky/smooth through some pitch modulation.

Click here for audio

2A03 Triangle Arpeggios

Monday, July 9th, 2012

Volt per octave control is kinda sorta working.

Click here for audio

It really needs to be calibrated, and it also needs some filtering to get rid of noise. Soon…

First CV Audio From 2A03

Sunday, July 8th, 2012

I needed a break from working on the new Pokey.synth code, so I took this afternoon to get the DE0-Nano input board (mentioned in the previous post) working with an audio channel on the NES. Today’s wave: the triangle.

This is a Make Noise Maths plus a little knob twiddling feeding the triangle wave pitch of the 2A03. It’s not following the volt per octave standard yet, but it’s smooth and responsive like a modular synth oscillator should be.

Click here for audio.

Gold Plated

Wednesday, July 4th, 2012

So naked!


The past few months have been a blur. Who even knows what the boards in the top row are.

The board on the bottom is an input control board for interfacing an $80 DE0-Nano FPGA development board with modular synth controls. It has:

8 analog inputs

8 logic inputs

8 potentiometers

4 endless rotary encoders

8 LEDs

2 pushbuttons

2 toggle switches

Can an FPGA support all that at once? Yes, because FPGAs are great. I’m a little nervous about the analog input support. I am feeding the A/D converter with 5V power from the DE0-Nano, but the 5V regulation on the Nano is questionable. The board on my desk right now measures 4.71V.

Sweep of the Day

Sunday, November 20th, 2011

The NES synth module pushes onward! The sound clip below is the first audio of the triangle channel successfully controlled by the newest scheme. This method gives a register update rate of the audio hardware around 200 kHz with very low timing jitter.

Click here for sweep.

200 kHz probably sounds like overkill, but realize that has to be distributed across all the registers to update. For example, the pitch of one pulse wave uses two registers. If I did nothing but update the pitch of one pulse wave, the system would update at a maximum of 100 kHz ( = 200 kHz / 2 registers). Between noise, pulse, and triangle pitch there are seven registers. On top of that there are three volume registers and one on/off flag.

200 kHz / (7 + 3 + 1) = ~18 kHz, which does not sound quite so fast anymore.

Newest 2A03 Dev Board

POKEY.synth Manual Version 1.0

Tuesday, March 8th, 2011

Click here for the manual.

I wanted to get a manual of some sort uploaded before shipping the rest of the first batch of modules. I will be stepping through the names on waiting list soon to see who is still interested and ready to buy a tested module.

If anyone is curious, going Gnuplot -> Inkscape -> PDF had graphical problems, so I had to go Gnuplot -> Inkscape -> PNG -> PDF. That is why the file is huge and the text is unsearchable. The graphics look best in Google Chrome, and worst in Adobe Acrobat… go figure. I am trying to find a better method of making PDFs for the future.

The Magic Octave Effect

The Magic Octave Effect

Pokey Status Update #78234

Monday, January 17th, 2011

It has been difficult to contact me lately via e-mail, so I would like this post to help respond to many of the questions I receive. I am in the process of testing built modules and writing the manual.

What does it do?

Short answer: Pokey.synth takes an old Atari computer soundchip and adds voltage control to the sounds.

The POKEY chip was used in 8-bit Atari computers, some arcades, and some Atari 7800 games. It is like an Atari 2600 soundchip on steroids, with better pitch control and more channels. Pokey.synth uses a POKEY chip to make a 2-voice synthesizer with separate voltage controllable pitch, volume, and distortion waveform for each voice. There is also an audio input for simple bit-crushing-style effects. Detailed information will be available in the manual coming shortly.

How much is a module?

Short answer: $400 + shipping

Each module includes a tested and working Atari POKEY chip. It turns out that authenticity is a little expensive.

How much is a kit?

Short answer: kits are not available

It would cost more for me to kit the SMT components than it does to pay for factory assembly. My preference is to put time into service and new designs instead of making kits. I feel that is more beneficial to everyone in the long run.

Did you get my e-mail/pm?

Short answer: Most likely yes

After my blog post in mid-December, the first 25 spots on the waiting list filled up. I received a slew of requests via e-mails to this blog, e-mails to Analog Bytes, Muffwiggler PMs, and telepathic projections. I really appreciate all the enthusiasm, but I also want to be fair and add people to the waiting list in the order they contacted me. I apologize for the back-log. It takes time to decode the order of messages coming in the different formats, so I chose to sacrifice communication to finish the product.  My focus is on getting modules tested and packed, after which I will get back to correspondence. I also plan to create a mailing list for information, updates, and future waiting lists.

Can you ship to Japan/Greece/[insert non-US country here]?

Short answer: no, I cannot at this time.

I know a little about US laws but am still learning about the laws of other countries. For example, in many countries it is not legal to sell electronics that contain lead (unless they meet special exemptions). Here in the US, we are incredibly pro-lead. It is commonly found in children’s toys, from which it is extracted and concentrated into a purer form for recreational use*. Wealthy Americans often have gold jewelry lead-plated, because otherwise they risk looking cheap*. Using lead in electronics is a perfectly reasonable thing to do by US standards. Coincidentally, the solder in this first round of Pokey modules contains lead.

Why is the module not RoHS-compliant?

Short answer: it was too expensive for this first run. Later runs will be RoHS compliant.

Selling to many countries in Europe requires meeting a set of material restrictions (known as the Reduction of Hazardous Substances Directive).  Meeting the requirements means that solder used cannot contain lead. Sadly, the RoHS alternatives to leaded solder require a higher temperature to melt. That leads to two problems. First, the higher temperatures require a more expensive process than leaded soldering. Second, more expensive printed circuit board material is required to withstand the increase in temperature during soldering. SMT components are baked on, not soldered by hand, so the PCBs are put into an oven. PCBs expand as they are heated, so a specialized material is required in order to avoid over-expansion at higher temperatures. Otherwise, circuit board connections can become damaged during SMT assembly.

Here is a picture of modules that passed initial testing, but are awaiting final testing and knobs:

So... close...

So... close...

*: This is not actually true

Pokey Progress

Tuesday, December 14th, 2010

The Pokey synth main board PCBs are going through surface mount manufacturing this week, so modules should be ready to test and pack in the next couple weeks. In the meantime there are manual pages to write and front panels to assemble. Here’s a shot of some front panels waiting for main boards:

Once the modules are tested and ready to ship, I will start e-mailing everyone on the waiting list. All sales on this first run will be handled directly through Analog Bytes.

Pokey Status Pics

Sunday, October 3rd, 2010

All the hard-to-get parts are in, so I’m sending out for production-ready prototype PCBs. If those don’t have any issues then I’ll have a run of 25 modules done a couple weeks later.

The Panel

The Panel

The Parts

The Parts

The Bench

The Bench

The toaster oven in the corner is for baking prototypes. I haven’t needed it yet, but some parts just can’t be soldered by hand.