Go Down

Topic: Adding Envelope to an Output? (Read 3 times) previous topic - next topic

Magician

Quote
Quote from: Magician on September 20, 2011, 02:01:39 PM
Edited: Just realized, probably it would sound awful  with 8 original bits scaled down to even less... But idea would still be practical with 16 bit or 24 bit R2R. Only less outputs 'd be available

Yup, that's the whole problem. That's why I want to do something in analog-domain. ;-)


The problem only I can see, is not that design isn't possible in digital domain, but only less outputs would be available in digital domain solution, than if we use PWM filtered to analog -> to VCA, just because PWM use single pin. So basically problem narrowed down to shortage of digital pins, ( for 8 voices x 8-bit envelope for each, would require 16 x 8 = 128 outputs ).
It could be easily solved with shift register extender.
Analog multiplier (1 transistor VCA) posted above create more distortion than  4 bit sound, and should not be considered seriously. More sophisticated VCA require more components, and higher price IC for all design.

What I'm saying, that shift registers + R2R 16-bit (homemade DAC) would win for 
quality to simplicity/price ratio.

If we set amplitude resolution to less than 256 levels, R2R could be simplified to 14 (64 levels) or 12 (16 levels ).

WilliamK Govinda

But all that would take too many cycles and sample-rate would lower too much. To be honest, I could just add Envelope at 8-bits, but it would require multiplication or division and it slows the whole thing down to a point that I get like 1 voice.

Now, imagine the current Beat707 SY LE, which does 8 voices, now, combine that with 4 PWM outputs, there's no extra cycles added, and the Envelope math is very simple and is not per-sample calculated, so it would still fit on the code. Doing the VCA outside in analog domain would make all this work like a charm. Its only 4 voices, but still, 4 dual OSC voices, not bad for a single ATmega328. ;-)

Another path would go nuts and use another chip for processing audio, like my XMOS Shield idea, but that's another talk, check the other thread. ;-)

Wk

Magician

Than just add digital pot, single chip: AD5204 / AD5206




WilliamK Govinda

Ah, I forgot about those, I did check some last time but they are a bit expensive, but them again, its a single chip solution, so I will check this out again, thanks.  :smiley-red:

Wk


Go Up