[PD] Play/loop and pitch change
M.Jones at signal.qinetiq.com
Fri Aug 8 15:53:32 CEST 2003
nope your maths is wrong(!) I'm pretty sure no guard points are needed,
more so if the original pitch is not changed. multiply by [arraysize-3]
then add one.
by the way, it looks like phasor~ accepts non-signal data connected to its
left inlet, but I seem to remember it not working when I used to do this.
has it changed in v37? then why use sig~ (as it does in the help file)
----- Original Message -----
From: "e skogen" <eskogen at usfamily.net>
To: "pix" <pix at test.at>
Cc: <pd-list at iem.at>
Sent: Friday, August 08, 2003 2:37 PM
Subject: Re: [PD] Play/loop and pitch change
> this point has been confusing to me, as well. and, like pix, i've been
> avoiding it because i am lazy :P
> what if:
> 1. the phasor~ is going from 0 to 1
> 2. the phasor~ is multiplied by ((the array size) - 1)
> 3. this value is added to by one
> | [arraysize]
> | |
> | [- 1]
> | |
> [+~ 1]
> wouldn't this give you your read from 1 to size-2? or is my math wrong?
> or do you really need to provide wrap-around points (guard points) for
> cleanly looping samples?
> i'm going to have to look at the docs more when i get the chance.
> also, Soeren: if it's small, could you send me a copy of the soundfile
> that's causing clicks?
> pix wrote:
> > more than likely it's your sample data.
> > try a sample that is completely silent. if the click goes away, it is
> > likely your data.
> > also, try filling your array using the "sinesum" message from
> > 2.control.examples/15.arrays.pd if this doesn't click, it is definitely
> > your data.
> > note on the tabread4~ help page that tabread4~ requires guard points
> > (although it doesn't say that explicitly). valid reads are from 1 to
> > size-2. you are reading from 0 to (size-1) if you are just multiplying a
> > phasor.
> > not thinking too hard about it (eg, i could easily be wrong), i think
> > guard points situation is that the sample at 0 should be a copy of the
> > sample at size-2 and the sample at size-1 should be a copy of the sample
> > at 1.
> > i guess to build a table like this from a normal non-guard-pointed
> > you could grow (suing a resize message) the given table by 2 samples,
> > set the sample at newsize-2 to the sample at 0, and the sample at
> > newsize-1 to the sample at 1.
> > now if you index the table using (phasor*newsize-2)+1 you should get a
> > clean loop, but unfortunately the sample will be offset by one sample.
> > could wither fix this in the indexing ( something like
> > ((phasor*newsize-2)-1 mod (newsize-2))+1 ) or copy all of the samples
> > by one when you are fixing the table.
> > making some things to do this guard point generation and indexing would
> > a nice pair of abstractions to make available.
> > okay.. i think i just thought about that way too much.
> > you will be able to explain any huge errors in my reasoning, by knowing
> > that i didn't test any of this. i've never noticed clicking when just
> > using tabread4~ without doing all of this jiggery-pokery, as my samples
> > are normally kind of noisy... but i always new i was being lazy.
> > by the way, instead of using a modified phasor~ to do one-shot, you
> > send a line~ object a "0, 1 <period>" message.
> > pix.
> > On Fri, 08 Aug 2003 10:05:17 +0200
> > Søren Bovbjerg <sb at cvmt.dk> wrote:
> >>I am searching for a PD object (external/native) that can play samples
> >>from an array in both loop and "single shot" mode while being able to
> >>change playback speed.
> >>So far I have been using a phasor~ (modified to create 1 or unlimited
> >>ramps) + tabread4~ but I am experiencing a very small click when the
> >>sound loops. The click is only noticable when the sample is a pure
> >>looping tone. The problem exists with both wav and aiff files so I don't
> >>thing it is a "header" problem.
> >>I have attached the sampler (without modified phasor~) I have been using
> >>so far. It should run on any newer PD version.
> >>Any ideas are welcome.
> (ascii pseudo-patch)!!! yazaaahhh!!
> ------ http://USFamily.Net/info - Unlimited Internet - From
> PD-list mailing list
> PD-list at iem.at
More information about the Pd-list