100% found this document useful (4 votes)
184 views66 pages

Instant Download Coding Art: A Guide to Unlocking Your Creativity with the Processing Language and p5.js in Four Simple Steps 2nd Edition Mathias Funk PDF All Chapters

Guide

Uploaded by

gabtamaotwe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
184 views66 pages

Instant Download Coding Art: A Guide to Unlocking Your Creativity with the Processing Language and p5.js in Four Simple Steps 2nd Edition Mathias Funk PDF All Chapters

Guide

Uploaded by

gabtamaotwe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 66

Download Full Version ebookmass - Visit ebookmass.

com

Coding Art: A Guide to Unlocking Your Creativity


with the Processing Language and p5.js in Four
Simple Steps 2nd Edition Mathias Funk

https://ebookmass.com/product/coding-art-a-guide-to-
unlocking-your-creativity-with-the-processing-language-
and-p5-js-in-four-simple-steps-2nd-edition-mathias-funk/

OR CLICK HERE

DOWLOAD NOW

Discover More Ebook - Explore Now at ebookmass.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

Coding Art: A Guide to Unlocking Your Creativity with the


Processing Language and p5.js in Four Simple Steps 2 /
converted Edition Mathias Funk
https://ebookmass.com/product/coding-art-a-guide-to-unlocking-your-
creativity-with-the-processing-language-and-p5-js-in-four-simple-
steps-2-converted-edition-mathias-funk/
ebookmass.com

The Little Guide to Getting Your Book Published: Simple


Steps to Success John Bond

https://ebookmass.com/product/the-little-guide-to-getting-your-book-
published-simple-steps-to-success-john-bond/

ebookmass.com

Typescript and JavaScript Coding Made Simple 2 Books in 1:


A Beginner's Guide to Programming Mark Stokes

https://ebookmass.com/product/typescript-and-javascript-coding-made-
simple-2-books-in-1-a-beginners-guide-to-programming-mark-stokes/

ebookmass.com

Multilateral Development Banks: Governance and Finance 1st


ed. 2018 Edition Ihsan Ugur Delikanli

https://ebookmass.com/product/multilateral-development-banks-
governance-and-finance-1st-ed-2018-edition-ihsan-ugur-delikanli/

ebookmass.com
International Business and Security: Geostrategy in
Perspective Jiye Kim

https://ebookmass.com/product/international-business-and-security-
geostrategy-in-perspective-jiye-kim/

ebookmass.com

The Palgrave Handbook of Literature and Mathematics 1st


Edition Robert Tubbs

https://ebookmass.com/product/the-palgrave-handbook-of-literature-and-
mathematics-1st-edition-robert-tubbs/

ebookmass.com

Administrative Law and Politics: Cases and Comments 5th


Edition – Ebook PDF Version

https://ebookmass.com/product/administrative-law-and-politics-cases-
and-comments-5th-edition-ebook-pdf-version/

ebookmass.com

Mosby’s Paramedic Textbook 4th Edition, (Ebook PDF)

https://ebookmass.com/product/mosbys-paramedic-textbook-4th-edition-
ebook-pdf/

ebookmass.com

Alters and Schiff Essential Concepts for Healthy Living


(Ebook PDF)

https://ebookmass.com/product/alters-and-schiff-essential-concepts-
for-healthy-living-ebook-pdf/

ebookmass.com
From Me to We: How Shared Value Can Turn Companies Into
Engines of Change 1st Edition Ricardo Ernst

https://ebookmass.com/product/from-me-to-we-how-shared-value-can-turn-
companies-into-engines-of-change-1st-edition-ricardo-ernst/

ebookmass.com
Design Thinking
Design Thinking is a set of strategic and creative processes and principles
used in the planning and creation of products and solutions to human-­
centered design problems.

With design and innovation being two key driving principles, this series
focuses on, but not limited to, the following areas and topics:

• User Interface (UI) and User Experience (UX) Design

• Psychology of Design

• Human-Computer Interaction (HCI)

• Ergonomic Design

• Product Development and Management

• Virtual and Mixed Reality (VR/XR)

• User-Centered Built Environments and Smart Homes

• Accessibility, Sustainability and Environmental Design

• Learning and Instructional Design

• Strategy and best practices

This series publishes books aimed at designers, developers, storytellers


and problem-solvers in industry to help them understand current
developments and best practices at the cutting edge of creativity, to invent
new paradigms and solutions, and challenge Creatives to push boundaries
to design bigger and better than before.

More information about this series at https://link.springer.com/


bookseries/15933.
Coding Art
A Guide to Unlocking Your
Creativity with the Processing
Language and p5.js in Four
Simple Steps
Second Edition

Mathias Funk
Yu Zhang
Coding Art: A Guide to Unlocking Your Creativity with the Processing
Language and p5.js in Four Simple Steps
Mathias Funk Yu Zhang
Eindhoven, The Netherlands Eindhoven, The Netherlands

ISBN-13 (pbk): 978-1-4842-9779-7 ISBN-13 (electronic): 978-1-4842-9780-3


https://doi.org/10.1007/978-1-4842-9780-3
Copyright © 2024 by Mathias Funk and Yu Zhang
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or
part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way,
and transmission or information storage and retrieval, electronic adaptation, computer software,
or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark
symbol with every occurrence of a trademarked name, logo, or image we use the names, logos,
and images only in an editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of opinion as to whether or not
they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of
publication, neither the authors nor the editors nor the publisher can accept any legal
responsibility for any errors or omissions that may be made. The publisher makes no warranty,
express or implied, with respect to the material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Miriam Haidara
Development Editor: James Markham
Editorial Assistant: Jessica Vakili
Cover designed by eStudioCalamar
Cover image designed by Freepik (www.freepik.com)
Distributed to the book trade worldwide by Springer Science+Business Media New York, 1
New York Plaza, Suite 4600, New York, NY 10004-1562, USA. Phone 1-800-SPRINGER, fax (201)
348-4505, e-mail [email protected], or visit www.springeronline.com. Apress Media,
LLC is a California LLC and the sole member (owner) is Springer Science + Business Media
Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail [email protected]; for
reprint, paperback, or audio rights, please e-mail [email protected].
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook
versions and licenses are also available for most titles. For more information, reference our Print
and eBook Bulk Sales web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is
available to readers on the Github repository: https://github.com/Apress/Coding-Art. For more
detailed information, please visit https://www.apress.com/gp/services/source-code.
Paper in this product is recyclable
Table of Contents
About the Authors������������������������������������������������������������������������������xiii

About the Technical Reviewer������������������������������������������������������������xv

Acknowledgments����������������������������������������������������������������������������xvii

Chapter 1: Introduction������������������������������������������������������������������������1
1.1. Coding Art������������������������������������������������������������������������������������������������������3
1.2. Motivation������������������������������������������������������������������������������������������������������4
1.2.1. How to Talk with a “Machine”���������������������������������������������������������������4
1.2.2. Practice a Practice��������������������������������������������������������������������������������5
1.2.3. Do It and Own It�������������������������������������������������������������������������������������6
1.3. How to Read This Book����������������������������������������������������������������������������������7
1.3.1. Calling All Creatives�������������������������������������������������������������������������������7
1.3.2. Four Steps, One Example, One Zoom�����������������������������������������������������8
1.3.3. Getting Ready��������������������������������������������������������������������������������������11

Chapter 2: Idea to Visuals�������������������������������������������������������������������13


2.1. Visual Elements��������������������������������������������������������������������������������������������13
2.1.1. Shapes�������������������������������������������������������������������������������������������������14
2.1.2. Shaping Up in Processing��������������������������������������������������������������������18
2.1.3. Colors, Transparency, and Filters���������������������������������������������������������21
2.1.4. Working with Form and Texture�����������������������������������������������������������25

v
Table of Contents

2.2. Canvas Secrets��������������������������������������������������������������������������������������������29


2.2.1. Scaling Visual Elements����������������������������������������������������������������������30
2.2.2. Resetting or Restoring the Canvas������������������������������������������������������32
2.2.3. Rotation and Translation����������������������������������������������������������������������34
2.3. Animation: From Frames to Motion��������������������������������������������������������������39
2.3.1. Animation Basics���������������������������������������������������������������������������������39
2.3.2. Simple Movement��������������������������������������������������������������������������������40
2.3.3. Rhythm in Motion��������������������������������������������������������������������������������43
2.4. Interaction as Input for Animation����������������������������������������������������������������49
2.4.1. Combining Mouse Presses and Movement�����������������������������������������50
2.5. Summary�����������������������������������������������������������������������������������������������������52

Chapter 3: Composition and Structure�����������������������������������������������53


3.1. Data and Code Structure������������������������������������������������������������������������������54
3.1.1. Creating Many Things��������������������������������������������������������������������������54
3.1.2. Controlling Many Things����������������������������������������������������������������������64
3.2. Visual Structure��������������������������������������������������������������������������������������������68
3.2.1. Composition and Alignment�����������������������������������������������������������������68
3.2.2. Composing with Layers�����������������������������������������������������������������������73
3.2.3. Controlling Layers��������������������������������������������������������������������������������78
3.3. Summary�����������������������������������������������������������������������������������������������������83

Chapter 4: Refinement and Depth�������������������������������������������������������85


4.1. Randomness and Noise�������������������������������������������������������������������������������85
4.1.1. Working with Randomness������������������������������������������������������������������86
4.1.2. Controlling Randomness���������������������������������������������������������������������91
4.1.3. Selecting and Making Choices with Randomness�������������������������������97
4.1.4. Working with Noise����������������������������������������������������������������������������102

vi
Table of Contents

4.2. MemoryDot������������������������������������������������������������������������������������������������106
4.2.1. Smoothing�����������������������������������������������������������������������������������������106
4.2.2. Smoothly Working with Many Things������������������������������������������������113
4.3. Using Computed Values�����������������������������������������������������������������������������116
4.3.1. Computing Values with Functions�����������������������������������������������������116
4.3.2. The Space Between Two Values: Interpolation����������������������������������122
4.3.3. Interpolation with Functions��������������������������������������������������������������124
4.4. Interactivity������������������������������������������������������������������������������������������������129
4.4.1. Mouse Interaction������������������������������������������������������������������������������130
4.4.2. Keyboard Interaction�������������������������������������������������������������������������133
4.4.3. Other Input�����������������������������������������������������������������������������������������142
4.5. Summary���������������������������������������������������������������������������������������������������143

Chapter 5: Completion and Production���������������������������������������������145


5.1. Making Things Big for Print������������������������������������������������������������������������145
5.1.1. High-Resolution Rendering����������������������������������������������������������������147
5.1.2. Migrating to Scalable Version������������������������������������������������������������149
5.1.3. Rendering Snapshots of Dynamic Work��������������������������������������������151
5.2. A Backstage for Control�����������������������������������������������������������������������������157
5.2.1. Tweak Mode in Processing����������������������������������������������������������������158
5.2.2. Centralizing Control with Variables����������������������������������������������������159
5.2.3. “Backstaging” with the Keyboard�����������������������������������������������������161
5.3. More Stable and Less Risky Code��������������������������������������������������������������165
5.3.1. The Right Things in the Right Place���������������������������������������������������165
5.3.2. Avoiding Resource Bloat��������������������������������������������������������������������169
5.3.3. Code Structure�����������������������������������������������������������������������������������169
5.3.4. Don’t Reinvent the Wheel������������������������������������������������������������������172

vii
Table of Contents

5.4. Testing Before Deployment������������������������������������������������������������������������175


5.4.1. Depending on Dependencies�������������������������������������������������������������176
5.4.2. Anticipating Differences��������������������������������������������������������������������176
5.4.3. Preparing for Unattended Operation��������������������������������������������������178
5.5. Summary���������������������������������������������������������������������������������������������������179

Chapter 6: Taking a Larger Project Through All Four Steps��������������181


6.1. Context, Inspiration, and Starting Point������������������������������������������������������184
6.2. Concept and Artwork���������������������������������������������������������������������������������185
6.3. Step 1: Idea to Visuals��������������������������������������������������������������������������������187
6.4. Step 2: Composition and Structure������������������������������������������������������������190
6.4.1. Composition: The Fog������������������������������������������������������������������������191
6.4.2. Composition: Creating the Mountains������������������������������������������������192
6.4.3. Structure: Creating the Particles�������������������������������������������������������194
6.5. Step 3: Refinement and Depth�������������������������������������������������������������������197
6.5.1. Refinement: Reshaping the Particles������������������������������������������������198
6.5.2. Depth: Adding Interaction������������������������������������������������������������������203
6.6. Step 4: Completion and Production������������������������������������������������������������206
6.6.1. Completion: Installation in Space������������������������������������������������������206
6.6.2. Production in Print�����������������������������������������������������������������������������207
6.7. Summary���������������������������������������������������������������������������������������������������210

Chapter 7: Flow Fields and Particle Storms with p5.js��������������������213


7.1. Getting Started with p5.js��������������������������������������������������������������������������214
7.1.1. Structure of p5.js Sketches���������������������������������������������������������������215
7.1.2. From Processing to p5.js�������������������������������������������������������������������218
7.1.3. Fine-Tuning the Presentation������������������������������������������������������������219
7.1.4. How to Spot Errors?��������������������������������������������������������������������������220
7.1.5. Making Your Work Publically Accessible�������������������������������������������221

viii
Table of Contents

7.2. Generative Art on the Web��������������������������������������������������������������������������223


7.2.1. Flow Fields����������������������������������������������������������������������������������������223
7.2.2. From Flow Field to Particle Flow�������������������������������������������������������228
7.2.3. From Particle Flow to Dotted Particle Traces������������������������������������236
7.2.4. Giving Particle Traces Different Colors and Shapes���������������������������242
7.2.5. Painting Particle Traces As a Whole���������������������������������������������������251

Chapter 8: Making Sense of Touch and Sensors with p5.js��������������255


8.1. Preparing for Mobile Browsers, Accidental Interaction,
and Device Orientation�������������������������������������������������������������������������������255
8.1.1. Preventing Accidental Interactions����������������������������������������������������257
8.1.2. Device Orientation�����������������������������������������������������������������������������258
8.1.3. Grid-Based Example Case�����������������������������������������������������������������260
8.2. Touch and Multi-touch�������������������������������������������������������������������������������264
8.2.1. Working with Multiple Touches����������������������������������������������������������265
8.2.2. Multi-touch Interaction����������������������������������������������������������������������267
8.3. Working with Device Sensors��������������������������������������������������������������������273
8.3.1. Activating Sensors�����������������������������������������������������������������������������273
8.3.2. Working with Device Rotation������������������������������������������������������������274
8.3.3. Working with Device Acceleration�����������������������������������������������������276

Chapter 9: Dealing with Problems����������������������������������������������������281


9.1. Helping Yourself�����������������������������������������������������������������������������������������282
9.1.1. Error Messages or Nothing Happens�������������������������������������������������282
9.1.2. Working with Copy–Paste������������������������������������������������������������������283
9.1.3. Reference Documentation�����������������������������������������������������������������285
9.1.4. Searching for Symptoms�������������������������������������������������������������������286

ix
Table of Contents

9.2. Getting Help from Others���������������������������������������������������������������������������288


9.2.1. Finding Help��������������������������������������������������������������������������������������288
9.2.2. Asking the Right Questions Right������������������������������������������������������289
9.2.3. Minimal Working Example�����������������������������������������������������������������290
9.3. Working with Experts���������������������������������������������������������������������������������291
9.3.1. How Can Experts Help You?���������������������������������������������������������������291
9.3.2. How to Manage a Project with Experts?�������������������������������������������292

Chapter 10: Learning Path����������������������������������������������������������������295


10.1. Going Deeper�������������������������������������������������������������������������������������������295
10.1.1. Challenges to Pick���������������������������������������������������������������������������296
10.1.2. Building Your Own Toolset���������������������������������������������������������������297
10.1.3. Sharing Your Toolset with Others�����������������������������������������������������298
10.2. Different Technologies�����������������������������������������������������������������������������298
10.2.1. Enhancing Processing and p5.js�����������������������������������������������������298
10.2.2. Assessing Feasibility�����������������������������������������������������������������������299
10.2.3. Moving Away from Processing and p5.js�����������������������������������������300

Chapter 11: Creative Processes��������������������������������������������������������303


11.1. Two Types of Ideation�������������������������������������������������������������������������������303
11.1.1. Concept-Based Ideation������������������������������������������������������������������304
11.1.2. Material-Based Ideation������������������������������������������������������������������304
11.2. Using Abstraction Layers�������������������������������������������������������������������������305
11.2.1. First Loop: Behavior to Output���������������������������������������������������������306
11.2.2. Second Loop: Adding Data���������������������������������������������������������������307
11.2.3. Third Loop: Adding Input and Interaction�����������������������������������������308
11.2.4. Fourth Loop: Adding a Backstage����������������������������������������������������311
11.2.5. Creative Processes with Layers������������������������������������������������������312

x
Table of Contents

Conclusion����������������������������������������������������������������������������������������315

Epilogue��������������������������������������������������������������������������������������������317

References����������������������������������������������������������������������������������������321

Index�������������������������������������������������������������������������������������������������325

xi
About the Authors
Mathias Funk is Associate Professor in the
Future Everyday group in the Department of
Industrial Design at the Eindhoven University
of Technology (TU/e). He has a background
in Computer Science and a PhD in Electrical
Engineering (from Eindhoven University of
Technology). His research interests include
data design methodologies, data-enabled
design, systems for musical expression, and
design tools for data and AI. In the past he has researched at ATR (Japan),
RWTH Aachen, Philips Consumer Lifestyle and Philips Experience
Design, Intel labs (Santa Clara), National Taiwan University of Science and
Technology, and National Taiwan University. He is also the co-founder of
UXsuite, a high-tech spin-off from Eindhoven University of Technology.
He has years of experience in software architecture and design, building
design tools, and web technologies. As a teacher, he teaches various
courses in the Industrial Design curriculum about designing with data and
visualization approaches, systems design, and technologies for connected
products and systems. He is regularly invited to hold international
workshops, and as an active musician for years, he is very interested in the
intersection of music, art, and design in particular.

xiii
About the Authors

An artist by training, Yu Zhang finished


her PhD in 2017 on the theory and artistic
practice of interactive technologies for public,
large-scale installations. She approaches
visual art with mixed reality installations and
projections, sensor-based interactives, and
computational arts. She roots her artistic
intent in the symbolism of Asian traditions and
transforms the artistic unpacking of drama
and cultural signifiers into experiences of
interactivity and connectivity that ultimately bridge artistic expression and
audience experience. She uses systems design toolkit to realize a complex
multifaceted experience playing with the spatiotemporal context of the
audience's interaction with the installations when digital and physical
converge. Starting from interactivity, she constructs layers of different
connections between artist, artwork, audience, and the environment to
express how far such connectivity can impact and reshape the structure
and relations of objects, space, and time within a dynamic audience
experience. Apart from her artistic research and practice, Yu’s teaching
experiences cover over 10 years and a broad space including traditional
classrooms and design-led project-based learning activities.

xiv
About the Technical Reviewer
Dr. Bin Yu is currently an Assistant Professor
in Digital Innovation at Nyenrode Business
University. He worked in Philips Design
from 2019 to 2022. Bin received his PhD in
Industrial Design (2018) from TU/e and
M.S. in Biomedical Engineering (2012) from
Northeastern University, Shenyang, China.
Dr. Bin Yu had rich experience, from both
academia and industry, in digital product
design, user interface design, healthcare
design, and data visualization. He has published more than 40 papers in
top journals and conferences. Besides, his work has been invited to several
design exhibitions, like Dutch Design Week, Milan Design Week, New York
Design Week, and Dubai Design Week.

xv
Acknowledgments
We started this book in October 2018 and went through the process of
writing for several months, ending with an intensive summer writing
retreat at Tenjinyama Art Studio in Sapporo. We are grateful for the
hospitality and kindness of Mami Odai and her team, and we will always
remember these weeks on the hill with the wind rushing through the
dark trees.
From October 2019, we sent out the manuscript to the reviewers, and
we would like to acknowledge their hard work and sincerely thank them
for great feedback and suggestions, warm-hearted encouragement, and
praise: Loe Feijs (Eindhoven University of Technology), Jia Han (Sony
Shanghai Creative Center), Garyfalia Pitsaki (3quarters.design), Bart
Hengeveld (Eindhoven University of Technology), Joep Elderman (BMD
Studio), Ansgar Silies (independent artist), and Rung-Huei Liang (National
Taiwan University of Science and Technology). Without you, the book
would not have been as clear and rich. We also thank the great team at
Apress, Natalie and Jessica, and especially Bin Yu for his excellent technical
review. We express our gratitude to Tatsuo Sugimoto, our translator for the
Japanese edition of Coding Art. Finally, we deeply appreciate the support
from friends and family for this project.

xvii
CHAPTER 1

Introduction
The art world is interwoven with technology and actually quite innovative
and playful. From cave paintings to the use of perspective, novel colors,
and lighting, to printing techniques and direct inclusion of machines and
code, there are examples of how art broke ground and changed its shape
forever. Already before the beginning of the twenty-first century, artists
used code and programmed machines to generate art or even be part of it.
There are so many examples of technology in art. It is also interesting
to see the path of how it has grown in the past 70 years. Famous examples
are, for instance, of earlier pioneers in computer art like Georg Nees,
Michael Noll, Vera Molnár, and Frieder Nake who brought the use of
pseudo-randomness and algorithm about fractals and recursion in code
drawing. The more recent generation of artists like Casey Reas, who is
well known for developing the Processing software, extend artistic ideas
through the programming language. Some artists like Jared Tarbell
introduce real data into art creation and connect the complexity with the
data availability. It is remarkable that for most of their works, computer
artists open the source code to the public, so we can learn from them.
In this book, we want to make the point that the use of modern
technology and machines in creative work does not contradict “creative
expression.” Instead, if used well, technology can help creatives take steps
in new directions, think of new ideas, and ultimately discover their ideal
form of expression.

© Mathias Funk and Yu Zhang 2024 1


M. Funk and Y. Zhang, Coding Art, Design Thinking,
https://doi.org/10.1007/978-1-4842-9780-3_1
Chapter 1 Introduction

Why data and information in art? The use of data can connect artworks
to the human body, signals from outer space, or contemporary societal
issues, important events happening all over the world. With data streams,
creative works can become “alive.” As they represent data in visual or
auditory forms, they comment on what is happening in the world; they
provide an alternative frame to news and noteworthy. They can react and
even create their own data as a response.
Why is interaction interesting for creatives? Interaction in an artwork
opens a channel for communication with individual viewers or an entire
audience. Interaction can make a work more immersive and let viewers
engage in new ways with the artist’s ideas. Some might want to engage
with art emotionally; some others prefer a more rational approach. The
creative is in charge of defining and also limiting interactivity – from fully
open access to careful limitations that preserve the overall aesthetics and
message of the work. Interaction can help create multifaceted artworks
that show different views on the world, or even allow for exploration of
unknown territory.
Using computation and code can help a creative express ideas
independent of medium and channel – the work is foremost conceptual
and can be rendered in any form susceptible to the viewer. So, when we
express an artistic concept in the form of code or machine instructions, we
can direct the machine to produce its output in a number of ways: print
a rendered image on a postcard or t-shirt, project an animation onto a
building, or make an expressive interaction accessible from a single screen
or for a global audience on the Internet. By disconnecting from physical
matter, we create ephemeral art that might even change hands and be
changed by others.
Ultimately, technology transforms what it is applied to. We show you
how to do this with creativity.

2
Chapter 1 Introduction

1.1. Coding Art
What is “coding art” all about? The title is intentionally ambiguous, ranging
in meaning from how to code art to coding as creative expression. Probably
the message that resonates most with you is somewhere in the middle.

Tips We are curious what you think during or after reading and
working with this book. Please let us know on our website.1

In this book, “coding” simply means an action that translates meaning


from one language into another, for example, from a natural language into
a computer language. This translation, as any translation, implies a change
in who can and will interpret what we express in the new language. It also
implies thinking about how this interpretation might work out toward a
result. For natural languages, we empathize with other people, how they
think and act. For machines, we need something called “computational
thinking” [3, 6, 21].
Learning how to code is quite similar to learning how to speak another
language. Some people might follow a more theoretical approach and
learn vocabulary and grammar before attempting to speak and converse.
Some others start with a conversation and gradually understand the
structure of the language behind it. Depending on the circumstances, any
approach might work well.
For teaching how to code in a computer or programming language,
both approaches have been used in the past. There are very theoretical
ways to approach coding. They often come with a steep learning curve and
the full richness of what the language creators intend you to know about it.
And there are also ways to playfully get used to simple examples that teach

1
https://codingart-book.com/feedback

3
Chapter 1 Introduction

the basics before moving to more complicated examples. In the context of


creative work, we strongly feel that the second approach, starting with the
“conversation,” works far better. However, we have seen in practice that
the playful approach often hits a limitation: how to make the step from toy
examples to something that is useful and also complex and intricate. This
is hard and the reason why we write this book.

1.2. Motivation
Every profession, every vocation, is about doing something difficult with
high quality, often using specific approaches or techniques. This works for
engineers, researchers, marketing, and doing business. For creatives, the
“difficult thing” is the invention of meaning and purpose out of a large set
of options, constraints, and relations. It is a very human thing to create,
which means we apply both our intuition and our training and knowledge
to a challenge. Creatives apply various technologies in a creative process,
and coding is a part of that. In this book, the use of coding in creative
work is based on the situation that we try to construct meaning through
understanding the logic and structure of coding. We use coding as a
creative tool rather than being hardcore programmers or mere end users.

1.2.1. How to Talk with a “Machine”


Confronted with the particular but different characteristics of art, design,
and technology, we have seen creatives struggle with questions about
“how to start,” “how to continue,” and “how to end” while working with
code and coding practice. Like writing a book or essay, it is difficult to
code an idea in an individual context and condition, so that a machine
can produce something meaningful for us. Unlike writing, the machine
will respond swiftly to anything we feed it. It will never complain about too
much work and always accurately reflect what we write in coded language.
And when we get things wrong, make a mistake, which happens more

4
Chapter 1 Introduction

often than we are comfortable with, then this is on us. The machine is a
“stupid” thing, dull and rational. Whatever creativity emerges is ours only.
This book is essentially about how to let the machine express and amplify
our human creativity by using precise instructions (“code”) and input (“data”).
For many creatives, the use of code in their projects brings new
challenges, beyond successfully completing a project. For example, an
unforeseen challenge is to let the work operate reliably for hours, days, and
weeks. With traditional “static” material, creative output eventually turns
into a stable form that rests in itself. Paper, photo, clay, concrete, metal,
video, or audio documentary are stable. There are established ways to
keep them safe and maintain their quality. If you want, you can study this
conservation craft as a university subject even.
Things are different for art or design based on code. Code always
needs a machine to run on, an environment to perform its function.
This essentially counteracts technological progress: there is always a
newer machine, a more modern operating system, a more powerful way
to program something. Any of these get in and code written for earlier
machines may stop working. This does not happen that easily to a painting
or a designed and manufactured object.

1.2.2. Practice a Practice
When we write about “coding” as a practice, we try to combine the creative
process with computational thinking. Over the years, our art or design
students, inevitably, encounter similar problems. They often ask questions
like “why do we need to learn coding?”, “coding is so difficult to continue
once you are stuck, what is it worth?”, and “I could understand the
examples (from the programming software references) well, but I cannot
do my idea just by using those examples, how to do that?” These questions
(or often passionate complaints) point at the difficulty of learning coding
as a new language. It seems that there is a big disconnect of “brainy”
coding from creative practice. There is a common understanding that

5
Chapter 1 Introduction

creative expression is fueled by inspiration and directed by intuition. In


contrast, coding or working with technology seems to be very rational
and thought through. We think creative coding is an exciting mix of these
two, alternating between different modes of thinking and doing. Often we
start with a loose idea of what we want to create, then throw a few shapes
on our computational canvas. Then figure out a technical issue and go
back to tweak the colors, position, or movement. Soon, this will turn into
something intuitively creative and much faster than learning to wield a
brush and master the skills to paint.

1.2.3. Do It and Own It


Before we can start, here is yet another big “why” question: even if coding
is an indispensable part of a creative project, why do artists or designers
need to do the code themselves? Cooperative skills are basic for any
contemporary artist and designer, there are cases of successful artists who
command a multidisciplinary team to work on their ideas. Sadly, this is
quite rare. More realistically, we see creatives who cannot afford a team of
qualified experts and who work on smaller budgets and projects. We see
creatives who don’t want to give up control and who want to keep their
creative agency. And even if you want to collaborate, without understanding
coding and technology to some extent, it will be very difficult to work with
experts productively or get help when you run into problems. The point
about creative technology is: you want something? Then do it and own it.
We are aware that creatives who are learning or exploring interactive
art, digital art, and new media art are no longer just following one
traditional approach. Instead, they need to work with their ideas from a
broader perspective – in the principles of science, technology, engineering,
and mathematics (STEM). When we move into the field where art meets
code, creatives may need a new way of thinking and working which can
help them see this new field through the lens of an old field where they
have been active in and professional at.

6
Chapter 1 Introduction

In projects where code is involved, you as the creative need the ability
to read code, understand code, perhaps even write code, and think in a
computational structure. This is necessary for effectively communicating
with technology experts in a common “language.” We think these are
essential abilities creatives today need to have. Besides, creatives who rely
mostly on the help of experts often feel uncertain as to how much control
they have to relinquish to achieve their goal. We actually have a section on
working with technology experts toward the end of the book.

1.3. How to Read This Book


This book can be read in different ways, from different perspectives and
also with different pre-knowledge and backgrounds. It is hard to find a
common ground, but we hope that, with patience and openness, you will
soon see our point.

1.3.1. Calling All Creatives


First of all, this book is dedicated to creatives who might be designers, artists,
design or art students. We also wrote this book for musicians, architects,
engineers, and researchers. They all share that creativity makes their
profession special and their work unique. The creative will benefit mostly by
taking the main road from beginning to end, visiting all examples and typing
along. Why not bring this book to your favorite café once a week and slowly
make your way through the different chapters. If you space it out over several
weeks, you will see that the breaks will spark new thoughts of how to code art
and what you could do yourself with the current week’s topic.
We also wrote this book for educators who could take a jump to the last
three chapters first. There we explain more about the rationale behind the
concepts we introduce and our methodology. We show how everything fits
together, also from an educational point of view.

7
Chapter 1 Introduction

Third, this book is written for technical experts, who know it all actually
and who might be surprised by the simplicity of the code examples. Why
would they read this book? Because they realize that knowing code as a
second native language and being able to construct the architecture of
code is not enough, by far. The embedding of code in a process, driven by
creativity or business interests, is where the challenges lie. As a technical
expert, you will find the last three chapters most interesting and can use it
as a lens to scan the other parts of the book.

1.3.2. Four Steps, One Example, One Zoom


In the first chapters of this book, we will go through a creative process in four
steps and explain how coding works in each step. The steps will each unfold
through several practical examples and conclude with a short summary.
The first step, idea to visuals, gives you a short primer into working
with Processing and the different visual elements that are readily available
to you. We quickly proceed to working with the visual canvas before
diving into animation and interaction. From this point onward, you know
how to draw moving things on a canvas that might even respond to your
interactive control. The second step is about composition and structure,
that is, how we let art emerge from a multitude of different elements on
the canvas. We will introduce data and code structure that help you in
working with many visual elements at the same time. Together, we apply
this in several examples around visual structure. In the third step, we show
you how to work things out in more detail and how to give depth to your
creations. You will learn about randomness and noise and how to control
them artistically. We show you how to create smooth animations and
transitions between different elements and colors. Interactivity returns
in this step, and we show you how to combine interactive input with
composition and refinement. The fourth step is about production, how
to bring your creation to the stage, how to produce and present it well in
different media from high-resolution printing to interactive installations.

8
Chapter 1 Introduction

On the next page, we show an example that we created inspired by an


abstract geometrical painting of Kazimir Malevich (Suprematisme, 1915)
as inspiration (Figure 1-1). We chose this work because, for us, it visually
hinted at a very interesting motion of otherwise static blocks that seems
to be captured in a moment just before toppling over. We started with a
recreation of the visual composition of ten basic elements in similar primary
colors on a cream-colored canvas (step 1). In a second step, we connected
to the impression of inherent motion and work with the blocks: we shifted
and redrew the same composition recursively, adding more and more layers
over time (step 2). The third step involved adding three large-scale rotated
copies of the composition to complete the circular perspective. We also fine-
tuned the timing of adding the different elements and operations over time,
so the work developed in a few minutes from the first screen and visually
stabilized in the last screen. Finally, we added a gradual shift of the entire
canvas that, over several minutes, zoomed out and shifted the center of the
canvas from the left top to the right bottom (step 3). In the fourth step, we
“produce” the images that you see: we let the animation play and live select
tens of frames to be automatically rendered. From these frames, we finally
select eight frames as they exhibit good composition individually and also
show the motion of the entire work well (step 4).
This example shows how we borrow from the four large steps described
in this book, by picking a few pieces from each step that match our concept.
From a process point of view, steps 1, 3, and 4 were relatively straightforward.
We took more time for the second step because we went into two different
directions, one more playful and one more technical, of which the playful
was the right one at the end after trying both. Only after resolving this, we
could move faster again. There are chances that you will struggle as well
while working with this book; don’t forget to take breaks and never let go.

9
Chapter 1 Introduction

Figure 1-1. Example of generative art taking an abstract geometrical


painting of Kazimir Malevich (Suprematisme, 1915) as inspiration

10
Chapter 1 Introduction

Throughout these four steps, we will teach you about creative


computation, and, at some point, you will see also bits of strategies,
patterns, and more complex concepts appear. Afterward, we will roll up
all steps in a larger example, MOUNTROTHKO, in Chapter 6. Then, we
take a turn to p5.js, the Processing version for the web. Here we show
how to creatively reproduce generative art and take your own turn, while
introducing important features of p5.js. Chapter 7 also shows how to
creatively mix and order the four steps to match a project better. In
Chapter 8, we show you how to work with multi-touch input and
movement sensors to create an interactive art piece. Finally, in the last
three chapters of the book, we zoom out and turn toward the practice of
creative coding, through learning and collaboration. This part shows you
how you can make progress using this book and how to go beyond, what
you can do when you feel stuck, and how to get help. It’s all there; you just
need to go step by step toward it.

1.3.3. Getting Ready
This book contains a lot of examples, and they are written in code (“source
code”). Most examples can be used directly, and the resulting visual output
is shown close to the source code.

CODE EXAMPLES

// How to quickly find code examples in the book?


Look for text in a box like this!

All source code listed in this book is written in the open source
software Processing. Processing itself is available from https://
processing.org, and we recommend that you install it on your computer
to get the most out of this book. Processing is a medium for understanding

11
Chapter 1 Introduction

the structure and logic of code. We will explain this shortly. The code
examples are available online from our Processing library.2 Throughout
the book we call these examples also Processing sketches, which is a
common way to refer to code files in the Processing community. Although
it might be tempting to just download the examples and play with them,
we recommend typing them yourself (at least some of them). This way,
you will pick up the programming style much faster and allow your muscle
memory to support your learning. And if you are lucky, you will make a few
small mistakes that give you surprising results.
Finally, we will address you, the reader, informally. Think of this book
as a conversation in your favorite café over coffee, and your laptop is right
in front of you. Feel free to pause the conversation and dive into a topic
on your own, or explore the code of the examples, and then resume to the
next page. Let’s begin.

2
The Processing library can be found here: https://codingart-book.com/
library. You can install it using the Processing library manager.

12
CHAPTER 2

Idea to Visuals
In this first part of the book, we will go through four process steps and
show for each step how coding becomes a meaningful part of our creative
process. In step 1, idea to visuals, we take a bottom-up approach and
start directly with visuals and code. Our entry point to this approach is
to use code directly from the ideation stage of the creative process. More
specifically, instead of making mood boards, sketching, writing, searching
the web, or talking to experts, we suggest that you just start the Processing
application and give it a spin. First, we look at how we can express our
ideas using Processing and a few lines of code. Yes, we start really simple.

2.1. Visual Elements
For many artists, even if visual elements in their work are coded, the
standards for effectiveness in their work are still based on either cognitive
or aesthetic goals [12, 18, 20]. When we analyze any drawings, paintings,
sculptures, or designs, it is similar – we examine and decompose them
to see how they are put together to create the overall effect of the work.
Lines, colors, shapes, scale, form, and textures are the general fundamental
components of aesthetics and cognition for both art and design and for
coding art as well.
Processing can draw a wide range of forms that result from variation
and combination of simple shapes. When you take an example from the
Processing reference, try to change the numbers in the example to explore
how the shape changes and responds to different numbers.
© Mathias Funk and Yu Zhang 2024 13
M. Funk and Y. Zhang, Coding Art, Design Thinking,
https://doi.org/10.1007/978-1-4842-9780-3_2
Chapter 2 Idea to Visuals

The first two examples show that you can hit play in Processing as
often as you want and see how your work is evolving over time. Sometimes,
it is good to look at the results, just after changing a single value. By moving
fast between the code and the canvas, you will also learn faster and get a
better understanding of how the code influences the drawing of shapes
and how you can control precisely what is drawn on the canvas. At the
same time, by going through two detailed examples, we want to give you a
feeling for how helpful the Processing reference pages are. These pages are
available online and as part of your Processing application, and they, given
an overview of all functions, explain how they work and how exactly you
can use them. When browsing the reference, you might find interesting
new features that come in handy for your next project.
We recommend having a browser window open with the Processing
reference web page, so you can quickly jump into an explanation without
losing momentum in creating with Processing. First shapes coming up, do
you have Processing started up and ready?

2.1.1. Shapes
Every visual element in Processing follows one of two patterns: (1) first
specifying position, then size, and then shape or (2) specifying the points
on which the shape is drawn. We will come back to this in a few pages. By
carefully looking through these examples about simple visual elements,
you will understand the similarities in the code for ellipse and rectangle
and also the similarities for line, point, curve, polygon, and triangle.
Let’s start with a simple example based on the “ellipse” shape.
Open Processing, and type in the following three lines of code to draw a
simple circle.

14
Chapter 2 Idea to Visuals

FIRST DRAWING: A SIMPLE ELLIPSE WITH A BLACK BORDER

// Draw a simple ellipse


noFill();
stroke(0, 0, 0);
ellipse(56, 46, 55, 55);
// Try copying and pasting the code several times
// with different values to create layered shapes.

In this example, we draw an ellipse with equal width and height, so


we get a perfect circle. Processing fills shapes white with a black border
if we don’t provide further instructions. This standard behavior can be
changed, for instance, by using the noFill function in our example.
There is also a new element in this code: the code comment. Code
comments allow us to leave thoughts and ideas in the middle of the code
that help us understand it at a later moment or help communicate the
main ideas to others. Code comments start with double slashes // and will
be rendered gray in Processing. This means that Processing knows these
are just comments and will ignore them when drawing. You will see that
we often use code comments to explain a function or what is happening
line by line. This is not just for learning; you can and should leave your
own comments in your code to better document what you have learned,
and also what might be difficult to understand, so you don’t get confused
next time you come back to this piece of code.

Reminder Correct spelling is really important in programming. So,


you need to carefully check that it is noFill and not nofill, for
example.

15
Chapter 2 Idea to Visuals

When going through the code, you notice something interesting:


the spelling of Processing functions like noFill is quite special; it starts
with a lowercase character, and then there is an uppercase character
in the middle. This is a naming convention for several programming
languages that allows to distinguish different words that are combined
in a function name. This combination is necessary because Processing
cannot deal with spaces inside a name, and still we want to be able to read
and understand the function name. The solution is to combine the words
and use uppercase characters at the beginning of every word inside the
combination of words – all except the first one. Processing checks this
before running any program, and it will “complain” if the spelling is wrong.
Try spelling a few things wrong in the preceding program, and see how
Processing reacts. This will be helpful in the future.
Back to our example: The circle is not filled, but we still draw a thin
line around the circle. The width of the line is set to 1 pixel automatically.
We can change the color of the line with the stroke function. We use three
numbers to specify the amounts of red, green, and blue in the color. The
amounts range from 0 to 255.

? Think about this Try playing with different values for the


different color components. Can you create a deep purple color or a
light beige just by using different color values?

This is also known as the RGB color mode. Here, we just use the RGB
values of black color (0, 0, 0). If we would increase the three values from
0 to 120 each, we would see a gray color, and if we turn them all up to 255,
the resulting color is white.
If we look at the last line of the code example, the first two numbers, 56
and 46, give us the location of the element. When positioning an element
on the digital canvas, the first number always refers to the horizontal
position or x coordinate. The second number refers to the vertical position

16
Chapter 2 Idea to Visuals

or y coordinate. That’s why they are usually called x and y. We refer to a


point or position on the canvas as (x, y), in our example (56, 46). Our
ellipse is drawn as a circle with equal width and height which are both 55.
Now, try changing the values in ellipse to see different shapes of the
ellipse and in stroke which will give the ellipse outline a different color.
Can you stretch the ellipse sideways or turn the outline green?
After the first ellipse example, the next example shows how we can
change a few numbers and see a very different drawing of the circle.

DRAW A CENTERED AND FILLED ELLIPSE ON A PURPLE BACKGROUND

// set the size of the canvas


size(600, 600);
// first, paint the background purple
background(208, 170, 208);
// set line color and width and fill color
stroke(246, 173, 113);
strokeWeight(10);
fill(113, 70, 132);
// draw the ellipse in center of canvas
ellipse(width/2, height/2, 320, 320);

In this example, we first set the size of the canvas with the size
function. The first number is the width and the second number the height
of the digital canvas (Figure 2-1). In this case, both width and height of
the canvas are 600. We will use the width and height later in the example,
when drawing the ellipse. Another new thing in this example is the
background color of the digital canvas, which is defined according to RGB
(208, 170, 208) color using the background function. In addition to just
defining stroke color, we also define the width of the stroke (strokeWeight)
and the RGB color that is used to fill the drawn elements. In this example,

17
Chapter 2 Idea to Visuals

the position of the ellipse, that is, the x and y coordinates, is located in
the center of the digital canvas. We achieve this by replacing the first two
numbers by the width and height of the canvas, each divided by 2. When
we divide the width by 2, we effectively get the horizontal middle point, so
300. The same works for the height: we divide it by 2 and get the vertical
middle point at 300. Now, we can use these two new values to position the
ellipse and draw it in size 320 by 320 pixels.

Figure 2-1. Canvas measurements (left) and drawn circle (right).


The canvas measures 600 pixels in width and height.

In the following part of this section, we will look at the visual elements
in general and quickly show the code example of using such elements in
Processing environment.

2.1.2. Shaping Up in Processing
The line as a visual element is really everywhere in art and design.
Processing draws lines as a path between two points on the digital canvas.

18
Chapter 2 Idea to Visuals

DRAW A SIMPLE LINE

// draw line from position (21, 22) to position (31, 32)


line(21, 22, 31, 32);

On the Processing canvas, the line also could be imagined as a


dynamic path in which a tiny dot is moving between two defined
positions – or simply as the tip of a pencil or brush moving from the first
point to the second point in a straight line.
A second shape in Processing that is drawn by points is the triangle.
Here, we specify three different points as pairs of coordinates. Unlike the
line, the triangle can be filled, so we should also think about using fill
before. Why before? Because Processing really does things step by step:
first, prepare how to draw a shape, then draw it, and then the next. So,
when we want to draw two different shapes, we first draw the first shape,
change how Processing should draw the next shape, and then draw the
second shape. And if we don’t change the looks, then Processing will just
keep the previous settings.

? Think about this Can you guess what this triangle will look like?
Try it out in Processing to see if you are right.

DRAW A TRIANGLE

fill(140, 40, 160);


// draw triangle between position (21, 22),
// position (31, 32), and position (41, 22)
triangle(21, 22, 31, 32, 41, 22);

19
Chapter 2 Idea to Visuals

Processing offers more shapes that are just defined by points, for example,
quad (four points) or even complex polygons that are freely defined by a list of
multiple points. You can check the Processing reference how to use them.
We have seen the shape ellipse in Processing that was defined not by
different points, but by giving a position and then the size of the shape. The
ellipse function allows to draw circles and ellipses. Another shape is the
rect function that allows to draw squares and rectangles on the canvas.

DRAW A RECTANGLE

fill(140, 180, 20);


// draw rectangle at position (21, 22) with
// size given by width 70 and height 30
rect(21, 22, 70, 30);

We can draw the same rectangle with rounded corners by adding a fifth
value to the rect function: the corner radius.

DRAW A RECTANGLE WITH ROUNDED CORNERS

// the last argument is the corner radius


rect(21, 22, 70, 30, 10);

In this example, the top-left corner of the rectangle is in position (21, 22),
because Processing positions visual elements by default with their top-left
corner. Processing can interpret the position of a shape in different ways.
There is the CORNER mode that takes the position as the top-left corner,
and there is the CENTER mode that takes the position as the center of the
shape. Both can be useful in different situations. Let’s see how it works for
drawing rectangles.

20
Chapter 2 Idea to Visuals

DRAW TWO ROUNDED RECTANGLES WITH DIFFERENT POSITIONING

// draw rounded rectangle with (21, 22) as center


rectMode(CENTER);
fill(255, 0, 0);
rect(21, 22, 70, 30, 10);
// draw rounded rectangle with (21, 22) as top-left corner
rectMode(CORNER);
fill(0, 0, 255);
rect(21, 22, 70, 30, 10);

The first rectangle is drawn with rectMode(CENTER), which means that


the position parameters (first and second parameters) are interpreted as
the center point of the rectangle. As a result, the rectangle is drawn around
this center point. The second rectangle in the preceding example is drawn
with the rectMode(CORNER), which changes the location interpretation to
the upper-left corner. As a result, the rectangle has its upper-left corner at
the given position (first and second parameter) and then extends right and
down by width and height, respectively.

Tips You don’t have to repeat the rectMode function. It applies to


all rectangles until you call rectMode again with a different setting.

2.1.3. Colors, Transparency, and Filters


Artists play with color through different art mediums – acrylic, oil color,
watercolor, ink, colored pencils, or mixed materials. Each of these
mediums has its own characteristics, and each requires its specific
techniques for using in art practice.

21
Chapter 2 Idea to Visuals

Whenever we want to use color in Processing functions such as fill,


stroke, background, and many others, we specify the color by its channels:
red, green, and blue in the RGB mode and hue, saturation, and brightness
in the HSB mode. Two different color modes can be used in Processing: RGB
or HSB. If there is no colorMode specified in the code, then the default of
RGB with scale of 0–255 is used.
When we use three values to specify the red, green, and blue channels
of a color, we notice that for grayscale colors from black (0, 0, 0) to white
(255, 255, 255), the three values are the same. In this case, we can just
use a single value, and Processing will understand that we want to use the
same value for all three channels.

SHORTCUT TO DRAW GRAYSCALE COLORS

// lightgray
fill(180, 180, 180);
// same lightgray
fill(180);

With multiple shapes that overlap, we might want to work with


transparency in our canvas drawing. That is very easy in Processing:
just add the alpha transparency as the fourth value in any function that
specifies color, for example, fill or stroke.

FILL COLORS WITH TRANSPARENCY

// solid purple
fill(180, 0, 180);
// 50% transparent purple (255 * 0.5 = 128)
fill(180, 0, 180, 128);

22
Chapter 2 Idea to Visuals

In addition to using colors and transparency, there are also several


filters which can be applied to achieve special color effects, for example,
filter(GRAY) (turn colors into grayscale), filter(INVERT) (invert
the colors), filter(POSTERIZE) (reduce the number of colors), or
filter(BLUR) (blur the image). By giving different values to these filters,
they produce striking creative effects.
The following piece of code is based on the line and color functions
in Processing to draw an image which contains a variety of color and line
combinations (Figure 2-2). This image is inspired by the Dutch artist Piet
Mondrian and his 1942 painting New York City I [15]. To achieve the effect
in the image, arranging the order of lines in the code might be the part that
needs the most patience. Why? Processing runs the code line by line. The
first lines in the code will be drawn first, and the following lines will be
drawn on top of them, thereby creating layers of digital paint. What you see
on top is drawn last.

Figure 2-2. Reproduction of a Mondrian painting New York City I

DRAW LINES IN DIFFERENT COLORS AND ORIENTATIONS

// set canvas size, white background


size(1920, 1080);
background(255);
// set 30 pixel line weight
strokeWeight(30);
// set color and draw line

23
Chapter 2 Idea to Visuals

stroke (9, 37, 87);


line (0, 980, width, 980);
stroke (135, 3, 17);
line (0, 10, width, 10);
stroke (9, 37, 87);
line (0, 90, width, 90);
stroke (211, 179, 15);
line (100, 0, 100, height);
stroke (211, 179, 15);
line (0, 650, width, 650);
// many more lines ...

If we look closely in this example (and also the image), we see that
the same colors are used over and over. Instead of typing the same three
numbers for the respective colors again and again (and potentially making
mistakes), we can also define the colors before and just reuse them.

DEFINE COLORS BEFORE DRAWING MAKES CODE BETTER READABLE

// define blue, red and yellow


color blue = color(9, 37, 87);
color red = color(135, 3, 17);
color yellow = color(211, 179, 15);
// set colors and draw line
stroke (blue);
line (0, 980, width, 980);
stroke (red);
line (0, 10, width, 10);
stroke (blue);
line (0, 90, width, 90);
stroke (yellow);
line (100, 0, 100, height);

24
Random documents with unrelated
content Scribd suggests to you:
Fac-simile autograph manuscript by Halévy in possession of the
Paris Opera Library.

In “La Juive” the orchestration is, in point of richness, originality


and variety of powerful contrasts, much in advance of anything
previously known in French opera; and his instrumentation of
“L’Eclair,” in its freshness, vivacity and piquancy, was no less
innovating, and notable in a lighter direction. In “La Juive” he had a
libretto which is among the finest that were ever set to music. Its
tragic story is told with immense effect, and the poet’s knowledge of
the needs of a composer is manifested with masterly ability. Halévy
never again obtained such a book. How felicitously it inspired him, is
seen in the first act in the impressive reply of the Cardinal to
Eleazar’s contempt for the Christians; in the romance sung by
Leopold to Rachel; in the chorus of the people at the fountain which
runs with wine; in the magnificent chorus and march which precede
the brilliant entrance of the Emperor, and ending with the stirring Te
Deum and the welcome to the Emperor. In the second act, the
Passover scene in Eleazar’s house is full of interest in its Jewish
elements, with which Halévy, himself a Jew, must have been in
complete sympathy. In the same act there are the fiery duet between
Eudoxia and Leopold, and the other duet, equally spirited and
intense in effect, between Rachel and Leopold, both masterpieces in
their way, and speedily followed by the no less splendid dramatic aria
sung by Rachel to her father, and in which she announces her love
for Leopold; the climax of this wonderful act being reached in the
thrilling trio, in which Eleazar pronounces the curse. The next act,
with its brilliant pageantries, falls short of that which precedes it, but
has an immensely dramatic, concerted number which culminates in
the anathema by the Cardinal. The fourth act rises to the level of the
second, with its noble duet between Eleazar and the Cardinal, the
tremendous scene of the Jew in which he savagely defies his
Christian foes and welcomes death. The last act is for the most part
declamatory, and has no such numbers as those we have named, but
the impressive dramatic intensity of the work is maintained to the
end.
In “Guido et Ginevra,” he tries to repeat the success of “La Juive,”
but despite several fine flights of genius he failed, not only owing to
the morbidly sad and dull nature of the play, but to the heaviness of
the music. He was more successful with “La Reine de Chypre,” an
essentially spectacular opera, which, by the way, was analyzed by
Wagner in one of his Paris letters (1841). The score is often brilliant
and melodious, and it contains some movingly pathetic melodies, but
it is uneven in excellence, and has pages on pages of music so
obscure in meaning and so dull in effect that its interest is often
impaired. Almost the same criticism may be made on his next grand
opera, “Charles VI.” Moreover, by this time, Meyerbeer’s “Les
Huguenots” had been produced, and Halévy, carried away by the
enthusiasm with which that work filled him, consciously or
otherwise, deserted his own marked individuality and became, to all
intents and purposes, a follower of Meyerbeer, at least in grand
opera. In his “Le Val d’Andorre” he became himself again, for the
time being, and produced a lyric drama that fell little short of
perfection in the complete sympathy with which the composer
identified himself with the poet. There Halévy sounded the very
depths of passionate grief, in the music he has given to Rosa after her
lover has been drawn as conscript. In “Les Mousquetaires de la
Reine” he produced a delightful score, sparkling, chivalrous in spirit
and full of beauties. For the rest there is little to be said that would
not be in the way of repetition. His “La Tempesta,” written for Her
Majesty’s Theatre, London, was received there with enthusiastic
favor, but although there are some genuine beauties in the work,
especially in the finely characteristic music given to Caliban, it has
nothing in it that entitles it to live. Halévy was greatly piqued that the
one melody most praised by the artists, and that was hummed by
everybody, was Dr. Arne’s “Where the bee sucks,” which he had
retained for Ariel. With all his fecundity in melody Halévy rarely
wrote one that achieved general popularity. The most noted
exception is “Quand de la nuit l’épais nuage” from “L’Eclair,” a
charming air, simple, chaste, and delicious in its tender grace. He
seldom, however, vouchsafed so unaffected a tune, the harmonies of
which are for the most part confined to the tonic and dominant. The
romance “Pendant la fête une inconnue,” from “Guido et Genevra,” is
another morceau, scarcely less naïve and delicate, that long survived
the opera in which it appeared, but it did not make the tour of the
world as did the other. His comic operas abound in fascinating music
which is buried, and must remain so, in the uninteresting librettos
that he so thoughtlessly accepted. In that dreary book, “Le Drapier,”
there is a glorious duet, “Ah! devenez mon père.” But there is not an
opera of his in which some perfect gem is not to be found. His
fecundity in melody is impressively exemplified in the fairy opera “La
Fée aux Roses,” of which the score is affluent in charming music,
sensuously oriental in style, beautiful in local color, and of striking
originality in orchestral treatment. He made an attempt to revive the
enharmonic scale of the Greeks in his “Prométhée Enchainé,” the
translation of which had been made by his brother. It was a bold
adventure, but it failed. It must be confessed that it is monotonous
because of lack of variety in the orchestration, owing to the almost
continuous use of wind instruments to the neglect of the strings. The
recitatives are noble, and the chorus of the Océanides is one of his
most classical and beautiful compositions.
CARICATURE OF HALÉVY BY CARJAT.

From the Paris illustrated paper “Le


Gaulois.”

Halévy, despite all his industry and the fame he enjoyed through
his greatest successes, made no lasting impression on the music of
his day. Even “La Juive,” notwithstanding its power and its
brilliancy, found no imitators, and “L’Eclair” still stands alone, the
only example in its genre. It is sad that an artist should have labored
so long and so well, should have been a thorough master of his art,
and yet have fallen almost into obscurity thirty years after his death.
A careful examination of some of his more ambitious operas shows
that he was, in some respects, slightly in advance of his time,
especially in his tendency to avoid purely rhythmical airs in favor of
what is now called “Endless Melody,” but there is no likelihood that
the future will revive his works. It was his misfortune that
Meyerbeer’s star rose so early after the appearance of “La Juive,” and
that Halévy was drawn into the vortex that the rage for the composer
of “Les Huguenots” made. If he had followed the example of the
latter, had written music to none but good librettos, economized his
talents instead of wasting them in a reckless ambition to produce
music; if he had also adhered firmly to his own individual originality
instead of permitting himself to be unreasonably influenced by the
success of another, his operas might have had a stronger claim than
they have on the favorable consideration of posterity. When Halévy
wrote “La Juive,” the time was ripe for a great revolution in French
grand opera, and he just escaped becoming an epoch-maker at his
art. Meyerbeer appeared at that moment, and to him fell the honor
that was just within Halévy’s grasp. Whether the latter would have
seized it if his rival’s career had been delayed, it is hard to say, for his
lack of discrimination in the choice of opera books was already deep-
seated. Saint Beuve says of him: “‘La Juive,’ ‘Guido,’ ‘La Reine de
Chypre,’ ‘Charles VI,’ are true lyric tragedies on which are the seal of
beauties that time cannot obliterate. Some works, that appeal more
readily to the tastes of the masses, have been dowered with greater
popularity, but the decision of those who know is the only one that
appeals to a conscientious artist, and of this, Halévy received an
ample share. We think we are not mistaken in saying that as musical
education becomes more widespread, the popularity of Halévy will
grow.” This, however, is doubtful, and it is more than probable that
Halévy himself felt that he had not wholly accomplished his mission,
for Saint Beuve, who knew him well, also says, “It is strange that this
estimable man, always full of work, should sometimes have nursed a
secret sorrow. What it was, not even his most cherished and trusted
friends ever knew. He never complained.” Who shall say that this
secret sorrow, so silently guarded, was not born of a sense of failure,
or at least, of self-disappointment! It is not improbable that toward
the close of his busy art-life he saw, with prophetic eye, the fate that
was to attend the greater part of what he had composed; that he had
written for his own time and not for the future. Already he has
become little more than a name to nearly all, except students of
musical history. The works on which his fame chiefly rests are
seldom performed, and the others, admirable as many of them are,
have gone into oblivion, and in all probability, never to see the light
again. That he was a master in his art, is unquestionable, but it would
seem also that he was lacking in that highest quality of genius that
confers immortality on its possessor.
HECTOR BERLIOZ

Reproduction of a portrait engraved by


A. Gilbert after a painting by G.
Courbet.
HECTOR BERLIOZ

More than a score of years have passed since Berlioz died, in Paris,
that city which was the object of his youthful dreams, the scene of his
bitter struggles and his sublime defeats. It was in the midst of those
Parisians, who had accorded him little more than mockery and
scorn, that he had wished to die, weighed down by sadness and
discouragement, supported by a few intimate friends and rare
disciples. Moreover, did he not foresee that sad end when writing the
following lines which subsequent events proved only too true? “It
was about that time of my academic life that I experienced again the
attack of a cruel malady (moral, nervous, imaginary, whatever you
like) which I will call sickness of isolation, and which will kill me
some day.... This is not spleen, though it leads to that later on; it is
the boiling away, the evaporation of the heart, the senses, the brain,
the nervous fluid. Spleen is the congelation of all that, it is the block
of ice.” Therefore death was for him a blessed release. For some years
before, there remained of Hector Berlioz nothing but an earthly
frame, an inert and suffering body; the moral being was crushed. The
fall of The Trojans was the rudest possible shock to that nature so
well tempered to receive it; hitherto the proud artist had returned
blow for blow; never had a defeat, however grave, completely
overthrown him. For the first time, in witnessing the downfall of the
work of his predilection, the athlete had faltered. He had laid down
his arms and thenceforth, weary of life and of the struggle, had
contented himself with the hollow diversions which the capital
offered him, “preoccupied solely with material interests, inattentive
and indifferent to that which impassions poets and artists, having a
morbid taste for scandal and mockery, laughing with a dry and
mirthless laugh when this strange taste is gratified.” A certain
heartache, a vague suffering of the soul, vain regrets, preyed upon
him at least as much as bodily ills; his shade alone wandered among
us, dumb, taciturn, isolated, and one beautiful morning in the month
of March it vanished.
Berlioz’s militant career may be divided into two distinct periods;
that in which he struggles for position, and which lasts from his
arrival in Paris until after Romeo and Juliet and the Funeral and
Triumphal Symphony, in 1842; that in which, tired of struggling
without profit though not without glory, he starts off to establish his
reputation outside the frontier, and to return afterwards to Paris,
victorious and triumphant; this lasts until his death. So soon as he
achieved a success abroad, great or small, “Be sure that Paris knows
it!” was the cry to his friends. And Paris, being informed of it, had
forgotten it instantly. It was during the intervals between these tours,
when he came back to France to see if his foreign successes had given
him a better standing in the eyes of his countrymen, that his last
principal works were produced: The Damnation of Faust, The
Childhood of Christ, The Te Deum and Beatrice and Benedict, finally
The Trojans.
It was towards the end of 1821 that Berlioz came to Paris,
ostensibly to study medicine, but with a secret longing to devote
himself to music. He was then nearly eighteen years of age, being
born at La Côte Saint-André (Isère), Dec. 11, 1803, and had already
received some lessons in music from the poor stranded artists at La
Côte. We are indebted to Berlioz himself for the names of these
artists, which were Imbert and Dorant.
On arriving at Paris, where his father, a simple health officer, but a
devotee to the sciences and to medicine, had allowed him to come on
the express condition that he should follow exactly the course of the
Faculty, he set to work as best he could to carry out this program. But
one evening he goes to the Opera to hear Salieri’s Danaïdes:
immediately music regains possession of his soul, and he spends all
his spare time in the library of the Conservatoire, studying the scores
of Gluck’s operas; there he meets a pupil of Lesueur who introduces
him to that master, and he attaches himself with much affection to
the author of the Bardes, who admits him to his class. At length he
informs his family of his settled determination to devote himself to
music, and he has performed at Saint-Roch a mass which he burns
almost immediately after, saving only the Resurrexit which obtains
grace in his sight, at least for a time. He then took part in the
preparatory concours for the prize of Rome, and was not even judged
worthy to be a competitor. Immediately summoned home by his
parents, who had no faith in his “pretended irresistible vocation,” he
arrived there so sad, so crushed, so misanthropic, that his father,
uneasy about him, permitted him to return to try once more his
fortune in Paris. He came back for the winter of 1826, having nothing
to live on but a small allowance from his family, on which he was
obliged to economize in order to pay back, little by little, a loan which
a friend had made him for the execution of his mass. His existence at
this time, which was shared by another student, his friend
Carbonnel, was a very miserable one, their meals consisting on
certain days of vegetables and dried fruits. He gave lessons in
solfeggio at a franc a lesson, and even applied for the position of
chorus singer at the Théâtre des Nouveautés. But artistic pleasures
counterbalanced the material privations, and his heart danced for joy
whenever he could go to the Opéra or to the Odéon and hear some
masterpiece by Spontini, Gluck or Weber; his fourth god, Beethoven,
was not revealed to him till two years later, when Habeneck founded
the Société des concerts du Conservatoire for the dissemination of
the works of that prodigious genius. He continued however in the
classes of Lesueur and Reicha, so that he was able to pass the
preliminary examination for the concours of 1828. The subject given
out by the board of examiners was a scene from Orpheus torn to
pieces by Bacchantes, and Berlioz’s music was declared by the judges
as impossible to be played. His only response was to prepare for its
performance at the concert to be given at the Conservatoire, the
superintendent of the Beaux-Arts, M. de Larochefoucauld, to whom
he had been recommended, having placed that hall at his disposal,
notwithstanding the violent protestations of the director, Cherubini.
But chance favored the self-love of the members of the Institute, for
Berlioz was obliged to give up his plan, on account of an
indisposition of the singer Alexis Dupont.
It would have been strange indeed, if Berlioz, with his ardent
imagination and brain always on fire, had allowed the romantic
movement to pass by without attaching himself to it with all the fury
and passion which he threw into everything. He soon became one of
the leaders of the new school, poor enough in musicians, counting
only himself and Monpau, whereas it abounded in writers and
artists. Like all his comrades in romanticism, even exceeding them
all, Berlioz was an enthusiastic and constant visitor at the Odéon,
where some of Shakespeare’s plays were then being given by a
company of English tragedians. Here he received a double blow;
from Shakespeare who floored him, as he said, and from Miss
Smithson who intoxicated him. It was to attract the attention of the
beautiful tragedienne that he organized, with his overtures to
Waverley and Francs-Juges and his cantata of la Mort d’Orphée, a
concert which she never heard anything about. It was also this idea
of reaching her through the medium of music which inspired him to
write his Fantastic Symphony, in which he put himself in the scene
with his beloved, and which, in fact, was to end by gaining him Miss
Smithson’s heart.
As these first attempts of Berlioz are little known, it is well to
specify them, if for no other reason than because one may find in
these forgotten pieces the plan of certain pages of the Damnation of
Faust and the Childhood of Christ. His overtures to Waverley and to
the Francs-Juges were performed for the first time at the concert
which he gave at the Conservatoire, in honor of Miss Smithson, May
26, 1828; on this occasion he also had played the Resurrexit from his
first mass, in place of The Death of Orpheus, which could not be
given owing to the illness of Alexis Dupont, a march of the Magi
going to visit the manger, and a grand scene on the Greek
Revolution. Finally, on the 1st of November, 1829, he had his two
overtures repeated, together with his Resurrexit under a new title,
The Last Judgment, and a new work entitled Chorus of Sylphs, the
plan of which is as follows: “Mephistopheles, in order to excite in
Faust’s soul the love of pleasure, assembles the sprites of the air and
bids them sing. After a prelude on their magic instruments, they
describe an enchanted country, the inhabitants of which are
intoxicated with perpetual delights. Gradually the charm operates,
the voices of the Sylphs die away and Faust, fallen asleep, remains
plunged in delicious dreams.” Everybody knows to-day what this
adorable bit has become.
In the meantime Berlioz obtained the “Prix de Rome” in July,
1830, after having tried for it four times in vain. He set out at once
for Rome, first giving, however, a farewell concert at which was
played his cantata of Sardanapalus and the Fantastic Symphony,
aimed at Miss Smithson whom Berlioz execrated because of her
ignorant indifference, and who, moreover, had not the slightest
suspicion of his mad passion and frantic hatred. The young
composer departed quite proud of his success and also of the sharp
response of Cherubini who said, when asked if he was going to hear
the new production of Berlioz, “I do not need to go to find out how
things should not be done.” He stayed in Italy nearly two years, in
order to conform to the regulations of the Academy, but it was time
wasted for him from an artistic point of view. With his just and
profound distaste for Italian music, he was in no condition to be
benefited by it. The only comfort he took was in fleeing to the
country, where he strolled with his new friend Mendelssohn; but this
companionship proved uncongenial and was short-lived. He
shortened his sojourn in Italy as much as possible, and as soon as the
director Horace Vernet gave him leave, he returned to Paris, taking
with him an overture to King Lear and the monodrama of Lelio or
the Return to Life, a series of old pieces worked over, which
completed the Fantastic Symphony. This work he could have done
just as well in Paris as in Rome; indeed he would probably have
accomplished more by remaining in Paris, instead of strolling about
the country near Rome playing on his guitar and frittering away his
time.
MISS SMITHSON.

Reproduction of a French lithograph


portrait by Francis—published in 1827.

On his return to Paris he felt a reawakening of his passion for Miss


Smithson, who had been temporarily forgotten and patronizingly
dubbed “the Smithson girl,” while his heart was interested elsewhere.
At the time of his setting out for Rome, he had thoughts for none but
the young and attractive pianiste, Marie Moke, whom he had known
through his friend Ferdinand Hiller; to her he had shown some
attention, finally declaring to her his uncontrollable passion.
This young lady had coolly married Camille Pleyel—a name which
she was to make famous as a virtuoso—while her mad lover, her
pretended fiancé, was in Italy.
He made haste, as soon as he got back to Paris, to organize a
concert for the purpose of performing in honor of Miss Smithson, the
Fantastic Symphony, and on that day (Dec. 9, 1832) he experienced
a double triumph, since this masterpiece, which she believed to be
inspired by herself, deeply touched the tragedienne and won her
heart for Berlioz. Little did she suspect that this composition had
been written with a view to stigmatize her, at the time when Berlioz
was madly in love with Mademoiselle Moke, and that before going to
Rome he had it played in honor of Mademoiselle Moke, as it was now
being given in Miss Smithson’s honor. Meanwhile, the families of the
two lovers made just opposition to their fine projects for the future;
but Berlioz and his fiancée taking the lead, strove their utmost to
overcome these obstacles, and to tie the indissoluble bond which was
to render them equally miserable.
During all these negotiations the English Theatre of Paris was
obliged to close its doors, and Miss Smithson, who had assumed
direction of it, found herself without resources, not having enough to
pay the debts of the enterprise. To make matters worse, she broke
her leg while getting out of a carriage, in which she was going about
to organize a benefit concert. While she was confined to the house by
her accident, Berlioz had the customary “respectful summons” to
make to her family, and as soon as she was well he married her; “she
was mine,” he said, “and I bade defiance to every thing!” The young
household was not rolling in wealth; the wife had nothing but her
debts, and the husband had but three hundred francs which a friend
had lent him. No matter, even a sad life is not without its sunshine.
Berlioz was obliged to have recourse to his pen, and began to write
for the newspapers through sheer necessity, a thing which he had
hitherto done through love of controversy and in self-defence.
His first appearance in literature was made in 1829 in the
Correspondent, with a pretty well developed article on Beethoven,
whom the artists and amateurs of Paris were just beginning to know,
thanks to Habeneck and his Société des Concerts at the
Conservatoire. He also furnished some articles to the Revue
Européenne and the Courrier de l’Europe; finally, that influential
paper, the Gazette musicale de Paris, which in 1881 ended a glorious
career of forty-seven years, espoused Berlioz’s cause, and worked
faithfully for his success. Shortly after, in 1835 he allied himself with
the Journal des Débats as musical critic, a post which he held for
thirty years, finding in its proprietors, MM. Bertin, staunch friends
and protectors. Besides giving him a comfortable living, Berlioz’s
articles served him at first in establishing relations with the press, as
much as they injured him later by exciting bitter jealousy and
enmity.
It was in the midst of financial difficulties that Berlioz wrote the
symphony Harold in Italy, inspired no doubt by his own excursions
in the vicinity of Rome. In this he introduced a viola part for
Paganini, but the part was too much subordinated to the orchestra to
suit the great violinist, who desired a veritable concerto with a simple
orchestral accompaniment; fortunately Berlioz did not give heed to
this demand. The performance of Harold (Nov. 23, 1834) made
Berlioz known to connoisseurs, and soon after M. de Gasparin,
Minister of the Interior, ordered of him a Requiem for the
anniversary service of the victims, not of the Revolution of 1830, but
of the Fieschi outrage. This Requiem did not reach its destination,
but was performed at the celebrated service in the church of the
Invalides, Dec. 5, 1837, for the French soldiers and General
Danrémont, killed at the siege of Constantine.
Fortune seemed at last to smile on the persistent efforts of the
young composer, when a failure came to overturn his fond hopes. His
opera Benvenuto Cellini, written on a poem by Léon de Nailly and
Auguste Barbier, was performed at the Opéra Sept. 10, 1838; it was
well sustained by Mmes. Stolz and Dorus-Gras, but badly rendered
by Duprez, and disappeared from the bills after three performances,
the celebrated tenor not wishing to appear in a work in which he was
quite eclipsed by the two prima donnas. Berlioz, in order to recover
from the effect of this failure, organized two Conservatoire concerts,
thinking that the performance of the Fantastic Symphony would
recompense him for the loss of his rights at the Opéra. The first
concert barely covered expenses, but the second had a memorable
result. Scarcely was the symphony ended when a man jumped upon
the platform, and kissed the hands of the stupefied composer. The
next day Berlioz received a letter in which, as a token of admiration,
he was asked to accept a sum of twenty thousand francs, and this
letter was signed by the enthusiastic listener of the evening before,
Nicolo Paganini. This sum—whether it was, as some think, a secret
manifestation of Bertin’s liberality, or whether it was really given by
Paganini for the purpose of defending himself in the eyes of the
Parisians against an accusation of avarice—made Berlioz easy in his
finances for some little time, and enabled him to work with an
unperturbed mind. He profited by the first hours of leisure which he
had found since his return, and wrote first his symphony with solos
and choruses, Romeo and Juliet, which he dedicated to his official
benefactor and which was first heard Nov. 24, 1839, and then the
grand Funeral and Triumphal Symphony, performed at the
inauguration of the column of July in 1840. He also wrote, about this
time, a number of songs or choral compositions, and the brilliant
overture Le Carnival Romain.

NICOLO PAGANINI.

From a drawing by Ingres in Rome, 1818.


Engraved by Calamatta. Paganini in his
thirty-fourth year.

The year 1842 was an important date in Berlioz’s career. From that
time his life was a divided one. Misunderstood in his own country,
disheartened by his unsuccessful attempts to win the heart of the
great public, inconsolable for the failure of Benvenuto which closed
to him forever the doors of the Academy of Music, he resolved to
undertake an artistic tour through Europe, and began with Belgium
in the latter part of the year 1842. He met with rather more success
there than in France, though he was still the subject of heated
discussion. He took with him a decidedly mediocre singer,
Mademoiselle Martin Recio, who had made a failure at the Opéra,
and had managed to attach herself to him. He married her later, soon
after the death of Miss Smithson, from whom he had been separated;
but he was no happier in his second marriage than in his first; his
first wife drank, his second made unjustifiable pretensions as a
singer, which always exasperated him. After this little excursion to
Belgium, Berlioz determined to try his fortune in Germany, where
already some of his works had found their way; from this time
onward, his life was nothing more than a series of journeys through
France and foreign countries. His first grand tour was through
northern Germany. At Leipsic he saw Mendelssohn, whom he met on
the best of terms, forgetting all about their youthful quarrels; at
Dresden he inspired an equal devotion on the part of Richard
Wagner, who received him as a brother and treated him as a master;
at Berlin he was no less warmly welcomed by Meyerbeer, who
recruited the necessary artists for him and enabled him to direct a
part of his Requiem.
On his return to Paris he organized, first, a monster festival at the
Exposition of the Products of Industry, in August, 1844, then four
grand concerts at the Circus of the Champs Elysées, early in 1845;
but these gigantic concerts which it had always been his aim to
direct, brought him no profit. Not discouraged by this, however, he
gave grand concerts at Marseilles and at Lyons, the modest success
of which was due partly to curiosity, partly to surprise. After that he
went to Austria, Bohemia and Hungary; this tour was scarcely
finished when he rushed off to Lille to organize a grand festival there
on the occasion of the inauguration of the Northern railroad. Finally
in the summer of 1846 he returned to Paris, and after having given a
magnificent performance of his Requiem in the Saint Eustache
church, he decided to bring before the public his most important
work, The Damnation of Faust. The first performance took place on
December 6, before a small audience. The solos were sung by Roger,
Hermann, Leon, Henri, and Madame Duflôt-Maillard, who had no
better comprehension of the music than the public. The second
performance was given on Sunday the 20th, before an equally small
house, with a tenor who had to omit the Invocation to Nature. This
convinced Berlioz that he was still far from having conquered his
own country. He departed for Russia, deeply wounded by the
indifference of his countrymen.
Some of his Paris friends had clubbed together to furnish him the
means to go to St. Petersburg, whence he had received some brilliant
offers. He achieved the greatest success there, with musicians as well
as with the public, and the fact of his having formerly befriended
Glinka at Paris had its effect in enlisting sympathies for him in
Russia. On his way back he stopped at Berlin, where the Damnation
of Faust was given with little enough appreciation, but where he
received recognition from the sovereign and the princess of Prussia.
When he got back again to Paris, crowned with laurels, and with
money enough to settle all the debts incurred by the performance of
the Damnation of Faust at the Opéra Comique, he worked hard to
get the appointment at the Opéra of Duponchel and Roqueplan, who
were talking of an immediate revival of Benvenuto Cellini, of
mounting la Nonne sanglante, etc. Berlioz succeeded in getting them
nominated directors, through the aid of the Bertins, but they no
sooner had the official notice in their pockets than they utterly
ignored Berlioz. The latter understood that he was holding a restraint
upon them, and since, as he said, he was accustomed to this sort of
proceedings, he took himself off to London in order to rid them of his
troublesome presence. The affair of the Drury Lane concerts,
unwisely entered into with the eccentric conductor Julien,
terminated in bankruptcy, and the Revolution which followed in
1848 would have left Berlioz without a sou had not Victor Hugo and
Louis Blanc obtained for the sworn disciple of the romantic school
the humble post of librarian at the Conservatoire.
In August, 1848, Berlioz experienced one of the keenest sorrows of
his life in the loss of his father. He went to Grenoble to attend his
father’s funeral, and in his Mémoires he gives a most touching
account of the sad visit. It was about this time that his little Chœur
de Bergers was given under the pseudonym of Pierce Ducré, at the
concerts of the Philharmonic Society, Saint Cecilia hall, Chaussée
d’Antin. In 1852 his Benvenuto was given with great success at
Weimar under the fervent direction of Liszt, but the next year the
same opera utterly failed in London, where the Italians, said Berlioz,
conspired to ruin it. By “Italians” Berlioz meant the orchestral
conductor Costa and his party. Berlioz had accepted the preceding
year the leadership of the New Philharmonic, and had made by his
success, and attacks, a bitter enemy of the leader of the old
Philharmonic Society.

HECTOR BERLIOZ.

Reproduced from a portrait engraved


after a painting by M. Signol—Rome—
1831.

After the Empire had been restored in France, Berlioz would have
liked to see reëstablished in his own favor the high position which his
master Lesueur had occupied under the first Empire; but all that he
obtained was the privilege of performing a Te Deum, which he was
holding in reserve for the coronation of the new sovereign, and it was
Auber who was appointed master of music of the Imperial Chapel. In
December, 1854, his sacred trilogy of the Childhood of Christ,
completed and remodelled, was given with great success, and if it
was performed but twice, it was only because Berlioz,—he had taken
great care to announce it in advance,—was on the point of departing
for Gotha, Weimar, and Brussels, where there was great eagerness to
hear this new work. He returned to Paris the following March, and
on the evening of April 30, 1855, the day preceding the Universal
Exposition, he gave in Saint Eustache church the first performance of
his grand Te Deum for three choruses, orchestra and organ.
Afterwards when it became a question of engraving it, Berlioz was
able to see how greatly he was admired in foreign lands, for the first
subscribers were the kings of Hanover, Saxony, Prussia, the emperor
of Russia, the king of Belgium and the queen of England. The
following year he published a final and much enlarged edition of his
excellent Treatise on Modern Instrumentation and Orchestration,
originally brought out in 1844; he dedicated this work to the king of
Prussia. On the 21st of June, 1856, after four tours de scrutin, he was
nominated member of the Académie des Beaux-Arts, replacing
Adolphe Adam, who had refused to vote for him two years before and
had helped to form the majority in favor of Clapisson. The following
years were spent by Berlioz in organizing concerts at Weimar and in
England, and above all in the composition of the great work on which
he built his supreme hope of success in France, his tragedy of Les
Troyens. Since 1856 he had been invited every year to Baden by
Bénazet, contractor for the gaming tables, to organize grand concerts
for the benefit of the visitors. Thus when the king of Baden, as
Bénazet was called, concluded to build a new entertainment hall, it
occurred to him at once that it would be a fine idea to get Berlioz to
write something for its inauguration, and the latter, from the first
mention of the subject, felt a reawakening of the desire which had
been haunting him for thirty years, to write a comic opera, at once
sentimental and gay, on certain scenes arranged by himself after
Shakespeare’s comedy Much Ado About Nothing. He acquitted
himself of this agreeable task by fits and starts; the performance of
the work at Baden took place three days sooner than he hoped, and
the success was great enough with that cosmopolitan audience, in
which the French predominated, to find an immediate echo at Paris.
The following year Mesdames Viardot and Vendenheuvel-Duprez
sang the delicious nocturne which closes the first act. For an instant
Berlioz indulged in the hope that they were going to play his bit of
comedy at the Opéra Comique, and in this fond hope he wrote two
more things and had them engraved; but he was soon obliged to
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookmass.com

You might also like