Minim
Minim is an audio library that uses the JavaSound API , a bit of Tritonus, and Javazoom's MP3SPI to provide an easy to use audio library for people developing in the Processing environment. The philosophy behind the API is to make integrating audio into your sketches as simple as possible while still providing a reasonable amount of flexibility for more advanced users. There are no callbacks and you do not ever need to directly manipulate sample arrays, all of the dirty work is handled for you. The download comes in two flavors: (1) just the jar files needed to use Minim and (2) a full distribution that includes the javadocs, examples, and source code. Minim is licensed under the GNU Lesser General Public License (LGPL), a copy of which is included with both distributions. Users of Minim 1.1 should peruse the Javadocs to see what's changed (hint: not much has changed, but there are a couple of nice new things).

Download: Minim 2.0.2 full distro | Minim 2.0.2 library only

Minim 2.1.0 Beta

The next version of Minim is currently available as a Beta build. The big new feature is a music programming framework built around the concept of a unit generator (UGen). This framework makes it possible to intuitively create synthesis chains and schedule notes to be played with these chains. You can read about the framework beginning in the Minim Manual at the Music Programming Intro section. You can also peruse the Javadocs for the Beta build online at http://code.compartmental.net/minim-beta/javadoc/. The package ddf.minim.ugens contains all of the new music programming classes.

Download: Minim 2.1.0 BETA (new UGen Framework)

Installation

To install either distribution, unzip the file into the libraries folder in your sketchbook. Create this directory if it doesn't exist. The zip should extract a directory named minim. You will then need to remove the version of Minim that is included with Processing.

On OSX: Find your Processing.app and right click, choose "Show Package Contents". Then dig down to Contents/Resources/Java/modes/java/libraries and delete the minim folder in there.

On Windows: From the directory that contains Processing.exe, dig down to modes/java/libraries and delete the minim folder there. Finally, restart Processing. Here are some of the features of Minim:

  • AudioPlayer: Mono and Stereo playback of WAV, AIFF, AU, SND, and MP3 files.
  • AudioMetaData: An object filled with metadata about a file, such as ID3 tags.
  • AudioRecorder: Mono and Stereo audio recording either buffered or direct to disk.
  • AudioInput: Mono and Stereo input monitoring.
  • AudioOutput: Mono and Stereo sound synthesis.
  • AudioSignal: A simple interface for writing your own sound synthesis classes.
  • Comes with all the standard waveforms, a pink noise generator and a white noise generator. Additionally, you can extend the Oscillator class for easy implementation of your own periodic waveform.
  • AudioEffect: A simple interface for writing your own audio effects.
  • Comes with low pass, high pass, band pass, and notch filters. Additionally, you can extend the IIRFilter class for easy implementation of your own IIR filters.
  • Easy to attach signals and effects to AudioInputs and AudioOutputs. All the mixing and processing is taken care of for you.
  • Provides an FFT class for doing spectrum analysis.
  • Provides a BeatDetect class for doing beat detection.

Planned Features:

  • More AudioEffects like reverb, delay, phasing, ring modulation, and bit crushing.
  • Better filters using frequency domain filtering techniques.

To start using Minim, you can take a look at the Quickstart Guide or dive right into the Javadocs. If you have any questions about using the library you can post on the Processing forum or send me a private message there. If you find bugs, please report them on the Github issues page.

If you'd like to contribute to the development of Minim, simply fork the project on Github and send pull requests when you've got code you'd like us to consider for inclusion in the library. Enjoy!

UGenSignal

UGenSignal
generate ( )
getUGen ( )
setUGen ( )

Triggerable

stop ( )
trigger ( )

SignalSplitter

SignalSplitter
addListener ( )
bufferSize ( )
getFormat ( )
removeListener ( )
sampleRate ( )
samples ( )
type ( )

SignalChain

SignalChain
add ( )
clear ( )
contains ( )
disable ( )
disableAll ( )
enable ( )
enableAll ( )
generate ( )
get ( )
hasEnabled ( )
isEnabled ( )
remove ( )
size ( )

Recordable

addListener ( )
bufferSize ( )
getFormat ( )
removeListener ( )
sampleRate ( )
type ( )

Polyphonic

addSignal ( )
clearSignals ( )
disableSignal ( )
enableSignal ( )
getSignal ( )
hasSignal ( )
isEnabled ( )
isSounding ( )
noSound ( )
removeSignal ( )
signalCount ( )
sound ( )

Playable

cue ( )
getMetaData ( )
isLooping ( )
isPlaying ( )
length ( )
loop ( )
loopCount ( )
pause ( )
play ( )
position ( )
rewind ( )
setLoopPoints ( )
skip ( )

NoteManager

NoteManager
pause ( )
resume ( )
setDurationFactor ( )
setNoteOffset ( )
setTempo ( )
tick ( )

MultiChannelBuffer

MultiChannelBuffer
getBufferSize ( )
getChannel ( )
getChannelCount ( )
getSample ( )
set ( )
setBufferSize ( )
setChannel ( )
setChannelCount ( )
setSample ( )

Minim

Minim
AIFC
AIFF
AU
LOOP_CONTINUOUSLY
MONO
SND
STEREO
WAV
createRecorder ( )
createSample ( )
debug ( )
debugOff ( )
debugOn ( )
error ( )
getInputStream ( )
getLineIn ( )
getLineOut ( )
loadFile ( )
loadFileIntoBuffer ( )
loadFileStream ( )
loadSample ( )
loadSnippet ( )
setInputMixer ( )
setOutputMixer ( )
stop ( )

EffectsChain

EffectsChain
add ( )
clear ( )
contains ( )
disable ( )
disableAll ( )
enable ( )
enableAll ( )
get ( )
hasEnabled ( )
isEnabled ( )
process ( )
remove ( )
size ( )

Effectable

addEffect ( )
clearEffects ( )
disableEffect ( )
effectCount ( )
effects ( )
enableEffect ( )
getEffect ( )
hasEffect ( )
isEffected ( )
isEnabled ( )
noEffects ( )
removeEffect ( )

Controller

Controller
BALANCE
GAIN
MUTE
PAN
SAMPLE_RATE
VOLUME
balance ( )
gain ( )
getBalance ( )
getControl ( )
getControls ( )
getGain ( )
getPan ( )
getVolume ( )
hasControl ( )
isMuted ( )
mute ( )
pan ( )
printControls ( )
setBalance ( )
setGain ( )
setPan ( )
setVolume ( )
shiftBalance ( )
shiftGain ( )
shiftPan ( )
shiftVolume ( )
unmute ( )
volume ( )

BufferedAudio

LEFT
RIGHT
getChannel ( )
length ( )

AudioSource

AudioSource
BALANCE
GAIN
MUTE
PAN
SAMPLE_RATE
VOLUME
left
mix
right
addEffect ( )
addListener ( )
balance ( )
bufferSize ( )
clearEffects ( )
close ( )
disableEffect ( )
effectCount ( )
effects ( )
enableEffect ( )
gain ( )
getBalance ( )
getControl ( )
getControls ( )
getEffect ( )
getFormat ( )
getGain ( )
getPan ( )
getVolume ( )
hasControl ( )
hasEffect ( )
isEffected ( )
isEnabled ( )
isMuted ( )
mute ( )
noEffects ( )
pan ( )
printControls ( )
removeEffect ( )
removeListener ( )
sampleRate ( )
setBalance ( )
setGain ( )
setPan ( )
setVolume ( )
shiftBalance ( )
shiftGain ( )
shiftPan ( )
shiftVolume ( )
type ( )
unmute ( )
volume ( )

AudioSnippet

AudioSnippet
BALANCE
GAIN
MUTE
PAN
SAMPLE_RATE
VOLUME
balance ( )
close ( )
cue ( )
gain ( )
getBalance ( )
getControl ( )
getControls ( )
getGain ( )
getMetaData ( )
getPan ( )
getVolume ( )
hasControl ( )
isLooping ( )
isMuted ( )
isPlaying ( )
length ( )
loop ( )
loopCount ( )
mute ( )
pan ( )
pause ( )
play ( )
position ( )
printControls ( )
rewind ( )
setBalance ( )
setGain ( )
setLoopPoints ( )
setPan ( )
setVolume ( )
shiftBalance ( )
shiftGain ( )
shiftPan ( )
shiftVolume ( )
skip ( )
unmute ( )
volume ( )

AudioSignal

generate ( )

AudioSample

AudioSample
BALANCE
GAIN
MUTE
PAN
SAMPLE_RATE
VOLUME
left
mix
right
addEffect ( )
addListener ( )
balance ( )
bufferSize ( )
clearEffects ( )
close ( )
disableEffect ( )
effectCount ( )
effects ( )
enableEffect ( )
gain ( )
getBalance ( )
getControl ( )
getControls ( )
getEffect ( )
getFormat ( )
getGain ( )
getMetaData ( )
getPan ( )
getVolume ( )
hasControl ( )
hasEffect ( )
isEffected ( )
isEnabled ( )
isMuted ( )
mute ( )
noEffects ( )
pan ( )
printControls ( )
removeEffect ( )
removeListener ( )
sampleRate ( )
setBalance ( )
setGain ( )
setPan ( )
setVolume ( )
shiftBalance ( )
shiftGain ( )
shiftPan ( )
shiftVolume ( )
type ( )
unmute ( )
volume ( )

AudioRecorder

AudioRecorder
beginRecord ( )
endRecord ( )
isRecording ( )
save ( )
setRecordSource ( )
setSampleRecorder ( )

AudioPlayer

AudioPlayer
BALANCE
GAIN
MUTE
PAN
SAMPLE_RATE
VOLUME
left
mix
right
addEffect ( )
addListener ( )
balance ( )
bufferSize ( )
clearEffects ( )
close ( )
cue ( )
disableEffect ( )
effectCount ( )
effects ( )
enableEffect ( )
gain ( )
getBalance ( )
getControl ( )
getControls ( )
getEffect ( )
getFormat ( )
getGain ( )
getMetaData ( )
getPan ( )
getVolume ( )
hasControl ( )
hasEffect ( )
isEffected ( )
isEnabled ( )
isLooping ( )
isMuted ( )
isPlaying ( )
length ( )
loop ( )
loopCount ( )
mute ( )
noEffects ( )
pan ( )
pause ( )
play ( )
position ( )
printControls ( )
removeEffect ( )
removeListener ( )
rewind ( )
sampleRate ( )
setBalance ( )
setGain ( )
setLoopPoints ( )
setPan ( )
setVolume ( )
shiftBalance ( )
shiftGain ( )
shiftPan ( )
shiftVolume ( )
skip ( )
type ( )
unmute ( )
volume ( )

AudioOutput

AudioOutput
BALANCE
GAIN
MUTE
PAN
SAMPLE_RATE
VOLUME
bus
left
mix
right
addEffect ( )
addListener ( )
addSignal ( )
balance ( )
bufferSize ( )
clearEffects ( )
clearSignals ( )
close ( )
disableEffect ( )
disableSignal ( )
effectCount ( )
effects ( )
enableEffect ( )
enableSignal ( )
gain ( )
getBalance ( )
getControl ( )
getControls ( )
getEffect ( )
getFormat ( )
getGain ( )
getPan ( )
getSignal ( )
getVolume ( )
hasControl ( )
hasEffect ( )
hasSignal ( )
isEffected ( )
isEnabled ( )
isMuted ( )
isSounding ( )
mute ( )
noEffects ( )
noSound ( )
pan ( )
pauseNotes ( )
playNote ( )
printControls ( )
removeEffect ( )
removeListener ( )
removeSignal ( )
resumeNotes ( )
sampleRate ( )
setBalance ( )
setDurationFactor ( )
setGain ( )
setNoteOffset ( )
setPan ( )
setTempo ( )
setVolume ( )
shiftBalance ( )
shiftGain ( )
shiftPan ( )
shiftVolume ( )
signalCount ( )
sound ( )
type ( )
unmute ( )
volume ( )

AudioMetaData

AudioMetaData
album ( )
author ( )
comment ( )
composer ( )
copyright ( )
date ( )
disc ( )
encoded ( )
fileName ( )
genre ( )
length ( )
orchestra ( )
publisher ( )
sampleFrameCount ( )
title ( )
track ( )

AudioListener

samples ( )

AudioInput

AudioInput
BALANCE
GAIN
MUTE
PAN
SAMPLE_RATE
VOLUME
left
mix
right
addEffect ( )
addListener ( )
balance ( )
bufferSize ( )
clearEffects ( )
close ( )
disableEffect ( )
disableMonitoring ( )
effectCount ( )
effects ( )
enableEffect ( )
enableMonitoring ( )
gain ( )
getBalance ( )
getControl ( )
getControls ( )
getEffect ( )
getFormat ( )
getGain ( )
getPan ( )
getVolume ( )
hasControl ( )
hasEffect ( )
isEffected ( )
isEnabled ( )
isMuted ( )
mute ( )
noEffects ( )
pan ( )
printControls ( )
removeEffect ( )
removeListener ( )
sampleRate ( )
setBalance ( )
setGain ( )
setPan ( )
setVolume ( )
shiftBalance ( )
shiftGain ( )
shiftPan ( )
shiftVolume ( )
type ( )
unmute ( )
volume ( )

AudioEffect

process ( )

AudioBuffer

get ( )
level ( )
size ( )
toArray ( )