Attempt at creating a Doppler Effect type patch
Hi all, I am new to the world of MaxMSP (so go easy on me!!)
I am currently trying to design and create a maxmsp patch that will be able to re-create the doppler effect. The reason I want to recreate it is to build a simulator of a Rotary Cabinet (such as a leslie). I will be taking the impulse response of a Leslie over the next weeks in order to achieve the speaker characteristics of the leslie (this will be with it stationary - motors not spinning).
Once this IR has been achieved I am planning on using it to affect a sound wave in order to apply the doppler effect to it. At the moment I am just using SFplay in order to mess around and play with the patch. I am using cycle to create the pitch-shifting effect of a rotary cabinet (dynamically affecting the tapin / tapout). Then panning the signal from left to right to create the movement of the rotary cabinet.
I have attached below what I have managed to create so far. Just wanted to get peoples feedback on it so far, can anyone think of any better ways of achieving this? Any massive problems with what I have done so far?
As I said earlier I am very new to MaxMSP so please go easy if there are any MASSIVE issues that i've completely overlooked!!!
Kind Regards,
Jonny
have a look in the examples/spatialization folder. There is an excellent doppler patch there.
I have had a look at it and have taken it apart a fair amount. However the thing that I am struggling with is that on the example patch the sound is triggered and then ends. In my patch I want that effect to be repeated and the speed of this to be determined by a sinusoid wave (unless there is a better way to determine the speed. I still want the pan to shift from left to right and back again. Can you think of any ways that I could accomplish this?
Many thanks for your reply,
Jonny
I find that a pretty good simulation of Doppler effect can be achieved with a combination of intensity panning (to create an effect of continuously changing directionality), volume control of the sound source (to create an effect of changing distance), and delay (also a factor of the distance, based on the virtual location of the sound source, which, when continuously changing causes the associated change in pitch).
The following examples might be of some help. They're not super-sophisticated (and might or might not be relevant to your Leslie-imitation project), but they pretty much work.
*this* for me is the ultimate doppler effect:
http://www.maxforlive.com/library/device.php?id=239
- looks brilliant, too.
Chris, thankyou very much for those links. Really Helpful.
Wetterberg, I believe I need Max for Live to open this up - which I unfortunately do not have. Does sound fantastic though!
this is the monolake device translated as a .maxpat file-- don't know how kosher this is but here it is anyway
Thankyou for your help. Sort of linked to this is another question I have:
I want to essentially populate a message that controls ramp with some calculated values. I am struggling to find a way to plug these integer values into the ramp message in the right places.
Is there a simpler route, or can anyone help?
Thankyou Very much,
I've put $ argument placeholders in the message box for you, and you need to pack the arguments into a list first (because there's more than one variable). I've also changed the arithmetic to floating point, and the list is stored in zl reg so that the number box doesn't trigger the ramp directly (use the button to trigger)
Terry thank you so much!!! That worked an absolute charm! :)
Please find attached my patch as it stands, it now has 3 speed presets and the option to have a custom speed. Please note that at the moment I am just using phasor~ to give me a signal input to play with.
What are your thoughts?
Regards
I didn't look to closely at the actual doppler simulator subpatch, but I tried simplifying your speed control method, and the control trajectory is a sine wave which is what the circular motion of a leslie speaker describes anyway (instead of straight line ramps, and changed your audio source to a sine wave to verify more easily that it does more or less what it's supposed to, which it seems to do... the maths might need some refining perhaps...
Terry, yet again your help has been incredible! The developments are fantastic. Thank you!
Another quick, potentially simple question;
If I change an integer from say 1 to 10, is there anyway of instead of it simple jumping straight to 10 to actually have it go 1,2,3,4,5,6,7,8,9,10? Or change from 1 to 2 to have to go 1.1, 1.2, 1.3 ......, etc
Thank you,
not sure what you mean; if it's a number box it comes in two flavours float or int, and if you drag closer to the right side of a float box it scrolls at a finer resolution ie tenths or hundredths etc
Sorry my question wasn't written very well.
When a integer box is changed from 1 to 2 instead of it just going straight from 1 to 2 I want it to automatically increment from 1 to 2 in small stages (so a sort of fade up / down sort of thing).
Does that make sense?
you can use line to ramp up or down to a new value-- if you wanted a discrete number of steps you'd need to change the time grain according to the difference between the current target value and the previous value, and the time taken to perform the ramp... i'll leave that for you to implement
Yet again Terry fantastic!
Thank you :)
Jonny your superlatives must be having an effect. here's a version of the doppler patch with what i think are improvements.
by using poltocar you can describe the motion in two dimensions, rather than it just as the speaker moving back and forth along a line. I've incorporated the idea of virtual mics, which can be spaced apart by a variable (x) distance, as well as their proximity from the speaker (the y distance of the speaker from the mid-piont between the two mics)
so panning and doppler shift is calculated independently for each output channel
hope it makes sense
Here is another link that you may find interesting :
http://www.lma.cnrs-mrs.fr/~kronland/MovingSources/
There's some abstractions to simulate moving sound sources, and an example of using those to simulate a leslie cabinet :
http://www.lma.cnrs-mrs.fr/~kronland/MovingSources/Leslie.html
Hi all,
I have now completed this patch ("Leslie Simulator") and am wondering if someone on here would be interested in testing it (would be supplied as a build application)?
The reasons for this are so that I can gather some feedback and get your impression on it.
Please message / email me if you are interested (jonny.boyd@ntlworld.com)
Kind Regards,
Jonny
Please note, this has been build on Mac OS, so I believe my built application will only work on a Mac.
Regards,