<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Bandlimited oscillators]]></title><description><![CDATA[<p>This is a collection of abstractions that generate bandlimited oscillators. They include:</p>
<p>[bl-saw.mmb~] - bandlimited sawtooth waveform<br />
[bl-pulse.mmb~] - bandlimited pulse wave with PWM<br />
[bl-tri.mmb~] - bandlimited triangle wave<br />
[bl-asymtri.mmb~] - bandlimited asymmetrical triangle wave (sort of...see below)</p>
<p>There is also an object called [bl-init.mmb]. This is the object that initializes all the waveforms and at least one instance MUST be included in order for the others to work.</p>
<p>There are also help patches included. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":-)" alt=":-)" /></p>
<p>IMPORTANT!<br />
Before you can use these, you must do the following steps.</p>
<p>1. Open [bl-init.mmb]<br />
2. There is a message box that says [44100(. This is the maximum sampling rate that these will work at (running at lower sampling rates will be fine). If you plan on using higher sampling rates, change this message box and click it. Technically, it will still work at a higher sampling rate, but it won't generate harmonics above the sampling rate in this box.<br />
3. Click the [bang( to fill the wave tables. This patch actually creates a wavetable for EVERY harmonic between 30Hz and the Nyquist frequency. So it will take a few minutes. Be patient! You will get a message in the Pd window when it is done.<br />
4. Save the patch.</p>
<p>Once you do this, [bl-init.mmb] will simply load with the tables already generated, so you don't have to wait every time you instantiate it. I didn't have this already done for you in order to keep the upload small, and so you can see how to adjust it if you need to.</p>
<p>So, I guess I'll go ahead and try to explain how these work. As stated above, every harmonic is generated in [bl-init.mmb] for the oscillators. It doesn't create a table for each set of harmonics however (e.g., there isn't a saw table with two harmonics, a saw table with three harmonics, etc.). Instead, each of these individual tables are tacked on to the end of each other to create one long wave table. So, for each set of 1027 samples in the sawtooth wavetable, there is one cycle with a set amount of harmonics.</p>
<p>When the oscillators read the frequency input, it is divided into the Nyquist frequency to determine how many harmonics are needed. It then uses this (* 1027) as the offset for the table. This is how I got around the problem of table switching at block boundaries. By doing this way, the &quot;switching&quot; is done at audio rate.</p>
<p>There are actually two [tabread4~]s. One has one less harmonic than the other. As the frequency changes it crossfades between these tables. When one table goes completely silent, that's when it &quot;switches.&quot; Below 30Hz, they switch to geometrically perfect waveforms.</p>
<p>[bl-saw.mmb~] and [bl-tri.mmb~] just read through the tables. Nothing really interesting about them.</p>
<p>[bl-pulse.mmb~] is actually the difference between to sawtooths. In other words, there are two bandlimited sawtooth oscillators inside of it. Adjusting the pulse width cause the phase of one of the sawtooths to shift. When you subtract this phase-shifted sawtooth from the other, it creates a bandlimited pulse wave...without oversampling! This is the same Phase Offset Modulation method used in Reason's SubTractor.</p>
<p>[bl-asymtri.mmb~] uses the same technique as [bl-pulse.mmb~], except it uses bandlimited parabola waves instead of sawtooths. Adjust the phase offset sets where the top vertex is. This doesn't really generate true triangle or saw waves, though. They still have the parabolic curve in them, so the harmonics seem to come out a little more. It's more of a &quot;reasonable approximation.&quot; But, it is bandlimited, and it does sound pretty cool to modulate the shape. I don't have the scaling quite right yet, but I'll get to it later...maybe. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";-)" alt=";-)" /></p>
<p>I should also mention that these use my [vphasor.mmb~] abstraction, so the phase reset is sample accurate.</p>
<p>I'll eventually set these up to allow frequency and pulse-width arguments, but I'm currently in the process of moving to another country, so it may be a little bit before I get around to it.</p>
<p>Didn't any of that make any sense?</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/bl-mmb.zip" rel="nofollow">http://www.pdpatchrepo.info/hurleur/bl-mmb.zip</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4048/bandlimited-oscillators</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Jul 2026 15:22:34 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/4048.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Jul 2010 04:51:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bandlimited oscillators on Fri, 16 Jul 2010 04:51:46 GMT]]></title><description><![CDATA[<p>This is a collection of abstractions that generate bandlimited oscillators. They include:</p>
<p>[bl-saw.mmb~] - bandlimited sawtooth waveform<br />
[bl-pulse.mmb~] - bandlimited pulse wave with PWM<br />
[bl-tri.mmb~] - bandlimited triangle wave<br />
[bl-asymtri.mmb~] - bandlimited asymmetrical triangle wave (sort of...see below)</p>
<p>There is also an object called [bl-init.mmb]. This is the object that initializes all the waveforms and at least one instance MUST be included in order for the others to work.</p>
<p>There are also help patches included. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":-)" alt=":-)" /></p>
<p>IMPORTANT!<br />
Before you can use these, you must do the following steps.</p>
<p>1. Open [bl-init.mmb]<br />
2. There is a message box that says [44100(. This is the maximum sampling rate that these will work at (running at lower sampling rates will be fine). If you plan on using higher sampling rates, change this message box and click it. Technically, it will still work at a higher sampling rate, but it won't generate harmonics above the sampling rate in this box.<br />
3. Click the [bang( to fill the wave tables. This patch actually creates a wavetable for EVERY harmonic between 30Hz and the Nyquist frequency. So it will take a few minutes. Be patient! You will get a message in the Pd window when it is done.<br />
4. Save the patch.</p>
<p>Once you do this, [bl-init.mmb] will simply load with the tables already generated, so you don't have to wait every time you instantiate it. I didn't have this already done for you in order to keep the upload small, and so you can see how to adjust it if you need to.</p>
<p>So, I guess I'll go ahead and try to explain how these work. As stated above, every harmonic is generated in [bl-init.mmb] for the oscillators. It doesn't create a table for each set of harmonics however (e.g., there isn't a saw table with two harmonics, a saw table with three harmonics, etc.). Instead, each of these individual tables are tacked on to the end of each other to create one long wave table. So, for each set of 1027 samples in the sawtooth wavetable, there is one cycle with a set amount of harmonics.</p>
<p>When the oscillators read the frequency input, it is divided into the Nyquist frequency to determine how many harmonics are needed. It then uses this (* 1027) as the offset for the table. This is how I got around the problem of table switching at block boundaries. By doing this way, the &quot;switching&quot; is done at audio rate.</p>
<p>There are actually two [tabread4~]s. One has one less harmonic than the other. As the frequency changes it crossfades between these tables. When one table goes completely silent, that's when it &quot;switches.&quot; Below 30Hz, they switch to geometrically perfect waveforms.</p>
<p>[bl-saw.mmb~] and [bl-tri.mmb~] just read through the tables. Nothing really interesting about them.</p>
<p>[bl-pulse.mmb~] is actually the difference between to sawtooths. In other words, there are two bandlimited sawtooth oscillators inside of it. Adjusting the pulse width cause the phase of one of the sawtooths to shift. When you subtract this phase-shifted sawtooth from the other, it creates a bandlimited pulse wave...without oversampling! This is the same Phase Offset Modulation method used in Reason's SubTractor.</p>
<p>[bl-asymtri.mmb~] uses the same technique as [bl-pulse.mmb~], except it uses bandlimited parabola waves instead of sawtooths. Adjust the phase offset sets where the top vertex is. This doesn't really generate true triangle or saw waves, though. They still have the parabolic curve in them, so the harmonics seem to come out a little more. It's more of a &quot;reasonable approximation.&quot; But, it is bandlimited, and it does sound pretty cool to modulate the shape. I don't have the scaling quite right yet, but I'll get to it later...maybe. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";-)" alt=";-)" /></p>
<p>I should also mention that these use my [vphasor.mmb~] abstraction, so the phase reset is sample accurate.</p>
<p>I'll eventually set these up to allow frequency and pulse-width arguments, but I'm currently in the process of moving to another country, so it may be a little bit before I get around to it.</p>
<p>Didn't any of that make any sense?</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/bl-mmb.zip" rel="nofollow">http://www.pdpatchrepo.info/hurleur/bl-mmb.zip</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4048/bandlimited-oscillators</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4048/bandlimited-oscillators</guid><dc:creator><![CDATA[Maelstorm]]></dc:creator><pubDate>Fri, 16 Jul 2010 04:51:46 GMT</pubDate></item><item><title><![CDATA[Reply to Bandlimited oscillators on Fri, 16 Jul 2010 12:37:54 GMT]]></title><description><![CDATA[<p>Neet! I'll take a look at this later when I have time.</p>
<p>Here's the link to my external version<br />
<a href="http://puredata.hurleur.com/viewtopic.php?pid=18854" rel="nofollow">http://puredata.hurleur.com/viewtopic.php?pid=18854</a></p>
<p>I'll want to see if I can steal some of your waveforms <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";)" alt=";)" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4048/bandlimited-oscillators/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4048/bandlimited-oscillators/2</guid><dc:creator><![CDATA[saturno]]></dc:creator><pubDate>Fri, 16 Jul 2010 12:37:54 GMT</pubDate></item><item><title><![CDATA[Reply to Bandlimited oscillators on Fri, 16 Jul 2010 23:00:17 GMT]]></title><description><![CDATA[<p>Excellent! I have at least one synth patch that I've been meaning to share, but was waiting to find a method to make a bandlimited square wave with vibrato without oversampling so much that it would only run on really fast computers. So thanks to Maelstorm and saturno both.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4048/bandlimited-oscillators/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4048/bandlimited-oscillators/3</guid><dc:creator><![CDATA[ichabod]]></dc:creator><pubDate>Fri, 16 Jul 2010 23:00:17 GMT</pubDate></item><item><title><![CDATA[Reply to Bandlimited oscillators on Mon, 19 Jul 2010 23:26:17 GMT]]></title><description><![CDATA[<p>Of course! a pulse wave with variable duty cycle can be made by just subtracting a saw wave from another at a phase offset by the duty cycle.</p>
<p>Am I to understand that the parabola wave equation is</p>
<p>[ cos(x) * pow(-1, x) * (4/pow(x,2)) ] - pow(PI,2)/3</p>
<p>where x is the harmonics number?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4048/bandlimited-oscillators/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4048/bandlimited-oscillators/4</guid><dc:creator><![CDATA[saturno]]></dc:creator><pubDate>Mon, 19 Jul 2010 23:26:17 GMT</pubDate></item><item><title><![CDATA[Reply to Bandlimited oscillators on Tue, 20 Jul 2010 03:51:34 GMT]]></title><description><![CDATA[<p>More like:</p>
<p>pow(PI, 2)/3 + [pow(-1, n) * (4/pow(n, 2)) * cos(n * x)]</p>
<p>where n is the harmonic number and x is the phase. So basically what I did, IIRC, is for each harmonic in the [cosinesum( message I did this for the amplitude:</p>
<p>pow(-1, n) * (4/pow(n, 2))</p>
<p>and then offset the resulting waveform by pow(PI, 2)/3. The offset just lines the peak up at DC, which makes it easier to normalize.</p>
<p>I came across the formula here (bottom of page 3). Maybe it will make more sense to see it in a proper formula:</p>
<p><a href="http://www.musicdsp.org/files/bandlimited.pdf" rel="nofollow">http://www.musicdsp.org/files/bandlimited.pdf</a></p>
<p>And, yeah, that pulse wave technique kinda blew me away when I found out about it. It turns out to be a lot easier than you'd think it would! <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/wink.png" title=";-)" alt=";-)" /></p>
<p>btw, thanks for cross-linking with your externals. I meant to do that myself.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4048/bandlimited-oscillators/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4048/bandlimited-oscillators/5</guid><dc:creator><![CDATA[Maelstorm]]></dc:creator><pubDate>Tue, 20 Jul 2010 03:51:34 GMT</pubDate></item><item><title><![CDATA[Reply to Bandlimited oscillators on Tue, 20 Jul 2010 13:03:48 GMT]]></title><description><![CDATA[<p>I'll see if I can give it a shot. I'll be uploading a version soon that does pulse wave with variable duty cycle.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/4048/bandlimited-oscillators/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/4048/bandlimited-oscillators/6</guid><dc:creator><![CDATA[saturno]]></dc:creator><pubDate>Tue, 20 Jul 2010 13:03:48 GMT</pubDate></item></channel></rss>