Can a hobbyist use Sharc DSP's? - Page 1
Forum section: electronics / general

author: BCZ
author_rank: Contributor
timestamp: March 06, 2017, 04:15:24 pm
content: Hi,I want to use some FIR capable DSP's for a speaker I'm building. The commercial options like miniDSP do not have the features I want (not talking about FIR). Therefore I'm looking at Analog's Sharc DSP's. Something like a ADSP-SC584These evaluation boards are very pricey, and I am just entering the world of DSP programming, so I want to make sure that's the right way to go.Are there other fees besides the expensive evaluation board? My budget is around $1000 on the DSP and my time budget is about 4-5 months to learn how to get the thing working.Are the common audio algorithms available in CCES available to be used like drag and drop? Can I modify the algorithm to make it better suited for my purposes?If Sharc DSP's aren't the right choice, what should I look at?ThanksEDIT: OK I want to step in and explain what I want in much more detail because even on DIY speaker forums few people understand the complexity of what I want to do. It is clear there are people here who are very knowledgeable in audio.First, if I only need to do a couple of active filters, I would just stick with a miniDSP and call it a day. Boom, done, simple, small, and not horribly expensive. Of course, I need the common active filters like Linkwitz Riley filters for crossover and shelf filters for adjusting the frequency response for 8 channels, etc. But I also need a lot more.I want to build the best possible small speaker. There are a lot more that goes into that than just some active filters. I need "dynamic" filters.Here is what I need that the miniDSP can't do.- Multi-band compressor. Huge amounts of bass boost will be used. In order to protect the speaker from blowing itself up, a compressor/limiter is needed to dial back the bass when it exceeds the limits of the speaker. A compressor will compress the entire band, but I only want the compressor to compress the bass band, and hence the need of a multi-band compressor. This is easily done if a compressor is already available. Then, all that is needed is to separate the signal into multiple bands like a crossover does, apply a different compressor setting to each band, then sum everything back together.- Equal loudness contour: At low volumes, we need a lot more bass for the sound to sound "balanced". At high volumes, our hearing sensitivity to bass and treble has increased, and we want progressively less bass and treble as volume is increased. I want to implement this to preserve tonal balance at all volume levels.- Fake bass synthesizer. There is a psychoacoustic phenomenon where the ear can be tricked to think it is hearing a fundamental note lower than what it actually is with the right harmonic composition. It is used to make small speakers seem like it is playing bass when it is not. I want to have that for my speaker. A twist will be to activate this feature only above certain levels. For example, my speaker is capable of quite low and quite loud. It is capable of playing 40Hz at 95dB. But it can play 100Hz at 110dB. So eventually I want to program it in a way where the fake bass synthesizer is not activated until the incoming signal exceeds the limits of the speaker. For example, if I need to play 40Hz at 90dB, it'll just play 40Hz at 90dB. But if it needs to play 40Hz at 100dB, then the woofer will play 40Hz at its limit of 95dB and get the other the 5dB from the fake bass synthesizer making harmonics at 80Hz, 120Hz, 160Hz, etc where it is capable of playing 110dB.- Lots of FIR filtering - Not only for linear phase crossovers, but also to correct group delay of woofers and room correction. For low frequencies a lot of power is needed for those long FIR's.- Thermal compression compensator - Because the speaker is so small, the woofer requires 3-10x more power to achieve the same volume for bass as a normal sized speaker. 99% of the power is converted into heat. The problem is that the hotter the woofer gets, the more power the woofer needs to achieve the same volume because the sensitivity is reduced due to the higher temperature causing higher resistance. This means I need something to apply a boost to the woofer depending on the volume level. This is an advanced feature that needs to be written myself. A simplified implementation can be the same as the equal loudness contour, but after a certain volume it start boosting instead of cutting, but it is a "dumb" variable boost since it is not varying depending on the woofer's temperature based on a temperature model of the woofer.- Thermal limiter: My speaker can play 105dB without distortion, but it doesn't mean it can play 105dB for long periods of time because it can't handle that level of power for very long. Therefore, the volume needs to be gradually backed down. It can play 100dB for maybe a few minutes, then it'll get too hot and need volume to be further reduced. I need a feature to monitor the average RMS level and gradually adjust the limiter up or down. So if I want to play the speaker for hours on end, it'll automatically limit the volume to say 95dB to prevent the speaker from melting. This is another feature that needs to be written myself.I hope this gives a better idea of what I need.

author: Marco
author_rank: Super Contributor
timestamp: March 06, 2017, 04:30:43 pm
content: What possible need do you have for 24 GFLOPs? Do you want to add a 5 minute reverb? I can't imagine any processing for a set of speakers a cortex-M7 or even a M4 couldn't handle.PS. of course Sharc DSP boards works with SigmaStudio, so instead of programming you can do "programming".PPS. long FIR filters should really be done with (zero latency) FFT based filtering.

author: BCZ
author_rank: Contributor
timestamp: March 06, 2017, 04:38:57 pm
content: Quote from: Marco on March 06, 2017, 04:30:43 pmThis is just what someone recommended me.The miniDSP 2x4 HD uses a SHARC ADSP21489, seems like a single core version, and that only does about 4096 taps for FIR filtering at 96KHz. I prefer to have 2x more taps than that if possible.If the ARM Cortex has similar processing power, and has algorithms that can be used without writing my own from scratch, I'd like to hear more about it and then research it more on my own.

author: BCZ
author_rank: Contributor
timestamp: March 06, 2017, 04:44:32 pm
content: Quote from: Marco on March 06, 2017, 04:30:43 pmHey, if I have to do "programming", I have absolutely no problem with that! It'll save me a ton of time. I would strongly prefer not to get my hands dirty and program, but if I have to, I will.Can you explain, or link me to a source about FFT based filtering? This is the first time I've heard long FIR filters should be done with that. The biggest issue with FIR is the delay, so if there is something better, I'm all ears.

author: Marco
author_rank: Super Contributor
timestamp: March 06, 2017, 05:11:22 pm
content: Quote from: BCZ on March 06, 2017, 04:38:57 pmI don't see any external memory on their board, I assume that's the cause. I refuse to believe that a processor with 2.7 GFLOPs is going to be the limiting factor with FFT based filtering of such a tiny filter at audio rates, no matter how bad the ADI libraries for running FFTs from external memory are (it's been eons, but I'm predisposed towards TI over ADI).QuoteI haven't used it, when I did DSP programming zero latency FFT based filtering was still patented, but here's some code for it :http://blog.audio-tk.com/2015/07/07/audio-toolkit-zero-latency-efficient-convolution/I'm sure googling for zero latency fft would turn up more. The idea is to use a small part of the impulse response with a FIR filter, then apply the rest of it with FFTs of increasing size. So the delay of the FFT based filters are irrelevant, because it's ready by the time it's actually necessary.

author: legacy
author_rank: Super Contributor
timestamp: March 06, 2017, 05:13:15 pm
content: I have a blackfin BF537 board for sale, with its debugger. 250 euro + postage.

author: Rasz
author_rank: Super Contributor
timestamp: March 06, 2017, 06:29:18 pm
content: quick answer is: NO.more elaborate: sure, that $1K should be enough for hardware, drop 3-5 more for support contract and you have a chance of using it.also dps in the speaker? why not up the chain?

author: JPortici
author_rank: Super Contributor
timestamp: March 06, 2017, 07:43:57 pm
content: maybe he wants to correct the speaker responce... inside the speaker? there was talk of "adaptive" headphones a couple of years ago. load the model of the heaphone you want to emulate... i think roland made those

author: BCZ
author_rank: Contributor
timestamp: March 06, 2017, 07:49:12 pm
content: The DSP is outside the speaker, but the location doesn't matter.I'm not sure what you guys mean. The DSP can only be used after the source and before the amplification of the speaker. I'm correcting the speaker's response, like a passive crossover, but of course I'll be doing much more than what a passive crossover can do with delays, filtering, bass boost, limiter, equal loudness contour, harmonic synthesis (fake deep bass), etc.

author: alexanderbrevig
author_rank: Frequent Contributor
timestamp: March 06, 2017, 07:59:41 pm
content: I've got a SHARC devkit, and I'd say it depends on what your hobby entails.For me, I thought I would need it - but I've not outgrown using whatever ARM devboard I have at hand at the time. (I experiment with room correction FFT and now mostly FIR filters)As such, I'm selling my board!https://www.eevblog.com/forum/buysellwanted/fs-adzs-21489-ezlite/

author: diyaudio
author_rank: Frequent Contributor
timestamp: March 06, 2017, 08:25:13 pm
content: Short Answer: Yes, "if you determined enough". I built an entire SHARC DSP project from scratch (Hardware and Software), I was hellbent for 6-months and it surprisingly worked.See here.https://www.eevblog.com/forum/microcontrollers/my-first-working-audio-dsp-prototype/I own the latest SC-589 BOARD as well, however, a STM32F4/F7 will fulfill most hobbyist audio DSP curiosity. (limited to stereo/ mono processing) the STM32 only has I2S channels for up to two channels.With that said the SHARC is built for intensive MULTICHANNEL processing, even an STMF7 will sweat processing a single audio processing chain with i.e Parametric EQ, HPF/LPF/DELAY/ALLPASS using FIR even with a small number DSP taps, Dynamic Volume... now imagine 8-channel audio simultaneously processing.

author: Marco
author_rank: Super Contributor
timestamp: March 06, 2017, 08:32:13 pm
content: Quote from: diyaudio on March 06, 2017, 08:25:13 pmWhy would you chain what you can simply combine?Another option for prototyping is Bela DSP, they used the Beaglebone black to make an audio DSP board.

author: diyaudio
author_rank: Frequent Contributor
timestamp: March 06, 2017, 08:39:53 pm
content: QuoteThat's a very complex processor, Analog Devices hasn't really finalized the documentation and software for that platform. You better off working with 4-th generation support and documentation is finalized and lots of domain knowledge exists.QuoteYes, the chips aren't priced that bad, but the tools are. note the ICE-100 debugger is no longer supported and only works with CCES 1.0, the ICE-1000 is now the de facto standard going forward.QuoteIf you buy an 21489 EZ-board you just need to study the talk through sample you half way done.QuoteSigma Studio has this but its limited, also it defeats the purpose of the platform as its primarily intended for custom DSP development, i.e taking Matlab algorithm code converting it to C and running it on the processor.QuoteSTMF4/STMF7

author: diyaudio
author_rank: Frequent Contributor
timestamp: March 06, 2017, 08:44:58 pm
content: Quote from: Marco on March 06, 2017, 08:32:13 pmBeaglebone/Raspberry Pi cannot be used for deterministic real-time audio processing for serious real world applications... common man!

author: Marco
author_rank: Super Contributor
timestamp: March 06, 2017, 09:18:49 pm
content: Quote from: diyaudio on March 06, 2017, 08:44:58 pmThe DSP and audio I/O code doesn't really run under Linux with Bela, they use Xenomai 2 which uses a real time kernel under Linux which prevents interrupts from getting to Linux until it's done with the important stuff. They say it works down to a 2 sample buffer ... that's low latency enough.

author: nctnico
author_rank: Super Contributor
timestamp: March 06, 2017, 10:00:35 pm
content: Quote from: diyaudio on March 06, 2017, 08:44:58 pmOfcourse it can. The input and outputs are governed by the fixed ADC/DAC sample clocks. Once sampled a signal has no reference to time. As long as you can read the data quick enough from the ADC, process it and send it to the DAC everything is OK.

author: timb
author_rank: Super Contributor
timestamp: March 07, 2017, 01:28:35 am
content: Also, the BeagleBone Black has two PRUs onboard (Programmable Realtime Units; basically two microcontrollers that have direct memory access to the main ARM CPU and direct access to I/O). You can do a lot with them, surprisingly!

author: BCZ
author_rank: Contributor
timestamp: March 07, 2017, 02:22:30 am
content: Quote from: alexanderbrevig on March 06, 2017, 07:59:41 pmDo you know if the dev board comes with a case for the board or do I have to make one for it? Seems fragile like that. If I'm using this I'm going to be moving a lot with this because it is a small speaker designed for travel.Quote from: diyaudio on March 06, 2017, 08:25:13 pmI did not expect to meet someone on this forum who's done very similar things what I want to do!I am pretty determined. I would say really determined, but I've put an insane amount of time and effort I put into pushing the speaker design to the limit, and I want to see some "quick" results first. Not just to get some improvements over miniDSP, but also to learn the ropes a bit before doing the complicated work. Then I'll take my time and do everything that I want to. Lots of DSP is the only way to get significantly higher audio performance.I will need 8 channels of processing. 4 channels (for the woofers) will require a good amount of FIR correction. It is a 3 way speaker, but the 2 woofers each need a channel of DSP to apply different settings.QuoteWhat do you mean by that? Does that mean the 21489 EZ-board will be easy to develop for?QuoteThat's what I want. There are a few algorithms in there, like the limiter, dynamic volume, dynamic bass, and harmonic synth that I would like to use.

author: BCZ
author_rank: Contributor
timestamp: March 07, 2017, 03:31:19 am
content: Just noticed. The miniDSP 2x4 HD uses the ADSP-21489, and I use 2 of them to get the 8 channels I need. If I get the ADSP-21489 dev board, wouldn't I have even less processing power since I'm running all 8 channels on one DSP instead of two?

author: Rasz
author_rank: Super Contributor
timestamp: March 07, 2017, 04:27:57 am
content: do you even need real time? is this supposed to be a product or a one off thing?you know, random $200 laptop with i5 processor has ~10Gflops you can manage as simple as point and click VST plugins

author: BCZ
author_rank: Contributor
timestamp: March 07, 2017, 04:45:07 am
content: Quote from: Rasz on March 07, 2017, 04:27:57 amYes I do need real time. (Well, a few ms delay for FIR is OK).It is a one off thing. I considered using an Intel NUC with Linux, but it still did not have most of the features I wanted. Great for FIR though, as many taps as I want. Even if it did, eventually I want to move on to a DSP platform where I can put it inside the speaker.I've heard of VST plugins, but I thought they're used for music production and not something real time like this?

author: Rasz
author_rank: Super Contributor
timestamp: March 07, 2017, 05:00:04 am
content: why do you need real time? is this supposed to be a foldback? speakerphone?

author: BCZ
author_rank: Contributor
timestamp: March 07, 2017, 05:03:17 am
content: Quote from: Rasz on March 07, 2017, 05:00:04 amI don't quite understand. How can a speaker not be real time? If I want to play music through it, I want it to play within like a few ms, not a few minutes later.

author: Rasz
author_rank: Super Contributor
timestamp: March 07, 2017, 05:39:59 am
content: Quote from: BCZ on March 07, 2017, 05:03:17 amReal time, especially hard real time, is required in radio equipment/telecommunications (nano/micro seconds), in broadcast/stage/live performance (single digit ms), in voice communications (tens of ms). Basically anywhere you need to react to the incoming signal. Thats where you use DSP.Playing music thru your speakers doesnt require real time, there is no feedback, music wont sound worse just because it came out 300ms after you pressed Play.

author: BCZ
author_rank: Contributor
timestamp: March 07, 2017, 06:10:13 am
content: Quote from: Rasz on March 07, 2017, 05:39:59 amOh then in that aspect it doesn't require hard real time. I do want to keep it under 40 ms so it is only one frame off sync when watching video.

author: Rasz
author_rank: Super Contributor
timestamp: March 07, 2017, 06:34:18 am
content: you can delay video instead

author: BrianHG
author_rank: Super Contributor
timestamp: March 07, 2017, 06:40:59 am
content: Quote from: BCZ on March 07, 2017, 06:10:13 amWhat's your video source?You know that if everything is coming from your PC, an 8 channel sound card + your own created wrapper sound driver which then feeds the hardware core audio driver will allow you to make any filters in software you like, converting any X source audio channels, be it stereo, or your own surround mixer, to any output with any filtering you like + there will be no audio/video delay since your wrapper driver tells the OS that there is an audio delay of X ms and the video playback will automatically lip-sync to the setting.

author: poorchava
author_rank: Super Contributor
timestamp: March 07, 2017, 06:51:06 am
content: You can look at TMS320 from TI. Delfino and piccolo families are rather cheap to start with, sub 200€ if memory serves me right.But beware, documentation is fragmented as hell, they have their own names for everything you might want to search for and the processor behaves in generally very different way than your standard Cortex-M microcontroller. There is also stuff missing where you'd normally expect it (no interrupt priorities, mostly no DMA for communication interfaces)On the other hand documentation if free, and there kinda is some help at TI community as long as you have one of the more popular processors. They are also available in packages ranging from reasonably small (they even have SOP-like if memory serves me right) to very big. Bigger members of family have CLA which is actually an independent coprocessor. The biggest Delfino I think is dual core + dual CLA all running at 200MHz. That is plenty for audio stuff.

author: BCZ
author_rank: Contributor
timestamp: March 07, 2017, 07:01:33 am
content: What's the advantage if delay wasn't a problem?I can't do a PC setup, because I eventually want the DSP to be inside the speaker for a pretty solution. I started off with just a speaker, and the number of different boxes and wires was insane, something like 11 boxes and 40+ sets of cables. It was crazy messy. Now the V2 speaker has the amplifiers and power supply inside the speaker, which reduces the number of boxes by 8 and a lot of wiring, but there is still a ton of wires from the DSP's and Wi-Fi streamer. For the V3 speaker I want the DSP to be inside the speaker and completely eliminate wires and extra boxes, just a speaker and a power cord.

author: b_force
author_rank: Super Contributor
timestamp: March 07, 2017, 07:16:21 am
content: Quote from: BCZ on March 06, 2017, 07:49:12 pmYou can do all these things perfectly with a ADAU1701 or other sigma DSP units.Much cheaper and less complex.The Sharc DSPs are highly overated.Have done quiet some PCB design for professional audio customers. Almost all of them want a Sharc, but they barely use 10% of what it's capable of.Unless you need a lot of memory (delays) or something very close to realtime adjustements (feedback) or monitoring, there is no reason to take a Sharc.Sigma dsps can be easily programmed with sigmastudio with a very cheap 3rd party programming board.

author: diyaudio
author_rank: Frequent Contributor
timestamp: March 07, 2017, 08:32:04 am
content: Quote from: b_force on March 07, 2017, 07:16:21 amTotal Rubbish. It's the only DSP processor that I came across with SPORT channels with up to8 channelsof dedicated I2S lanes with(Audio Decoders in ROM) It's also much simpler to program, with excellent documentation.

author: b_force
author_rank: Super Contributor
timestamp: March 07, 2017, 08:40:06 am
content: Quote from: diyaudio on March 07, 2017, 08:32:04 amThat's not rubbish, you're talking about a specific solution.Not a general audio filter solution, like the TS was mentioning.Compare apples with apples, not with other fruits.I can name a million other projects where a Sharc DSP is an absolute necessity.Not for just some active filtering.

author: diyaudio
author_rank: Frequent Contributor
timestamp: March 07, 2017, 09:34:27 am
content: Quote from: b_force on March 07, 2017, 08:40:06 amYou keep missing the point!!. (it's obvious you haven't work with the processor) people are looking formulti-channel processingeven if it's a simple IIR/FIR filter, who cares! the point is it's a multi-channel processor. i.e you can do things like (x2 3-way, x1 center, and x1 subwoofer that's 8 channels) at 192KHz sample rate (and it won't choke), explain to me how you going to do that with other processors?

author: nctnico
author_rank: Super Contributor
timestamp: March 07, 2017, 11:19:34 am
content: Easy. Daisy chain several CODECs on an SPI bus and use DMA to transfer the data. Ofcourse the CPU should be able to handle the amount of data and algorithm but that should go without saying.

author: diyaudio
author_rank: Frequent Contributor
timestamp: March 07, 2017, 11:39:36 am
content: Quote from: nctnico on March 07, 2017, 11:19:34 amsuch a cost reduction implementation!. you, of course, know I meant out of the box solution.

author: ohdsp
author_rank: Contributor
timestamp: March 07, 2017, 12:07:22 pm
content: The ADAU1452 Sigma DSP is a very very powerful device for the price, plenty of TDM and I2S interface options (48 TDM channels in, 48 TDM channels out), built in ASRC functions and many other useful and powerful features. I have worked with professionals before who claim you can get as much, if not more, processing power from the ADAU1452 than some of the SHARC devices in the right applications as the core is based on a newer better design....

author: Marco
author_rank: Super Contributor
timestamp: March 07, 2017, 04:01:10 pm
content: Quote from: b_force on March 07, 2017, 07:16:21 amThe popular hobby at the the moment is room correction, which requires quite long filters. Since the people doing it generally don't want or can't do much real DSP programming, they often do it with a straight FIR filter ... at that point you need a whole lot of power.BTW, the Bela audio board has plenty of channels too.

author: BCZ
author_rank: Contributor
timestamp: March 07, 2017, 04:05:06 pm
content: Quote from: Marco on March 07, 2017, 04:01:10 pmWait, you're saying there's a much more computationally efficient way to do the FIR filtering for stuff like room correction if people can do real DSP programming? Can you expand on that?

author: Marco
author_rank: Super Contributor
timestamp: March 07, 2017, 04:08:07 pm
content: As I said, FFT based filtering can be used even if you want low latency (zero latency FFT based filtering).

author: b_force
author_rank: Super Contributor
timestamp: March 07, 2017, 05:19:21 pm
content: Quote from: diyaudio on March 07, 2017, 09:34:27 amI am not missing the point, but you're only pointing out one specific market.What you're referring to, is only suitable for home/cinema audio type like market.There are many different areas where people don't even care about multi-channel audio.The AUDAU1701 etc has 4 channels out, or can even be used with an high quality DAC, CODEC and ADC.More than good enough for most active mutli-way speaker systems (unless you're looking for something specific)Yes, I have worked with these processors quiet a bit.BTW, I am not saying that the Sharc is rubbish, I am just saying that it's heavily overrated in just fairly simple active filter designs.The topic starter (BCZ) clearly said he just wants to make some active filters with it.If it's just for hobby, I would recommend building a dedicated media center pc instead.Much cheaper, much more possibilities, virtually endless delays.

author: b_force
author_rank: Super Contributor
timestamp: March 07, 2017, 05:26:18 pm
content: Quote from: Marco on March 07, 2017, 04:01:10 pmRoom correction is not just for hobby or 'popular', it's a fundamental principal in room acoustics.Widely used in professional setups for many years.What you're referring to is delay correction with a multi-subwoofer system.For what BCZ is planning to do with it, you don't need a Sharc and you definitely don't need FIR filters.

author: diyaudio
author_rank: Frequent Contributor
timestamp: March 07, 2017, 05:42:37 pm
content: Quote from: b_force on March 07, 2017, 05:26:18 pmWe in audiophoolery territory.

author: b_force
author_rank: Super Contributor
timestamp: March 07, 2017, 06:27:14 pm
content: Quote from: diyaudio on March 07, 2017, 05:42:37 pmGo read some stuff on Floyd Toole, John Eargle and basic acoustics.Or just call any acoustic consultant company (you know, the ones who develop concert halls, churches, theaters etc)Nothing audiophile about this stuff. Basic physics.

author: Marco
author_rank: Super Contributor
timestamp: March 07, 2017, 06:42:07 pm
content: Quote from: b_force on March 07, 2017, 05:19:21 pmI'm not familiar with exactly how it's implemented, but I don't see how the ADAU's can do base harmonic synthesis at least. He'll need something properly programmable with some significant amounts of memory for that.Quote from: b_force on March 07, 2017, 05:26:18 pmThat doesn't mean you can't do it as a hobby. Speaker design was always a common hobby, a hobby which has entered the digital realm for a while already.

author: Rasz
author_rank: Super Contributor
timestamp: March 07, 2017, 06:55:16 pm
content: I get it now. OP wants DSP because its modern wooden volume knob/oxygen free gold plated power cable, goes to 11 etc.How about some acoustic panels on your ceiling/walls?

author: BCZ
author_rank: Contributor
timestamp: March 07, 2017, 07:14:33 pm
content: OK I want to step in and explain what I want in much more detail because even on DIY speaker forums few people understand the complexity of what I want to do. It is clear there are people here who are very knowledgeable in audio.First, if I only need to do a couple of active filters, I would just stick with a miniDSP and call it a day. Boom, done, simple, small, and not horribly expensive. Of course, I need the common active filters like Linkwitz Riley filters for crossover and shelf filters for adjusting the frequency response for 8 channels, etc. But I also need a lot more.I want to build the best possible small speaker. There are a lot more that goes into that than just some active filters. I need "dynamic" filters.Here is what I need that the miniDSP can't do.- Multi-band compressor. Huge amounts of bass boost will be used. In order to protect the speaker from blowing itself up, a compressor/limiter is needed to dial back the bass when it exceeds the limits of the speaker. A compressor will compress the entire band, but I only want the compressor to compress the bass band, and hence the need of a multi-band compressor. This is easily done if a compressor is already available. Then, all that is needed is to separate the signal into multiple bands like a crossover does, apply a different compressor setting to each band, then sum everything back together.- Equal loudness contour: At low volumes, we need a lot more bass for the sound to sound "balanced". At high volumes, our hearing sensitivity to bass and treble has increased, and we want progressively less bass and treble as volume is increased. I want to implement this to preserve tonal balance at all volume levels.- Fake bass synthesizer. There is a psychoacoustic phenomenon where the ear can be tricked to think it is hearing a fundamental note lower than what it actually is with the right harmonic composition. It is used to make small speakers seem like it is playing bass when it is not. I want to have that for my speaker. A twist will be to activate this feature only above certain levels. For example, my speaker is capable of quite low and quite loud. It is capable of playing 40Hz at 95dB. But it can play 100Hz at 110dB. So eventually I want to program it in a way where the fake bass synthesizer is not activated until the incoming signal exceeds the limits of the speaker. For example, if I need to play 40Hz at 90dB, it'll just play 40Hz at 90dB. But if it needs to play 40Hz at 100dB, then the woofer will play 40Hz at its limit of 95dB and get the other the 5dB from the fake bass synthesizer making harmonics at 80Hz, 120Hz, 160Hz, etc where it is capable of playing 110dB.- Lots of FIR filtering - Not only for linear phase crossovers, but also to correct group delay of woofers and room correction. For low frequencies a lot of power is needed for those long FIR's.- Thermal compression compensator - Because the speaker is so small, the woofer requires 3-10x more power to achieve the same volume for bass as a normal sized speaker. 99% of the power is converted into heat. The problem is that the hotter the woofer gets, the more power the woofer needs to achieve the same volume because the sensitivity is reduced due to the higher temperature causing higher resistance. This means I need something to apply a boost to the woofer depending on the volume level. This is an advanced feature that needs to be written myself. A simplified implementation can be the same as the equal loudness contour, but after a certain volume it start boosting instead of cutting, but it is a "dumb" variable boost since it is not varying depending on the woofer's temperature based on a temperature model of the woofer.- Thermal limiter: My speaker can play 105dB without distortion, but it doesn't mean it can play 105dB for long periods of time because it can't handle that level of power for very long. Therefore, the volume needs to be gradually backed down. It can play 100dB for maybe a few minutes, then it'll get too hot and need volume to be further reduced. I need a feature to monitor the average RMS level and gradually adjust the limiter up or down. So if I want to play the speaker for hours on end, it'll automatically limit the volume to say 95dB to prevent the speaker from melting. This is another feature that needs to be written myself.I hope this gives a better idea of what I need.

author: BCZ
author_rank: Contributor
timestamp: March 07, 2017, 07:43:12 pm
content: I forgot to say, for the first step into the foray of DSP's, I would be happy if I can just replicate the miniDSP to do the normal active filters, crossovers, time delay, FIR, and compressor for 8 channels. Just that alone would reduce the number of DSPs from 4 miniDSP's to 1 and a huge reduction in wirings. I'm using multiple miniDSP's for the sole purpose of the multi band compressor. The miniDSP has 4 channel outputs, but only a single compressor per output. Therefore I'm making a multi band compressor by summing together the outputs using analog components, which is a very silly and expensive way when all it takes is a simple addition of outputs done within the DSP and then output to one channel. But that's the crap I have to deal with miniDSP that pushed me to go with my own DSP.All the other fancy dynamic adjustments of bass, treble, fake bass synthesizer, thermal compensation and limiter can come later.I repeat, I cannot use a PC. I started this project because I travel A LOT (mostly not for vacations unfortunately), and I want a nice sounding small speaker to bring with me to my travels. Of course I went batshit crazy in terms of how far I wanted to push this (the speaker cost me ~$4000 to build...), but it has been so much fun. Trust me, no audiophool BS, all science. I'm actually in the process of "upgrading" my cables from $1 cables to $10 cables because the ultra cheap cables have been causing me some problems. Hence, the small speaker and the desire to have everything in one box.

author: kilohercas
author_rank: Regular Contributor
timestamp: March 07, 2017, 08:12:54 pm
content: What i did is made programmer out of FT2232D, that simply disconnects boot flash from DSP, loads data from hex file, and that it, debugging is done via uart.This is my Mandelbrot test, and ti bowed my mind how much performance where is compared to STM32F4, at least 10 times faster

author: Marco
author_rank: Super Contributor
timestamp: March 07, 2017, 08:52:21 pm
content: Quote from: kilohercas on March 07, 2017, 08:12:54 pmThe M7 would be a better comparison. Harvard architecture memory banks with DMA, dual issue arithmetic/memory-ops. It's almost a DSP at this point, except like most processor designers the ARM designers can't get it through their bloody heads that you can cheaply implement something other than either brain dead branch behaviour or too smart for it's own good branch prediction. Still, it will handle branches a lot better than the M4.

author: poorchava
author_rank: Super Contributor
timestamp: March 08, 2017, 06:38:03 am
content: I wonder how does CM7s TCM improve performance over CM4s pure load-store model. I remember a project where we found out that when performing relatively simple operation on a large amount of data, memory load/store oeprations were the bottleneck of the whole system. In comparison TMS320 Piccolo was much faster as simlar FCPU.

author: JPortici
author_rank: Super Contributor
timestamp: March 08, 2017, 08:29:26 am
content: Quote from: b_force on March 07, 2017, 05:26:18 pmhe probably meant that it's becoming the new consumer / prosumer fad

author: diyaudio
author_rank: Frequent Contributor
timestamp: March 08, 2017, 09:16:21 am
content: Quote from: kilohercas on March 07, 2017, 08:12:54 pmI saw this a year ago on your channel (good work BTW), it actually motivated me to build my own version, I didn't use an ADSP-21489 like you have, but a smaller ADSP-21262 as I only needed 6 channels and I got them for 3$ a pop!... I might do an ADSP-21489 as my next challenge if time ever permits.An STM32-F7 costs almost the same as an ADSP-21489 !!

author: technix
author_rank: Super Contributor
timestamp: March 08, 2017, 12:02:18 pm
content: Maybe it is better to use a Raspberry Pi for hobbyist DSP building. Raspberry Pi + Cirrus Logic Audio Card. There will be some latency though, but not too much.The VideoCore IV GPU in the BCM2837 can handle the FFT and iFFT for you in its parallel fashion. You have 4x ARMv8-A Cortex-A53 cores (sadly no 64-bit kernel yet, although the cores and the bootloader are 64-bit capable) running your maximum optimized NEON SIMD DSP code at 1.2GHz. The sound card is capable of stereo 192kHz 24-bit sampling input and output at line level or SPDIF. And you can stream audio in and out through network.

author: Rasz
author_rank: Super Contributor
timestamp: March 08, 2017, 06:37:27 pm
content: Quote from: technix on March 08, 2017, 12:02:18 pmfor a couple of seconds before it starts throttling back to half speed while still telling the kernel its running 1.2GHzPee is terrible when it comes to real performance, great support thobut the idea is sound, paying $20 for bare DSP chip is insane when you can get whole 4 core dev board for less

author: Marco
author_rank: Super Contributor
timestamp: March 08, 2017, 10:49:31 pm
content: Unfortunately there is only one SBC with software to develop hard real time audio effects relatively easily (ie. Beaglebone black with the Bela code).The really cheap SBCs are all based on Amlogic and Allwinner CPUs, for which getting hard real time Xenomai to work would be a bit of a pain. The Xenomai developers seem to have little patience for helping with porting i-pipe to non mainline kernels, ie. the kind of kernels all the cheap SBCs use at the moment.

author: technix
author_rank: Super Contributor
timestamp: March 08, 2017, 11:43:43 pm
content: Quote from: Rasz on March 08, 2017, 06:37:27 pmJust put a heat sink on the BCM2837 and point a fan at it.

author: b_force
author_rank: Super Contributor
timestamp: March 09, 2017, 08:37:08 am
content: Quote from: BCZ on March 07, 2017, 07:14:33 pmWhy do you need those things for an hobby project?I have been in the professional field for quiet some years, and only in the PA/Sound reinforcement business those tings are serious problems.Still, as a last resort solution. You should simply never develop on the edges of what is capable.You can't beat physics with electronics so to say.Unless you're playing constantly on ear deafening volumes, home hifi never really gets into problems..BTW, like I said before, Sigma DSPs are perfectly capable of doing all these limiters, loudness compansation etc, just have a look at SigmaStudio.

author: technix
author_rank: Super Contributor
timestamp: March 09, 2017, 10:10:08 am
content: Quote from: Marco on March 08, 2017, 10:49:31 pmActually older Allwinner chips also have mainline kernel support. Too bad those are slow...Raspberry Pi have the bonus of having high quality I2S audio I/O and the Cirrus Logic Sound Card I was talking about is an I2S based one, so it won't suffer from the buggy USB core introducing jitter.

author: BCZ
author_rank: Contributor
timestamp: March 10, 2017, 05:34:02 am
content: Quote from: b_force on March 09, 2017, 08:37:08 amI want them because my reason for doing this project is to push the limits of performance, not just to build something. My time is valuable and limited, I don't want to make something that I could buy with money. That's not worth my time.Some of the features related to thermal and limiting are needed because the speaker is so crazy small yet I want incredible bass from them. This means LOTS of power. I don't need to play anywhere near ear deafening levels to push the speaker into thermal problems. 100dB of bass will do it, and 100dB of bass is loud, but not really that loud at all since the non bass sections of music is likely only 80dB.The other features like equal loudness contour are just to make the speaker even closer to the ideal sounding subjective speaker.I still can't find this, but can Sigma DSPs FIR filtering? If it can, how much can it do? I know SHARC definitely can, but I was looking at Sigma Studio, and a number of DSP algorithms like the harmonic synth available to chips like the ADAU1701 is not available for the SHARC DSPs.

author: b_force
author_rank: Super Contributor
timestamp: March 10, 2017, 06:58:17 am
content: Quote from: BCZ on March 10, 2017, 05:34:02 amGoogle is your friend, especially Analog Devices forum is full of it.One side note, people were mentioning audiophile type 'myth' solutions before, using FIR just for groupdelay and phase correction is definitely in the same league. One of the very last things to be worried about (if even worried about at all).FIR is great for pushing noise away (out of band), or correcting loudspeaker non-linearities.

author: BCZ
author_rank: Contributor
timestamp: March 10, 2017, 02:49:31 pm
content: Quote from: b_force on March 10, 2017, 06:58:17 amI wouldn't go so far to call these as audiophile myths. Yes, they're definitely on the lower side of priority because in a normal speaker the audibility of phase and group delay is likely to be inaudible. However, severe phase shift and group delay is definitely audible. There are time domain issues when using large bass boosts in a small vented enclosure like mine, and it easily exceeds the 1 cycle audibility threshold. This is not like expensive speaker cables and power cords that actually makes no difference, subjectively (double blind) or objectively. Even if it is under the audibility threshold, it makes the speaker objectively more accurate in the time domain.I feel at this point I want to just get a DSP that will allow me to do the basic functions of an active DSP crossover first without too much work just to get things started and reduce the learning curve, and then move on from there. There's a lot of hardware stuff that I don't know that I'm still trying to wrap my head around. I'm sure someone has made a DSP for active speaker crossover, and I think I would like to start there first. Any recommendations?By the way, Google sucks (or I don't know how to use it properly). I've been looking for audio DSP's for a long time, yet this thread is the first time I've heard of the "Open Hardware DSP platform". I bet there are others just like this that may help me a LOT to first get started.

author: diyaudio
author_rank: Frequent Contributor
timestamp: March 10, 2017, 04:44:47 pm
content: Quotehttp://www.digikey.com/products/en/development-boards-kits-programmers/evaluation-and-demonstration-boards-and-kits/787?k=ADAU1452

author: Marco
author_rank: Super Contributor
timestamp: March 10, 2017, 04:56:41 pm
content: An expert could use the ADAU to save time when applicable, if you want to actually learn something about DSP programming avoid it ... all it can teach you is self deception about the limitations not being relevant.It's not a spring board, it's a kiddy pool.

author: alexanderbrevig
author_rank: Frequent Contributor
timestamp: March 13, 2017, 09:40:13 am
content: Quote from: Marco on March 10, 2017, 04:56:41 pmIt's a good place to quickly prototype.The few things I tried to implement was easily done with the sigma studio.If there were a way to easily add custom blocks it would be awesome!Some times, all you need is a small pool. (sentence got weird with the work kiddy there...)

author: BrianHG
author_rank: Super Contributor
timestamp: March 13, 2017, 10:35:37 am
content: I just ran into this:

author: b_force
author_rank: Super Contributor
timestamp: March 13, 2017, 10:45:52 pm
content: Quote from: Marco on March 10, 2017, 04:56:41 pmI guess, for me it's all about what result you get.I don't care if that's with kids building blocks, or die hard programming.In fact, the last one takes sometimes way to much time (for me)

author: BCZ
author_rank: Contributor
timestamp: March 13, 2017, 11:55:17 pm
content: Quote from: b_force on March 13, 2017, 10:45:52 pmCompletely agree. I'll get my hands dirty if I have to, but if there is a kiddy toy way of making it happen, I'm 110% for that. I'm not going to reinvent the wheel.