Skip to content

processing/processing-sound

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Processing Sound library

Release License Documentation Javadoc

The new Sound library for Processing 3 provides a simple way to work with audio. It can play, analyze, and synthesize sound. The library comes with a collection of oscillators for basic wave forms, a variety of noise generators, and effects and filters to alter sound files and other generated sounds. The syntax is minimal to make it easy for beginners who want a straightforward way to add some sound to their Processing sketches!

How to use

The easiest way to install the Sound library is through Processing's Contribution Manager. The library comes with many example sketches, the full online reference can be found here.

If you have questions or problems using the library, the best place for help is the Processing Discourse. Bugs can be reported on the Github issues page, advanced users can also have a look at the library's full JavaDoc documentation.

For detailed changelogs and to download older releases, have a look at the Github releases page.

Known issues

SoundFile class for loading audio data from disk:

  • Currently no support for decoding WAV files that are in compressed formats such as 8bit unsigned (see #15)
  • MP3 decoding is extremely slow on ARM processors (Android and Raspberry Pi). Since all audio samples loaded by the library end up being stored as raw uncompressed data in RAM anyway, we generally recommend using WAV files for loading audio samples from disk
  • Some MP3 files with meta-information (especially where large amounts of data such as the album cover image is stored in the ID3 header) fail to load (see #32)

Contributing

Pull requests for bug fixes as well as new features and example sketches are always welcome! Check the open issues if you don't know where to start.

Thanks to the following community members for their contributions:

  • @Calsign for improved Android support
  • @alexdmiller for the BeatDetection analyzer class
  • @icalvin102 for the Waveform analyzer class
  • @defrost256
  • @cluder

How to build

  1. git clone git@github.com:processing/processing-sound.git
  2. (optional: copy (or soft-link) processing-core.zip from your local Processing for Android mode as well as your Android SDK's android.jar, API level 26 or higher, into the library/ folder. If you don't do this, these will be downloaded from GitHub instead. Note that as of version 2.2 the sound library is compiled against Processing's Android mode rather than the normal Processing core.jar in order to more smoothly support AudioIn on Android. Other dependencies, in particular Phil Burk's JSyn engine on which this library is based, are also all downloaded automatically by ant.)
  3. ant dist (or, alternatively, run build.xml from within Eclipse)

The resulting sound.zip can be extracted into your Processing installation's libraries/ folder.

License

LGPL v2.1