Importing the Minim library
The first thing you'll need to do for every sketch in this chapter is to import the minim
library. You'll learn all about Minim in this recipe.
How to do it...
Create a new sketch and go to Sketch | Import Library | minim. The following lines will be added at the top of your document.
import ddf.minim.*; import ddf.minim.signals.*; import ddf.minim.analysis.*; import ddf.minim.effects.*;
How it works...
The minim
library contains four packages. These contain specific classes to work with a certain aspect of audio. You don't usually need to import all of them into your sketch.
ddf.minim.*
: This contains the mainMinim
classes. You'll need to import this one in every sketch where you want to use theminim
library. This package allows you to play audio files and work with the microphone input of your computer.ddf.minim.signals.*
: This contains an oscillator and some wave generators to create sine waves, saw waves, and so on. This package is mostly used to create synthesizers...