Book Image

Multimedia Programming Using Max/MSP and TouchDesigner

By : Patrik Lechner
Book Image

Multimedia Programming Using Max/MSP and TouchDesigner

By: Patrik Lechner

Overview of this book

Max 6 and TouchDesigner are both high-level visual programming languages based on the metaphor of connecting computational objects with patch cords. This guide will teach you how to design and build high-quality audio-visual systems in Max 6 and TouchDesigner, giving you competence in both designing and using these real-time systems. In the first few chapters, you will learn the basics of designing tools to generate audio-visual experiences through easy-to-follow instructions aimed at beginners and intermediate. Then, we combine tools such as Gen, Jitter, and TouchDesigner to work along with Max 6 to create 2D and 3D visualizations, this book provides you with tutorials based on creating generative art synchronized to audio. By the end of the book, you will be able to design and structure highly interactive, real-time systems.
Table of Contents (19 chapters)
Multimedia Programming Using Max/MSP and TouchDesigner
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using OpenGL in Jitter


OpenGL is a great framework for hardware-accelerated rendering. Before losing any more word about it, let's consider a more basic rendering setup to draw a 3D sphere to a floating window, as shown in the following screenshot:

So what we have here are as follows:

  • A jit.window object that provides us with rendering destination or rendering context. Its name is referenced by the other OpenGL objects.

  • A jit.gl.render object that controls and drives our rendering. We need to send a bang to it to draw the next frame. But before that, we send it the message erase, so the last frame is overwritten with the background color. An erase_color message with 4 numbers sets up a new background color. If this color has an alpha value smaller than 1, the last frame will still be partly visible, causing feedback-like effects. Play around with it to get a better understanding of the erase message and the process of drawing a frame!

  • A jit.gl.gridshape object that contains the data for a spherical...