<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[ChipMusic.org - PCM to PDM bitstream converter?]]></title>
	<link rel="self" href="https://chipmusic.org:80/forums/feed/atom/topic/13971/"/>
	<updated>2018-08-12T08:54:45Z</updated>
	<generator>PunBB</generator>
	<id>https://chipmusic.org/forums/topic/13971/pcm-to-pdm-bitstream-converter/</id>
		<entry>
			<title type="html"><![CDATA[Re: PCM to PDM bitstream converter?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/259551/#p259551"/>
			<content type="html"><![CDATA[<p>Hi there,</p><p>Any one know how to convert PDM to PCM. I&#039;m interfacing Knowles pdm mems with samd21 atmeal series MCU. I have interfaced and getting the millions of data but don&#039;t know how to extract the useful data from it. kindly share and help.</p>]]></content>
			<author>
				<name><![CDATA[nishant]]></name>
				<uri>https://chipmusic.org/nishant</uri>
			</author>
			<updated>2018-08-12T08:54:45Z</updated>
			<id>https://chipmusic.org/forums/post/259551/#p259551</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PCM to PDM bitstream converter?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/244090/#p244090"/>
			<content type="html"><![CDATA[<p>It is easy to convert 16bit PCM to PDM, if not oversampling the PCM data.<br />That is, if the wav file contains 64K audio samples, convert the 64K audio samples to 64K PDM samples is no issue.<br />However, without oversampling the 64K audio samples to at least 64 times, the output 64K PDM samples is pretty much useless.<br />I am working on PDM to PCM conversion too.<br />Have trouble to test my code using existing PCM/wav file as input source.<br />Looks like the only way to test my code is get real PDM samples from digital microphone.<br />Any suggestion besides to use the real PDM samples from digital microphone?</p>]]></content>
			<author>
				<name><![CDATA[minlin]]></name>
				<uri>https://chipmusic.org/minlin</uri>
			</author>
			<updated>2016-05-16T02:39:19Z</updated>
			<id>https://chipmusic.org/forums/post/244090/#p244090</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PCM to PDM bitstream converter?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/238910/#p238910"/>
			<content type="html"><![CDATA[<p>Hi all,<br />I&#039;m working on a PDM flow audio, and i&#039;m testing some code that convert from PDM 2 PCM. So I&#039;m starting from a PCM audio, than i convert to PDM with the fantastic code posted here (thank you very much!!) and finally back to PCM with my code.<br />Now i have a question: when I convert from PCM 2 PDM, should i have a number of bit equal to (num_pcm_samples * 8)/decimation_factor ?<br />A numeric example: <br />I want to have a PCM audio flow at 16khz, from PDM i sample at 1.024Mhz (16kz*64).<br />For each msec i have 128 PDM samples (bit) and 16 PCM samples. Correct?<br />Now when I convert from PCM 2 PDM with the script of Vegas Diamond, i&#039;ve that the PDM samples are equal to PCM samples.<br />What am I doing wrong?</p>]]></content>
			<author>
				<name><![CDATA[nannaws]]></name>
				<uri>https://chipmusic.org/nannaws</uri>
			</author>
			<updated>2016-01-27T14:01:50Z</updated>
			<id>https://chipmusic.org/forums/post/238910/#p238910</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PCM to PDM bitstream converter?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/238503/#p238503"/>
			<content type="html"><![CDATA[<p>Thank you very much!<br />If some other one is interested in this topic I&#039;ve found this link that could be helpful:<br /><a href="http://dlbeer.co.nz/articles/pdm.html" target="_blank">http://dlbeer.co.nz/articles/pdm.html</a></p><p>;-)</p>]]></content>
			<author>
				<name><![CDATA[An0nym0u5]]></name>
				<uri>https://chipmusic.org/An0nym0u5</uri>
			</author>
			<updated>2016-01-15T16:03:01Z</updated>
			<id>https://chipmusic.org/forums/post/238503/#p238503</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PCM to PDM bitstream converter?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/238471/#p238471"/>
			<content type="html"><![CDATA[<p>Don&#039;t know if Vegas Diamond frequents the forums much any more, so <a href="http://protodome.co.uk/PCMtoPDM.zip" target="_blank">here it is</a>.</p><p>Code is commented, instructions are in there too.</p><p>Shoot him some €s if it comes in useful.</p>]]></content>
			<author>
				<name><![CDATA[PROTODOME]]></name>
				<uri>https://chipmusic.org/PROTODOME</uri>
			</author>
			<updated>2016-01-14T18:49:50Z</updated>
			<id>https://chipmusic.org/forums/post/238471/#p238471</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PCM to PDM bitstream converter?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/238468/#p238468"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>PROTODOME wrote:</cite><blockquote><p>Cheers for the help guys. Vegas Diamond wrote me up a little bit of software in the end. The output sounds very NES DPCM, which is rad.</p><p>And yeah, if I get something really decent out of it, I&#039;ll let y&#039;all know.</p></blockquote></div><p>Hi, I&#039;m arrived here by googling...<br />Do you still have the PCM-&gt;PDM conversion software? Can you please share it if possible?</p><p>I would be very grateful, I need something similar to prepare some test bitstream for a decoder...</p><p>Thank you!</p>]]></content>
			<author>
				<name><![CDATA[An0nym0u5]]></name>
				<uri>https://chipmusic.org/An0nym0u5</uri>
			</author>
			<updated>2016-01-14T14:27:35Z</updated>
			<id>https://chipmusic.org/forums/post/238468/#p238468</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PCM to PDM bitstream converter?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/205757/#p205757"/>
			<content type="html"><![CDATA[<p>Cheers for the help guys. Vegas Diamond wrote me up a little bit of software in the end. The output sounds very NES DPCM, which is rad.</p><p>And yeah, if I get something really decent out of it, I&#039;ll let y&#039;all know.</p>]]></content>
			<author>
				<name><![CDATA[PROTODOME]]></name>
				<uri>https://chipmusic.org/PROTODOME</uri>
			</author>
			<updated>2014-04-10T00:15:35Z</updated>
			<id>https://chipmusic.org/forums/post/205757/#p205757</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PCM to PDM bitstream converter?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/205328/#p205328"/>
			<content type="html"><![CDATA[<p>Shoot me a message if you need any help.</p><p>Edit:</p><p>Noticed someone posted my pcm2pwm software. I&#039;m not sure it&#039;s exactly what you&#039;re looking for but might get you most of the way there. I think there are instructions on the use of the software and it&#039;s output. It&#039;s designed for use in some older CPU assembly code but I&#039;m sure you could format it however you&#039;d like. However, the output is a differential format used for latch audio and not necessarily what you want.</p><p>It&#039;s still 1-bit audio but it depends on what your 1-bit DAC is like. If it&#039;s a &quot;true&quot; 1-bit DAC then my code will work fine for you, if you have a more advanced delta-sigma modulator sort of setup then you&#039;ll need to write a little program to do the conversion. WAV files are extremely easy to parse byte by byte, so writing a little C program to convert to whatever format you need should be quick and painless.</p>]]></content>
			<author>
				<name><![CDATA[jefftheworld]]></name>
				<uri>https://chipmusic.org/jefftheworld</uri>
			</author>
			<updated>2014-04-04T19:05:16Z</updated>
			<id>https://chipmusic.org/forums/post/205328/#p205328</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PCM to PDM bitstream converter?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/205326/#p205326"/>
			<content type="html"><![CDATA[<p>I believe this might be of interest to you: <a href="http://jefftheworld.com/software/pcm2pwm.tar.gz" target="_blank">http://jefftheworld.com/software/pcm2pwm.tar.gz</a></p><p>Good luck with the project! Keep us updated <img src="https://chipmusic.org/forums/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></content>
			<author>
				<name><![CDATA[irrlichtproject]]></name>
				<uri>https://chipmusic.org/irrlichtproject</uri>
			</author>
			<updated>2014-04-04T18:55:10Z</updated>
			<id>https://chipmusic.org/forums/post/205326/#p205326</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PCM to PDM bitstream converter?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/205316/#p205316"/>
			<content type="html"><![CDATA[<p>Cool! I never heard of PDM till now. It&#039;s a tad unrelated but seeing the 1&#039;s and 0&#039;s like that representing the sign reminds me heavily of this 1bit ADC that kind of does a similar thing to a wavform (though its still very different). At about 4:56 you can really start seeing the discrete highs and lows that make up the sinewave in her example. <br /><div class="embed_video"><iframe width="560" height="340" src="https://www.youtube.com/embed/DTCtx9eNHXE" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div></p>]]></content>
			<author>
				<name><![CDATA[TylerBarnes]]></name>
				<uri>https://chipmusic.org/TylerBarnes</uri>
			</author>
			<updated>2014-04-04T17:33:03Z</updated>
			<id>https://chipmusic.org/forums/post/205316/#p205316</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PCM to PDM bitstream converter?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/205314/#p205314"/>
			<content type="html"><![CDATA[<p>Could you send me a PM with contact info or something? I have some questions and I don&#039;t want to clutter up the forum with conversation threads.</p>]]></content>
			<author>
				<name><![CDATA[Vegasdiamond]]></name>
				<uri>https://chipmusic.org/Vegasdiamond</uri>
			</author>
			<updated>2014-04-04T16:09:52Z</updated>
			<id>https://chipmusic.org/forums/post/205314/#p205314</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PCM to PDM bitstream converter?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/205242/#p205242"/>
			<content type="html"><![CDATA[<p>Yeah, I saw this but couldn&#039;t quite decipher it well enough to apply the code meaningfully (I&#039;m not very good, still learning). If you knocked this up in C++ or whatever I&#039;d be eternally grateful.</p>]]></content>
			<author>
				<name><![CDATA[PROTODOME]]></name>
				<uri>https://chipmusic.org/PROTODOME</uri>
			</author>
			<updated>2014-04-03T18:32:08Z</updated>
			<id>https://chipmusic.org/forums/post/205242/#p205242</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PCM to PDM bitstream converter?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/205235/#p205235"/>
			<content type="html"><![CDATA[<p>You&#039;ve probably seen this but this: <a href="http://en.wikipedia.org/wiki/Pulse-density_modulation" target="_blank">http://en.wikipedia.org/wiki/Pulse-density_modulation</a> Includes an algorithm in pseudocode to convert from PCM to PDM. Is this what you are looking for? If you want I can try and implement it in C++ or something, doesn&#039;t seem that hard. It&#039;s weird that there are no apps (or implemented versions) of this algorithm readily available.</p>]]></content>
			<author>
				<name><![CDATA[Vegasdiamond]]></name>
				<uri>https://chipmusic.org/Vegasdiamond</uri>
			</author>
			<updated>2014-04-03T16:24:15Z</updated>
			<id>https://chipmusic.org/forums/post/205235/#p205235</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[PCM to PDM bitstream converter?]]></title>
			<link rel="alternate" href="https://chipmusic.org/forums/post/205218/#p205218"/>
			<content type="html"><![CDATA[<p>Anyone know of any software that can do this?</p><p>I&#039;ve built myself a very simple Arduino PDM synth and want to slap in some waveforms and (very small) samples without having to write them out by hand (and guesswork). I&#039;ve literally been using photoshop to work out the conversion.</p><p>There must be something out there that takes a PCM wave (.wav or something), crunches the numbers and spits out a bunch of 1s and 0s which I can then copypaste into the code.</p>]]></content>
			<author>
				<name><![CDATA[PROTODOME]]></name>
				<uri>https://chipmusic.org/PROTODOME</uri>
			</author>
			<updated>2014-04-03T12:49:50Z</updated>
			<id>https://chipmusic.org/forums/post/205218/#p205218</id>
		</entry>
</feed>
