<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi, Martin.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">A first-order digital delta-sigma modulator would be a difference followed by an integrator and a quantiser in a feedback loop. The difference is between the input (multi-bit) and the output (1-bit); the integrator is a unit-gain, 1-sample feedback loop, so [rpole~ 1]. Particularly, I'm talking about a bipolar DDSM where the quantiser gives 1 for signals >= 0, -1 otherwise.</div><div><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><a href="http://dariosanfilippo.tumblr.com" target="_blank"><br></a></div></div></div></div></div></div></div></div></div></div></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">You can convert a 1-bit signal into a multi-bit one by averaging the impulses. For that, you can use a low-pass filter that would also remove the shaped noise introduced by the quantisation. The cutoff of the filter gives you the bandwidth of the resulting signal; the resolution of the coefficients of the low-pass filter determines the sample depth resolution.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I am not aware of designs where a low-pass is used before quantisation.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">In PD, it would be something like this:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><div><img src="cid:ii_k3dn5ct50" alt="image.png" style="margin-right: 0px;" width="353" height="562"><br></div></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Cheers,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Dario</div><br><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 23 Nov 2019 at 19:35, Martin Dupras <<a href="mailto:martindupras@gmail.com" target="_blank">martindupras@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks Miller!<br>
<br>
I don't particularly understand the math behind biquad filters, so<br>
might you be able to elaborate on how that works? Am I right in<br>
understanding that the first yields the first derivative of the<br>
signal?<br>
<br>
That's not quite what I'm trying to do; I think perhaps I need to<br>
explain myself better.<br>
<br>
Here's what I'm trying to do.<br>
<br>
As I understand it, to convert a PCM signal into a (say) 1-bit sigma<br>
delta equivalent, you'd upsample it by some power of 2 (say 32),<br>
low-pass filter it, and then quantize to 1 bit whether the signal goes<br>
up or down. So what I'd like to do is store the resulting delta signal<br>
numerically in an array of the same size, but where each index is<br>
storing, instead of a single 32-bit value, the 32-bit numerical<br>
equivalent of the sequence of 0s and 1s that happens in the space of 1<br>
sample.<br>
<br>
Any idea how I would go about this?<br>
<br>
Many thanks!<br>
<br>
- martin<br>
<br>
<br>
On Sat, 23 Nov 2019 at 17:07, Miller Puckette <<a href="mailto:msp@ucsd.edu" target="_blank">msp@ucsd.edu</a>> wrote:<br>
><br>
> biquad~ 0 0 1 -1 0<br>
><br>
> then to convert back,<br>
><br>
> biquad~ 1 0 1 0 0<br>
><br>
> (this may differ by a DC offset fromt eh original).<br>
><br>
> cheers<br>
> Miller<br>
><br>
> On Sat, Nov 23, 2019 at 04:29:32PM +0000, Martin Dupras wrote:<br>
> > I was wondering if anyone has tried converting PCM signals to<br>
> > delta-sigma and vice-versa in PD? Are there any examples of how one<br>
> > would do that?<br>
> ><br>
> > To be clear, I don't need it to be realtime as such; what I'd like to<br>
> > do is be able to copy the PCM values of one array as a delta-sigma<br>
> > version in another.<br>
> ><br>
> > Any ideas or pointers?<br>
> ><br>
> > Thanks,<br>
> ><br>
> > - martin<br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > <a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br>
> > UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br>
<br>
<br>
<br>
_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-list</a><br>
</blockquote></div>