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

Sampling and audio file playback


We've talked a lot about samples, meaning individual values in a stream of audio. Now, we arrive at sampling, meaning recording audio, playing back of audio, and sample, which means a piece of audio. Sadly, the word sample has an ambiguous meaning in this context.

To be able to record and play something, we'll need to reference memory somehow. We have two options for this: RAM and hard disk. Playing from the hard disk and recording to it can be done using [sfplay~] and [sfrecord~] respectively. The [sfinfo~] object can be used to get additional info about the audio file such as sample rate, length, and so on. Playing from the disk is particularly useful if we need to play very long files since they would of course eat up our RAM. The same is true for recording. The big caveat here is that we don't have as much flexibility when playing from the disk, which is also the reason why we won't cover this technique any further.

Instead, let's take a look at a setup...