Book Image

Processing 2: Creative Coding Hotshot

By : Nikolaus Gradwohl
Book Image

Processing 2: Creative Coding Hotshot

By: Nikolaus Gradwohl

Overview of this book

Processing makes it convenient for developers, artists, and designers to create their own projects easily and efficiently. Processing offers you a platform for expressing your ideas and engaging audiences in new ways. This book teaches you everything you need to know to explore new frontiers in animation and interactivity with the help of Processing."Processing 2: Creative Coding Hotshot' will present you with nine exciting projects that will take you beyond the basics and show you how you can make your programs see, hear, and even feel! With these projects, you will also learn how to build your own hardware controllers and integrate devices such as a Kinect senor board in your Processing sketches.Processing is an exciting programming environment for programmers and visual artists alike that makes it easier to create interactive programs.Through nine complete projects, "Processing 2: Creative Coding Hotshot' will help you explore the exciting possibilities that this open source language provides. The topics we will cover range from creating robot - actors performing Shakespeare's "Romeo and Juliet", to generating objects for 3D printing, and you will learn how to run your processing sketches nearly anywhere from a desktop computer to a browser or a mobile device.
Table of Contents (16 chapters)
Processing 2: Creative Coding Hotshot
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Making your disco dance floor


In this task, we will use the sketch we generated in the previous task and turn it into a texture for a 3D object. We will create a rectangle using the Processing shapes and texture it with our visualizer.

We will also implement the playlist functionality for our MP3 files and define a file format that allows us to control the sequence of the music and the visualizers.

Prepare for Lift Off

In this task, we are going to create a text file that controls our playlist and the sequence in which the visualizers are shown. Each playlist entry has two lines. The first line contains only the filename of the MP3 file and the second line contains the visualizer IDs and their length in seconds. The entries are separated using a "-". The following is an example of a playlist text file:

song1.mp3
0:4-1:2-3:2
song2.mp3
0:1-1:1:0:1-2:1

In this case, the song2.mp3 file is played and the visualizers with IDs 0, 1, 0, and 2 are shown for one second.

So, add some MP3 files to the data...