News:

SMF for DIYStompboxes.com!

Main Menu

DIYDSP !!!

Started by Peter Snowberg, August 21, 2003, 07:31:05 PM

Previous topic - Next topic

Peter Snowberg

Hello everyone,

*** Disclaimer: I LOVE TUBES; but I also think DSP is pretty neat. One is not a replacement for the other or vice versa. They are different and will always be.  I don't like the buzz around "modeling". Model me a Trainwreck and I'll be impressed, but since only a handful people can even get remotely close using actual tubes, resistors, and caps, I'm not holding my breath. Maybe by the year 3762.... ***

I've been playing with DSP hardware for a long time now and always dreamed of selling DSP hardware supported by open-source effects. The price of the hardware has fallen through the floor so I've just about given up on producing DSP pedals for profit, but I did stumble on some new chips from Alesis-Semi that would make a nice addition to low power amps. I'm going to start selling some small amps soon with built-in effects and have decided to grant a license to individuals to build this design for themselves or friends SO LONG AS IT IS NOT DONE FOR PROFIT. I don't care if they feed you a nice dinner, but no money must change hands. I am retaining all commercial rights to the circuit. Ok, now with the legalize out of the way....

I came up with several designs based on Alesis-Semi parts and finally decided to publish a larger one because the cost difference was just about zero after adding tons of capability to the smaller design.

The most basic effect would be a clone of the Alesis PicoVerb (design #1). This is a cute little box that has been called an "overachiever" for its size (it really is small). It contains stereo 24 bit A/D, a 28 bit DSP with reverb memory, and a stereo 24 bit D/A with 16 built in effects.

As neat as it is, I'm from the country who's motto is "too much of everything is just enough". First change is the addition of external storage for algorithms. This allows future upgrades, TOTAL user programmability, and algorithm sharing. Using two of the DSPs (design #2) allows for a lot more options, but there is no way to use the delay memory in multiple chips as a single buffer with feedback. To attack this I added some signal multiplexing driven by basic logic and the word clock. (design #3)

That allows you pass a signal around the whole buffer while retaining stereo in and out. Ok, great. Now we have a core for a neat little gadget. 24 bit, 48K, 1.36 seconds of delay memory, and if we're using it with a mono source, it has either stereo output, or an effects loop.

I started the PCB layout for this design as well as the next larger one (design #4) I had done with the intention of using it for a commercial pedal and an amp add-on. When push came to shove, the cost difference was very low and depending on how you look at things, there was no clear benefit to the smaller design (at least for me). The major difference between the two is the that #4 tosses out the signal routing logic and replaces it with an Alesis-Semiconductor 1K DSP which has silicon included for dynamic processing as well as enough horsepower to do 20 band graphic EQs on each of its 4 inputs AS WELL AS each of the four outputs. This chip now does all the signal routing between A/D, Reverb DSPs, and D/A.

Other features include 6 pots for effect tweaking (10 bit), two expression pedal inputs, signal and clip LEDs, and for people who want to program them, an optoisolated USB unterface with drivers for all windows, Mac OS, and Linux.

There is a design 5 as well as 6, 7, and 8 too. At some point the cost of the Alesis DSPs get too high and it makes sense to go for a different architecture with different chips. Other goodies in the higher designs include more delay memory, optical I/O, and even Quadraphonic In/Out.

If I can pay my rent commercially selling #4, I'll be quite happy. If a bunch of people build it themselves and have fun with it, I will quite happy too. If people make their own algorithms and share them, I will be overjoyed.

I'll make the parts available as a kit with circuit board at some point, but it's all off the shelf stuff.

I would like to find out how many people would be interested in building this design and does the idea of open-source DSP effects appeal to you?

Thanks!
-Peter

IC List for design #4:
(2) NE5532 (in DIP-8 package everything else is surface mount)
(2) TL074
(2) AL3201B DSP
(1) AL3101 DSP
(1) AL1101 ADC
(1) AL1201 DAC
(1) 2Mbit FLASH
(1) Atmel ATmega microcontroller
(1) 12.228 MHz clock module
Eschew paradigm obfuscation

mattv

Holy cats! Do DSP effects appeal to me?  Yes!

Most of my curiousity has been stifled though, by cost and the apparent learning curve. It seems like a kit would address the latter, but any hints on the cost?

Honestly, this is very exciting  :D

drew

It depends how cheap I could get the Alesis chips... :)

If I could get some unique and/or weird DSP effects, it would be worth building, of course depending on the hardware cost.

How easy would it be to program algorithms? If there were a way to program stuff easily- in pseudo-code or (I know this is a dream, but...) a graphical editor then I would definitely be into it. Front-panel editing with tiny buttons is my least favorite thing in the world.

You know what, though..... (this is more of an idea for a commercial product than a DIY deal) if you had a few rotary encoders, controlling parameters in a logical ("grouped") way, to make it easy to create weird delay-based effects, that would be GREAT. Instead of controlling regular reverb parameters like "color"/decay/etc it could control something complex... maybe a sweeping "morph" through several filter types, with in-between steps? (The filter types would be approximated by the 20-band EQ...) And another parameter to control "density" of the reverb if you can't already do that, maybe another to specifically control the nature of the feedback (control the point in the delay at which it feeds back, or if it feeds back in different amounts to different stages...

Those are just ideas, I am not a DSP programmer, but I have seen my share of regular digital reverbs, and have several regular ones myself. I would drop all my current projects and build one if I could control it exquisitely and make absolutely weird sounds with it though.


drew
toothpastefordinner.com

drew

Oh by the way, the USB/macos thing is so awesome I can't handle it. I just now saw that. That would probably make it unreasonably expensive though...

sirkut

I'm definately interested in this project. count me in, I'm a graduate in computer science so I doubt the coding part would be a problem.

aron

Heck, I'm interested too. What language would we be writing the code in?

AllyP

Can I join the club too ;)

....another CompSci student with too much time  on their hands :wink:

Chris R

csDood++;

I've been wanting to jump into DSP programming.. but the startup cost was always so big...

this could be fun.

C

AlexK

That's awesome, I'm in too as long as it's not ridiculously expensive for the kit.

-Alex

Peter Snowberg

Thanks for the interest.

These DSPs are really slimmed down cores. Think of them as MAC cores rather than regular DSPs. They don't even have branching, but they are optimized for munching on sound and making reverbs. This simplicity makes them much simpler to program than any other DSP I've seen. The SCRs even have four LFOs built in to generate table offsets. The Alesis-Semi web site is down for some reason (they need a new host!), but they have example code for a few effects there as well as the assembler available for download.

I don't have real costs now but here are some figures:
- A/D less than $2 in singles
- D/A less than $2 in singles
- SCR DSPs $5.40/ea. (10K qty. singles price not yet know)
- 1K DSP $3.60? (10K qty. singles price not yet know)

I’m not looking to make a profit from anyone here so the kit cost will be as cheap as I can reasonably make it. In the smallest run size that makes sense, the board cost comes to about $9 (2 sides, plated holes, solder mask 2 sides, legend 1 side).

The USB interface solves two problems. The first one is ground loops. I can just imagine an old tube amp killing a $2000 PC. The optoisolation gets rid of that. The second problem is what connector to use. Async serial is a natural for the data, but Macs don't even have serial ports these days. A UK company called FDTI makes a USB-Serial interface chip which is very cheap ($5.75 in singles) and compatible with all windows versions as well as Mac OS and Linux. This interface is just like any other USB/Serial except EIA-232 voltages are never used and the serial end is isolated TTL I/O.

I already have plans for a pseudo-code compiler inside the pedal. These DSPs are far too limited to read front panel controls and generate coefficients, so much of the ATmega's responsibility is to do just this. The ATmega runs a macro language that connects a bunch of effects blocks together by inserting memory I/O locations and LFO assignments to code blocks, pasting the blocks together, compiling the whole lot, and downloading. Basic linear math applies scaling and bias to analog front panel controls and dumps those values into instructions, which are inserted into the DSP(s) on the fly. Whew.... It's not direct, but it does work. You are just limited to updating 1 coefficient per sample period. Not a big deal.

I've dreamed of a graphical connect the dots effect designer for at least 12 years. That would be amazingly cool. :D I know there are commercial packages that do this now. Does anybody know any names?

I don't like tiny button digital interfaces either so I'm trying to keep everything adjusted as analog controls that can be memorized as presets. Bottons are still used to select programs and presets, but not for parameters.

The user interface is six knobs, seven tiny pushbuttons, three foot switches, a bunch of LEDs, and a 2x40 character LCD. The LCD could get dumped for a three digit LED 7-segment display, but a more expensive ideal configuration would be to have both.

More soon....

Take care,
-Peter
Eschew paradigm obfuscation

Peter Snowberg

SCR DSP code for Wide Sterero Chorus Example: (note: this chip allows programs up to 123 instructions long. LFO frequency assignments not included.)

Alesis comments in RED Mine in BLUE

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; File: AN320103.ASM
; Description: Wide Stereo Chorus Example
; Authors: Jeff Rothermel
; Copyright 2001 Alesis Semiconductor
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;

LFO0 SIN AMP=10000 FREQ=2 ; f = FREQ * 0.029Hz for Fs=48kHz set LFO 0 (for left channel) to sinewave, amplitude=10000, speed=.058Hz or 17 cycles per second
LFO1 SIN AMP=10000 FREQ=3 set up LFO 1 (used by right)
;
MEM chorusmeml 8192 ; 8192 big enough for full AMP LFO  left channel delay line memory allocation for assembler
MEM chorusmemr 8192  ; right chorus memory right channel delay line memory allocation for assembler
;
;NOTE: memory locations are referenced by:
; name Start of memory block
; name' End of memory block
; name" Middle of memory block
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
Process Left
RZP ADCL K=.5 ; Read left/2 into accumulator
WZP chorusmeml ; Write acc to start left chorus mem
RZPB chorusmeml+400 ; Read delayed left to B reg
;
CHR0 RZP chorusmeml" COMPK LATCH ; Read middle of chorus memory
CHR0 RAP chorusmeml"+1 ; Read middle+1 chorus memory
;
WBP OUTL K=.999 ; Write dry (B) + chorus (acc) to OUTL
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
Process Right
RZP ADCR K=.5 ; Read right/2 into accumulator
WZP chorusmemr ; Write acc to start right chorus mem
RZPB chorusmemr+400 ; Read delayed right to B reg
;
CHR1 RZP chorusmemr" COMPK LATCH ; Read middle of chorus memory
CHR1 RAP chorusmemr"+1 ; Read middle+1 chorus memory
;

WBP OUTR K=.999 ; Write dry (B) + chorus (acc) to OUTR
;
That's all there is to a dual-mono chorus! 12 instructions + LFO setup + DRAM refresh (16 instructions)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Add 16 extra reads for refresh  
These instructions refresh the buffer which is made of DRAM
RZP 0x00
RZP 0x40
RZP 0x80
RZP 0xc0
RZP 0x100
RZP 0x140
RZP 0x180
RZP 0x1c0
RZP 0x200
RZP 0x240
RZP 0x280
RZP 0x2c0
RZP 0x300
RZP 0x340
RZP 0x380
RZP 0x3c0

Now add some front end to modify this code on the fly....  8)
Eschew paradigm obfuscation

sirkut

uh...wow..that is some pretty simple code.

mike darling

This sounds just like what I want for my new preamp project. You can count me in if/when this thing gets launched.

Joep

Yeah, it really looks cool.

I'm interested!

mattv

Would similar code like this come with a kit?

aron

QuoteI've dreamed of a graphical connect the dots effect designer for at least 12 years. That would be amazingly cool.  I know there are commercial packages that do this now. Does anybody know any names?

I could probably help write a simple graphical interface if we "standardize" on certain objects.

Peter Snowberg

QuoteI could probably help write a simple graphical interface if we "standardize" on certain objects.

OOooooo... Cool 8) I thought a little about doing one using the GD library in PHP to draw the maps.

My object definitions at the moment all have a set number of ins and outs, as well as parameter inputs with limits. Each one takes up resources that are easily defined. Ins, Outs, Parameter Ins, Control Outs, AL3101 cycles, AL3101 RAM, AL3201B cycles, AL3201B DRAM, AL3201B I/O, AL3201 LFOs, and parameter limits.

QuoteWould similar code like this come with a kit?

Yes. Not only that, but I plan on posting the code I come up with in the future as open-source. This is the first DSP pedal to be user upgradeable and user programmable.  I encourage people to tinker under the hood.

One of the things I like about this circuit is the ability to do effects like this:

Guitar -> DSP Compressor -> 20 band DSP EQ -> Loop Send -> Analog Distortion Pedal -> Loop Receive -> DSP Tremolo -> 20 band DSP EQ -> DSP auto-wah -> DSP  Flanger -> DSP Reverb -> 20 band DSP EQ -> Out

(You would still have resources left over too!)

When you can control everything, the potential is finally unlocked outside the lab.

Anything can get mixed in series and parallel. You are only limited by the number of instructions available per sample, (246 Reverb DSP instructions and 1023 AL3101 DSP instructions) LFO assignments, or buffer memory.

I expect all kind of crazy stuff to get generated.

I was hacking around with an ancestor of this pedal in 1995 and accidentally made a chorus-echo effect with a octave up and an octave down in the feedback loop. It sounded GREAT as a space guitar effect! Goes to show those who make sure everything is perfect the first time miss out sometimes. Within a couple days I had half a dozen spacey effects that really sounded good to me. I hope lots of that will happen with this pedal.

Take care,
-Peter
Eschew paradigm obfuscation

mattv

Remarkable... I'm anxious to see how things turn out.

Thanks Peter.

chumpito

Any update to this Peter?

Transmogrifox

I'm definitely interested in this.  I'm familiar mostly with assembly language, but I think C and C++ will come back fairly quickly if I dig out my old texts and some internet help sites.  I was previously thinking of investing in an Analog Devices evaluation board kit.  They have some nice processors that I have some experience using.  I like your kit idea better, as it is tailors specifically to music/guitar effects interface.
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.