<?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[vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed]]></title><description><![CDATA[<p>Hello all,</p>
<p>I'm having a hard time to achieve the following:</p>
<p>I have an audio signal that is 1 for 14 samples  then  0,  when it's &quot;1&quot;  I'd like to output a &quot;1&quot; signal, then the next sample I'd like to output zero, in order to know at which sample the change occurred.</p>
<p>I want to avoid using  &quot;block~&quot; to set audio block to 1 in a subpatch, and don't want to use externals.</p>
<p>Anyone has a clue about how to achieve this ?</p>
<p>Cheers</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Jul 2026 03:51:40 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/15871.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 05 May 2026 12:28:15 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Tue, 05 May 2026 12:28:15 GMT]]></title><description><![CDATA[<p>Hello all,</p>
<p>I'm having a hard time to achieve the following:</p>
<p>I have an audio signal that is 1 for 14 samples  then  0,  when it's &quot;1&quot;  I'd like to output a &quot;1&quot; signal, then the next sample I'd like to output zero, in order to know at which sample the change occurred.</p>
<p>I want to avoid using  &quot;block~&quot; to set audio block to 1 in a subpatch, and don't want to use externals.</p>
<p>Anyone has a clue about how to achieve this ?</p>
<p>Cheers</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed</guid><dc:creator><![CDATA[y0g1]]></dc:creator><pubDate>Tue, 05 May 2026 12:28:15 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Tue, 05 May 2026 13:32:41 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/y0g1">@y0g1</a> When you say &quot;1&quot; signal do you mean float 1?<br />
Even with [block~ 1] you will not get the control rate data until the end of the 64 sample Pd block.<br />
You can visualize it with an array after the fact......... a lot of discussion of samplewise stuff here......... <a href="https://forum.puredata.info/topic/13317/looking-for-velvet-noise-generator/69" rel="nofollow">https://forum.puredata.info/topic/13317/looking-for-velvet-noise-generator/69</a><br />
and also using [print~]<br />
Both Vanilla.</p>
<p>No time at the moment but you could play with [env~ 2 1] which should give you the data... again after the fact.......<br />
David.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/2</guid><dc:creator><![CDATA[whale-av]]></dc:creator><pubDate>Tue, 05 May 2026 13:32:41 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Tue, 05 May 2026 21:24:14 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/whale-av">@whale-av</a> said:</p>
<blockquote>
<p><a href="https://forum.puredata.info/topic/13317/looking-for-velvet-noise-generator/69" rel="nofollow">https://forum.puredata.info/topic/13317/looking-for-velvet-noise-generator/69</a></p>
</blockquote>
<p>Hello, thank you,</p>
<p>&quot;env~&quot; outputs a float, I think my question is confusing.</p>
<p>I'll try to be more precise, I'm analysing audio input signals, 4 audio inputs.<br />
They are mics placed around a snare drumhead, each time there's an attack I generate<br />
a signal that is 1 for all mics.</p>
<p>This signal is long, a few samples long, and I was scratching my head to find a way to turn it only into a 1 sample long impulse. It would make my life much easier.</p>
<p>all this stays at signal rate, then once a hit on the snare was detected on all 4 mics, I'll get the difference in samples in between them in order to know the position on the drumhead where the hit occurred.</p>
<p>thanks for the link to discussion, I'll read more into it to see if I can extract infos that could help. Any link to other posts about samplewise ways of doing things in general is welcome!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/3</guid><dc:creator><![CDATA[y0g1]]></dc:creator><pubDate>Tue, 05 May 2026 21:24:14 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Wed, 06 May 2026 01:13:08 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/y0g1">@y0g1</a> David asked all the questions I would've asked and now I get the benefit of added clarity <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" />. I wonder if this thing I made for <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/eeight">@eeight</a> has any useful ideas for you, especially the stuff up to the [rzero~] and [clip~] inclusive? <a href="https://forum.pdpatchrepo.info/topic/13739/sync-in-ms-between-2-audio-signals/6" rel="nofollow">https://forum.pdpatchrepo.info/topic/13739/sync-in-ms-between-2-audio-signals/6</a></p>
<p>Maybe if you just take the impulses on the leading edges and compare their timings (uh, somehow), that will give you the info you need. I'm hand waving because I don't know how you'd determine which impulse was first.</p>
<p>Edit: I think the premise of your project is that the sound of the bead of the stick hitting the batter head is dominant. I wonder if that's true for a snare drum.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/4</guid><dc:creator><![CDATA[jameslo]]></dc:creator><pubDate>Wed, 06 May 2026 01:13:08 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Wed, 06 May 2026 07:13:53 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/y0g1">@y0g1</a> said:</p>
<blockquote>
<p>This signal is long, a few samples long, and I was scratching my head to find a way to turn it only into a 1 sample long impulse. It would make my life much easier.</p>
</blockquote>
<p>i'm really not sure if i understand - but if it was only about that, a simple clipped derivative should be enough?</p>
<pre><code>[rzero~ 1]
|
[max~]
</code></pre>
<p>but based on the rest of the discussion, it sounds like you want to know which mic received the first input? i assume that it's not enough to have this per block though - since some mics might have a rising edge in the block after the mic that detected first? (EDIT: when handling things on control rate)</p>
<p>EDIT: it should be doable though to only trigger one impulse each time after a defined &quot;cooldown&quot; period (not sure about the proper word here) on signal rate.</p>
<p>EDIT2: and if it's about counting samples from the first hit to the others and then triangulating - that should also be achievable. let me know whether i understand correctly first. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/5</guid><dc:creator><![CDATA[ben.wes]]></dc:creator><pubDate>Wed, 06 May 2026 07:13:53 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Wed, 06 May 2026 09:52:10 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jameslo">@jameslo</a> said:</p>
<blockquote>
<p><a href="https://forum.pdpatchrepo.info/topic/13739/sync-in-ms-between-2-audio-signals/6" rel="nofollow">https://forum.pdpatchrepo.info/topic/13739/sync-in-ms-between-2-audio-signals/6</a></p>
</blockquote>
<p>Hello,</p>
<p>your &quot;metronome timer&quot; patch contains the answer to my question, great !<br />
( quite impressed by the reactivity on this forum )</p>
<p><img src="/uploads/files/1778061123786-screenshot-2026-05-06-at-09.13.36.png" alt="Screenshot 2026-05-06 at 09.13.36.png" class="img-responsive img-markdown" /></p>
<p>I would have never thought of &quot;rpole&quot;, &quot;rzero&quot;, never used those it's a bit hard to understand how it works. The patch is well commented but still if you could detail a tiny bit the part where you take the impulse that would be lovely.</p>
<p>For knowing which one arrived first, I made a sample counter, but still I have to find out how to reset it when first mic is getting the signal. ( So being able to have only impulses might help me go further )</p>
<p>At least I know where to ask if I'm stuck again <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/smiley.png" title="smiley" alt=":smiley:" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/6</guid><dc:creator><![CDATA[y0g1]]></dc:creator><pubDate>Wed, 06 May 2026 09:52:10 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Wed, 06 May 2026 10:53:16 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/y0g1">@y0g1</a> The formula for [rzero~] in help means &quot;the output is the difference between the current input and (the previous input times the current coefficient).&quot;  Since the coefficient is always 1, it's just the difference between the last two inputs. So since the input is just a square wave toggling between 0 and 1, the output is going to be 1 on the rising edge, -1 on the falling edge, and 0 otherwise. By clipping it to 0..1, I just take the rising edge pulse.</p>
<p>&quot;Convert to negative pulse&quot; means instead of sitting at 0 with the occasional 1 pulse, it now sits at 1 with the occasional 0 pulse.</p>
<p>The formula for [rpole~ 1] in help means &quot;&quot;the output is the sum of the current input plus (the previous output times the current coefficient).&quot; When both the input and coefficient are 0, the output is 0, and when they're both 1, it increments by 1 each sample (i.e. counts samples).</p>
<p>By now you probably know how to understand the formula for [rzero_rev~ 0], let me know if you don't. The reason you need it is so that [samphold~] grabs the highest previous count, not the reset value.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/7</guid><dc:creator><![CDATA[jameslo]]></dc:creator><pubDate>Wed, 06 May 2026 10:53:16 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Wed, 06 May 2026 15:26:00 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jameslo">@jameslo</a> Thank you for the detailed explanations! I feel smarter than yesterday.</p>
<p>Though I noticed my signal is in fact a succession of 1 and 0, over a period of a dozen of samples, any advice about how to &quot;debounce&quot;, I'd like my signal to be one , then 0 for 4410 samples ( ignoring all the next &quot;1&quot; ).</p>
<p>I hope it's clear, I can precise things, but I'd need to get my head out of it for an hour to do so... I'm way out of my comfort zone dealing with sample accuracy...</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/8</guid><dc:creator><![CDATA[y0g1]]></dc:creator><pubDate>Wed, 06 May 2026 15:26:00 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Wed, 06 May 2026 17:42:52 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/y0g1">@y0g1</a> What value are you using for the threshold? What frequency are you using for [lop~]? Can you please post a recording of several snare hits?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/9</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/9</guid><dc:creator><![CDATA[jameslo]]></dc:creator><pubDate>Wed, 06 May 2026 17:42:52 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Thu, 07 May 2026 09:42:42 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jameslo">@jameslo</a> At first I didn't use &quot;lop~&quot; thinking my signal was a constant &quot;1&quot;.<br />
I added the low pass and was able to detect attacks.</p>
<p>I'm now confronted to other problems, really hard to tell what's wrong...<br />
I didn't post a patch at first because it uses a big external library ( flucoma ).</p>
<p>But after. a few days attempting to get the delay difference in samples between 4 mics receiving the sound of a snare drum I post here the ( buggy) patch I ended up with.<br />
If anyone can have a look ( installing flucoma first ) I'd appreciate...</p>
<p>This patch is an adaptation for an artist who did this in Max msp , he needed this to work in puredate in order to use it with &quot;Bela Gem&quot; hardware.</p>
<p>I could post the &quot;Max&quot; patcher as well if needed.<a href="/uploads/files/1778144607173-interonsetdetection.zip">interOnsetDetection.zip</a>![Screenshot 2026-05-07 at 11.38.55.png]</p>
<p>I attach also a screenshot of where the patch is at:</p>
<p><img src="/uploads/files/1778146953004-screenshot-2026-05-07-at-11.38.55.png" alt="Screenshot 2026-05-07 at 11.38.55.png" class="img-responsive img-markdown" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/10</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/10</guid><dc:creator><![CDATA[y0g1]]></dc:creator><pubDate>Thu, 07 May 2026 09:42:42 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Thu, 07 May 2026 10:32:22 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/y0g1">@y0g1</a> I'm unable to test, but your patch looks like [fluid.ampfeature~] and [fexpr~] is supposed to be outputting 1 when the signal is above some threshold and 0 otherwise, is that correct? Is it working as you expect?</p>
<p>If so, the only thing you need from my patch is the part that extracts the leading edge as a pulse, inverts it, and then counts the samples between pulses, but if the signal out of [fexpr~] isn't clean (i.e. outputs one and only one contiguous block of 1s for every drum note) then my counter will output junk. That's why I was asking about [lop~] and threshold in my patch, which is what I assumed you were using for signal conditioning, e.g. for novelty metronome sounds I had to adjust them to get clean square pulses.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/11</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/11</guid><dc:creator><![CDATA[jameslo]]></dc:creator><pubDate>Thu, 07 May 2026 10:32:22 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Thu, 07 May 2026 11:22:24 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jameslo">@jameslo</a> Cheers,</p>
<p>I'm testing what I did to check if I get the onsets right.</p>
<p>the main difference with your exemple is instead of  resetting the counter every other sample I need to reset it after the fourth onset is received .</p>
<p>another difference is the difference in between each onset is in the order of 4 to 20 samples.</p>
<p>Once I'm sure I get the onsets right I need to count from 0 for 1st Onset to 3 for the 4th onset and only then reset the counter and retrieve the values ( with samphold I guess )</p>
<p>How would you adapt metronome timer for getting the difference between 4 consecutive &quot;onsets&quot;, then reset the sample counter to be ready for the next 4 onsets ?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/12</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/12</guid><dc:creator><![CDATA[y0g1]]></dc:creator><pubDate>Thu, 07 May 2026 11:22:24 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Thu, 07 May 2026 13:07:42 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/y0g1">@y0g1</a> said:</p>
<blockquote>
<p>How would you adapt metronome timer for getting the difference between 4 consecutive &quot;onsets&quot;, then reset the sample counter to be ready for the next 4 onsets ?</p>
</blockquote>
<p>Ugh, in audio domain? I dunno but off the top of my head I think it would be nasty/not worth it. Can't you just take a stream of timing intervals in control domain and process them in groups of 4? How you would align each group of 4 isn't obvious to me either, which is what I think <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ben-wes">@ben.wes</a> was alluding to earlier RE &quot;cooldown period&quot;. Edit: maybe [fexpr~] could help.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/13</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/13</guid><dc:creator><![CDATA[jameslo]]></dc:creator><pubDate>Thu, 07 May 2026 13:07:42 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Thu, 07 May 2026 13:40:10 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/y0g1">@y0g1</a> Why not translate the (up and running?) Max patch 1:1 into Pd? (I can not see the Max screenshot.)</p>
<hr />
<p><em>What is the overall latency-requirement?</em><br />
And where do you output in the end, sigrate or controlrate?<br />
Analyzing the blocks in control-rate is more common and easier but has at least 1 block additional latency, and can still be sample-accurate. (Sample-accurately one block late.)</p>
<hr />
<blockquote>
<p>reset the sample counter</p>
</blockquote>
<p>When reset it? And why reset it at all?<br />
Calculate difference by doing 'now minus before' without any reset.<br />
But when has been before? i.e. what is Tzero? How do you decide which onset is now and which is before?</p>
<hr />
<p>Do you just need to know which mic onset has been first or do you need inter-mic delay of all 4 mics? Things like that can be done by calculating the cross-correlation, but you have not asked for that, so I assume the Max patch is not doing that.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/14</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/14</guid><dc:creator><![CDATA[lacuna]]></dc:creator><pubDate>Thu, 07 May 2026 13:40:10 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Thu, 07 May 2026 18:34:35 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/lacuna">@lacuna</a></p>
<pre><code>Why not translate the (up and running?) Max patch 1:1 into Pd? (I can not see the Max screenshot.)
</code></pre>
<p>Well this is what I'm doing, though my questions are about parts in max that are done in &quot;Gen&quot; ( hence my question about &quot;detrending&quot; a signal, the max patcher does it this in Gen ),  there's a sample counter in the  max version using &quot;phasor~&quot; , in Max the right inlet of phasor resets the phase with non-zero signal value, in order to reset the counter, in pd I can't figure out how to achieve this...</p>
<pre><code>What is the overall latency-requirement?
</code></pre>
<p>the latency in the max patch is fixed, 256 samples.<br />
Then as the distance from hits to each mic can't be more than 50 centimetres this latency could be dropped to 64 samples I guess ( @ 44100hz )</p>
<p>as for your last questions, &quot;Tzero&quot; is when the hit on the snare is received first, &quot;before&quot; is after the it's been received by all 4 mics.</p>
<pre><code>Do you just need to know which mic onset has been first or do you need inter-mic delay of all 4 mics? Things like that can be done by calculating the cross-correlation, but you have not asked for that, so I assume the Max patch is not doing that.
</code></pre>
<p>the goal is to get the &quot;cross-correlation&quot;  in order to calculate the position where the snare drum was hit, I think I explained this in a post above. Then my questions are about those max things that are not 1:1 transposable, and that got me lost a bit.</p>
<pre><code> (I can not see the Max screenshot.)
</code></pre>
<p>Would you mind helping me achieving this if I post a few screenshots of the max patcher ?<br />
Let me know, I'd start a clean topic about this.</p>
<p>The initial question ( title of this topic ) has been resolved, but leading to other quirks I spent too much time on.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/15</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/15</guid><dc:creator><![CDATA[y0g1]]></dc:creator><pubDate>Thu, 07 May 2026 18:34:35 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Thu, 07 May 2026 18:37:50 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/lacuna">@lacuna</a> Actually I could even attach the patcher, it would make it easier right ?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/16</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/16</guid><dc:creator><![CDATA[y0g1]]></dc:creator><pubDate>Thu, 07 May 2026 18:37:50 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Thu, 07 May 2026 19:56:45 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ben-wes">@ben.wes</a></p>
<pre><code>EDIT2: and if it's about counting samples from the first hit to the others and then triangulating - that should also be achievable. let me know whether i understand correctly first. :)
</code></pre>
<p>Hi, I missed your post, but this is the idea. get the right number of samples from first hit to the others.<br />
( The triangulation part is already sorted )</p>
<p>I should maybe start a fresh topic about this, as my original question was answered.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/17</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/17</guid><dc:creator><![CDATA[y0g1]]></dc:creator><pubDate>Thu, 07 May 2026 19:56:45 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Mon, 11 May 2026 16:42:19 GMT]]></title><description><![CDATA[<p>this is probably overcomplicating things quite a bit. but i tried to patch something that will let through an inital impulse and then has a cooldown before the next impulse can go through:</p>
<p><img src="/uploads/files/1778517733677-image.png" alt="image.png" class="img-responsive img-markdown" /></p>
<p>next step would now be to measure the times for all mics starting from the first impulse.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/18</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/18</guid><dc:creator><![CDATA[ben.wes]]></dc:creator><pubDate>Mon, 11 May 2026 16:42:19 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Tue, 12 May 2026 14:16:46 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ben-wes">@ben.wes</a> neat piece of code!</p>
<p>I'll try it, and also learn from the way you graph the signal ( it must be an else object? )</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/19</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/19</guid><dc:creator><![CDATA[y0g1]]></dc:creator><pubDate>Tue, 12 May 2026 14:16:46 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Tue, 12 May 2026 14:49:28 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ben-wes">@ben.wes</a> your graph is a pdlua script of yours ?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/20</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/20</guid><dc:creator><![CDATA[y0g1]]></dc:creator><pubDate>Tue, 12 May 2026 14:49:28 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Tue, 12 May 2026 14:53:02 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/y0g1">@y0g1</a> said:</p>
<blockquote>
<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ben-wes">@ben.wes</a> your graph is a pdlua script of yours ?</p>
</blockquote>
<p>yep. I'll write another message with download link and also the patch when getting home later. currently at work. thanks for your response!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/21</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/21</guid><dc:creator><![CDATA[ben.wes]]></dc:creator><pubDate>Tue, 12 May 2026 14:53:02 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Tue, 12 May 2026 16:17:16 GMT]]></title><description><![CDATA[<p>here's a download link for the graph object (called <code>show~</code>). requires pdlua (installable through deken):</p>
<ul>
<li><a href="https://github.com/ben-wes/pdlua-show_tilde/releases" rel="nofollow">https://github.com/ben-wes/pdlua-show_tilde/releases</a></li>
</ul>
<p>... and here's the patch from above so that you don't need to patch it again from the picture if you want to check it out: <a href="/uploads/files/1778602611215-test-cooldown.pd">test-cooldown.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/22</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/22</guid><dc:creator><![CDATA[ben.wes]]></dc:creator><pubDate>Tue, 12 May 2026 16:17:16 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Tue, 12 May 2026 18:24:46 GMT]]></title><description><![CDATA[<p>btw. this rpole~ counter for the cooldown period could possibly be simplified with just a delwrite~/delread~ ... and the whole implementation is rather crappy since it's breaking down when signals or cooldown varies too much. not sure yet how to make this more stable. hopefully might share better approaches.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/23</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/23</guid><dc:creator><![CDATA[ben.wes]]></dc:creator><pubDate>Tue, 12 May 2026 18:24:46 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Thu, 14 May 2026 18:33:14 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ben-wes">@ben.wes</a> I ended up writing a few externals for the &quot;gen~&quot; codes I wanted to translate.<br />
Looking for a pd-vanilla way was quite instructive.</p>
<p>I guess some pdlua script would have worked ?<br />
If so, I think  a puredata vanilla &quot;scripting&quot; object would be a really nice feature...</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/24</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/24</guid><dc:creator><![CDATA[y0g1]]></dc:creator><pubDate>Thu, 14 May 2026 18:33:14 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Mon, 18 May 2026 21:34:13 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/y0g1">@y0g1</a> said:</p>
<blockquote>
<p>pdlua script would have worked ?</p>
</blockquote>
<p>yep. that would be an easy option in this case with its signal rate capabilities. currently, there's still a huge PR waiting to be merged into the official pdlua repo which also adds luajit support, increasing signal rate performance quite a bit.</p>
<p>anyway ... i think i ended up successfully implementing this in vanilla now:<br />
<img src="/uploads/files/1779139855594-screenshot-2026-05-18-at-23.29.14.png" alt="Screenshot 2026-05-18 at 23.29.14.png" class="img-responsive img-markdown" /></p>
<p>... [pd cooldown] looks like this:<br />
<img src="/uploads/files/1779139785113-image.png" alt="image.png" class="img-responsive img-markdown" /></p>
<p>... my previous version had the main issue that cooldown reset and first impulse could overlap. it's fixed now by just using 2 consecutive 0s for the reset (and avoiding consecutive impulses for the first trigger).</p>
<p>this might still be way too complicated. but it seems to actually measure the impulses for 4 channels now. <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /><br />
here's the patch: <a href="/uploads/files/1779139897094-test-cooldown-share.pd">test-cooldown-share.pd</a></p>
<p>if you'd want really exact localization, this should probably support subsample-measurements though. or at least a higher samplerate (since 1sp represents 7.15mm at 48kHz).</p>
<p><s>EDIT: the delay 100 for the snapshot is way too large here. 3ms is enough to cover the 100 samples range.</s><br />
EDIT2: cleaned up the patch and comments. fixed some stuff and uses fewer objects now by reducing redundancy.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/25</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/25</guid><dc:creator><![CDATA[ben.wes]]></dc:creator><pubDate>Mon, 18 May 2026 21:34:13 GMT</pubDate></item><item><title><![CDATA[Reply to vanilla method working like &quot;threshold~&quot; but triggering in between blocks, help needed on Thu, 21 May 2026 07:25:08 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/ben-wes">@ben.wes</a> Thank you for all this!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/26</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/15871/vanilla-method-working-like-threshold-but-triggering-in-between-blocks-help-needed/26</guid><dc:creator><![CDATA[y0g1]]></dc:creator><pubDate>Thu, 21 May 2026 07:25:08 GMT</pubDate></item></channel></rss>