Audio con processing

Solo disponible en BuenasTareas
  • Páginas : 2 (310 palabras )
  • Descarga(s) : 0
  • Publicado : 8 de febrero de 2012
Leer documento completo
Vista previa del texto
Audio con Processing
¿Processing tiene audio?
Si y No
Las bibliotecas de Processing (librerías).
Recorrido por las librerías, download Minim
Minim: Uses theJavaSound API to provide an easy-to-use audio library. A simple API while still providing a reasonable amount of flexibility for more advance users.
Minim is a class in the library that provided abunch methods that you can call to get audio resources from the system.
To uset it, you must declare a variable of type minim before you setup() function and them
Code Sample
Import ddf.minim*Minim minim;
Void setup () {
Minim= new Minim(this);
Void draw ()
Obtaining Audio Resources From Minim
There are four things you can do whit Minim:
1. Play anaudio file.
2. Play synthesized audio.
3. Monitor audio input
4. Record audio to disk

Loadin An Audio File
The are three different classes for playing a audio file, each designed toaddress a particular kind of playback.
Rather than creating new instances of these classes by using the new keywords, you create the by calling on of themethods Minim. They are as follows:
loadSnippet( String filename)
loasSample( String filename)
loadSample(String filename, int bufferSize)
loadFile(String filename)
In all casesfilename is either the name of an audio file in your sketch´s data folder, an absolute path to an audio file, or a URL that returns an audio file (like an mp3 file on a server or even the URL of aninternet radio station).
Import ddf.minim.*;
Minim mi_minim;
audio player in;
void setup() {
//instantiate a Minim object
minim=new Minim (this);
//load a file,default sample buffer size is 1024
in=mi_mini.loadFile(“Mac Audio.mp3”);
//Play the file ();
Void draw () {
void stop () {

GetLineIn( int type, inbufferSize, float Sample
tracking img