Book Image

OpenFrameworks Essentials

Book Image

OpenFrameworks Essentials

Overview of this book

Table of Contents (19 chapters)
openFrameworks Essentials
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Reading data from a text file


A fruitful source of input data for parameter automation are text files. Such files can contain various pieces of information, such as statistics of the weather (temperature) for a century, solar activity forecast, or recordings of human body motion captured by depth cameras. By parsing data from these files and using it as values for a project's parameters, we can obtain quite an interesting (and scientifically meaningful) parameter's automation.

Let's demonstrate it by parsing the eeg.txt text file containing a 128-channel electroencephalography (EEG) recording. This file is contained in the archive provided with the book.

Note

The EEG recording file, eeg.txt, was made by the Laboratory for Brain and Neurocognitive Development, Ural Federal University, Ekaterinburg, Russia. With the consent of the laboratory, this recording can be used as a source of input data in creative projects without any restrictions. For recording, HydroCel Geodesic Sensor Net from Electrical...