<< Chapter < Page Chapter >> Page >

Overlapped text

PFont fonte; /*The font have been previously createdin the data folder*/ fonte = loadFont("HoeflerText-Black-48.vlw");textFont(fonte, 12); fill(10, 20, 250, 80);textAlign(RIGHT); text("pippo pippo non lo sa", 10, 14, 35, 70);textFont(fonte, 24); fill(200, 0, 0, 100);text("ppnls", 25, 5, 50, 90);
Got questions? Get instant answers now!

Processing allows a tight control of the spatial occupation of characters and of the distance betweencontiguous characters (see [link] ). The function textWidth() computes the horizontal extension of a character or a string. It can be used, together with the exact coordinatespassed to text() , to control the kerning and the tracking between characters. The textSize() allows to redefine the size of characters. The textLeading() re-defines the distance in pixels between adjacent text lines. This distance is measured betweenthe baselines of the strings of characters. Letters such as "p" or "q" extend below thebaseline for a number of pixels that can be obtained with the textDescent() . Instead, the textAscent() gives back the maximum extension above the baseline (typically, the height of the letter"d").

Typeface metrics

Typeface metrics

Auditory elements


Untill version beta 112, Processing gave the possibility to program several audiofunctionalities by means of some core primitives. In those older versions only two basic primitives are available to playback andload .wav files. In more recent versions, Processing delegate sound management and processing functionalities to external libraries . The most used libraries are Ess , Sonia , and Minim . Only the latter is included in the base installation of Processing. Essand Sonia need an explicit installation process. Recently, a well-structured and documented Java library called Beads has also been introduced. It is well suited to the construction ofaudio-processing algorithms based on chains of base objects. As in the case of images, in order to process and playback sounds the source files have to be stored in the data folder of the current sketch. The library Sonia is the most complex one. With its functions, one can do sample playback , realtime Fourier-based spectral analysis, .wav file saving. In order to use the Sonia library, the programmer has to download the .zip file from Sonia . Once decompressed, the directory Sonia_?_? has to be copied into the directory Processing/libraries . Finally, the command import has to be inserted into the code by selecting it from the menu item Sketch / Import Library / Sonia_?_? .

In order to run the applets produced with Sonia from a web browser, the Phil Burk's JSyn plugin has to bedownloaded and installed from the site (External Link) .
The library Minim , based on Java Sound , is more user-friendly, well-documented and recommended, if one wants to work with sounds employing high-level primitives, without dealing with low-level numerical details and buffer management.


In this section, we first use then analyze an application for theexploration of timbres, similar in conception to the Color Chooser of [link] , and here called Sound Chooser. For the moment, let us think about a sound timbre inanalogy with color in images. For example, the various instruments of the orchestra have different and characterizing timbres (colors). Later on, wewill define the physical and perceptual aspects of timbre more accurately. In the Sound Chooser applet, four sounds withdifferent timbres can be played by clicking onto one of the marked radii. Each radius corresponds to a musical instrument(timbre/color). By changing position along the radius it is possible to hear how the brightness is changed. Moreprecisely, as long as we proceed toward the centre, the sounds gets poorer.

Questions & Answers

the cell wall is targeted
Rebel Reply
what is rispiration
Liaquat Reply
transpiration in organism
what is biology mean?
Nickey Reply
bio means life logy means study . study about life . physiology. morphology . anatomy and others organisms related topics is termed as biology
Biology is the study life. that the study about living organism
what is oxidation?
Rose Reply
 the state or result of being oxidized
hahahaha thanks, but my teachers requires a thorough meaning about that
Is the process of oxidizing ,the addition of oxygen to a compound with a loss of electrons, always accompanied by reduction
loss of electron....
thank you. 😊
thank you. 😊
thank you. 😊
what is oxidized
the process or result of oxidizing or being oxidized.
my pleasure
Google itttt.....if need explanation
to rose...
oxidation is the removal of oxygen addition of hydrogen
what is genetic
Chibawa Reply
genetic is the study of inheritance and variation
Nice one genetic is the scientific study of heredity and variation in living organism
Genetic : generally is the scientific study of heredity and variation in living thing .
name the enzymes that i found in the saliva
Valuables Reply
salivary amylase
draw a bacterium cell and label
Kadijah Reply
What are the osmoregulatory functions of the kidney?
bisi Reply
What is ecology
Hebert Reply
it is the study of interaction of living organisms with their environment.
what is cell
Etama Reply
cell is the basic unit of life
cell is the basic structural and functional unit of an living organism
a cell is the smallest and most basic unit of a living thing
cell is the basic unit of life. we are made up of 60,000 billions of cells.Each cell carry out a specific function in the body.
A cell is the smallest basic functioning unit of life.
where is the pectoral gridle located?
Tiania Reply
What is hypotonic
Bright Reply
what is hypotonic
Hypotonic means weak solution
the difference between the two cells
Obeng Reply
explain the courses and the correction of lon term sightedness and short term sightedness
Isaac Reply
long sightedness is said to be like someone that can see far object clearly why short sightedness is someone that only can see near obect
why drinking excess alcohol causes thirst and dehydration
uwikuzo Reply
Can we chat about nutrition please?
Uhm why is it so important to follow the nutritional process?
BC it contribute to the source of life
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Media processing in processing. OpenStax CNX. Nov 10, 2010 Download for free at http://cnx.org/content/col10268/1.14
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Media processing in processing' conversation and receive update notifications?