<< 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

Sounds

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.

Timbre

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

Application of nanotechnology in medicine
what is variations in raman spectra for nanomaterials
Jyoti Reply
I only see partial conversation and what's the question here!
Crow Reply
what about nanotechnology for water purification
RAW Reply
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
Damian
yes that's correct
Professor
I think
Professor
what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
Rafiq
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
Damian
How we are making nano material?
LITNING Reply
what is a peer
LITNING Reply
What is meant by 'nano scale'?
LITNING Reply
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
how nano science is used for hydrophobicity
Santosh
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
Rafiq
what is differents between GO and RGO?
Mahi
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
Rafiq
if virus is killing to make ARTIFICIAL DNA OF GRAPHENE FOR KILLED THE VIRUS .THIS IS OUR ASSUMPTION
Anam
analytical skills graphene is prepared to kill any type viruses .
Anam
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
Adin
why?
Adin
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
Damian Reply
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
Praveena Reply
hi
Loga
what does nano mean?
Anassong Reply
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Good
Berger describes sociologists as concerned with
Mueller Reply
what is hormones?
Wellington
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?

Ask