Convert pcm encode to pdm so auto outputs pulses to speaker

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

Do you have a sound card that can deliver 3MHz pulses?

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

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.

Cheers
Found this link, might help others

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

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.

All i wanted to do was the conversion, thats it, done.
Cheers

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