Minim index
Name Minim
Examples
None available
Description The Minim class is how you get what you want from JavaSound. There are methods for obtaining objects for playing audio files: {@link AudioSample}, {@link AudioSnippet}, and {@link AudioPlayer}. There are methods for obtaining an {@link AudioRecorder}, which is how you record audio to disk. There are methods for obtaining an {@link AudioInput}, which is how you can monitor the computer's line-in or microphone, depending on what the user has set as the record source. Finally there are methods for obtaining an {@link AudioOutput}, which is how you can play audio generated by your program. All of these classes are given {@link AudioStream AudioStreams} by Minim, which are Threads that do the actual work of audio I/O. Because of this, you should always call the close method of an AudioXXX when you are finished with it.

Minim needs to know about your sketch so that it can load files from the sketch's data directory. For this reason, you must pass a PApplet to the constructor.

Constructors
Minim(fileSystem);
Minim(implementation);
Parameters
fileSystem   the Object that will be used for file operations
implementation   the MinimServiceProvider that will be used for returning audio resources
Fields
AIFC   The .aifc file format.

AIFF   The .aiff file format.

AU   The .au file format.

MONO   Specifies that you want a MONO AudioInput or AudioOutput

SND   The .snd file format.

STEREO   Specifies that you want a STEREO AudioInput or AudioOutput

WAV   The .wav file format.

Methods
createRecorder ( )   Creates an {@link AudioRecorder} that will use source as its record source and that will save to the file name specified. The format of the file will be inferred from the extension in the file name. If the extension is not a recognized file type, this will return null. Be aware that if you choose buffered recording the call to {@link AudioRecorder#save()} will block until the entire buffer is written to disk. In the event that the buffer is very large, your sketch will noticably hang.

createSample ( )   Creates an {@link AudioSample} using the provided left and right channel samples.

debug ( )   Displays a debug message, but only if {@link #debugOn()} has been called. The message will be displayed in the console area of the PDE, if you are running your sketch from the PDE. Otherwise, it will be displayed in the Java Console.

debugOff ( )   Turns off debug messages.

debugOn ( )   Turns on debug messages.

error ( )   Used internally to report error messages. These error messages will appear in the console area of the PDE if you are running a sketch from the PDE, otherwise they will appear in the Java Console.

getInputStream ( )   Get the input as an AudioStream that you can read from yourself, rather than wrapped in an AudioInput that does that work for you.

getLineIn ( )   Gets an {@link AudioInput}, to which you can attach {@link AudioEffect AudioEffects}.

getLineOut ( )   Gets an {@link AudioOutput}, to which you can attach {@link AudioSignal AudioSignals} and {@link AudioEffect AudioEffects}.

loadFile ( )   Loads the requested file into an {@link AudioPlayer} with the request buffer size.

loadFileIntoBuffer ( )   Loads the requested file into a MultiChannelBuffer.

loadFileStream ( )   Creates and AudioRecordingStream that you can use to read from the file yourself, rather than wrapping it in an AudioPlayer that does the work for you.

loadSample ( )   Loads the requested file into an {@link AudioSample}.

setInputMixer ( )   Sets the Javasound Mixer that will be used for obtaining input sources such as AudioInputs. This will do nothing if you have provided your own MinimServiceProvider.

setOutputMixer ( )   Sets the Javasound Mixer that will be used for obtain output destinations such as those required by AudioOuput, AudioPlayer, AudioSample, and so forth. This will do nothing if you have provided your own MinimServiceProvider.

stop ( )   Stops Minim. A call to this method should be placed inside of the stop() function of your sketch. We expect that implemenations of the Minim interface made need to do some cleanup, so this is how we tell them it's time.

Usage Web & Application
Related