Shop OBEX P1 Docs P2 Docs Learn Events
How to do wav player? — Parallax Forums

How to do wav player?

RaymanRayman Posts: 14,768
edited 2015-12-24 17:45 in Propeller 2
Now that I have some SD card reading functions, I'm thinking about doing a wav player...

But, the DACs are only 8-bit and good wav files are usually 16-bit...

I guess you'd want to dither the DAC in time to get better resolution.

But, is this any better that what we did on P1?
Maybe the amount of external filtering needed is reduced?

Comments

  • Seems to me, a small amp circuit added to one DAC would make for the MSB of a 16 bit DAC.
  • RaymanRayman Posts: 14,768
    Hmm... Actually using two DACs might work...

    The headphone amp I've been using has a 10k input resistor and 10k feedback resistor (for each channel).
    Maybe there's two different resistor values I could use from the two DACs to form a summer circuit.
    That might work nicely...
  • Didn't think about it that way. Rather than amplify one, attenuate one. Either way, getting one DAC range to closely match the step size of the other one would yield the 16 bits, or something close.

  • cgraceycgracey Posts: 14,209
    In the next FPGA file release, there will be smart pins. These can dither the 8-bit DACs using 256-clock PWM to switch between to adjacent values or pseudo-random dither of one-LSB-magnitude to realize 16-bit DACs.
  • :) Merry xmas Chip.
  • RaymanRayman Posts: 14,768
    Just read on the web that the idea of using two 8-bit dacs doesn't usually work because in practice the DACs are not perfect and the LSB steps are not equal. This makes it so the combined steps are messed up...

    So, I guess smart-pin dithering is the way to go...
  • Makes sense. Looks like Chip is ahead on this anyway.
  • cgraceycgracey Posts: 14,209
    potatohead wrote: »
    :) Merry xmas Chip.

    Hey, Merry Christmas and Happy New Year to all you guys!

Sign In or Register to comment.