Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Processing 2: Creative Coding Hotshot
Processing 2: Creative Coding Hotshot

Processing 2: Creative Coding Hotshot: Learn Processing with exciting and engaging projects to make your computer talk, see, hear, express emotions, and even design physical objects

eBook
€8.99 €28.99
Paperback
€37.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Processing 2: Creative Coding Hotshot

Chapter 1. Romeo and Juliet

Robots and performing arts share a long history. In fact, the word "Robot" was first coined in 1920 for a play by the Czech author Karel Čapek named "Rossum's Universal Robots". The play featured six robots, but since nobody was able to build a talking Robot at that time, humans had to play them. Times have changed a lot and we don't need humans to disguise themselves as robots anymore. For this project, we will do it the other way round and make some robots who play the humans. Unfortunately, "Rossum's Universal Robots" would require nine humans and six robots, so I chose a scene that's simpler to perform. We are going to build a pair of robots who play the humans in the famous balcony scene from Romeo and Juliet.

Mission Briefing


To create the Processing sketches for this project, we will need to install the Processing library ttslib. This library is a wrapper around the FreeTTS Java library that helps us to write a sketch that reads out text. We will learn how to change the voice parameters of the kevin16 voice of the FreeTTS package to make our robot's voices distinguishable. We will also create a parser that is able to read the Shakespeare script and which generates text-line objects that allow our script to know which line is read by which robot.

A Drama thread will be used to control the text-to-speech objects, and the draw() method of our sketch will print the script on the screen while our robots perform it, just in case one of them forgets a line. Finally, we will use some cardboard boxes and a pair of cheap speakers to create the robots and their stage. The following figure shows how the robots work:

Why Is It Awesome?

Since the 18th century, inventors have tried to build talking machines (with varying success). Talking toys swamped the market in the 1980s and 90s. In every decent Sci-Fi novel, computers and robots are capable of speaking. So how could building talking robots not be awesome? And what could be more appropriate to put these speaking capabilities to test than performing a Shakespeare play? So as you see, building actor robots is officially awesome, just in case your non-geek family members should ask.

Your Hotshot Objectives

We will split this project into four tasks that will guide you through the generation of the robots from beginning to end. Here is a short overview of what we are going to do:

  • Making Processing talk

  • Reading Shakespeare

  • Adding more actors

  • Building robots

Making Processing talk


Since Processing has no speaking capabilities out of the box, our first task is adding an external library using the new Processing Library Manager. We will use the ttslib package, which is a wrapper library around the FreeTTS library.

We will also create a short, speaking Processing sketch to check the installation.

Engage Thrusters

  1. Processing can be extended by contributed libraries. Most of these additional libraries can be installed by navigating to Sketch | Import Library… | Add Library..., as shown in the following screenshot:

  2. In the Library Manager dialog, enter ttslib in the search field to filter the list of libraries.

  3. Click on the ttslib entry and then on the Install button, as shown in the following screenshot, to download and install the library:

  4. To use the new library, we need to import it to our sketch. We do this by clicking on the Sketch menu and choosing Import Library... and then ttslib.

  5. We will now add the setup() and draw() methods to our sketch. We will leave the draw() method empty for now and instantiate a TTS object in the setup() method. Your sketch should look like the following code snippet:

    import guru.ttslib.*;
    
    TTS tts;
    void setup() {
      tts = new TTS();
    }
    
    void draw() {
    }

    Tip

    Downloading the example code

    You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

  6. Now we will add a mousePressed() method to our sketch, which will get called if someone clicks on our sketch window. In this method, we are calling the speak() method of the TTS object we created in the setup() method.

    void mousePressed() {
      tts.speak("Hello, I am a Computer");
    }
  7. Click on the Run button to start the Processing sketch. A little gray window should appear.

  8. Turn on your speakers or put on your headphones, and click on the gray window. If nothing went wrong, a friendly male computer voice named kevin16 should greet you now.

Objective Complete - Mini Debriefing

In steps 1 to 3, we installed an additional library to Processing. The ttslib is a wrapper library around the FreeTTS text-to-speech engine.

Then we created a simple Processing sketch that imports the installed library and creates an instance of the TTS class. The TTS objects match the speakers we need in our sketches. In this case, we created only one speaker and added a mousePressed() method that calls the speak() method of our tts object.

Reading Shakespeare


In this part of the project, we are going to create a Drama thread and teach Processing how to read a Shakespeare script. This thread runs in the background and is controlling the performance. We focus on reading and executing the play in this task, and add the speakers in the next one.

Prepare for Lift Off

Our sketch needs to know which line of the script is read by which robot. So we need to convert the Shakespeare script into a more machine-readable format. For every line of text, we need to know which speaker should read the line. So we take the script and add the letter J and a separation character that is used nowhere else in the script, in front of every line our Juliet-Robot should speak, and we add R and the separation letter for every line our Romeo-Robot should speak. After all these steps, our text file looks something like the following:

R# Lady, by yonder blessed moon I vow,
R# That tips with silver all these fruit-tree tops --

J# O, swear not by the moon, the inconstant moon,
J# That monthly changes in her circled orb,
J# Lest that thy love prove likewise variable.

R# What shall I swear by?

J# Do not swear at all.
J# Or if thou wilt, swear by thy gracious self,
J# Which is the god of my idolatry,
J# And I'll believe thee.

I have already converted the script of the play into this format, and it can be downloaded from the book's support page at http://www.packtpub.com/support.

Engage Thrusters

Let's write our parser:

  1. Let's start a new sketch by navigating to File | New.

  2. Add a setup() and a draw() method.

  3. Now add the prepared script to the Processing sketch by navigating to Sketch | Add File and selecting the file you just downloaded.

  4. Add the following line to your setup() method:

    void setup() {
      String[] rawLines = loadStrings( "romeo_and_juliet.txt" );
    }
  5. If you renamed your text file, change the filename accordingly.

  6. Create a new tab by clicking on the little arrow icon on the right and choosing New Tab.

  7. Name the class Line. This class will hold our text lines and the speaker.

  8. Add the following code to the tab we just created:

    public class Line {
      String speaker;
      String text;
    
      public Line( String speaker, String text ) {
        this.speaker = speaker;
        this.text = text;
      }
    }
  9. Switch back to our main tab and add the following highlighted lines of code to the setup() method:

    void setup() {
      String[] rawLines = loadStrings( "romeo_and_juliet.txt" );
    
      ArrayList lines = new ArrayList();
      for ( int i=0; i<rawLines.length; i++) {
        if (!"".equals(rawLines[i])) {
          String[] tmp = rawLines[i].split("#");
          lines.add( new Line( tmp[0], tmp[1].trim() ));
        }
      }
    
    }
  10. We have read our text lines and parsed them into the lines array list, but we still need a class that does something with our text lines. So create another tab by clicking on the arrow icon and choosing New Tab from the menu; name it Drama.

  11. Our Drama class will be a thread that runs in the background and tells each of the speaker objects to read one line of text. Add the following lines of code to your Drama class:

    public class Drama extends Thread {
      int current;
      ArrayList lines;
      boolean running;
    
      public Drama( ArrayList lines ) {
        this.lines = lines;
        current = 0;
        running = false;
      }
    
      public int getCurrent() {
        return current;
      }
    
      public Line getLine( int num ) {
        if ( num >=0 && num < lines.size()) {
          return (Line)lines.get( num );
        } else {
          return null;
        }
      }
    
      public boolean isRunning() {
        return running;
      }
    }
  12. Now we add a run() method that gets executed in the background if we start our thread. Since we have no speaker objects yet, we will print the lines on the console and include a little pause after each line.

      public void run() {
        running = true;
    
        for ( int i =0; i < lines.size(); i++) {
          current = i;
          Line l = (Line)lines.get(i);
          System.out.println( l.text );
          delay( 1 ); 
        }
        running = false;
      }
  13. Switch back to the main sketch tab and add the highlighted code to the setup() method to create a drama thread object, and then feed it the parsed text-lines.

    Drama drama;
    
    void setup() {
    
      String[] rawLines = loadStrings( "romeo_and_juliet.txt" );
      ArrayList lines = new ArrayList();
      for ( int i=0; i<rawLines.length; i++) {
        if (!"".equals(rawLines[i])) {
          String[] tmp = rawLines[i].split("#");
          lines.add( new Line( tmp[0], tmp[1].trim() ));
        }
      }
    
      drama = new Drama( lines );
    }
  14. So far our sketch parses the text lines and creates a Drama thread object. What we need next is a method to start it. So add a mousePressed() method to start the drama thread.

    void mousePressed() {
      if ( !drama.isRunning()) {
        drama.start();
      }
    }
  15. Now add a little bit of text to the draw() method to tell the user what to do. Add the following code to the draw() method:

    void draw() {
      background(255);
      textAlign(CENTER);
      fill(0);
    
      text( "Click here for Drama", width/2, height/2 );
    }
  16. Currently, our sketch window is way too small to contain the text, and we also want to use a bigger font. To change the window size, we simply add the following line to the setup() method:

    void setup() {
    
      size( 800, 400 );
      
      String[] rawLines = loadStrings( "romeo_and_juliet.txt" );
      ArrayList lines = new ArrayList();
      for ( int i=0; i<rawLines.length; i++) {
        if (!"".equals(rawLines[i])) {
          String[] tmp = rawLines[i].split("#");
          lines.add( new Line( tmp[0], tmp[1].trim() ));
        }
      }
    
      drama = new Drama( lines );
    }
  17. To change the used font, we need to tell Processing which font to use. The easiest way to find out the names of the fonts that are currently installed on the computer is to create a new sketch, type the following line, and run the sketch:

        println(PFont.list());
  18. Copy one of the font names you like and add the following line to the Romeo and Juliet sketch:

      void setup() {
    
        size( 800, 400 );
        textFont( createFont( "Georgia", 24 ));
    
    ...
  19. Replace the font name in the code lines with one of the fonts on your computer.

Objective Complete - Mini Debriefing

In this section, we wrote the code that parses a text file and generates a list of Line objects. These objects are then used by a Drama thread that runs in the background as soon as anyone clicks on the sketch window. Currently, the Drama thread prints out the text line on the console.

In steps 6 to 8, we created the Line class. This class is a very simple, so-called Plain Old Java Object (POJO) that holds our text lines, but it doesn't add any functionality.

The code that is controlling the performance of our play was created in steps 10 to 12. We created a thread that is able to run in the background, since in the next step we want to be able to use the draw() method and some TTS objects simultaneously.

The code block in step 12 defines a Boolean variable named running, which we used in the mousePressed() method to check if the sketch is already running or should be started.

Classified Intel

In step 17, we used the list() method of the PFont class to get a list of installed fonts. This is a very common pattern in Processing. You would use the same approach to get a list of installed midi-interfaces, web-cams, serial-ports, and so on.

Adding more actors


In this task, we will combine the things we did in the previous two tasks and add some TTS objects to our Drama thread. We will need two robot actors for this scene speaking with different voices, and since we want to build robots containing a speaker each, we need one of our TTS objects to speak on the left speaker and the other one on the right.

Unfortunately, FreeTTS only comes with one male voice, so we will have to increase the pitch of the voice for our Juliet-Robot.

Engage Thrusters

  1. First, we open the sketch from the previous task and start by creating two TTS objects, one for each of our robot actors. Both use the default voice named kevin16, but we change the pitch for our Juliet-Robot.

    void setup() {
      size( 800, 400 );
      textFont( createFont( "Georgia", 24 ));
    
      String[] rawLines = loadStrings( "romeo_and_juliet.txt" );
      ArrayList lines = new ArrayList();
      for ( int i=0; i<rawLines.length; i++) {
        if (!"".equals(rawLines[i])) {
          String[] tmp = rawLines[i].split("#");
          lines.add( new Line( tmp[0], tmp[1].trim() ));
        }
      }
    
      TTS romeo = new TTS();
      TTS juliet = new TTS();
      juliet.setPitchShift( 2.4 );
      drama = new Drama( lines, romeo, juliet );
    }
  2. Switch to the Drama thread and add two variables to our actors.

    public class Drama extends Thread {
      TTS romeo;
      TTS juliet;
    
      int current;
      ArrayList lines;
      boolean running;
      …
  3. We also need to extend the constructor of our Drama class to enable us to add the actors.

      public Drama( ArrayList lines, TTS romeo, TTS juliet ) {
        this.lines = lines;
        this.romeo = romeo;
        this.juliet = juliet;
        current = 0;
        running = false;
      }
  4. In the run() method, we take the current line and choose the actor object depending on the actor variable we added to each line. We also don't need the delay() and the println() methods anymore.

      public void run() {
        running = true;
    
        for ( int i =0; i < lines.size(); i++) {
          current = i;
          Line l = (Line)lines.get(i);
          if ( "J".equals( l.speaker )) {
            juliet.speak( l.text );
          }
          if ( "R".equals( l.speaker )) {
            romeo.speak( l.text );
          }
        }
        running = false;
      }
  5. Since each of our robots gets his own speaker, we don't want to hear the text on both speakers. We want one robot to use the right one and the other robot, the left one. Fortunately, ttslib provides a speakLeft() and a speakRight() method, which do exactly what we need. So change the two speak() methods to look like the following:

      ...
      if ( "J".equals( l.speaker )) {
          juliet.speakLeft( l.text );
      }
      if ( "R".equals( l.speaker )) {
        romeo.speakRight( l.text );
      }
      ...
  6. Currently, our draw() method is somewhat boring and also somewhat misleading if the drama thread is already running. So we will change it to display five lines of the currently read script. Add an if statement to the draw() method that checks the state of the running variable we added to our Drama thread earlier.

    void draw() {
      background(255);
      textAlign(CENTER);
      fill(0);
    
      if ( !drama.isRunning() ) {
        text( "Click here for Drama", width/2, height/2 );
      } else {
      }
    }
  7. Now we add a for loop that displays the previous two lines, the line that's currently being read, and the next two lines of text in our sketch window. We will now change the text alignment so that it matches the speaker of our robot actors. The text will be aligned to the right if our robot uses speakRight(), and it will be aligned to the left if our robot uses speakLeft().

    void draw() {
      background(255);
      textAlign(CENTER);
      fill(0);
    
      if ( !drama.isRunning() ) {
        text( "Click here for Drama", width/2, height/2 );
      }
      else {
        int current = drama.getCurrent();
        for ( int i = -2; i < 3; i ++) {
          Line l = drama.getLine(i + current);
          if ( l != null) {
            if ( "J".equals( l.speaker )) {
              textAlign( LEFT );
              text( l.text, 10, height/2 + i * 30 );
            }
            else {
              textAlign( RIGHT );
              text( l.text, width - 10, height/2 + i * 30 );
            }
          }
        }
      }
    }
  8. To show the current line more prominently, we will change the color of the text. We set the color of the current line to black and all other lines to a lighter gray by adding a fill() statement to the for loop.

        for ( int i = -2; i < 3; i ++) {
          fill( abs(i) * 100 );
          Line l = drama.getLine(i + current);
          if ( l != null) {
            if ( "J".equals( l.speaker )) {
              textAlign( LEFT );
              text( l.text, 10, height/2 + i * 30 );
            }
            else {
              textAlign( RIGHT );
              text( l.text, width - 10, height/2 + i * 30 );
            }
          }
        }
  9. Now run your code and click on the sketch window to start the drama thread.

Objective Complete - Mini Debriefing

In this task of our current mission, we added two TTS objects and changed the voice parameters to make them sound different in step 1. Then we extended our Drama thread and added TTS objects for the voices of our robot actors. In steps 4 and 5, we modified the run method to use the voices we just created instead of just printing the text lines.

In steps 6 to 9, we made changes to the draw() method and made it display five lines of text. The line that's currently spoken is black, and the two lines before and after it fade to a light gray.

The fill() method is used to change not only the fill color of an object, but also the text color. Because the index of our for loop runs from -2 to 2, we can simply take the absolute value and multiply it with 100 to get the gray level. The following is a screenshot of the running sketch:

Classified Intel

FreeTTS and ttslib also allow you to use a binary TTS engine named MBROLA. Unfortunately, it's only distributed in binary form, and at the time of writing, it only works on Linux. So if you are using Linux and want to give it a try, you can make the following changes to our Romeo and Juliet sketch:

  1. Open http://tcts.fpms.ac.be/synthesis/mbrola.html in your browser and click on Download. Download the MBROLA binary for your platform.

  2. Download the female_us1 voice from the MBROLA site.

  3. Create a folder for the MBROLA binary and unzip the two packages you just downloaded. Make sure that the path to the MBROLA binary contains no blanks, since FreeTTS can't deal with it.

  4. Rename the MBROLA binary to mbrola.

  5. Now go back to your Romeo and Juliet sketch and add the following highlighted line to your setup() method:

    void setup() {
      System.setProperty("mbrola.base", "/path/to/mbrola/");
    
      size( 800, 400 );
      textFont( createFont( "Georgia", 24 ));
    
      String[] rawLines = loadStrings( "romeo_and_juliet.txt" );
      ArrayList lines = new ArrayList();
      for ( int i=0; i<rawLines.length; i++) {
        if (!"".equals(rawLines[i])) {
          String[] tmp = rawLines[i].split("#");
          lines.add( new Line( tmp[0], tmp[1].trim() ));
        }
      }
    
      drama = new Drama( lines );
      TTS romeo = new TTS();
      TTS juliet = new TTS();
      juliet.setPitchShift( 2.4 );
      drama = new Drama( lines, romeo, juliet );
    }
  6. Make the path of the system property point to the folder where your mbrola binary and the us1 voice are located.

  7. Now you can change the Juliet TTS object to the following:

        TTS juliet = new TTS( "mbrola_us1" );
  8. You will also need to change the pitch of the voice as mbrola_us1 is already a female voice and we don't need to simulate it anymore.

MBROLA is a text-to-speech engine developed at the Faculte Polytechnique de Mons in Belgium. The author requires every publication that mentions their work to mention their book, An Introduction To Text-To-Speech Synthesis, Thierry Dutoit, Kluwer Academic Publishers, Dordrecht, Hardbound, ISBN 1-4020-0369-2, April 1997, 312 pp.

Building robots


Now we are ready for the final task of our Romeo and Juliet project. We will take some cardboard boxes, Styrofoam spheres, and a pair of cheap speakers or headphones and turn them into our robot-actors.

The robots described in this section are just my version. If you like, you can build them to be completely different and as complex or as simple as you want.

Prepare for Lift Off

To build our robots, we need some materials and tools, which should not be too hard to find. I used the following for my robot-actors:

  • Two cardboard boxes for the bodies

  • Two Styrofoam spheres for the heads

  • A pair of cheap speakers or headphones

  • Googly eyes

  • Acrylic paint

  • Marker pens

  • Needles

  • A hot glue gun

The following picture shows the main materials I used for my robots:

Engage Thrusters

Let's build some robots:

  1. Disassemble your speakers and try to get rid of the body. We only need the speakers, but make sure you don't remove or destroy the cables.

  2. Cut a hole into your cardboard boxes where the speakers should go. Make the holes a bit smaller than the speakers, as shown in the following picture, because we need to glue them to the box later:

  3. Paint your cardboard boxes. I made one white and the other green.

  4. While the boxes are drying, paint some hair on the heads like in the following picture. I made Romeo-Robot's hair black and Juliet-Robot's hair brown.

  5. After the paint has dried, fix the speakers to the cardboard box using some hot glue, as shown in the following picture. Make sure you don't get any glue on the membrane of your speakers.

  6. Now use some markers to draw a face for the robots. You can see the faces of my robots in the following picture:

  7. Use a needle to attach the heads to the bodies of the robots.

  8. Now connect your robot-actors to your sound card and place Juliet on a balcony (for example an empty shoe-box) and make them act.

Objective Complete - Mini Debriefing

In this task, we completed our robot-actors by building bodies for them. We used some cardboard boxes, painted them, and added a cheap pair of speakers by gluing them into the boxes. Each robot got a head made of a painted Styrofoam sphere.

As I already said in the introduction to this task, there is no right or wrong way to build your robots. Build them as small or as big as you like. Add some hair, make them a nose, sew a dress for Juliet, draw Romeo a mustache, and so on.

Mission Accomplished


In this mission, we added speaking capabilities to Processing by installing the ttslib library. We learned how to simulate multiple speakers by changing the pitch of voice or installing an additional TTS engine on Linux.

We also defined a speak text format for the Shakespeare script to make parsing easier and created a Drama thread that manages our text lines and controls our robots.

We completed our robot-actors, and they are eagerly waiting to perform in front of an audience. So gather your friends and family and make your robots a stage. They will love it, trust me. Well, at least your robots will love it, as you can see in the following picture:

You Ready to go Gung HO? A Hotshot Challenge


Now that you have completed building your robot-actors, why don't you try to take them to the next level?

  • Make them perform different plays. There are plenty of famous dialogs out there that could be performed by your robot-actors.

  • Currently your robot-actors are stationary. Try to add some servo motors and make them move their heads using an Arduino.

  • Connect some webcams to your computer and use Processing to record some videos of the performances from different angles.

  • Make your robot-actors perform a play with a real actor.

  • Make your robots read live input from the Web such as Twitter feeds or the news.

  • Your robots don't have to look like humans; make them look like zombies, aliens, animals, and so on.

Left arrow icon Right arrow icon

Key benefits

  • Teach your computer to create physical objects, visualize data, and program a custom hardware controller
  • Create projects that can be run on a variety of platforms, ranging from desktop computers to Android smartphones
  • Each chapter presents a complete project and guides you through the implementation using easy-to-follow, step-by-step instructions

Description

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

Who is this book for?

This book targets Processing developers ,visual artists, creative professionals, and students who want to move to the next level of learning Processing for gaining inspiration, work, or just for fun. The book assumes a basic understanding of programming. However, this book is also recommended to non-artistic readers, looking to expand their graphics and develop their creativity.

What you will learn

  • Make your computer see, hear, and feel with Processing
  • Have fun with entertaining projects while learning new tricks with Processing
  • Use Processing to teach a pair of cardboard robots to enact famous plays
  • Write code you can run on a variety of devices ranging from your desktop computer to your Android smartphone
  • Learn to build a custom hardware controller and control it using Processing
  • Use Processing to create motion sensor games you can play using your Kinect
  • Design objects you can print using a 3D printer with Processing
Estimated delivery fee Deliver to Ireland

Premium delivery 7 - 10 business days

€23.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 20, 2013
Length: 266 pages
Edition : 1st
Language : English
ISBN-13 : 9781782166726
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Ireland

Premium delivery 7 - 10 business days

€23.95
(Includes tracking information)

Product Details

Publication date : May 20, 2013
Length: 266 pages
Edition : 1st
Language : English
ISBN-13 : 9781782166726
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 117.97
C Programming for Arduino
€41.99
Processing 2: Creative Coding Hotshot
€37.99
Processing 2: Creative Programming Cookbook
€37.99
Total 117.97 Stars icon
Banner background image

Table of Contents

9 Chapters
Romeo and Juliet Chevron down icon Chevron up icon
The Stick Figure Dance Company Chevron down icon Chevron up icon
The Disco Dance Floor Chevron down icon Chevron up icon
Smilie-O-Mat Chevron down icon Chevron up icon
The Smilie-O-Mat Controller Chevron down icon Chevron up icon
Fly to the Moon Chevron down icon Chevron up icon
The Neon Globe Chevron down icon Chevron up icon
Logfile Geo-visualizer Chevron down icon Chevron up icon
From Virtual to Real Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2
(9 Ratings)
5 star 44.4%
4 star 33.3%
3 star 22.2%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




thomas Aug 29, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
i am an experienced programmer and wasn't looking for a book explaining the basic principles of the processing language, i just wanted to use processing for making my ideas visible quickly, drawing from the big pool of libraries processing offers. this book exceeded my expectations by far. i built speaking robots in chapter one, finally got to do something with the kinect i had lying around for years but never got to play with, ventured into audio analysis and even learnt how to use shaders!the projects are built up in a couple of small steps that should take no longer than 15 to 30 minutes to accomplish, and always reward you with something that's cool, that works, and that you know beforehand will play a key role in the project you're trying to accomplish. the small steps invite you to begin exploring all their aspects, try out variations and test what's possible. the suggestions for further extensions after every project are funny and challenging :)this book shows you how processing can help you concentrate on the creative work, and not on a programming language or interface barrier. i loved it!
Amazon Verified review Amazon
Hashiba Aug 19, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Processing 2: Creative Coding Hotshot is the perfect book for Processing users that want to tackle more complex projects or for developers with some Java experience that want to dive into the new Processing 2.0 release.The structure of the projects allows you to follow along or "hack as you go". Each chapter introduces the underlying principles of each library and how to use them, but what is more important is how the descriptions puts you in the right "mindset". I suggest you to type the code of each chapter and afterwards expand the examples with your own classes.I specially enjoyed how the author introduced GLSL filters, taking advantage of the OpenGL integration, and building on top of the previous examples.No more excuses, grab this book and start coding like a boss.
Amazon Verified review Amazon
Amazon Customer Apr 30, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Processing is a great free coding language supported by donations. It is simpler to use than Java but compiles into a java program. It has simple 3D and animation capabilities.
Amazon Verified review Amazon
B. Pauzenberger Jul 11, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Neun Projekte, die verschiedenste Technologien kombinieren und in Processing-Anwendungen bündeln, die echt Spaß machen. Auch kleine Hardware-Basteleien kommen nicht zu kurz.Fazit: Kaufempfehlung!
Amazon Verified review Amazon
H. Lamers Jul 29, 2013
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Processing 2: Creative Coding Hotshot is about connecting Processing with hardware. The book is divided into 9 projects which all have their own chapter. To go roughly through them Processing 2: Creative Coding Hotshot shows you how to let Processing talk. How to connect Processing with Kinect hardware or specialized controllers. Processing 2: Creative Coding Hotshot explains also how to create a game which allows you to cover all internet capable platforms. There is a chapter that shows you how to create a geographic information system that takes a web server log-file and shows where the requests of the readers came from. And the last chapter explains how to create and export a 3D object with Processing that can be printed by a 3d printer.What I really liked about Processing 2: Creative Coding Hotshot was the suggestions listed at the end of each chapter. Most of the time when I study a book I just go to the next chapter but these suggestions made it easier for me to continue with the work or make a different approach to the same subject in order to try to reach another level. To summarize Processing 2: Creative Coding Hotshot. If you're not into Processing connected to hardware this book is a good choice to get into it.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela