Announcement

Collapse
No announcement yet.

Home Brew ADC/DAC

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Home Brew ADC/DAC

    Anyone here ever toy with the idea of creating an ADC and a DAC from scratch? I've never found affordable computer sound hardware that sounded even halfway decent and I've got so many parts lying around I think I could do it from scratch... that is, after about a year of research and education...

    The noise performance of everything I've seen is abysmal

    (BTW I'm poor but I have lots of time and parts so I never buy anything I think I have some NOS germanium power transistors from 1975 hanging around...

    Beware: rant approaching

    I'm extremely intrigued by real time FFT... by amplitude transfer curves modulated by signal level... by records of sample streams with many taps stuck into it like digi reverb, but that have positions that shift over time (cho/fla) and not based on cyclical crap... how about a chorus reverb hybrid that breathes with the amplitude of the input signal... oscillators that speed up and slow down a la leslie, but driven not by a footswitch but by the frequency domain info coming out of your pickups. FFT based distortion schemes like the drawbars on a hammond B3, one set PER STRING of your guitar, tweaked ever so subtly by a breath controller or a wah pedal, all in sync, and patched into a mixer from hell... then piped into a bank of ... say 8 >98db s/n DACs and into 8 different tube heads out to 8 different speaker cabinets... octophonic sonic megamultiplexing!
    You wanna talk touch sensitivity? Jeebus H Christ on a pogo stick, we can have it all!
    With control signals based off of both the amplitude and the frequency domain of what's coming out of your guitar... dear lord, we HAVEN'T EVEN SCRATCHED THE SURFACE!!!
    (I plan to hijack all the necessary proc. power from a PS3 running linux... 1.8 teraflops + LADSPA = my cup of tea)

    Why haven't digital effects made a real step forward in 20 years?!?
    The mating of chorus and reverb with non-static/cyclic control should have been accomplished long ago.
    It's like when NASA put a man on the moon... and then another, and another, and one day...
    now we don't get out of Earth orbit and we accept it as the limits. Dar dar dar

    forget digital models of tube amps - it's like using a computer for a damn drum machine replacement/replica of a human and a trap set. Computers have wonderful places in music... but none of those places is pretending to sound like a human drummer or an honest to god tube amp (Okay, the programming on Meshuggah's Catch33 is nothing short of flawless, God-like, and indistinguishable from the drums on I - I was totally fooled for a month before I found out it was programmed, but they created the Drum kit from hell, which is like... I dunno... 3 gigs of samples from the drummer's set... and anyway, I'm convinced that Meshuggah are not humans - they're aliens and beyond comparison with the rest of us. I mean just listen to their vocalist - heavens to murgatroid, it's hideous and disgusting - the mating song of alpha centaurians, perhaps... and who the hell plays in 23/16 - 4/4 polyrhythms at 220 bpm?
    But check out Aphex twin... or Radiohead... they do things with computers that you can't do any other way... they use the computer... in it's right place... right place...(hehe)

    Okay, I'm feeling much better now.

    So... any thoughts on a homebrew low noise high performance ADC or DAC?
    Also - any other coders lurking here, afraid to represent for fear they might be bludgeoned with vacuum tubes for their heathen ways (j/k I love tubes, too you guys, I just would like to see tubes and C++/<language of choice> go hand in hand)

    Michael Miller

  • #2
    I'm not sure what you're on, but can I have some please? srsly though....

    I am kind of a coder, I'm currently designing embedded systems based on cheap microcontrollers and DSPs for my day job. I mostly work with assembler, though I do some Agilent VEE and Labview.

    The M-Audio Delta 1010 converters sound just fine to me, and it took me a lot less time to earn the $400 I needed to buy it than it would have to make a good sounding converter from scratch. It has great Linux support, too.

    PC-based audio will always have latency, which I like to measure in "feet from the speaker", bearing in mind that sound travels at about one foot per millisecond. If you're not careful, even running something like an audio optimized Linux distro, you can end up playing an amp that is effectively half a city block away for the purposes of ear-brain feedback. Complicated FIR or FFT based filters will always introduce latency: a 4096 point kernel at 48kHz takes 85 milliseconds, and your amp just moved another 85ft down the street. Well maybe it's 42.5 or 170, I forget, but the argument is still valid. This (IMO) is one reason why digital guitar effects haven't moved as far as you'd like in 20 years.

    The latency of FIRs can be reduced by transforming the kernel to move all the energy to the beginning instead of the middle, but I don't know if this is possible with FFT-based filtering, especially since you need to overlap-add multiple blocks to get acceptable sound quality. IIRs naturally have low latency.

    I have written a number of tunes that use guitars processed with samplers, synths, and various kinds of software, and I can just about stand Meshuggah in small doses but I find that I most enjoy playing a plain electric guitar plugged straight into a normal tube amp.

    I have played with adding digital reverb to homebrew tube amps, but the old Accutronics spring reverb takes some beating...
    Last edited by Steve Conner; 02-27-2007, 09:50 AM.
    "Enzo, I see that you replied parasitic oscillations. Is that a hypothesis? Or is that your amazing metal band I should check out?"

    Comment


    • #3
      Originally posted by Steve Conner View Post
      I'm not sure what you're on, but can I have some please? srsly though....
      Coffee. Lots and lots of Coffee.

      The M-Audio Delta 1010 converters sound just fine to me, and it took me a lot less time to earn the $400 I needed to buy it than it would have to make a good sounding converter from scratch. It has great Linux support, too.
      I haven't heard that one yet. thanks for the info - and linux support is essential as I'm running the planet CCRMA distro with the stable realtime kernel.

      When I said FFT I was actually simplifying things greatly...
      I'm working on a scheme where the frequency domain info trickles in and out in parallel streams - dynamically populates the data container.

      keep in mind that with judicious overhead to the system, I'll have still have 18.4 million flops per sample at 96khz for DSP which allows for high order analysis of incoming signals and some fancy prediction schemes
      That is, IF I can hijack all that processing power and repurpose the video coprocessors as audio ones. That remains to be seen.
      Otherwise, I'll wait until I can afford a normal computer that can do what I need it to do. I've been working on this for about 10 years so I can waita few more.

      The technique I'mworking on is a hybrid, playing to the strengths of FIR, IIR, and some other TLAs (three letter acronyms)...and is able to quite accurately identify any partial within Three quarters of a cycle. So I have a maximum delay of 37.5ms to identify a 20hz component and everything else is faster. I can handle a 37.5ms settle time for the sustained pitch tracking data at the extreme low end of the freq. band of interest. It is generally within 10% after half a cycle (which is better than most people's ears at 20 hz

      The system makes multiple passes over the information and refines things as time goes on, but preliminary results show that the initial fast tracking is accurate enough that you won't be able to tell. In addition to corrections coming from slower, more accurate processes based on the input signal, the system is also doing second order analysis and correcting itself, in most cases, before the slower first order processes are complete.
      Needless to say, there are a few "bugs" but I've been ironing them out.

      Mostly, I'm dissatisfied with the system's performance on initial pick attack but I've honed it to chuck the most unpleasant results from transients (which aren't exactly harmonic anyway) out the window. The transients are represented in the system by the digital version of the transients themselves
      "The best model of a cat is a cat, preferrably the same cat." (I can't remember who said this... I think Bob Pease quoted it from someone and I got it from him)

      I agree that a lack of processing power is one major reason that we're just now starting to see digital modelling amps, etc... that sound good (as long as you don't crank them up too loud) but I think the biggest block has been an extreme lack of creativity. For example:

      Lets say we have a digital signal called SIGNAL running at 100khz (to make the math simple) and we have a 1 * 100k array of samples. We have a pointer called NOW and another pointer called THEN. NOW moves through the array at 100ksamples / sec, recording SIGNAL as it goes when it gets to the end of the array, it loops back to the beginning. THEN trails behind now, oscillating around a centerpoint of 5000 samples at a fixed rate. Output is (NOW+THEN)/2
      This is a digital 50ms chorus (I'm sure you already knew this Steve, I just put it in so I can explain some ideas for making it less monotonous, sterile, and boring with VERY little extra processing power)
      No one has ever done anything to make it more interesting or organic.
      How about phasers.. wahwahwahwahwahwahwahwahwahwahwahwah
      Doesn't it ever get old?

      Why not remove the oscillator and replace it by a number of samples (added to or subtracted from the 5ksmps delay) based on a control signal derived from the amplitude of the input?
      Now you have the control end from an envelope filter or compressor, mated with the business end of a delay or a chorus. The line between chorus and delay has just been blurred and it has the touch sensitivity of a quacky envelope filter, but it's not all up in your face... set output to (NOW + .1*THEN)/1.1 and you have a subtle, organic effect that is touch sensitive and almost subliminally perceptible...
      or...
      set DelaySamples = 100000 / delay in ms
      have a drift control (0-1) set by a knob or expression pedal
      and a control signal (0-1) derived from audio signal amplitude
      such that array[THEN] = array[(NOW - (DelaySamples * control * drift))]
      or
      array[THEN] = array[(NOW - (DelaySamples - DelaySamples * control * drift))]
      or
      array[THEN] = array[(NOW - (DelaySamples + DelaySamples * control * drift))]
      hell, put all 3 together, it's still far less processing than a digital reverb
      dial in the wet to wherever you like it with another expression pedal
      Is it a delay? a chorus? a flanger?
      I don't know, but it doesn't go wahwahwahwahwahwahwahwahwahwahwahwah
      or shhhhweeeeeshhhhhhweeeeeshhhhhhweeee

      It would *breathe* with your playing.

      Take a digi reverb algorithm and "twiddle" the taps ever so slightly with this scheme and it would be like... like standing in a room that changed its shape and size in real time as you played, because of how you played.

      How about leave the classic cyclic efx as is, but vary the speed of the oscillators based off of an input signal derived control signal like amplitude or rate of change of amplitude

      You'd get sweet leslie like effects, much more organic and less sterile, which is the common complaint against digi efx

      And all I just did was say hmm... here's the front end of this existing effect... and the back end of that existing effect... lets see what happens when I fit them together - no fancy processing needed.

      Jesus, I should be coding this stuff up, not blabbing about it... but my patience for coding is limited which is why I do it only as a hobby. It's nice to have a place to rant about this stuff because I've never met anyone who I can discuss it with. I have techie friends and musician friends, but no musician techie friends, at least no hardcore ones.

      But anyway... did I manage to illustrate my point that there's been a severe lack of creativity on the part of the digital efects designers for a long time now? And now they're going off in the wrong directions, trying to model what we already have instead of doing something *new* and playing to the strengths of the DSP world, namely, to do things that can't be done any other way, or that can be done better that way. All of my ideas could be patched together out of analog synth modules, but the resulting complexity and snakepit of patch cables is better hidden digitally behind a clean user interface.

      Am I the only person in the world who feels this way?

      Maybe I'm as crazy as people think I am

      Off the subject - I too can only stand Meshuggah in small doses... I only brought them up as the only example I've ever heard where a computer was used to do something that existing technology (humans with drums - ooh high tech) does quite well.
      They had good reason to do it, too - Catch 33 was composed as it was, on a computer, to keep their ingrained neurological playing habits from interfering with the composition process. Then they learned to play what they composed. Pretty unique approach to songwriting.

      Okay, I'm going to stop before this turns into a book

      Michael Miller

      Comment


      • #4
        Originally posted by mjmiller View Post
        I haven't heard that one yet. thanks for the info - and linux support is essential as I'm running the planet CCRMA distro with the stable realtime kernel.
        M-Audio do have Linux drivers for their sound cards.

        These are the people who did the drivers:

        http://www.opensound.com
        It would be possible to describe everything scientifically, but it would make no sense; it would be without meaning, as if you described a Beethoven symphony as a variation of wave pressure. — Albert Einstein


        http://coneyislandguitars.com
        www.soundcloud.com/davidravenmoon

        Comment


        • #5
          Wow, this is turning into a book :-)

          The reason for the "lack of creativity" in digital effects is probably the same reason that you don't have any "hardcore musician techie" friends. The average musician is conservative and not very technical. Heck, the average musician probably plays in a wedding band and needs to nail the sounds of the songs he/she is covering.

          Now, developing a standalone digital effects box takes about a year of R&D and a fair up-front investment (for instance, the dev tools for SHARC DSPs are proprietary and cost about $10k) and these costs have to be recouped by selling a shitload of them. So in order to get the most sales, digital effects units are aimed at the average musician defined above. That means making them sound like classic amps and stomp boxes, but smaller, lighter, and cheaper.

          Anyway, the first thing you described sounds pretty neat. Is it some kind of analysis and resynthesis system that will take your instrument signal apart in the frequency domain and put it back together as whatever you fancy?

          The second batch of algorithms you described are ultimately envelope controlled comb filters, or banks of comb filters. Moving taps on delay lines in real time without nasty artifacts is a classic topic that comes up all the time on the music-dsp mailing list, and I shudder to think what kind of non-bandlimited horrors you would expose if you tried moving the tap at audio frequencies. But if you can get it right, I bet it would sound pretty neat too, but probably not in a way the man in the street would ever appreciate

          BTW, my music machine dual boots with XP and the Studio-To-Go Linux distro. So I probably have the same Linux bits as you, if you ever fancy collaborating on any coding.
          "Enzo, I see that you replied parasitic oscillations. Is that a hypothesis? Or is that your amazing metal band I should check out?"

          Comment


          • #6
            The reason for the "lack of creativity" in digital effects is probably the same reason that you don't have any "hardcore musician techie" friends. The average musician is conservative and not very technical.


            You know, that makes good sense… I always thought of musicians as creative types, but I guess it’s actually only a small percentage. So THAT’s why I hate most of the crap that dribbles out of the radio these days… I’m kind of a prog guy, which leaves me listening mostly to music from before I was born, when everyone was on acid.

            Anyway, the first thing you described sounds pretty neat. Is it some kind of analysis and resynthesis system that will take your instrument signal apart in the frequency domain and put it back together as whatever you fancy?


            That’s the core of it, in a nutshell…

            The second batch of algorithms you described are ultimately envelope controlled comb filters, or banks of comb filters. Moving taps on delay lines in real time without nasty artifacts is a classic topic that comes up all the time on the music-dsp mailing list, and I shudder to think what kind of non-bandlimited horrors you would expose if you tried moving the tap at audio frequencies. But if you can get it right, I bet it would sound pretty neat too, but probably not in a way the man in the street would ever appreciate


            The taps were supposed to move slowly, like chorus oscillator speeds... sorry, my brain goes faster than my fingers

            I think the problem comes partially from the fact that in the DSP world, control signals generally run FAR slower than audio signals – giving you the “zipper from hell” as your delay tap jumps 200 samples at a time at 20hz when you actuate the expression pedal. Or whatever.

            I didn’t go into detail on the control signals, did I….
            1) They should run faster than any audible frequency so no audible artifacts could ever be created by a control frequency. Preferrably, they should run AT the audio frequency, if processing power permits.
            2) They should have the same bit depth as the audio signal (24 bit float, perhaps)
            3) Delay line taps shouldn’t move fast. If you limit them to 2 samples per control clock cycle and everything runs at 96khz, they produce, at worst, 48khz sound. No artifacts. And that’s WAY faster than I intended – that would produce a pitch and tempo shift of an octave! I was thinking more like a standard chorus, a few cents, just instead of driven by an oscillator, the taps are driven (at tradition chorus tap rates) by a control signal derived exactly the same way a compressor’s control signal is derived, with a nice slow attack and release

            It all boils down to fast, high resolution, properly scaled control signals.

            And they've been doing it for well over a decade: check out digital choruses and flangers. They are moving taps in delay lines in real time, are they not?

            Here's a way to do it that requires far less processing power than, say, a digitech RP80 has

            Take your chorus algorithm
            get rid of the oscillator
            Take your compressor algorithm
            set the attack and decay nice and slow - the "swell" settings
            hook the compressor's control signal up to the chorus

            Poof

            If that wouldn’t work, I’ll eat my hat.


            BTW, my music machine dual boots with XP and the Studio-To-Go Linux distro. So I probably have the same Linux bits as you, if you ever fancy collaborating on any coding.


            Sweet. My project is... a MESS right now which is part of why I'm avoiding it for now I need to step back and take a look at the big picture, meditate for a month or two, then perform surgery, extracting the important parts and place them in a new framework. It's kind of a 10 year old ball of poorly commented twine... but I'd love to collaborate with you on it. I'll send you chunks as they become presentable, if you like.

            Michael Miller

            Comment

            Working...
            X