Hello, i was wondering if somebody have implemented the doppler effect in pd?
c
f' = f ___ c - v
thanks
R.
The variable delay [vd~] can be used for this. A guitar vibrato effect, made by adding LFO to an offset delay inlet, is a kind of Doppler that moves backward and forward. Doppler for sfx movement involves making this happen in one direction at the appropriate time, usually accompanied by panning and filtering.
On Fri, 17 Sep 2010 22:36:12 -0700 ronni montoya ronni.montoya@gmail.com wrote:
Hello, i was wondering if somebody have implemented the doppler effect in pd?
c
f' = f ___ c - v
thanks
R.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Sat, 18 Sep 2010, Andy Farnell wrote:
The variable delay [vd~] can be used for this. A guitar vibrato effect, made by adding LFO to an offset delay inlet, is a kind of Doppler that moves backward and forward.
Isn't that more of a case of a Doppler effect being marketed as being a vibrato effect ?... An actual vibrato effect wouldn't change the timing of the note, for example, but it's the kind of thing you have to apply in the device that makes the note, so, if your input is an already-synthesised note, the easiest you can do is pass off the Doppler effect as a vibrato effect and get away with it because it sounds close enough.
(i'm only talking about the mono case here, no panning.)
| Mathieu Bouchard ------------------------------ Villeray, Montréal, QC
On Fri, 17 Sep 2010, ronni montoya wrote:
Hello, i was wondering if somebody have implemented the doppler effect in pd? f' = f*c/(c-v)
You set a [vd~]'s delay to the distance of the sound source divided by c. A smooth change of delay will automatically switch the frequencies in the same manner that the doppler effect does (at low speeds).
You can also compute it from scratch, but note that you have to figure out the speed at which the source is going in _your_ direction, and that is radial.
If you stand at 10m from a straight road lane on which a car will pass at 40m/s, the car will be at the position 40*time on the road, and then draw a straight line from the road to you so that you have a right angle. Using Pythagore's theorem, (40*time)*(40*time) + 10*10 will equal to distance*distance :
[expr~ sqrt(pow(40*$v1,2)+pow(10,2))] gives the distance
but that's distance according to time, not distance-wise speed according to time. You can compute the latter using [rzero~], or you can use math (from grade 12) to do it all with one expr :
[expr~ 40*$v1 / sqrt(pow(40*$v1,2)+pow(10,2))]
But if you want to do it with [vd~], you do it with the first expr~.
And finally, note that the doppler effect formula that we use doesn't work well for the doppler effect observed in starlight, because it has to be corrected for very very high speeds (Lorentz/Einstein equation).
| Mathieu Bouchard ------------------------------ Villeray, Montréal, QC