<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 03/20/2015 12:57 PM, Reed Perkins
wrote:<br>
</div>
<blockquote
cite="mid:CABktLz3mZrTtx5DWSjJoVijS_QrwnvXDKFek6DAV20dCCTXA=A@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default"
style="font-family:garamond,serif;font-size:large">Hello all,</div>
<div class="gmail_default"
style="font-family:garamond,serif;font-size:large"><br>
</div>
<div class="gmail_default"
style="font-family:garamond,serif;font-size:large">[line~],
[vline~], and [phasor~] are used to generate line ramps in
basic sample-playback patches. The output of these objects is
usually multiplied by the total number of samples in a sound
file (that has already been loaded into an array or table) and
fed into the input of something like [tabread4~]. In other
words, we use these line-ramp objects to traverse the indices
of a table where a sample is loaded at a given speed.</div>
<div class="gmail_default"
style="font-family:garamond,serif;font-size:large"><br>
</div>
<div class="gmail_default"
style="font-family:garamond,serif;font-size:large">My
questions are these: </div>
<div class="gmail_default"
style="font-family:garamond,serif;font-size:large"><br>
</div>
<div class="gmail_default"
style="font-family:garamond,serif;font-size:large">1. Do these
line-ramps generate enough numbers such that every sample in a
table will be read? <br>
</div>
</div>
</blockquote>
<br>
No. (And I assume you are wanting the values of the table to be
output one after the other, in sequence, when you output them as a
signal.)<br>
<br>
The determining factors for how table values are output: a) ramp
duration (in time units), b) ramp height (end value - start value),
c) the sample rate, and d) whether the object doing the reading is
interpolating the index values.<br>
<br>
The sample rate in Pd is fixed, so you are only guaranteed to read
every table value when the ratio of ramp height/duration matches the
sample rate ratio. If you wanted something like [line~] and
[tabread~] to guarantee that every sample of the table is
read/output/whatever, you'd need a system in which the sample rate
changes based on the size of the array being read.<br>
<br>
<blockquote
cite="mid:CABktLz3mZrTtx5DWSjJoVijS_QrwnvXDKFek6DAV20dCCTXA=A@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default"
style="font-family:garamond,serif;font-size:large"><br>
</div>
<div class="gmail_default"
style="font-family:garamond,serif;font-size:large">2. Does it
matter if, say for example, [tabread4~] receives a decimal
number for an index, like 333987.8, which can be caused by
multiplying the output of [phasor~] (which goes from 0-1) by
the total amount of samples (usually a much larger number).</div>
</div>
</blockquote>
<br>
Yes, because [tabread4~] does interpolation. The [tabread~] object
does no interpolation so the number after the decimal point in your
index wouldn't make any difference.<br>
<br>
For example:<br>
<br>
[0 44099 2000(<br>
|<br>
[line~]<br>
|<br>
[tabread~ array1] <-- a table of size 44,100<br>
<br>
This will output every value of your table twice in a row, because
your taking twice as long to read the entire table. However, that's
probably not what you want, and if you listen to that results vs.
[tabread4~], you'll hear why interpolation is a good thing in this
case.<br>
<br>
<blockquote
cite="mid:CABktLz3mZrTtx5DWSjJoVijS_QrwnvXDKFek6DAV20dCCTXA=A@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default"
style="font-family:garamond,serif;font-size:large"><br>
</div>
<div class="gmail_default"
style="font-family:garamond,serif;font-size:large">3. Does the
output of [line~] and [vline~] vary due to being asked to
generate a ramp faster or slower? If I ask [line~] to go from
0-555987 in 3789 milliseconds, will the actual output be the
same or different if I then ask [line~] to go from 0-9876545
in 40 milliseconds</div>
</div>
</blockquote>
<br>
I'm not sure what you're asking. Are you asking whether the samples
output from 0-555987 will be the same in both cases? If so, the
answer is no. The [line~] object is outputting floating point
numbers in the range you specify, over the duration you specify,
aligned to block boundaries.<br>
<br>
<blockquote
cite="mid:CABktLz3mZrTtx5DWSjJoVijS_QrwnvXDKFek6DAV20dCCTXA=A@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default"
style="font-family:garamond,serif;font-size:large"><br>
</div>
<div class="gmail_default"
style="font-family:garamond,serif;font-size:large">I realize
this is totally theoretical, because in all honestly I
wouldn't be able to hear a difference if samples are being
skipped, but I want to know :)</div>
</div>
</blockquote>
<br>
But you do. If the sample rate is 44,100 samples per second, and
you read from 0 to 44,099 in one second with [tabread~] you'll hear
all the samples being output. But if you read from 0 to 44,099 in
_half_ of a second you'll be skipping every other sample. You'll
certainly perceive the difference as the sound recording going
_twice_ as fast.<br>
<br>
Essentially, the [tabread4~] object is for those situations where
you know you'll be playing back at a ramp height/duration ratio that
doesn't match the sample rate ratio. Or where you'll often be
speeding up or slowing down.<br>
<br>
-Jonathan<br>
<br>
<blockquote
cite="mid:CABktLz3mZrTtx5DWSjJoVijS_QrwnvXDKFek6DAV20dCCTXA=A@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default"
style="font-family:garamond,serif;font-size:large"><br>
</div>
<div class="gmail_default"
style="font-family:garamond,serif;font-size:large">Thanks for
your time.</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a class="moz-txt-link-freetext" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a>
</pre>
</blockquote>
<br>
</body>
</html>