Digital audio mixer - Page 1
Forum section: electronics / projects

author: colinza
author_rank: Contributor
timestamp: June 30, 2017, 06:30:41 am
content: Hi allFirst poster here, long time watcher of the videos.I've been playing with a project idea to build a digital audio mixer and wanted to see if anyone had some tips on going about designing such a beast.I want this mixer to have a couple of audio inputs and some outputs and be able to mix each input into each output flexibly as well as adding some stuff like compressor/limiting and an equaliser. Doing this in pure analog seems like a nightmare, and also difficult to add digital control to all of those elements because I'd like to be able to configure the mixing over ethernet or a nice HMI.So I feel like that leaves me with doing most of it in software, which is great. So then I was thinking of having the Teensy 3.5/6 be the main workhorse for some real-time DSP, that or trying to get it all into a raspberry pi (or maybe asus tinkerboard because the rockchip silicon has a bit more lightning in it) and just mixing through Jackd.Then there's the matter of getting that audio in and back out again with minimal latency or distortion, I was initially looking at options for the best SPI/I2C/I2S DAC's and ADC's but then I came across the so called "Codec" chips like the TLV320AIC, WM8731 and PCM3060. I can't really decide on the best one to use, so it's mostly down to availability which for me crosses out the WM8731 because I can only find them on giant Uno style shields here.Anyway, those all provide some kind of serial bus and then I imagine for the Linux SOC based setup I'd need to build some kind of driver which ALSA can use and perhaps even build some other interface that provides the audio to the soc via USB - that all sounds like a horrible pain which leans me back towards the teensy idea.Basically, I've gotten a bit lost in the weeds and hope someone has a good idea for architecting audio stuff

author: hamster_nz
author_rank: Super Contributor
timestamp: June 30, 2017, 06:59:24 am
content: I am having some issues in seeing what your inputs and your outputs are (both audio and user interface), and the level of audio performance and latency you want. Is it just for playback, or for live gigging?If you combine that with your desired feature list you should have a clearer spec for the required hardware.

author: alexanderbrevig
author_rank: Frequent Contributor
timestamp: June 30, 2017, 07:27:26 am
content: It's funny, I've been thinking about a similar project for a while.You should decide on some specs.Inputs: line level, microphone preamp, phantom power, balanced or unbalanced?Outputs: line level, balanced or unbalanced, headphone amplifier, speaker amplifier?The next requirement has to do with what you use for processing and that's the acceptable system latency.Once things get into the digital domain it's relatively easy. One thing I would encourage is to have the compressor and EQ "blocks" on at all time so that signals propagate through the system in phase (or close to it, at least).For a couple of inputs and outputs, I think the Teensy 3.6 should be capable. However you should probably be prepared to avoid the Arduino libraries and build it using interrupts and DMA.FYI for a super simple solution, with compression and EQ there's something like this:https://datasheets.maximintegrated.com/en/ds/MAX98090.pdfI did not get around to try it, but I guess the quality is OK for some applications.NB: not at all an expert, but I've been through some R&D and experimentation with the same idea - as I needed it back then. Since then I've changed my mixing console and have more than enough so not invested in the project any more.

author: colinza
author_rank: Contributor
timestamp: June 30, 2017, 07:31:22 am
content: I'd basically like a device which allows me to do both. My current setup takes audio into a mixing desk from my desktop PC combined with my guitar stuff. What annoys me with this desk is that there's only one output which means having to switch the output between my monitors and my headphones.This trivial problem is a great excuse to try invent a problem with solutions way outside of my experienceMy inputs are all analog "line-in" - I already have studio grade pre-amps and DACs so I don't need to worry about decoding SPDIF or HDMI or whatever. What I used to have was a compressor/limiter which was great until one of its channels broke, so I want those functions back too.Basically I'm thinking of a noob version of something likehttp://www.music-group.com/Categories/Behringer/Signal-Processors/Equalizers/DEQ2496/p/P0146andhttp://www.music-group.com/Categories/Behringer/Signal-Processors/Multi-Effects-Processors/FX2000/p/P0A3Pshoved into one box

author: hamster_nz
author_rank: Super Contributor
timestamp: June 30, 2017, 07:49:24 am
content: I have a couple of these codec boards in an ESD bag somewhere.https://www.tindie.com/products/kuupaz/fe-pi-audio-z-v1/I was going to do some experiments with multichannel audio, but haven't got any further than putting one on a Raspberry Pi. Works fine.The codec chip on that looks to be low cost simple way to provide a stereo I2C audio in/out.

author: colinza
author_rank: Contributor
timestamp: June 30, 2017, 07:54:31 am
content: Quote from: alexanderbrevig on June 30, 2017, 07:27:26 amThanks for all the advice.That Max chip looks pretty fair, not pro-audio grade but probably totally fine for me. Sadly I can only find it in TQFN, but I guess that's vaguely workable with a standard soldering iron. But I really like the idea of ordering a sample of that just as a starting point.

author: diyaudio
author_rank: Frequent Contributor
timestamp: June 30, 2017, 08:56:27 am
content: Quote from: colinza on June 30, 2017, 06:30:41 amYou can. simply use a AD Sigma Chip, define a processing route audio chain using Sigma Studio software, use your imagination and design any DSP" realistically you can throw at it", use a MCU, DAC and ADC. The only firmware you need to develop, is routing of audio channels (MCU I/O drivers for the ADC, DAC) with register update host code for the sigma audio blocks you pre-configured. Using this technique you don't write a line of DSP code, use low resource MCU like MCU (8-BIT optional), or a resource heavy system like a raspberry pi + LCD with funky graphics for aesthetics.Today, a project like this is obtainable. specialized mixers will use SHARC DSP or FPGA with propriety processing algorithms (which is not the objective I assume)If you do everything from scratch, it will take months of dedication and many R&D cycles.

author: colinza
author_rank: Contributor
timestamp: June 30, 2017, 09:19:56 am
content: Quote from: diyaudio on June 30, 2017, 08:56:27 amYour username is very encouraging. This is great, thanks!I'm not at all afraid of writing DSP code, I'm actually more afraid of trying to figure out the ALSA/Pulse/Jackd mess of Linux audio stuff, but it sounds like there's far better options anyway which is fantastic.

author: MosherIV
author_rank: Super Contributor
timestamp: June 30, 2017, 09:32:07 am
content: QuoteI am not sure what Compressor or limiting is.I believe 'Equaliser' means changing the high/low tone. To do this in the digital domain you need to do it with Fast Fourier Transforms.I do not thing even the most capable ARM Cortex M7 can do this in real time, certain not for more than 1 channel, let alone in stereo.(the key part is 'real time')I am not familiar with the CODEC chip that you mentioned, maybe they have the necessary DSP in them?Sounds like a cool project. Have fun

author: colinza
author_rank: Contributor
timestamp: June 30, 2017, 09:53:20 am
content: Is FFT really the only way or are there more optimal mechanisms? I mean, Winamp had an equalizer in it way back when since I had a Pentium 133On that though I did consider leaving the equalizer / tone control stuff as an analog bandpass filter with the opamps gain for each output/frequency set via digipots. But this would require a lot of digipots, and they aren't exactly cheap.

author: dmills
author_rank: Super Contributor
timestamp: June 30, 2017, 10:00:47 am
content: Quote from: MosherIV on June 30, 2017, 09:32:07 amActually EQ is EASY in the digital domain, and does not require realtime FFT (Which is a pain anyway from a latency perspective), think IIR biquad or the like, easy to compute and relatively cheap in multiplies and adds.No problem at all on a M7 with floating point, and only a small problem to code up in fixed point if you lack the FPU.Compression and (especially) limiting are actually harder to do well as a gain cell is in some sense a multiplier, and you must ensure that both input and control signal are band limited to ensure that the product has nothing >= Fs/2, often oversampling helps here.Generally the I2S/TDM dedicated parts are better then the codecs (which tend to be designed for PC audio), but whatever works.For MIC amps I like the THAT parts, the gain control is by I2C which is a little tedious (I really dislike that bus), but they work well. Do remember to consider the issues around Phantom power and its failure modes, it has some interesting ones if you have a short in a mic cable with P48 on and caps charged.Big mixers running many tens of channels tend to be FPGA based, because FPGAs do parallelism really really well, but lots of the smaller stuff is CPU based.Regards, Dan (Who does this stuff for a living).

author: fcb
author_rank: Super Contributor
timestamp: June 30, 2017, 11:47:21 am
content: Start really simple - perhaps a 4x2 without any eq. Then add eq. etc..Well worth studying how the pro mixers work, plenty published on them. The bussing structure is going to be your number-one headache, taking the "I'll just suck all the data in and deal with it in software" is going to fail pretty quickly when you get beyond a small number of inputs.

author: colinza
author_rank: Contributor
timestamp: June 30, 2017, 12:09:28 pm
content: Quote from: fcb on June 30, 2017, 11:47:21 amDo you have any links? Not looking for anything to give the game away but struggling to find good resources.

author: fcb
author_rank: Super Contributor
timestamp: June 30, 2017, 02:06:33 pm
content: Not really any links, but just found this on SSL's site.http://sslweb.solidstatelogic.com.s3.amazonaws.com/content/system-t/The-SSL-Tempest-Engine.pdfAMS-Neve or Calrec might have something. Sound-on-Sound likely published some articles about digital desks.

author: colinza
author_rank: Contributor
timestamp: July 10, 2017, 07:55:41 am
content: Quote from: diyaudio on June 30, 2017, 08:56:27 amI read up about the SHARC DSPs and requested a sample of the adau1772 from Analog. It looks like the best solution right now.Hopefully it will arrive this week and I can start twiddling on the weekend!If I get something working without releasing all the magic smoke I'll start documenting it. Wish me luck

author: diyaudio
author_rank: Frequent Contributor
timestamp: July 10, 2017, 02:41:48 pm
content: Quote from: colinza on July 10, 2017, 07:55:41 amThis is not how this chip works, sample then (plug and play), you need to buy a USBi cable, then using usbi cable, program the sigma target (with all the supporting sub circuits to boot it up) . Rather buy a development board and start from there. The amount of sub circuits will be a challenge to say the least, given the fact you never worked with this sort of stuff.

author: colinza
author_rank: Contributor
timestamp: July 10, 2017, 06:46:57 pm
content: My bag of tricks has the necessary programmers. The dev boards are out of the question, they are just way too expensive in africa

author: colinza
author_rank: Contributor
timestamp: August 07, 2017, 04:05:34 pm
content: Eyyyyy, I'm back. I have a DAC. I even made it quack.Okay but seriously I did get the wrong device, doh! The 1772 is specialised towards noise cancellation so it doesn't have any of the other cool DSP functions in it.Anyway, all is not lost I can at least learn how these work. So I put a copy of the datasheet next to the toilet and realised a good place to start is actually just controlling it via i2c directly and forget about sigmastudio. Then I can use the DAC and ADC's with I2S from some host... say.. a teensy.Neato!Bit of kapton tape and sheer dumb luck got it soldered onto a QFN adapter. Tested every contact, no shorts. hooray.I read the pin list, and copied the basic startup schematic onto a breadboard... Yeah, I know, a breadboard, but hey lets abuse the natural capacitance between the rails for a neat crystal setupOk so it's a spiders nest, moving on.Great Scott, Marty! It worked and I can poke at it from my pi over i2c. Alright then, I'll revert back in a year or two when I have more time to do useful things with it.Oh, the USBi interface mr diyaudio mentioned is a real thing, a reeeeal stupid thing but the FreeDSP project has a board that emulates it without spending $100 on a freaking USB cable. But oh wait, there's a FreeDSP project which has a bunch of opensource designs for the ADAU chips so I should just build one of those!