freesound-juce
A JUCE client for accessing the Freesound API
freesound-juce

A JUCE client for accessing the Freesound API. From the Freesound API docs:

With the Freesound API you can browse, search, and retrieve information about Freesound users, packs, and the sounds themselves of course. You can find similar sounds to a given target (based on content analysis) and retrieve automatically extracted features from audio files, as well as perform advanced queries combining content analysis features and other metadata (tags, etc…). With the Freesound API, you can also upload, comment, rate and bookmark sounds!

The freesound-juce client automatically maps function arguments to HTTP parameters of the Freesound API. JSON results are parsed and converted to C++ objects. The main object classes (SoundList, Sound, User, Pack) implement utility methods to further interact with the API.

The freesound-juce client includes a simple example command line application built with JUCE v5.4.4 which shows how to use it. Client's [documentation can be found here](). However we recommend you to check the official Freesound API documentation to get more information about the available API endpoints and features.

Usage

To use freesound-juce just copy FreesoundAPI.h and FreesoundAPI.cpp to your project source folder and #include "FreesoundAPI.h".

To access the API you'll need to create a Freesound user account and apply for an API key at https://freesound.org/api/apply/.

Quick example

FreesoundClient client(secret);
SoundList list = client.textSearch("bass");
Array<FSSound> arrayOfSearch = list.toArrayOfSounds();
for (int i = 0; i < arrayOfSearch.size(); i++) {
name = arrayOfSearch[i].name;
username = arrayOfSearch[i].user;
std::cout << "Sound Name: " << name << " Username: " << username << std::endl;
}

Example applications

Check out this cool exmaple apps:

  • Demo app: simple command-line utility that makes some queries to Freesound to demonstrate how the client works. Includes OAuth2 authentication example as well.
  • [FreesoundUploader](): let's you upload sounds to Freesound directly from your DAW!
SoundList::toArrayOfSounds
Array< FSSound > toArrayOfSounds()
Creates a copy of this object as an array of FSSound.
Definition: FreesoundAPI.cpp:910
SoundList
A class which implements the sound list returned from certain queries to Freesound API,...
Definition: FreesoundAPI.h:528
FreesoundClient
The Freesound client class which is responsible for all authorization and requests to the Freesound A...
Definition: FreesoundAPI.h:556