My goal is to create a Max patch that changes the lights based on audio frequencies smoothly, i.e. with slow-motion effect. So far, I’ve gotten the light to change corresponding to the amplitude of the sound. I used delay on audio, and I embedded a new patch that “smoothes out” the fast changes in amplitude detected by the microphone. So far so good! Here’s a video on the current effect of my patch. Now, you might see abrupt changes on the desktop reflection of light. That’s because I haven’t gotten each individual light to change smoothly, but I did on the overall effect.
Music by Pink Floyd “The Great Gig in the Sky”.
Code:
----------begin_max5_patcher----------
5987.3oc6ckzjiibc9b2+JfomC1RUQk6KJlCirjCcQ5hsu3XBEU.RhpJzMH.
MHX0cKEZ9s6bAqUgkDDfrIKNynoDIVXluW9ku7sku7e7wOrXUxWC1uv6268y
de3C+iO9gOXtj9BeH+6eXwV+utNxeu4wVDG7kjUeZwc1akE70Lyk+sdXPwES
NjEEjk8scA1e3EgwpG5uke2c9YqeNL9oGRCVmYe.AStjo9GA+NOBirDq9GB4
NOrbI3NODdIn7sC2XZNUW3dJtnAiOrMLV0jldHJ+h6y9VjoCrn1iY6ZlmCpu
3+7ieT+m6bj3WmrcafhXdM0+i+3O58GT+3wYdIO5seaRRllDKdtnv3f056Vu
+0Be.B.DMESofR9gjZXGPrhcvZmQ.QxV4DPG4DfifS7XTh5GoyQ7E24sXkuh
CT1eeLIcqugNYcy.jZRTS+7kvb5WwJ5AC.QhdI8c9o9aCxBReHH1ekkK.bjs
fNB1RGyN9+T8gzDOL16m7WmE9RfGrSVWS1VKLINDafDbRSjBjv6mUwN6yW5f
crKeJRm7.E5x2cQFL.cIU8+I5m7osR9XWI+58kfzbhNmpUv6vnfWBR2GlDW6
o+vB+c6pc4OT6UzrpOkX9g32UdovX6kvkWJM3kvh2mTdU+TEGISwNNjZ60eU
TL7p+YR1DjFeHrbbyLn8whevBlHSPMrLpQNKiXlpQDfJNnZ.9onj0eNXSsYN
pArcAwgw6RC1qjF5mk26Ju8lfG8ODk8viIwY6C+6lNHDsr06+n+5fNe4X0jW
C08GRC8iJnuEOkFtIIV2IZvq0Wtn4TBSM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