$Page Visuals Builder $TargetName Visuals Builder *PLATFORM NOTE - Windows support* To work with video on Windows, Max requires the /viddll/ engine. This engine is not shipped with Live, so you need to install it separately. In Max, from the menu, choose File > Show Package Manager. Search for "viddll" and install the package. Then restart Max and Live. *Triggering visuals with notes* Max comes with a lot of options to create visuals, most of which can be found in Jitter objects. This device uses Javascript to draw four shapes that are triggered by MIDI notes. Then it uses Jitter objects to get those shapes onto an output window. Visuals-Builder.png In Max for Live, real-time video processing happens in the same thread as where Live's interface is drawn, meaning that when Live's interface needs a lot of updates, the video output could stutter. Generating visuals in its own thread would require doing it in a standalone application, which goes beyond the scope of this example. However the Live API allows reading notes from clips, so we can render a MIDI clip to a video file. Using the Visuals Exporter will result in a smooth video at any resolution, without any hiccups. Visuals-Exporter.png -> To save CPU usage, the preview window inside Visuals Builder is rendered at a lower frame rate and resolution than the separate output window. -> The VideoOutput.maxpat abstraction in the bpatcher of Visuals Builder is built around [jit.world] object, which outputs a bang just before the computer screen updates. Performing any real-time calculations from this bang is the best way to get the correct values just in time for a screen refresh. -> It is easy to imagine combining these two example devices into one, which would prevent the duplication of the drawing code.