DSPRelated.com
Forums

DSP FAQ Up-to-dateness

Started by jaso...@gmail.com June 21, 2006
Section 3 of the comp.dsp FAQ at http://www.bdti.com/faq/dsp_faq.htm
contains information that is dated mostly around mid-2002. Is that
information still pretty current? I'm trying to figure some of this
stuff out but I don't really want to start out with obsolete hardware.

Thanks!
Jason Cipriani

"jason.cipriani@gmail.com" <jason.cipriani@gmail.com> wrote in 
news:1150927559.840295.223450@y41g2000cwy.googlegroups.com:

> Section 3 of the comp.dsp FAQ at http://www.bdti.com/faq/dsp_faq.htm > contains information that is dated mostly around mid-2002. Is that > information still pretty current? I'm trying to figure some of this > stuff out but I don't really want to start out with obsolete hardware. > > Thanks! > Jason Cipriani >
I haven't looked at the FAQ for a long time (and I assume most of the other regulars haven't either). I doubt that any of the 2002 DSP processors would be a best choice for a brand new design. We have participants of this group who regularly use DSP hardware from all the major manufacturers. I can help you with Analog Devices. I would start by describing your goals and application. I am sure you will get several suggestions. -- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com
Al,

Thanks for your reply.

> I haven't looked at the FAQ for a long time (and I assume most of the other > regulars haven't either). I doubt that any of the 2002 DSP processors would > be a best choice for a brand new design.
I kind of figured as much; glad I asked. Although they still might be OK for my application.
> We have participants of this group who regularly use DSP hardware from all > the major manufacturers. I can help you with Analog Devices. > > I would start by describing your goals and application. I am sure you will > get several suggestions.
Thanks! Well, my end goal is to build a piece of hardware that can a single analog input signal (audio in my case), compute the primary frequency component, and output MIDI controller messages, with the value being a function of the primary input frequency. My -real- goal is to learn how all this stuff works. I just decided to do this project recently, and I really don't know much about DSP hardware at all; and I only have basic knowledge of electronics design (I've always been a software guy, not a hardware guy). So I have a feeling it will be a long road -- and I certainly don't want to hit up this newsgroup with all my questions just yet. That said... So the major components of my project are an A/D converter, something that can do frequency analysis (I'm trying to stay purely digital after the input signal is converted), something that can handle the logic of finding the peak and converting it to MIDI controller values, and something to drive the MIDI signal. I don't know how programmable the DSP chips out there are, but I do see that a lot of them have integrated A/D converters. I have no idea how fast cheap DSP chips are but I'd like to be able to do have < 50ms latency all the way through. I also don't know of any other algorithms besides the FFT to do the frequency analysis; so I would like to be able to operate on block sizes of 2048, and I'd like the digital signal to have a 48KHz sample rate. 8 bits should be good enough for the frame width. The DSP chip doesn't necessarily have to have an integrated converter; but it at least needs to be able to interface with one (the only one I currently know of is the ADC0831; but I haven't done any research yet). So I want a DSP chip that can do that; not necessarily anything more than that. But ideally, I'd like to be able to program it without purchasing an extra few hundred dollars worth of hardware. I don't have any fancy machines, I have to do all the work by hand, so it would also be helpful if the chip came on a board already, or at least had less than a few hundred pins (dunno if this is reasonable). Also, I'd like a chip that can store my programs on it... I don't want to have to mess with external memory if I don't have to. For the logic and MIDI driver I was going to look into a Basic Stamp 2. However, I'm a little skeptical about the speed of those things so I am also looking into various other microcontrollers. The MIDI connection only needs a ground and two +5V lines. That shouldn't be an issue. Another thing I was thinking of is using Gumstix for the whole thing; haven't looked into that much yet either. I'm also looking for good resources related to general DSP programming, and optimizations; and also related to whatever specific chip I end up working with. Anyways, there's enough tutorials and howto's out there to help me get this project done. Right now I'm kind of intimidated by all the options I have, so my real question for this list, then, is what DSP chip I should get (although like I said, it just has to do FFT's, so chips specialized for that purpose also work... uh, but not the PowerFFT, I already found that, it's too intense!). I'm sure I can find out what hardware other people have used too so I'm not too worried about it. But hey... you asked! ;) Thanks again, I honestly wasn't expecting such a welcoming response! :) Jason Cipriani PS: Sorry if you receive this more than once... gmail seems to be having some technical difficulties right now.
> "jason.cipriani@gmail.com" <jason.cipriani@gmail.com> wrote in > news:1150927559.840295.223450@y41g2000cwy.googlegroups.com: > > > Section 3 of the comp.dsp FAQ at http://www.bdti.com/faq/dsp_faq.htm > > contains information that is dated mostly around mid-2002. Is that > > information still pretty current? I'm trying to figure some of this > > stuff out but I don't really want to start out with obsolete hardware. > > > > Thanks! > > Jason Cipriani > > > > > > > > -- > Al Clark > Danville Signal Processing, Inc. > -------------------------------------------------------------------- > Purveyors of Fine DSP Hardware and other Cool Stuff > Available at http://www.danvillesignal.com
jason.cipriani@gmail.com wrote:

   ...

> Thanks! Well, my end goal is to build a piece of hardware that can a > single analog input signal (audio in my case), compute the primary > frequency component, and output MIDI controller messages, with the > value being a function of the primary input frequency. My -real- goal > is to learn how all this stuff works. I just decided to do this project > recently, and I really don't know much about DSP hardware at all; and I > only have basic knowledge of electronics design (I've always been a > software guy, not a hardware guy). So I have a feeling it will be a > long road -- and I certainly don't want to hit up this newsgroup with > all my questions just yet. That said... > > So the major components of my project are an A/D converter, something > that can do frequency analysis (I'm trying to stay purely digital after > the input signal is converted), something that can handle the logic of > finding the peak and converting it to MIDI controller values, and > something to drive the MIDI signal. I don't know how programmable the > DSP chips out there are, but I do see that a lot of them have > integrated A/D converters. I have no idea how fast cheap DSP chips are > but I'd like to be able to do have < 50ms latency all the way through. > I also don't know of any other algorithms besides the FFT to do the > frequency analysis; so I would like to be able to operate on block > sizes of 2048, and I'd like the digital signal to have a 48KHz sample > rate. 8 bits should be good enough for the frame width. The DSP chip > doesn't necessarily have to have an integrated converter; but it at > least needs to be able to interface with one (the only one I currently > know of is the ADC0831; but I haven't done any research yet). > > So I want a DSP chip that can do that; not necessarily anything more > than that. But ideally, I'd like to be able to program it without > purchasing an extra few hundred dollars worth of hardware. I don't have > any fancy machines, I have to do all the work by hand, so it would also > be helpful if the chip came on a board already, or at least had less > than a few hundred pins (dunno if this is reasonable). Also, I'd like a > chip that can store my programs on it... I don't want to have to mess > with external memory if I don't have to.
... Actually, I think you want a DSP development board, complete with processor, codec (ADC and DAC with the necessary filters), power supply connection, and a manual. Al's company, Danville Signal Processing, makes a line of them, as do others (in the FAQ) and the major DSP chip makers. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Jason,

Unless your goal is to learn how to build the
hardware, I believe you have everything you
need under your fingertips - it's called a "PC."

--Randy

Randy Yates wrote:

> Jason, > > Unless your goal is to learn how to build the > hardware, I believe you have everything you > need under your fingertips - it's called a "PC." > > --Randy >
You may not be able to do it in real time on a PC without a lot of work, but if you can get the tone identification working at all on a PC you'll know what you need to get it going on a DSP chip. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
jason.cipriani@gmail.com wrote:

> Thanks! Well, my end goal is to build a piece of hardware that can a > single analog input signal (audio in my case), compute the primary > frequency component, and output MIDI controller messages, with the > value being a function of the primary input frequency. My -real- goal > is to learn how all this stuff works. I just decided to do this project > recently, and I really don't know much about DSP hardware at all; and I > only have basic knowledge of electronics design (I've always been a > software guy, not a hardware guy).
Then I suggest to use the soundcard in your PC (most have both Audio input and MIDI output, the latter hidden in the joystick port - you need a cable adapter) and the CPU for the processing. You can use any language you want and don't have to fight with the hardware.
> I'm also looking for good resources related to general DSP programming,
http://www.dspguide.com bye Andreas -- Andreas H&#4294967295;nnebeck | email: acmh@gmx.de ----- privat ---- | www : http://www.huennebeck-online.de Fax/Anrufbeantworter: 0721/151-284301 GPG-Key: http://www.huennebeck-online.de/public_keys/andreas.asc PGP-Key: http://www.huennebeck-online.de/public_keys/pgp_andreas.asc
Tim Wescott wrote:
> You may not be able to do it in real time on a PC without a lot of work, > but if you can get the tone identification working at all on a PC you'll > know what you need to get it going on a DSP chip.
How poor do you think this guy is? I would say any PC built in the last five years would be up to the job, no? Tone detection? FFTs? Not a lot of work, as I see it. --Randy
On Wed, 21 Jun 2006 20:22:23 -0700, jason.cipriani@gmail.com wrote:
> Thanks! Well, my end goal is to build a piece of hardware that can a > single analog input signal (audio in my case), compute the primary > frequency component, and output MIDI controller messages, with the > value being a function of the primary input frequency.
So, the "device-ness" of the final thing is an important goal? That kind of argues against the "do it on a PC" suggestions, although I whole-heartedly agree that that's the right way to start on the prototype.
> My -real- goal > is to learn how all this stuff works.
That's a really good goal. Particularly since you're quite likely to discover that the "compute the primary frequency component" isn't as easy as it sounds, depending on what the specific audio signal looks like...
> So the major components of my project are an A/D converter, something > that can do frequency analysis (I'm trying to stay purely digital after > the input signal is converted), something that can handle the logic of > finding the peak and converting it to MIDI controller values, and > something to drive the MIDI signal.
A modern PC can certainly do all of that. The only thing that it might have some trouble with, compared to a "bare metal" DSP solution is the time delay between the input audio signal and the corresponding MIDI output. If you're going to use any kind of block-based FFT analysis, with sufficient resolution to correctly identify bass notes, then the extra latency that a PC puts in your way will almost certainly not be a big problem, if you use ASIO or ALSA sound drivers. You can get down to a few miliseconds that way, on modern hardware, whereas you need on the order of 300ms to buffer enough audio samples to separate notes with fundamentals around 50Hz. (Of course, if you don't need to go that low, you can use less buffering and get lower detection latency.)
> I don't know how programmable the > DSP chips out there are, but I do see that a lot of them have > integrated A/D converters. I have no idea how fast cheap DSP chips are > but I'd like to be able to do have < 50ms latency all the way through.
Still doable on PC hardware, with some care. On a dedicated DSP your only problems will be algorithmic.
> I also don't know of any other algorithms besides the FFT to do the > frequency analysis; so I would like to be able to operate on block > sizes of 2048, and I'd like the digital signal to have a 48KHz sample > rate.
That's only going to give you a frequency resolution of about 23Hz, which is enough to separate notes down to about 400Hz, which isn't very low. You might want to investigate "multi-rate" techniques, or warped transforms. (terms to google for :-)
> For the logic and MIDI driver I was going to look into a Basic Stamp 2. > However, I'm a little skeptical about the speed of those things so I am > also looking into various other microcontrollers. The MIDI connection > only needs a ground and two +5V lines. That shouldn't be an issue.
Whatever processor has the oomph to detect the input frequency isn't going to have much trouble driving the MIDI stream, I would think. Most processors have built in serializers of various sorts these days, so you shouldn't have to do any manual bit-bashing.
> Another thing I was thinking of is using Gumstix for the whole thing; > haven't looked into that much yet either.
That's not such a terrible idea: it's fairly cheap, has all of the interfaces and converters that you're looking for (maybe on plug-in boards), and you can code it in a nice, comfortable environment like Linux. The XScale PXA255 actually has significant grunt for doing DSP work, but the gotcha is that you'll have to do it in fixed point (scaled integers): there's no floating point hardware. That's a significant complication, for a beginner at DSP work to have to worry about. There will be floating point available through the ARM C compiler, but it's all emulated: not going to be fast enough to do real-time DSP with.
> I'm also looking for good resources related to general DSP programming, > and optimizations; and also related to whatever specific chip I end up > working with.
There's lots of the sort of things that you're after at: http://music.columbia.edu/cmc/music-dsp/, but if you really want to understand what you're doing, a good university-grade DSP textbook and a chunk of study time is likely to be a really good idea.
> Anyways, there's enough tutorials and howto's out there to help me get > this project done. Right now I'm kind of intimidated by all the options > I have, so my real question for this list, then, is what DSP chip I > should get (although like I said, it just has to do FFT's, so chips > specialized for that purpose also work... uh, but not the PowerFFT, I > already found that, it's too intense!).
When you get really ambitious, and you've got your first few prototypes under your belt, you can move on to doing it all on an FPGA. You should be able to fit the whole project into a $10 Xylinx or Altera part (including the A/D converter) ... :-) Good luck, and happy exploring! Cheers, -- Andrew
Hey,

Wow you guys are great, thanks for all the responses! :)

---
Jerry Avins wrote:
>Actually, I think you want a DSP development board, complete with >processor, codec (ADC and DAC with the necessary filters), power supply >connection, and a manual. Al's company, Danville Signal Processing, >makes a line of them, as do others (in the FAQ) and the major DSP chip >makers.
That seems like a good piece of hardware to get started with. I'll look into those. --- Randy Yates wrote:
>Unless your goal is to learn how to build the >hardware, I believe you have everything you >need under your fingertips - it's called a "PC."
Well, my goal is to learn how to build the hardware. I've already done all this on a PC; it's not much fun any more. :) I think it will be a satisfying project. --- Tim Wescott wrote:
>You may not be able to do it in real time on a PC without a lot of work, >but if you can get the tone identification working at all on a PC you'll >know what you need to get it going on a DSP chip.
Well, agreeing with Randy Yates response to that, there's some incredibly fast software FFT implementations out there, and PC's are pretty fast. I've been able to do it close to realtime on 6 year old machines (but if the PC isn't dedicated to the task, there are some latency issues that are hard to control, no matter how low level your software gets); but like I said, it feels like cheating. But that's why, knowing that it can be done on a PC, I was initially considering making the entire thing ... --- Andrew Reilly wrote:
>When you get really ambitious, and you've got your first few prototypes >under your belt, you can move on to doing it all on an FPGA. You should >be able to fit the whole project into a $10 Xylinx or Altera part >(including the A/D converter) ... :-)
... on an FPGA. It seemed like, coming from my background, programming an FPGA would be more natural than integrating various pieces of hardware together. But, really, I have very little knowledge of FPGA's. The only experience I have with an FPGA is using some OTS FPGA-based hardware to read encoders off a motor. It turned out to be too slow for our application and we ended up moving to "real" encoder counting hardware. Might have been a crappy FPGA, though, or buggy software on it.
>That's only going to give you a frequency resolution of about 23Hz, which >is enough to separate notes down to about 400Hz, which isn't very low. >You might want to investigate "multi-rate" techniques, or warped >transforms. (terms to google for :-)
I'll hit up Google as soon as I press "send" :) I had picked 50ms with a 2048 block size and a 48KHz sample rate because it seemed reasonable, even though the frequency resolution is too low to be 100% useful. I did not know there -weren't- block-based algorithms, and also I probably underestimated the power of these chips. I don't want to start -too- complex though :) .
>Whatever processor has the oomph to detect the input frequency isn't going >to have much trouble driving the MIDI stream, I would think. Most >processors have built in serializers of various sorts these days, so you >shouldn't have to do any manual bit-bashing.
So... there are DSP chips/etc out there that have all the general purpose output lines, processing power, and a powerful enough instruction set to do -everything- I want to do on one piece of hardware? It seems like I'd be able to find a full project board, like Jerry mentioned, that has everything on it but if you can do it all on one IC; that would be pretty cool. With regard to the Gumstix:
>The XScale PXA255 actually has significant grunt for doing DSP >work, but the gotcha is that you'll have to do it in fixed point (scaled >integers): there's no floating point hardware. That's a significant >complication, for a beginner at DSP work to have to worry about.
I didn't know that. That's a small headache even if you -aren't- a beginner in the rest of the stuff you are working on. Oh well; I might pick up one of the Gumstix packs anyway to mess around with for some other stuff, so at least I'll have it around to futz with.
>There's lots of the sort of things that you're after at: >http://music.columbia.edu/cmc/music-dsp/, but if you really want to >understand what you're doing, a good university-grade DSP textbook and a >chunk of study time is likely to be a really good idea.
Thanks for the link; and I'll have to hit up Amazon and read some reviews. I just spent a significant chunk of money there on a couple of image processing books though, so hopefully the internet will hold me over for a few weeks :) . --- Well, thanks again guys (esp. Andrew Reilly) for all your information. I have not had much time, unfortunately, to delve into it since I first sent that message. So I have a lot of interesting stuff to think about now. Hopefully you won't be getting -too- many stupid questions from me :) Jason Cipriani