<?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[Creating a waveform switch]]></title><description><![CDATA[<p>hi again,<br />
im creating a very simple patch in which there are 3 sine wave osc. each with two pitches switchable with keys or bang objects. i want to make a switch that makes it so i can select other waveforms so i can put sounds together. i have the three osc. multiplying to a dac. and i think i need to send/receive from the subpatch to the main window. i was wondering how to: patch the waveform so that i can select them, use the hradio as i think it may be a switch that would do this is the main window, and in what order should the patch be patched so that i can have the oscs. and the dac in a subpactch while hhaveing the switch be out of the window.</p>
<p>thanks.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/2130/creating-a-waveform-switch</link><generator>RSS for Node</generator><lastBuildDate>Wed, 13 May 2026 03:41:49 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/2130.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 08 Nov 2008 17:16:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Creating a waveform switch on Sat, 08 Nov 2008 17:16:07 GMT]]></title><description><![CDATA[<p>hi again,<br />
im creating a very simple patch in which there are 3 sine wave osc. each with two pitches switchable with keys or bang objects. i want to make a switch that makes it so i can select other waveforms so i can put sounds together. i have the three osc. multiplying to a dac. and i think i need to send/receive from the subpatch to the main window. i was wondering how to: patch the waveform so that i can select them, use the hradio as i think it may be a switch that would do this is the main window, and in what order should the patch be patched so that i can have the oscs. and the dac in a subpactch while hhaveing the switch be out of the window.</p>
<p>thanks.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/2130/creating-a-waveform-switch</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/2130/creating-a-waveform-switch</guid><dc:creator><![CDATA[LyteBryte]]></dc:creator><pubDate>Sat, 08 Nov 2008 17:16:07 GMT</pubDate></item><item><title><![CDATA[Reply to Creating a waveform switch on Sun, 09 Nov 2008 08:48:13 GMT]]></title><description><![CDATA[<p>well, not sure if i still really understand your question,,,</p>
<p>but [tabread4~] tabosc4~] [tabplay~] etc all accept [set xxxxx( messages to switch between different tables.</p>
<p>so, you could name your waveform tables 0-waveform, 1-waveform, 2-waveform...etc</p>
<p>and then connect your hradio to [set $1-waveform( to switch through tables.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/2130/creating-a-waveform-switch/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/2130/creating-a-waveform-switch/2</guid><dc:creator><![CDATA[hardoff]]></dc:creator><pubDate>Sun, 09 Nov 2008 08:48:13 GMT</pubDate></item><item><title><![CDATA[Reply to Creating a waveform switch on Sun, 09 Nov 2008 09:25:38 GMT]]></title><description><![CDATA[<p>another alternative (if your waveforms are closely related to each other mathematically) is to use [expr~].</p>
<p>something like this is what I have in mind (it's a variable width sawtooth/triangle with waveshaping to make it squareish):</p>
<p>[phasor~ 50] [sig~ 0.3] /* width 0..1 */ [sig~ 6] /* drive 2..20*/<br />
| | |<br />
[expr~ tanh((if($v1&lt;$v2,$v1/$v2,(1-$v1)/(1-$v2))-0.5)*$v3)]<br />
|<br />
[hip~ 1] /* leak DC to prevent speakers melting */<br />
|<br />
[dac~]</p>
<p>tip: if you press Ctrl-t when editing an object, you get a better editor where you can copy and paste properly <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
<p>then for the structure of the patch, i'd do something like this:</p>
<p>waveform controls<br />
|<br />
[pd waveforms] // inside you can use [inlet]/[inlet~]/[outlet]/[outlet~]<br />
|<br />
[dac~]</p>
<p>or if you have repeated elements in the patch, use abstractions instead of subpatches so you don't get copy and paste nightmares (eg, you find a bug in one copy and have to change all 8 by hand...)</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/2130/creating-a-waveform-switch/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/2130/creating-a-waveform-switch/3</guid><dc:creator><![CDATA[ClaudiusMaximus]]></dc:creator><pubDate>Sun, 09 Nov 2008 09:25:38 GMT</pubDate></item></channel></rss>