<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[ChipMusic.org - Help me find HEX waveforms plz]]></title>
		<link>https://chipmusic.org/forums/topic/24241/help-me-find-hex-waveforms-plz/</link>
		<description><![CDATA[The most recent posts in Help me find HEX waveforms plz.]]></description>
		<lastBuildDate>Sat, 09 Mar 2019 02:19:28 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Help me find HEX waveforms plz]]></title>
			<link>https://chipmusic.org/forums/post/261551/#p261551</link>
			<description><![CDATA[<b><i>Orgia Mode says:</i></b><p>oh, thanks. I&#039;ll check it out.</p><p>I have a few routines that I&#039;m working on simultaneously to see what works. Both are accessing a data array where the sample is stored and both are using in Interrupt Service Routine to control playback speed. One is using a ring buffer which makes it pretty easy to push multiple samples into at once. The other method doesn&#039;t store the sample in volatile RAM. It is actually pretty difficult for me to understand how to get playback tuned properly. <br />I&#039;m going to PM you some code and schematic for better understanding.</p>]]></description>
			<pubDate>Sat, 09 Mar 2019 02:19:28 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/261551/#p261551</guid>
		</item>
		<item>
			<title><![CDATA[Re: Help me find HEX waveforms plz]]></title>
			<link>https://chipmusic.org/forums/post/261548/#p261548</link>
			<description><![CDATA[<b><i>jefftheworld says:</i></b><div class="quotebox"><cite>Orgia Mode wrote:</cite><blockquote><p>I&#039;m looking for raw data to send to a PWM DAC, or R2R DAC. I have no clue on what these encoded formats are. <br />LIke this sine wave:<br /></p><div class="quotebox"><blockquote><p>128,140,152,165,176,188,198,208,218,226,234,240,245,250,253,254,255,254,253,250,245,240,234,226,218,208,198,188,176,165,152,140,128,115,103,90,79,67,57,47,37,29,21,15,10,5,2,1,0,1,2,5,10,15,21,29,37,47,57,67,79,90,103,115</p></blockquote></div><p>This has 64 bytes per period for example.</p></blockquote></div><p>Even with a PWM resistor-ladder DAC you can store the data in a few different ways. It really depends on your playback routine. What is your playback routine like? How does it read data and how does it control your output pins?</p><p>If you&#039;re using a 1-bit routine that wants a simple differential PWM byte stream you can use my tool below to generate that from any 8-bit WAV file and the readme has a little detail on how the playback routine would work.</p><p><a href="https://github.com/JeffAlyanak/pcm2pwm" target="_blank">https://github.com/JeffAlyanak/pcm2pwm</a></p>]]></description>
			<pubDate>Sat, 09 Mar 2019 01:03:23 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/261548/#p261548</guid>
		</item>
		<item>
			<title><![CDATA[Re: Help me find HEX waveforms plz]]></title>
			<link>https://chipmusic.org/forums/post/261542/#p261542</link>
			<description><![CDATA[<b><i>Orgia Mode says:</i></b><p>I over here pulling my hair out trying to program this ATtiny85. Im a hardware guy...</p>]]></description>
			<pubDate>Fri, 08 Mar 2019 21:50:48 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/261542/#p261542</guid>
		</item>
		<item>
			<title><![CDATA[Re: Help me find HEX waveforms plz]]></title>
			<link>https://chipmusic.org/forums/post/261541/#p261541</link>
			<description><![CDATA[<b><i>Orgia Mode says:</i></b><p>I&#039;m looking for raw data to send to a PWM DAC, or R2R DAC. I have no clue on what these encoded formats are. <br />LIke this sine wave:<br /></p><div class="quotebox"><blockquote><p>128,140,152,165,176,188,198,208,218,226,234,240,245,250,253,254,255,254,253,250,245,240,234,226,218,208,198,188,176,165,152,140,128,115,103,90,79,67,57,47,37,29,21,15,10,5,2,1,0,1,2,5,10,15,21,29,37,47,57,67,79,90,103,115</p></blockquote></div><p>This has 64 bytes per period for example.</p>]]></description>
			<pubDate>Fri, 08 Mar 2019 21:47:33 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/261541/#p261541</guid>
		</item>
		<item>
			<title><![CDATA[Re: Help me find HEX waveforms plz]]></title>
			<link>https://chipmusic.org/forums/post/261539/#p261539</link>
			<description><![CDATA[<b><i>jefftheworld says:</i></b><p>You can even read a WAV header yourself to confirm the format of the data.</p><p><em>note: keep in mind that RIFF/WAV format files are little-endian.</em></p><p><strong>First, check format value — 21st and 22nd bytes</strong>: If the value is 1, the format is PCM.<br /><strong>Second, check the 23rd and 24th bytes</strong>: This will be the number of channels, almost always just 1 or 2.<br /><strong>Third, check the 25th to 28th bytes</strong>: This will be the sample-rate as a 32-bit integer.<br /><strong>Fourth, check the 35th to 36th bytes</strong>: This will be the bits-per-sample.</p><p>The data itself will start at byte 55 and go until the end of the file.</p><p>Channels are interleaved in the data, so to illustrate let&#039;s look at how a 16-bit WAV with two channels would look. I&#039;ll give each value a letter — a for the first channel and b for the second — and a number representing which sample it is — the first sample would be 1, etc.</p><div class="codebox"><pre><code>a1 a1 b1 b1 a2 a2 b2 b2 a3 a3 b3 b3 a4 a4 b4 b4
a5 a5 b5 b5 a6 a6 b6 b6 a7 a7 b7 b7 a8 a8 b8 b8</code></pre></div><p>You&#039;ll see that it&#039;s actually rather easy to understand this simple PCM encoding as encapsulated by the WAV format since it&#039;s just a simple header followed by a byte-stream.</p>]]></description>
			<pubDate>Fri, 08 Mar 2019 21:04:39 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/261539/#p261539</guid>
		</item>
		<item>
			<title><![CDATA[Re: Help me find HEX waveforms plz]]></title>
			<link>https://chipmusic.org/forums/post/261537/#p261537</link>
			<description><![CDATA[<b><i>jefftheworld says:</i></b><div class="quotebox"><cite>Orgia Mode wrote:</cite><blockquote><p>Anyone have a link to some waveforms in hex, decimal, binary or even octal, text-arrays?<br />Looking for the basics: tri, saw, squ, sin, etc. And maybe even a few more complex waveforms. <br />8-, 10-, or 12-bit would be ideal.</p></blockquote></div><p>What encoding do you want them in? Just asking for the base in which you represent them isn&#039;t really meaningful. Do you want DPCM? PWM? Some other more complex or more application-specific encoding?</p><p>If you&#039;re looking for something like (L)PCM then you can actually just open up most/all WAV files and read that data out directly. Aside from the preamble bytes it&#039;ll just be a byte stream at the bit-depth of the WAV that you can read and copy directly.</p>]]></description>
			<pubDate>Fri, 08 Mar 2019 20:32:03 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/261537/#p261537</guid>
		</item>
		<item>
			<title><![CDATA[Re: Help me find HEX waveforms plz]]></title>
			<link>https://chipmusic.org/forums/post/261507/#p261507</link>
			<description><![CDATA[<b><i>Orgia Mode says:</i></b><div class="quotebox"><cite>LotZo wrote:</cite><blockquote><p>The decimal tables for NES are in the famitracker source code. <a href="https://github.com/HertzDevil/famitracker-all/tree/master/Source/APU" target="_blank">https://github.com/HertzDevil/famitrack &#133; Source/APU</a></p></blockquote></div><p>Thats super helpful! Thanks for finding it.</p>]]></description>
			<pubDate>Thu, 07 Mar 2019 17:13:33 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/261507/#p261507</guid>
		</item>
		<item>
			<title><![CDATA[Re: Help me find HEX waveforms plz]]></title>
			<link>https://chipmusic.org/forums/post/261501/#p261501</link>
			<description><![CDATA[<b><i>LotZo says:</i></b><p>The decimal tables for NES are in the famitracker source code. <a href="https://github.com/HertzDevil/famitracker-all/tree/master/Source/APU" target="_blank">https://github.com/HertzDevil/famitrack &#133; Source/APU</a></p>]]></description>
			<pubDate>Thu, 07 Mar 2019 12:18:00 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/261501/#p261501</guid>
		</item>
		<item>
			<title><![CDATA[Re: Help me find HEX waveforms plz]]></title>
			<link>https://chipmusic.org/forums/post/261500/#p261500</link>
			<description><![CDATA[<b><i>Orgia Mode says:</i></b><p>Yeah, I have been exploring my options and I can either write a script to produce the tables that I want or write a function that will produce the values in real time.</p>]]></description>
			<pubDate>Thu, 07 Mar 2019 06:50:13 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/261500/#p261500</guid>
		</item>
		<item>
			<title><![CDATA[Re: Help me find HEX waveforms plz]]></title>
			<link>https://chipmusic.org/forums/post/261499/#p261499</link>
			<description><![CDATA[<b><i>Jophish says:</i></b><p>sounds like a fun little script to write to generate them <img src="https://chipmusic.org/forums/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></description>
			<pubDate>Thu, 07 Mar 2019 06:33:50 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/261499/#p261499</guid>
		</item>
		<item>
			<title><![CDATA[Help me find HEX waveforms plz]]></title>
			<link>https://chipmusic.org/forums/post/261486/#p261486</link>
			<description><![CDATA[<b><i>Orgia Mode says:</i></b><p>Anyone have a link to some waveforms in hex, decimal, binary or even octal, text-arrays?<br />Looking for the basics: tri, saw, squ, sin, etc. And maybe even a few more complex waveforms. <br />8-, 10-, or 12-bit would be ideal.</p>]]></description>
			<pubDate>Wed, 06 Mar 2019 01:03:06 +0000</pubDate>
			<guid>https://chipmusic.org/forums/post/261486/#p261486</guid>
		</item>
	</channel>
</rss>
