<?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[Throw~&#x2F;Catch~ and DSP block size issue]]></title><description><![CDATA[<p>Hello,</p>
<p>I'm trying to create a modulation matrix for my patch, where I can route a bunch of control signals (LFO, ADSR, etc) to modulate various parameters using a matrix mixer topology (all mod sources can be sent to all destinations, and all destinations can receive a mix of all sources). I am naturally going for the [throw~] and [catch~] object to create one summing bus per destination (16 in total).<br />
But I run into some errors there:</p>
<pre><code>throw~ MO_pulse-width_mod: vector size mismatch
sigcatch summingBus1: unexpected vector size
</code></pre>
<p>I have figured out this has to do with DSP block size conflicts, as I have [block~] objects of varying sizes in several sub-patches. However I cannot get my head around DSP block size handling in Pd, and even less how to solve my issue. I have tried putting a number of size-matching [block~] objects on the subpatches containing the [throw~] and [catch~] objects and/or, where the source signal is actually being generated. None worked.</p>
<p>However, I noticed that if I replace [throw~]/[catch~] by {send~]/{receive~] and put a [block~ 64 1 1] in both sub-patches, the conflict is resolved. But using {send~]/{receive~] would greatly complexify the patch so I'd rather stick with [throw~]/[catch~] if I can.</p>
<p>I have tried to draw an accurate hierarchy of my current patch in the hope you may help me figure out where the mismatch occur. It's a tad complex as the modulation sources, the matrix mixer and the modulation destinations are all in different places of my patch. So I'm first using [s~] objects to send the various mod sources to the mod matrix, then use [throw~] objects to send these to the various &quot;destinations&quot; summing buses. I have added info where the signal generators are (~), [s~]/{r~] and {throw~/catch~] are all located in the hierarchy, as well as where some mandatory [block~] objects are (I cannot remove these as it will break my code).<br />
Here it is:<br />
<img src="/uploads/files/1614629099478-routing1.png" alt="Routing1.png" class="img-responsive img-markdown" /><br />
Hope my post and this graph somehow makes sense... <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grimacing.png" title="grimacing" alt=":grimacing:" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue</link><generator>RSS for Node</generator><lastBuildDate>Mon, 07 Sep 2026 16:00:36 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/13331.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 01 Mar 2021 20:05:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Throw~&#x2F;Catch~ and DSP block size issue on Mon, 01 Mar 2021 20:05:56 GMT]]></title><description><![CDATA[<p>Hello,</p>
<p>I'm trying to create a modulation matrix for my patch, where I can route a bunch of control signals (LFO, ADSR, etc) to modulate various parameters using a matrix mixer topology (all mod sources can be sent to all destinations, and all destinations can receive a mix of all sources). I am naturally going for the [throw~] and [catch~] object to create one summing bus per destination (16 in total).<br />
But I run into some errors there:</p>
<pre><code>throw~ MO_pulse-width_mod: vector size mismatch
sigcatch summingBus1: unexpected vector size
</code></pre>
<p>I have figured out this has to do with DSP block size conflicts, as I have [block~] objects of varying sizes in several sub-patches. However I cannot get my head around DSP block size handling in Pd, and even less how to solve my issue. I have tried putting a number of size-matching [block~] objects on the subpatches containing the [throw~] and [catch~] objects and/or, where the source signal is actually being generated. None worked.</p>
<p>However, I noticed that if I replace [throw~]/[catch~] by {send~]/{receive~] and put a [block~ 64 1 1] in both sub-patches, the conflict is resolved. But using {send~]/{receive~] would greatly complexify the patch so I'd rather stick with [throw~]/[catch~] if I can.</p>
<p>I have tried to draw an accurate hierarchy of my current patch in the hope you may help me figure out where the mismatch occur. It's a tad complex as the modulation sources, the matrix mixer and the modulation destinations are all in different places of my patch. So I'm first using [s~] objects to send the various mod sources to the mod matrix, then use [throw~] objects to send these to the various &quot;destinations&quot; summing buses. I have added info where the signal generators are (~), [s~]/{r~] and {throw~/catch~] are all located in the hierarchy, as well as where some mandatory [block~] objects are (I cannot remove these as it will break my code).<br />
Here it is:<br />
<img src="/uploads/files/1614629099478-routing1.png" alt="Routing1.png" class="img-responsive img-markdown" /><br />
Hope my post and this graph somehow makes sense... <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grimacing.png" title="grimacing" alt=":grimacing:" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue</guid><dc:creator><![CDATA[tomatoKetchup]]></dc:creator><pubDate>Mon, 01 Mar 2021 20:05:56 GMT</pubDate></item><item><title><![CDATA[Reply to Throw~&#x2F;Catch~ and DSP block size issue on Tue, 02 Mar 2021 06:59:51 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/tomatoketchup">@tomatoKetchup</a> <a href="http://puredata.info/docs/manuals/pd/x2.htm" rel="nofollow">http://puredata.info/docs/manuals/pd/x2.htm</a> Chapter 2.4.5<br />
Sorry that it's bad news...... you will have to use inlets and outlets and then connect those to your [throw~] or [catch~]<br />
The best way to deal with this is to always put the blocked part of an abstraction into a sub-patch...... give the sub-patch inlets and outlets which will re-block to 64 for the abstraction...... and then use [throw~] and [catch~] to connect to the other abstractions.<br />
David,</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue/2</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Tue, 02 Mar 2021 06:59:51 GMT</pubDate></item><item><title><![CDATA[Reply to Throw~&#x2F;Catch~ and DSP block size issue on Tue, 02 Mar 2021 13:24:42 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/whale-av">@whale-av</a> I'm not sure I quite get it, even after reading the chapter and your post. Isn't it already what I'm doing there?<br />
For instance, all my [throw~] are in the SrcX routing subpatches, and all my [catch~] too (related to the reblocked Subpatch1). Yet I'm still getting the error message.<br />
I have screenshot a throw/catch pair of subpatches embedded with inlet~/outlet~ connections below:<br />
<img src="/uploads/files/1614691377132-throwcatch1.png" alt="throwcatch1.png" class="img-responsive img-markdown" /> <img src="/uploads/files/1614691382849-throwcatch2.png" alt="throwcatch2.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue/3</guid><dc:creator><![CDATA[tomatoKetchup]]></dc:creator><pubDate>Tue, 02 Mar 2021 13:24:42 GMT</pubDate></item><item><title><![CDATA[Reply to Throw~&#x2F;Catch~ and DSP block size issue on Tue, 02 Mar 2021 13:30:36 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/tomatoketchup">@tomatoKetchup</a> I think subpatches and abstractions inherit the blocking of their enclosing patches unless specified otherwise.  Try explicitly declaring a 64 sample block size in the subpatches containing the throw and catch objects and see if that fixes things.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue/4</guid><dc:creator><![CDATA[jameslo]]></dc:creator><pubDate>Tue, 02 Mar 2021 13:30:36 GMT</pubDate></item><item><title><![CDATA[Reply to Throw~&#x2F;Catch~ and DSP block size issue on Tue, 02 Mar 2021 13:50:05 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jameslo">@jameslo</a> When I do that I get no signal (the PWM does not work). I've tried tabwrite~ing both before the throw~ and after the catch~ and this is what I get:<br />
<img src="/uploads/files/1614692690887-throwcatch3.png" alt="throwcatch3.png" class="img-responsive img-markdown" /></p>
<p><div class="embed-container"><iframe src="//www.youtube.com/embed/VvglS4VL6FU" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue/5</guid><dc:creator><![CDATA[tomatoKetchup]]></dc:creator><pubDate>Tue, 02 Mar 2021 13:50:05 GMT</pubDate></item><item><title><![CDATA[Reply to Throw~&#x2F;Catch~ and DSP block size issue on Tue, 02 Mar 2021 14:08:42 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/tomatoketchup">@tomatoKetchup</a> Here's an example of what I was thinking:<br />
<img src="/uploads/files/1614694085698-screenshot-2021-03-02-090604.png" alt="Screenshot 2021-03-02 090604.png" class="img-responsive img-markdown" /><br />
<a href="/uploads/files/1614694099738-reblockingtest.pd">reblockingTest.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue/6</guid><dc:creator><![CDATA[jameslo]]></dc:creator><pubDate>Tue, 02 Mar 2021 14:08:42 GMT</pubDate></item><item><title><![CDATA[Reply to Throw~&#x2F;Catch~ and DSP block size issue on Tue, 02 Mar 2021 15:57:35 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jameslo">@jameslo</a> ok thanks, making some progress. Following your example, I've removed the [block~] object in the throw~ subpatch (I figure there's no need since none of the parent patches are being reblocked) and then changed the block~ in the catch for [block~ 64 1 0.25] (0.5 didn't work, probably because the parent was reblocked at 256, not 128 like in your example).</p>
<p>It seems to work and I've no more error messages, which is good. But there's a very strange new glitch in that the catch~d signal is somehow twice the amplitude of the one being throw~d (it oscillate between -2 and +2). Why would that be in your opinion?</p>
<p>EDIT: got it. My reblocked parent patch needed to be [block~ 256 1 <strong>4</strong>]. I gather the signal was sent twice between each new blocking of the receiver, hence appearing as if 2 identical signals were being mixed.</p>
<p>I hope changing this to 4 won't somehow break the code I had running already. Will have to do some heavy testing now to make sure the rest of the patch still behaves correctly.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue/7</guid><dc:creator><![CDATA[tomatoKetchup]]></dc:creator><pubDate>Tue, 02 Mar 2021 15:57:35 GMT</pubDate></item><item><title><![CDATA[Reply to Throw~&#x2F;Catch~ and DSP block size issue on Tue, 02 Mar 2021 16:28:52 GMT]]></title><description><![CDATA[<p>Everything seems to be working fine, fantastic! A great thanks to both of you <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/whale-av">@whale-av</a> and <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jameslo">@jameslo</a> for the help!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue/8</guid><dc:creator><![CDATA[tomatoKetchup]]></dc:creator><pubDate>Tue, 02 Mar 2021 16:28:52 GMT</pubDate></item><item><title><![CDATA[Reply to Throw~&#x2F;Catch~ and DSP block size issue on Tue, 02 Mar 2021 16:36:21 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/tomatoketchup">@tomatoKetchup</a> That's good news.....!<br />
For others.... this is how to do it...... <a href="/uploads/files/1614702900316-patch.pd">patch.pd</a><br />
David.<br />
<img src="/uploads/files/1614702979830-capture.jpg" alt="Capture.JPG" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue/9</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13331/throw-catch-and-dsp-block-size-issue/9</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Tue, 02 Mar 2021 16:36:21 GMT</pubDate></item></channel></rss>