## mexican hat

Sep 10, 2010 at 7:59am

# mexican hat

does anyone have a function generator (float data) to generate a “mexican hat” waveform?

i have a custom gaussian generator, and i have peter castines patch for
laplace, (which i think is identically with the mexican hat) but both dont
create curves for waves, they are only creating random numbers of the
respective distribution.

-110

#52257
Sep 10, 2010 at 8:38am

Not sure what kind of function you are after, but there are some very handy patches out there for similar things.

Try the patch sm.window-maker by Steven Miller.

http://www.stevenmmiller.net/software.html

Also one of Fredrik Olafsons abstractions could be the one. Look at “Make envelopes”.

http://www.fredrikolofsson.com/pages/code-max.html

And Graham Wakefield posted a very nice patch in this thread:

http://www.cycling74.com/forums/topic.php?id=18071

Maybe not what you where after?

#187814
Sep 11, 2010 at 3:31pm

sm.window-maker … yeah i have my custom window makers, too, that is what it is about.

the function “flat-top” seems to be at least something similar to laplace, the form
looks familiar, just the weighting seems different.
mexican hat / laplace should result in almost identical sqare-roots (energy) for both poles.

#187815
Sep 17, 2010 at 12:55am

However, if a mexican hat is a negative normalised distribution of a second derivative of a Gaussian function, then is this any help?

Gaussian function.

a*e^(-((x-b)^2)/(2*(c^2)))

Second derivative of a Gaussian function.

(a*e^(-((b-x)^2)/(2*c^2)) * (b^2 – 2*b*x – c^2 + x^2)) / c^4

;)

#187816
Sep 21, 2010 at 10:21am

… hmm … set new members to “moderated” ?

#187818
Sep 21, 2010 at 11:08am

Or add a difficult captcha for new members? Or implement the Akismet API? (the latter is probably a lot of work, but it works very well)

#187819

You must be logged in to reply to this topic.