First time on this mailing list, so hello everyone! I started using pd a couple of month ago and I'm completely addicted.
Ok I have a simple problem for which I'm looking for the most elegant solution.
I need a phasor (in a looping sampler) which frequency can be changed only at the beginning of it's period (when it drops to zero). That's usually the kind of problem a samphold can handle very well but when I connect a phasor and a samphold directly together I get a "dsp loop detected (some tilde objects not scheduled)" error. One solution could be to "pipe" the new frequency to the phasor with a delay calculated from the previous frequency but I have the feeling there must be a more elegant solution to this problem. Anyone got a suggestion?
There is a thread in the archive that is adressing a dsp loop issue but the solution proposed dosen't seem to be adapted to my specific problem.
Thank you Benef
I am not an expert in sound but with a [s~] (from [samphold~]) and a [r~] (into [phasor~]), you should avoid dsp loop. [r~] receive with one block delay. Don't know if there is better solution. ++
Jack
Le mercredi 28 avril 2010 à 08:03 -0700, Benoît Fortier a écrit :
First time on this mailing list, so hello everyone! I started using pd a couple of month ago and I'm completely addicted.
Ok I have a simple problem for which I'm looking for the most elegant solution.
I need a phasor (in a looping sampler) which frequency can be changed only at the beginning of it's period (when it drops to zero). That's usually the kind of problem a samphold can handle very well but when I connect a phasor and a samphold directly together I get a "dsp loop detected (some tilde objects not scheduled)" error. One solution could be to "pipe" the new frequency to the phasor with a delay calculated from the previous frequency but I have the feeling there must be a more elegant solution to this problem. Anyone got a suggestion?
There is a thread in the archive that is adressing a dsp loop issue but the solution proposed dosen't seem to be adapted to my specific problem.
Thank you Benef
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Thank you, I didn't knew about the one block delay. Problem solved very elegantly indeed!
Benef
De : Jack jack@rybn.org À : Benoît Fortier benoitfortier@yahoo.ca Cc : pd-list@iem.at Envoyé le : Mer 28 avril 2010, 11 h 26 min 41 s Objet : Re: [PD] connecting a samphold and a phasor together
I am not an expert in sound but with a [s~] (from [samphold~]) and a [r~] (into [phasor~]), you should avoid dsp loop. [r~] receive with one block delay. Don't know if there is better solution. ++
Jack
Le mercredi 28 avril 2010 à 08:03 -0700, Benoît Fortier a écrit :
First time on this mailing list, so hello everyone! I started using pd a couple of month ago and I'm completely addicted.
Ok I have a simple problem for which I'm looking for the most elegant solution.
I need a phasor (in a looping sampler) which frequency can be changed only at the beginning of it's period (when it drops to zero). That's usually the kind of problem a samphold can handle very well but when I connect a phasor and a samphold directly together I get a "dsp loop detected (some tilde objects not scheduled)" error. One solution could be to "pipe" the new frequency to the phasor with a delay calculated from the previous frequency but I have the feeling there must be a more elegant solution to this problem. Anyone got a suggestion?
There is a thread in the archive that is adressing a dsp loop issue but the solution proposed dosen't seem to be adapted to my specific problem.
Thank you Benef
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Wed, Apr 28, 2010 at 09:10:53AM -0700, Benoît Fortier wrote:
Thank you, I didn't knew about the one block delay. Problem solved very elegantly indeed!
However the problem is not really solved, only "delayed". :) Your phasor~'s frequency will not change when it is at zero, but at least 1 sample or in Pd even one block later (so usually 64 samples) when the phasor~ is already at a value different from 0.
This affects certain algorithms more than others, but you have to be aware of it. Here's Miller's notes from http://crca.ucsd.edu/~msp/techniques/latest/book-html/node96.html about the issue:
Having the oscillator's phase control the updating of its own frequency is an example of feedback, which in general means using any process's output as one of its inputs. When processing digital audio signals at a fixed sample rate (as we're doing), it is never possible to have the process's current output as an input, since at the time we would need it we haven't yet calculated it. The best we can hope for is to use the previous sample of output--in effect, adding one sample of delay. In block environments (such as Max, Pd, and Csound) the situation becomes more complicated, but we will delay discussing that until the next chapter (and simply wish away the problem in the examples at the end of this one).
A [phasor~] with a builtin [samphold~] on its own output could be a nice external.
Frank Barknecht Do You RjDj.me? _ ______footils.org__
On Wed, 2010-04-28 at 08:03 -0700, Benoît Fortier wrote:
First time on this mailing list, so hello everyone! I started using pd a couple of month ago and I'm completely addicted.
Ok I have a simple problem for which I'm looking for the most elegant solution.
I need a phasor (in a looping sampler) which frequency can be changed only at the beginning of it's period (when it drops to zero). That's usually the kind of problem a samphold can handle very well but when I connect a phasor and a samphold directly together I get a "dsp loop detected (some tilde objects not scheduled)" error. One solution could be to "pipe" the new frequency to the phasor with a delay calculated from the previous frequency but I have the feeling there must be a more elegant solution to this problem. Anyone got a suggestion?
In order to avoid recursiveness, you could do it by using [metro] and [vline~]. Then you have the feature 'update the frequency only loop-start' for free.
Roman
There's also the loop~ object (in pd/extra) which I had to write for exactly this reason. But I doubt it's general enough for every possible purpose :)
Miller
On Thu, Apr 29, 2010 at 04:26:13PM +0200, Roman Haefeli wrote:
On Wed, 2010-04-28 at 08:03 -0700, Beno??t Fortier wrote:
First time on this mailing list, so hello everyone! I started using pd a couple of month ago and I'm completely addicted.
Ok I have a simple problem for which I'm looking for the most elegant solution.
I need a phasor (in a looping sampler) which frequency can be changed only at the beginning of it's period (when it drops to zero). That's usually the kind of problem a samphold can handle very well but when I connect a phasor and a samphold directly together I get a "dsp loop detected (some tilde objects not scheduled)" error. One solution could be to "pipe" the new frequency to the phasor with a delay calculated from the previous frequency but I have the feeling there must be a more elegant solution to this problem. Anyone got a suggestion?
In order to avoid recursiveness, you could do it by using [metro] and [vline~]. Then you have the feature 'update the frequency only loop-start' for free.
Roman
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Thank you, I just tried the loop~ object and it works very well for what I'm doing (a looping sampler which allows to change the offset and the size of the repeated segment without transposing it... rather simple stuff I suppose but fun to work on when learning!). One more question came up to my mind when trying the loop~ object : it is recommended under certain circonstances to add 3 samples to an array to allow a "better playback" (or something like that) when building a sampler. Anyone can explain me why and when it is necessary to add those 3 samples?
I hope I'm not spaming this list with obvious, newbie questions! Thanks in advance.
Benoît
De : Miller Puckette mpuckett@imusic1.ucsd.edu À : Roman Haefeli reduzierer@yahoo.de Cc : Beno?t Fortier benoitfortier@yahoo.ca; pd-list@iem.at Envoyé le : Jeu 29 avril 2010, 11 h 43 min 23 s Objet : Re: [PD] connecting a samphold and a phasor together
There's also the loop~ object (in pd/extra) which I had to write for exactly this reason. But I doubt it's general enough for every possible purpose :)
Miller
On Thu, Apr 29, 2010 at 04:26:13PM +0200, Roman Haefeli wrote:
On Wed, 2010-04-28 at 08:03 -0700, Beno??t Fortier wrote:
First time on this mailing list, so hello everyone! I started using pd a couple of month ago and I'm completely addicted.
Ok I have a simple problem for which I'm looking for the most elegant solution.
I need a phasor (in a looping sampler) which frequency can be changed only at the beginning of it's period (when it drops to zero). That's usually the kind of problem a samphold can handle very well but when I connect a phasor and a samphold directly together I get a "dsp loop detected (some tilde objects not scheduled)" error. One solution could be to "pipe" the new frequency to the phasor with a delay calculated from the previous frequency but I have the feeling there must be a more elegant solution to this problem. Anyone got a suggestion?
In order to avoid recursiveness, you could do it by using [metro] and [vline~]. Then you have the feature 'update the frequency only loop-start' for free.
Roman
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list