Project 1 – Automated Lighting System

This patch analyzes audio in three ways and represents the information through a LED light pattern.
The 30 LED lights are grouped into three subgroups, where there’s an inner layer consist of two lights, a middle layer consist of a ring of 10 lights, and an outer layer of 18 lights. Changes of colors or brightness happen from the inner ring to the outer ring, so that the light propagates outwards.
The audio amplitude controls the brightness(saturation) of the colors. The ratio of lower frequency to higher frequency controls a color picker, which determines the RGB values. Then the values are being sent to the three layers with different amount of delay.

Code:


----------begin_max5_patcher----------
6718.3oc6csrjiiakccVeEJz3UyjEGbwaLgWXGyV2q7JGU3nBlRLyhcSIpQh
pdXG1e6C.3akjTfRfJUWIqtCUpHHE.N7fKtu.v+7COr7ozuGcX4h+mEeZwCO
7O+vCOXuj4BOT7ueX4lvuuJI7f81V9bR51iaV9XdQGx9QRj85kWQWX5wrjnL
6siKtZ9kx9wtn75Re6KV9T31WVt3uWbKOmteSXloXdwU1Els5Kwae4y6iVkk
+b.kSBjDBQPebAkfB3bk7wERT.5wEXR.p5mKdssYk9zu9Q7xpev8gahxh1+4
nsgOk2vQ0s63skMavbs+0G9f4iGcDX1F8MckUVUYQe21jWdXWTz5j3M5lNxU
TC5E0p5dcgMLFJPQkTI+wE.HDABEhgEOtPIFBd..srKP.OEf.ZxAAIKfV.BR
IwzwGt6yX2tdO9V16ADQSAvBrhcNLfJlZLHIMb8lnCGtAL.fRM8UNBEv3JAB
etdOWtbhEBb658JFZbcdFwacdSOL7knW06QKz+2z1swHIOPvQXF0P7AlVPHi
wzx9.BcPgeHo2n9C1+e+7ek8+j3sQqROt0BBzocLOBnAjB0B.rVHHlJTXsbO
lfYGOH690OY5E9uJLIZAJ.X5OjlOV.AudvP9S+2hRRR+1GgICaDBnPkIfisi
Kn8nyT2.C2i.yWe9euPnENcYfAsOv3P7KaCSL5WNv2FDvvHsrDMfYfIBkGnz
BRMhRD7gPLnGtDwmRRBVj++cQg76jnbcmkgPTkQdJhDnGKgER8jJbAEOf7Th
+Tl7oiYYoau5NZayL5nyxUTS2SRUAJsAFB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