Page 1 of 1

Convert pcm encode to pdm so auto outputs pulses to speaker

Permanent link to this postPosted: Tue Nov 21, 2017 2:41 am
Posted by dnorric`
Mint linux 18, audacity 2.1.2 install from distro repo
Hi want to take audio (normal sound file of waves) which exist in the freq domain and convert to pdm (pulse density modulation) so exists in time domain so can drive speaker with pulses. Is this possible in any way
Cheers
Damian

Re: Convert pcm encode to pdm so auto outputs pulses to spea

Permanent link to this postPosted: Tue Nov 21, 2017 2:55 am
Posted by steve
Do you have a sound card that can deliver 3MHz pulses?

Re: Convert pcm encode to pdm so auto outputs pulses to spea

Permanent link to this postPosted: Tue Nov 21, 2017 5:46 am
Posted by dnorric`
No i dont. All i want to do is convert a wave to a series of pulses much like pwm but i want pdm
Cheers

Re: Convert pcm encode to pdm so auto outputs pulses to spea

Permanent link to this postPosted: Tue Nov 21, 2017 10:12 am
Posted by steve
To output PDM for audio frequency input, you need to be able output extremely fast pulses (PDM is typically around 3 MHz). If your hardware can't output pulses that fast (which obviously a normal sound card can't), then you have no way to output the pulses to the speaker.

To do what you want, you would need to write a delta-sigma converter in software (a non-trivial task), and find some way to get the very high speed bit-stream out of your computer. If you can't do the latter, then there does not seem to be much point in spending the time and effort implementing a software delta-sigma converter.

Re: Convert pcm encode to pdm so auto outputs pulses to spea

Permanent link to this postPosted: Tue Nov 21, 2017 10:41 am
Posted by dnorric`
Cheers
Found this link, might help others

https://dlbeer.co.nz/articles/pdm.html

Re: Convert pcm encode to pdm so auto outputs pulses to spea

Permanent link to this postPosted: Tue Nov 21, 2017 10:59 am
Posted by steve
I see that you have been pursuing this same question for months, but I still don't see how you intend to solve the fundamental problem that PDM (and PWM) require a much higher frequency than sound cards can achieve. If this is just an academic exercise, I can give any number of relevant references (this one is quite good: https://tinyurl.com/y94fdce4), but if you want a practical way "to take audio" and "drive speaker with pulses", then you are wasting your time unless you use special hardware that is able to produce very high frequency pulses.

Re: Convert pcm encode to pdm so auto outputs pulses to spea

Permanent link to this postPosted: Tue Nov 21, 2017 11:08 am
Posted by dnorric`
All i wanted to do was the conversion, thats it, done.
Cheers

Re: Convert pcm encode to pdm so auto outputs pulses to spea

Permanent link to this postPosted: Tue Nov 21, 2017 11:41 am
Posted by steve
dnorric` wrote:All i wanted to do was the conversion, thats it, done.

For the benefit of anyone reading this topic, perhaps you can tell us how you did it.