<?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[For [phasor~]- and [vline~]-based samplers, how can we be sure all samples are being played?]]></title><description><![CDATA[<p>Hey guys just had a thought here.</p>
<p>Usually when making a sample player with <strong>[phasor~]</strong> or <strong>[vline~]</strong>, the foundation looks something like this:<br />
<img src="/uploads/files/upload-326e2621-3f8b-43b9-b048-405e608ada40.png" alt="Screen Shot 2015-03-20 at 8.27.02 AM.png" class="img-responsive img-markdown" />My question is that do both these objects, <strong>[phasor~]</strong> and <strong>[vline~]</strong>, generate all the points needed to playback every sample at whatever audio rate (44.1 khz or otherwise)?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 07:43:29 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/9151.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 20 Mar 2015 15:28:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to For [phasor~]- and [vline~]-based samplers, how can we be sure all samples are being played? on Fri, 20 Mar 2015 15:29:13 GMT]]></title><description><![CDATA[<p>Hey guys just had a thought here.</p>
<p>Usually when making a sample player with <strong>[phasor~]</strong> or <strong>[vline~]</strong>, the foundation looks something like this:<br />
<img src="/uploads/files/upload-326e2621-3f8b-43b9-b048-405e608ada40.png" alt="Screen Shot 2015-03-20 at 8.27.02 AM.png" class="img-responsive img-markdown" />My question is that do both these objects, <strong>[phasor~]</strong> and <strong>[vline~]</strong>, generate all the points needed to playback every sample at whatever audio rate (44.1 khz or otherwise)?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played</guid><dc:creator><![CDATA[rjp9]]></dc:creator><pubDate>Fri, 20 Mar 2015 15:29:13 GMT</pubDate></item><item><title><![CDATA[Reply to For [phasor~]- and [vline~]-based samplers, how can we be sure all samples are being played? on Fri, 20 Mar 2015 16:29:51 GMT]]></title><description><![CDATA[<p>Hmm, that's a good question. My guess is that every &quot;tilde&quot; type of object should output signal data at the same rate as the audio rate. The problem I see now is related to that multiplication you are using: since <strong>[phasor~]</strong> and your particular construction of <strong>[vline~]</strong> above both go from 0 to 1, and then are multiplied by a constant, you will sometimes get numbers that are not integers and which I suppose are rounded by <strong>[tabread4~]</strong> (since indexes of an array should always be integer).</p>
<p>A probably better way of doing this would be to already construct the whole patch in a way to avoid the rounding. If your maths are accurate, then it <strong>[line~]</strong>'s output will always be exactly +1 at each new audio frame. See:</p>
<p><img src="/uploads/files/upload-88ee1d8b-b44d-4bea-83c3-251d2302945f.png" alt="Screenshot from 2015-03-20 17:28:10.png" class="img-responsive img-markdown" /></p>
<p>That said, I really can't hear any difference between these constructions, and so from a practical point of view I would be too much bothered about it. But if you are curious about it, I would recommend you to write to the mailing list, where all the Pd gurus and old Chinese masters live. If someone knows the exact answer to this question, then this person is very likely reading that list.</p>
<p>Cheers!<br />
Gilberto</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played/2</guid><dc:creator><![CDATA[gsagostinho]]></dc:creator><pubDate>Fri, 20 Mar 2015 16:29:51 GMT</pubDate></item><item><title><![CDATA[Reply to For [phasor~]- and [vline~]-based samplers, how can we be sure all samples are being played? on Fri, 20 Mar 2015 16:36:23 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/gsagostinho">@gsagostinho</a> Ah I see. So instead of taking a number between 0-1 (provided by a <strong>[phasor~]</strong> or <strong>[line~]</strong>) and multiplying that by the total number of samples, it's more accurate to just use <strong>[line~]</strong> and have the ramp go from 0 to the last sample.</p>
<p>Which makes me curious. What is the <strong>[+ 1]</strong> for? Isn't the first index of an array at 0?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played/3</guid><dc:creator><![CDATA[rjp9]]></dc:creator><pubDate>Fri, 20 Mar 2015 16:36:23 GMT</pubDate></item><item><title><![CDATA[Reply to For [phasor~]- and [vline~]-based samplers, how can we be sure all samples are being played? on Fri, 20 Mar 2015 16:40:48 GMT]]></title><description><![CDATA[<blockquote>
<p>What is the [+ 1] for? Isn't the first index of an array at 0?</p>
</blockquote>
<p>My bad, it should actually be <strong>[- 1]</strong> and the message above <strong>[line~]</strong> should be <strong>[0, $1 $2(</strong>, since if we have <em>n</em> samples, their indexes are <em>0</em> until <em>n-1</em>, right?</p>
<p>Cheers!<br />
Gilberto</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played/4</guid><dc:creator><![CDATA[gsagostinho]]></dc:creator><pubDate>Fri, 20 Mar 2015 16:40:48 GMT</pubDate></item><item><title><![CDATA[Reply to For [phasor~]- and [vline~]-based samplers, how can we be sure all samples are being played? on Fri, 20 Mar 2015 17:58:41 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/gsagostinho">@gsagostinho</a> tabread4~ can read in between samples with interpolation though<br />
I think normal tabread~ uses the floor function (chops off the fractional part)</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played/5</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Fri, 20 Mar 2015 17:58:41 GMT</pubDate></item><item><title><![CDATA[Reply to For [phasor~]- and [vline~]-based samplers, how can we be sure all samples are being played? on Sat, 21 Mar 2015 01:51:25 GMT]]></title><description><![CDATA[<blockquote>
<p>tabread4~ can read in between samples with interpolation though</p>
</blockquote>
<p>Oh, really? I thought it interpolates between some samples before and some samples after the current one, but I never expected it to read between the samples. How does his work?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played/6</guid><dc:creator><![CDATA[gsagostinho]]></dc:creator><pubDate>Sat, 21 Mar 2015 01:51:25 GMT</pubDate></item><item><title><![CDATA[Reply to For [phasor~]- and [vline~]-based samplers, how can we be sure all samples are being played? on Sat, 21 Mar 2015 06:38:50 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/gsagostinho">@gsagostinho</a> when you tell it to read between 2 indices in a table it will output some value in between the values of those 2 indices generally, like a crude form of resampling.<br />
It allows one to give tabread4 values such as, say, 1.25. Tabread4~ can resample the integer sample values to give values in between the original integer indices, and in the case of 1.25 the sample in place 1 will be weighted more heavily than the sample in place 2. samples 0 and 3 would also be used for the weighting though, in order to get the cubic polynomial. (that is why one must read starting from sample 1 rather than sample 0 when using tabread4)<br />
(tabread4 uses lagrange interpolation:<br />
<a href="https://ccrma.stanford.edu/~jos/pasp/Lagrange_Interpolation.html" rel="nofollow">https://ccrma.stanford.edu/~jos/pasp/Lagrange_Interpolation.html</a>)<br />
That is what I mean by being able to read in-between samples: it is valid to pass non-integer sample values and receive a &quot;meaningful&quot; output.</p>
<p>This is also what makes it possible to use tabread4~ to play back samples at a slower or faster rate that isn't some integer multiple of it's sample rate, because you can give it (for instance) 1, 1.5, 2, 2.5 etc. If tabread4 could only read integers and was given the same input it would go 1, 1, 2, 2 etc. This is what regular tabread~ does though.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played/7</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Sat, 21 Mar 2015 06:38:50 GMT</pubDate></item><item><title><![CDATA[Reply to For [phasor~]- and [vline~]-based samplers, how can we be sure all samples are being played? on Sat, 21 Mar 2015 10:52:41 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/seb-harmonik-ar">@seb-harmonik.ar</a> Hi Seb, thanks for the explanation! So I see what you mean by reading in between the samples.</p>
<blockquote>
<p>This is also what makes it possible to use tabread4~ to play back samples at a slower or faster rate that isn't some integer multiple of it's sample rate, because you can give it (for instance) 1, 1.5, 2, 2.5 etc. If tabread4 could only read integers and was given the same input it would go 1, 1, 2, 2 etc. This is what regular tabread~ does though.</p>
</blockquote>
<p>Are you sure about <strong>[tabread~]</strong> though? Have a look at this:</p>
<p><img src="/uploads/files/upload-b8f6ac59-7ad8-44d3-be2e-60e55438c878.png" alt="Screenshot from 2015-03-21 11:51:12.png" class="img-responsive img-markdown" /><br />
<a href="/uploads/files/upload-36d50d16-72da-4e19-9e0e-aefea9e7e3ef.pd">tabread-playback-speed.pd</a></p>
<p>When I use different playback speeds which are not multiple of whole numbers with <strong>[tabread~]</strong> I still get slower or faster rate. I always thought that the only difference between <strong>[tabread~]</strong> and <strong>[tabread4~]</strong> is the use of interpolation, nothing else.</p>
<p>Cheers!<br />
Gilberto</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played/8</guid><dc:creator><![CDATA[gsagostinho]]></dc:creator><pubDate>Sat, 21 Mar 2015 10:52:41 GMT</pubDate></item><item><title><![CDATA[Reply to For [phasor~]- and [vline~]-based samplers, how can we be sure all samples are being played? on Sun, 22 Mar 2015 06:16:53 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/gsagostinho">@gsagostinho</a> yes, you will still get a slower or faster rate, but only integer indices will be read, and so certain samples will be repeated or skipped rather than interpolated between. It is true that the only difference is the interpolation (well, aside from tabread4's &quot;onset&quot; inlet)<br />
So I suppose it would have been better to say that you can read faster or slower with tabread~, but the output will have a lot more distortion than with tabread4</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played/11</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/9151/for-phasor-and-vline-based-samplers-how-can-we-be-sure-all-samples-are-being-played/11</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Sun, 22 Mar 2015 06:16:53 GMT</pubDate></item></channel></rss>