<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_plain.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="new">
  <name>Teaching Media Processing in Processing</name>
  <metadata>
  <md:version>1.2</md:version>
  <md:created>2005/05/09 22:52:45 GMT-5</md:created>
  <md:revised>2005/05/12 01:36:31 GMT-5</md:revised>
  <md:authorlist>
      <md:author id="drocchesso">
      <md:firstname>Davide</md:firstname>
      
      <md:surname>Rocchesso</md:surname>
      <md:email>Davide.Rocchesso@univr.it</md:email>
    </md:author>
      <md:author id="ppolotti">
      <md:firstname>Pietro</md:firstname>
      
      <md:surname>Polotti</md:surname>
      <md:email>polotti@sci.univr.it</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="drocchesso">
      <md:firstname>Davide</md:firstname>
      
      <md:surname>Rocchesso</md:surname>
      <md:email>Davide.Rocchesso@univr.it</md:email>
    </md:maintainer>
    <md:maintainer id="ppolotti">
      <md:firstname>Pietro</md:firstname>
      
      <md:surname>Polotti</md:surname>
      <md:email>polotti@sci.univr.it</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>Didactics; Sound for Designers</md:keyword>
  </md:keywordlist>

  <md:abstract>Skeleton of the presentation given in Copenhagen at the Sound in Interactive Media Workshop, may 12 2005</md:abstract>
</metadata>
  <content>
    <section>
      <name>Processing</name>
<para id="introp">
	<term src="http://processing.org"> Processing </term> is a
	language and development environment. It is oriented towards
	<term src="http://en.wikipedia.org/wiki/Interaction_design">
	  interaction design </term>. The Processing project was
	initiated and is currently pursued by <link src="http://benfry.com">Ben Fry</link> and <link src="http://groupc.net/">Casey Reas</link>. In the course
	<term src="http://cnx.rice.edu/content/col10268/latest/">
	Media Processing in Processing (MPP) </term>, processing is
	one of the main tools that we use to introduce the basics of
	image, graphic, and sound processing. Processing is an
	extension of Java and it supports many of Java structures with
	a simplified syntax.
      </para>
      <para id="modi">
	Processing can be used in three
	<list id="modil" type="named-item">
	  <name> Programming Modes </name> <item><name>Basic</name>
	  Sequence of commands (graphic primitives) </item>
	  <item><name>Intermediate</name> Procedural programming
	  </item> <item><name>Advanced</name> Object-Oriented
	  Programming </item>
	</list>
<cnxn document="m12614">Examples</cnxn>
      </para>
      <section>
	<name>Media Representation</name> <para id="representationp">Visual objects populate a 3D (or 2D)
	space. Images, curves, surfaces, and typographic elements can
	populate the space. Support for sound in Processing is very
	limited. <cnxn document="m12664">Guide to Media Representation
	in Processing</cnxn>.  </para>
      </section>
      <section>
	<name>Graphic Composition</name> <para id="graphicp">Processing provides primitives for drawing,
	coloring, lighting, and shading visual elements in the 3D (and
	2D) space. It can rely on OpenGL and hardware acceleration for
	locally-run applications. <cnxn document="m12665">Guide to
	Graphic Composition in Processing</cnxn>.</para>
      </section>
      <section>
	<name>Repertoire</name>
	<para id="referencep">
	  <link src="http://processing.org/reference/index_ext.html">The
	  complete reference manual</link>
	</para>
	<para id="librariesp">
	  <link src="http://processing.org/reference/libraries/index.html">The
	  libraries</link>
	</para>
      </section>
    </section>
    <section>
      <name>Sound in Processing</name>
      <section>
	<name>Core support</name> <para id="corep">
	<link src="http://processing.org/reference/PSound.html">The
	  PSound class</link> </para>
      </section>
      <section>
	<name>Libraries</name> 
	<para id="soniap">
	  <link src="http://processing.org/reference/libraries/sonia/">The
	Sonia library</link> (by Amit Pitaru) is based on <cnxn target="jsynp"> JSyn</cnxn> and <quote>"provides advanced
	audio capabilities such as multiple sample playback, realtime
	sound synthesis, realtime FFT (frequency) analysis of the
	microphone input, and writing .wav files from
	samples"</quote>.</para> <para id="jsynp"><link src="http://www.softsynth.com/jsyn/">JSyn</link> is Phil
	Burk's <quote>"Audio Software Synthesis API and Plugins for
	Java"</quote>. <quote>"JSyn is based on the traditional model
	of unit generators which can be connected together to form
	complex sounds"</quote>. <link src="http://www.softsynth.com/jsyn/slides/">Phil Burk's
	presentation at ICMC98</link>.</para> <para id="essp"><link src="http://www.tree-axis.com/Ess/">Ess </link> is Krister
	Olsson's <quote>"sound library that allows sound data to be
	loaded (AIFF, WAVE, AU, MP3), generated (sine, square,
	triangle and sawtooth waves, white and pink noise),
	manipulated (raw or via built-in effects), saved (AIFF, WAVE),
	analyzed (FFT) or simply played back.  Ess is built on
	JavaSound and as such requires no additional plug-ins, just
	Java 1.3 or better"</quote>. It was announced in the <link src="http://processing.org/discourse/">discourse
	section</link> of Processing site on May 9th, 2005, 12:50pm.
	</para>
      </section>
    </section>
    <section>
      <name>Examples</name>
      <example>
	<name>Audio-Visual Quantization</name> <para id="quantap">In
	this <link src="http://cnx.rice.edu/content/m12751/latest/quantagondole.html">applet</link>,
	the number of bits for representing the primary colors and the
	audio samples can be changed by hitting the keyboard
	arrows.</para>
      </example>
      <example>
	<name>Sound Chooser</name> <para id="soundchooserp">A <link src="http://cnx.rice.edu/content/m12664/latest/soundch.html">sound
	chooser</link>, similar in spirit to the <cnxn document="m12664" target="gimp_color">color chooser</cnxn> of
	image-processing applications.</para>
      </example>
      <example>
	<name>JSyn in Processing</name> <para id="jsyninpp">JSyn can
	be used directly in Processing, or side by side with Sonia. In
	this <link src="jsynexample.pde">example</link>, enveloped sine
	waves are generated by calling JSyn methods from within
	Processing code.</para>
      </example>
      <example>
	<name>Pan and Volume control in Ess</name> <para id="essexp"><link src="http://www.tree-axis.com/Ess/_examples/panVolume/">Example
	by Krister Olsson</link>.</para>
      </example>
      <example>
	<name>Audio Aliasing visualized</name> <para id="aliasingp">Visualizing (and hearing) <cnxn document="m12751" target="aliasingTab">aliasing</cnxn> through
	a spectral representation, in Sonia. An <link src="http://cnx.rice.edu/GroupWorkspaces/wg223/m12751/aliasingFermoD.pde/">audio-visual
	wallpaper</link> based on that.</para>
      </example>
    </section>
    <section>
      <name>Interaction for the Masses</name>
      <section>
	<name>Talking with the Universe</name> <para id="talkingp">The
	<link src="http://processing.org/reference/libraries/net/index.html">Net</link>
	library allows the creation of clients and servers. This is
	especially useful to talk easily with <link src="http://www.puredata.org">Pure Data</link>. See how a
	Processing <link src="NetSend.pde">client</link> sends
	frequency and amplitude controls to a <link src="networkReceive.pd">PD patch</link>.</para>
      </section>
      <section>
	<name>Talking with artefacts</name> <para id="artefactsp">The
	<link src="http://processing.org/reference/libraries/serial/index.html">Serial</link>
	library allows <quote>"for easily reading and writing data to
	and from external machines"</quote>.</para>
      </section>
      <section>
	<name>Seeing the World</name> <para id="seeingp">The <link src="http://processing.org/reference/libraries/video/index.html">Video</link>
	library allows <quote>"to display QuickTime video files and
	grab video data from a camera"</quote>. <link src="webcam.pde">Here</link> we compute and display the
	histogram of camera-grabbed frames dynamically.</para>
      </section>
    </section>
  </content>
</document>
