SOURCE is an open-source music sampler powered by Freesound's collection of 500k Creative Commons sounds contributed by a community of thousands of people around the world. SOURCE is a sampler that does not sample. Instead, it provides different ways to load sounds from Freesound and instantly generate new sound palettes to enrich the creative process and bring an endless SOURCE of inspiration.
SOURCE is designed to run as a stand-alone device on a hardware solution based on a Raspberry Pi 4, the Elk Pi hat for the Raspberry Pi (which provides low-latency multi-channel audio I/O), and the Elk BLACKBOARD controller board (which provides the user interface elements including buttons, faders, a display, and the audio I/O connectors). However, the core of SOURCE is implemented as a standard audio plugin using JUCE. That allows SOURCE to also be loaded in DAWs that support VST/AU plugins, or even run as a stand-alone application in desktop computers (eventhough with somewhat limited functionality). The picture below shows the looks of SOURCE as deployed with the Elk hardware stack:
To see SOURCE in action you can check out this demo video: https://youtu.be/7EXMY0AvBxo Also, I published a paper about source in the 2nd International Workshop on the Internet of Sounds, part of the Audio Mostly 2021 conference. I'm happy to say that SOURCE got the the Best Demo Award and the Industry Award (awared by Elk) in Audio Mostly 2021. Here is the citation information for the paper (and the PDF):
Font F. "SOURCE: a Freesound community music sampler." In: Audio mostly, A conference on interaction with sound. Proceedings of the 16th International Audio Mostly Conference AM’ 21; 2021 Sep 1-3; Trento, Italy. New York: Association for Computing Machinery; 2021. p. 182-7. DOI: 10.1145/3478384.3478388
As a researcher at the Music Technology Group of Universitat Pompeu Fabra, I have been leading the development of the Freesound website and coordinating research projects around it for a number of years. I've been always interested in how to take advantage of the creative potential of Freesound's huge sound collection, and in ways to better integrate Freesound in the creative process. Even though SOURCE started as a personal side project (that's why the Rita & Aurora logo is shown below, a fancy name I sometimes use for audio dev side-projects), I soon realized about the potential of the prototype and saw that SOURCE can bring together many of the research ideas that we have been experimenting with at the MTG in the last years. I believe that SOURCE can be a great music-making tool for creators, but I also think it can be a great playground for experimentation and research about the interaction between hardware devices and huge sound collections like Freesound.
SOURCE implements audio playback functionality which is common in many existing music samplers. Perhaps more interesting and unique are the capabilities of SOURCE for interacting with Freesound, searching and retrieving sounds. The SOURCE demonstration video linked above showcases some of these possibilities. Here is a (potentially incomplete) list of features:
- Search sounds in Freesound in real-time and download them to the sampler
- Filter sounds by:
- Textual query terms
- Duration
- Creative Commons license
- Perceptual qualities like: brightness, hardness and depth
- Replace loaded sounds by other sounds that are acoustically similar (using Freesound's similarity search feature)
- Random search mode that will retrieve unexpected sounds from Freesound
- Load any number of sounds (only limited by RAM memory)
- Map loaded sounds to MIDI notes automatically using contiguous or interleaved modes, or map them arbitrarily using a mapping editor
- For each sound loaded, configure sound paramters such as:
- Start and end position
- Play modes including looping and slicing
- Loop start and end positions
- ADSR amplitude envelope
- Low-pass filter with ADSR envelope
- MIDI root note and global pitch shift (based on playback speed)
- Freeze mode in which the playhead position can be controlled as a sound parameter
- Modulation of some of the above parameters with LFOs, envelopes, steps, velocity, pressure (polyphonic aftertouch, channel pressure or MPE pressure), the mod wheel and MPE slide and glide
- Control some of the above parameters with MIDI Control Change
- Support for velocity layers and multi-sampled instruments
- Get a sound usage log which lists the historic of sounds that have been used and can help in the Creative Commons attribution process
Note that the most interesting bit of SOURCE is it's methods for interacting with Freesound. The audio engine itself is rather basic and, well, those experience music sampler developers might find it naive. I'm open to contributions if anyone with more experience implementing music samplers wants to help :)
SOURCE is composed of a number of software processes that run on a hardware solution based on a Raspberry Pi 4, the Elk Pi hat for the Raspberry Pi (which provides low-latency multi-channel audio I/O), and the Elk BLACKBOARD controller board (which provides the user interface elements including buttons, faders, a display, and the audio I/O connectors). All software processes run under Elk Audio OS, an operative system optimized for low-latency and real-time audio systems. The core of SOURCE is the sampler engine which is implemented as a VST plugin and is run by the sushi process (a plugin host bundled with Elk Audio OS). The communication with the sensors of the controller board is carried out by the sensei process, which is also part of the Elk Audio OS distribution. Finally, a glue app is responsible for connecting all the sub-systems together (mostly via Open Sound Control/WebSockets), controlling the state of the user interface, exposing an HTTP endopoint that offers a complementary user interface, and, most importantly, communicating with Freesound to search and download sounds. Below there is a block diagram including all the aforementioned software processes and hardware elements.
When running as an audio plugin or stand-alone app in a Desktop computer, SOURCE bundles an HTML-based user interface which is loaded in the plugin itself. Below is a block diagram of SOURCE when running as a plugin or stand-alone app in a desktop computer.
More information about SOURCE architecture and internal details is documented in the [DEVELOPERS][DEVELOPERS.md] section.
This repository includes a deploy script written in Python3 (using the fabric package) which will carry out most of the necessary deployment steps for running SOURCE in the Elk hardware stack. However, a number of things need to be done before running the deploy script. The steps below assume that you have a Rasoberry Pi with an Elk Pi hat and the Elk BLACKBOARD with Elk Audio OS (>=0.7.2) up and running and that you can access it through ssh using the default user mind created by the Elk Auiod OS installation. If you're looking at running SOURCE as an audio plugin in a desktop computer, see the instructions below.
- Clone the source code repository in your local computer
git clone https://github.com/ffont/source.git && cd source && git submodule update --init
- Get a Freesound API key from https://freesound.org/apiv2/apply, and create a file named
freesound_api_key.pyinside theelk_platform/ui_appfolder of the cloned repository with the contents:
FREESOUND_API_KEY = "YOUR FREESOUND API KEY"
FREESOUND_CLIENT_ID = "YOUR FREESOUND CLIENT ID"
- Install Python3 depencies of the deploy script in your local computer
pip install -r requirements_fabfile.txt
-
Download the pre-compiled binaries of the latest release of SOURCE sampler engine for the Elk platform (or build them locally following the instructions from the DEVELOPERS file). Copy
SourceSampler.sotoSourceSampler/Builds/ElkAudioOS/build/SourceSampler.so(you might need to create intermediate folders). Note that this path is relative to the root of the cloned repository. -
Configure key-based ssh access to the Elk board form the local machine. If you already have ssh keys created in your local computer, you can install them in the Elk board running something like
ssh-copy-id - i ~/.ssh/id_rsa.pub mind@your-elk-board-hostname. -
Give extra sudo permissions to
minduser in the Elk board. Follow these steps:- ssh into the Elk board and run
sudo suto switch torootuser - rdit
/etc/sudoersto add the linemind ALL=(ALL) NOPASSWD: ALLin the User privilege specification AND comment the line# %sudo ALL=(ALL) ALL.
- ssh into the Elk board and run
-
Edit the file named
fabfile.pyand set thehostvarialbe in line 7 to match the host of your Elk board.
After the above steps, you can run the SOURCE deploy script using the command below. This will copy all the necessary app files to the board, configure the systemd services sushi (the audio plugin), source (the glue app/UI app) and sensei (the inerface with physical sensors), and start them. This will also configure the services to auto start on boot.
- Run
fab deploy-elk
And that's it! While the above mentioned services are running in the Elk board, you can use these utility commands bundled in the deploy script to see their logs:
fab logs-sushi
fab logs-source
fab logs-sensi
Note that to get MIDI input working you'll need to use a USB MIDI controller or interface, and might need to edit this line of code and set the id of the USB MIDI controller/interface (you can get a list of MIDI devices ids in the Elk board running aconnect -l).
SOURCE can also run as a standalone app or as an audio plugin in desktop/laptop computers: AU and VST3 on macOS, VST3 and LV2 on Linux, and VST3 on Windows. The top bar has the presets (128 slots), the voices being played, the tempo and the output level, and the interface is organised in four tabs:
General: getting new sounds from Freesound (by query or randomly, with license, duration and acoustic property filters), the list of sounds of the preset (each with its colour, also shown above the keyboard with the notes mapped to it, and the same details as the sound editor: author, Freesound ID, which opens the sound's page, duration, downloaded size and license; the piano button of a sound lets you add or remove its notes by tapping the keys; the stop button takes the colour of the sound while it plays) and the sound editor (sounds downloaded in preview quality can be downloaded again in original quality when logged in to Freesound): the waveform (with draggable start/end, loop and slice markers, and lines at the beats of the tempo), the sound parameters (with graphs of the filter and the envelopes; while a sound plays, its modulated knobs and sliders show a dot per note at the value the modulators give the parameter) and the modulators (LFOs, envelopes, steps, pressure, velocity, mod wheel, and MPE slide and glide) and the mappings of MIDI CCs and macros. Modulators, MIDI CCs and macros can set any of the sound's continuous parameters (except pitch shift and time stretch) and also the settings of the sound's other modulators (an LFO's rate or depth, an envelope's times...). LFOs restart with each note unless "Free" is ticked: a free-running LFO is shared by all the notes of the sound and keeps running between them (synced, it follows the beat of the host, Link or the BPM; its rate can be modulated by other free-running LFOs). When a modulator sets the cutoff or the rate of another modulator, its min and max are in octaves (+1 doubles the value), and the oscilloscope shows the values they give from the current one. The knob and piano buttons in the top bar hide or show the macros and the keyboard (to give more room to the rest).
Macros: 16 knobs at the top of all the tabs that set the sound parameters they are mapped to (start, end, loop start and end, playhead, freeze speed, cutoff, resonance, gain, pan and pitch) and effects parameters (delay time, EQ frequencies, reverb wet level...). They are also the plugin's parameters ("Macro 1" to "Macro 16"), so they can be automated from the host, and keep working when sounds are replaced. Map them in the sound editor ("Add macro", or choose "Macro" as the source of a mapping), or with "Learn": choose a macro and move parameters of the sound (or of all the sounds) or of the effects in the FX tab. Each knob shows what it controls (its name is automatic unless you rename it with a double-click) in the colour of the sound, with a dot of the colour of each sound it controls (piled down its side). Right-click a macro's knob (on the iPad: long press) to see what it is mapped to (sound or effect, and parameter of each mapping), change the min and max of each mapping with its two sliders, and clear mappings one by one or all at once. Mappings, names and values are saved with the preset.
Search: search Freesound with filters for license, duration, acoustic properties (brightness, hardness, depth, roughness, boominess, sharpness and warmth) and any other Freesound field (audio descriptors, category, BPM, ...), and see the results in a table or in a map where similar sounds are placed close to each other (the map is computed from the LAION-CLAP embeddings of the sounds and the colours come from their timbre). Click a sound to listen to it, or hover the map with Cmd pressed to listen to many sounds quickly. Sounds can be added to the preset or replace the audio of a sound of the preset (keeping all its settings), and several sounds can be selected (Shift+click, long press, a rectangle with Alt+drag or long press and drag, or randomly) to add them to the preset or replace all its sounds. After replacing sounds, the main tab shows the replaced sound (or all sounds).
Presets: an orange "*" next to the preset name means it has changes that are not saved (Save to keep them).
FX: effects applied to the output of the sampler: drive, chorus, 4-band parametric EQ, delay, reverb and compressor (with a meter of the gain reduction it applies). Each effect shows a visualization of what it does (the drive and compressor curves with the current level, the chorus modulation, the EQ response with draggable bands, the delay echoes and the reverb decay). Effects settings are saved with the presets; all effects, including the reverb, are off in new presets.
Settings: the MIDI input channel and MPE, your Freesound account (log in to download the sounds in full quality instead of the previews), the audio and MIDI devices (standalone app) and Ableton Link (iPad).
Note
The Linux and Windows versions are untested: they are built and pass the automated tests, but they have not been tried in real use (standalone app or DAWs) yet. Feedback and bug reports are very welcome!
To use SOURCE, download the files for your system from the latest release. Each format (standalone app and plugins) is in its own zip file. Presets and downloaded sounds are stored in the SourceSampler folder of your Documents folder.
macOS
The macOS builds (SOURCE-<version>-macOS-universal-*.zip) run on both Apple Silicon and Intel Macs, with macOS 10.15 (Catalina) or newer (11 or newer on Apple Silicon). Releases up to 1.2.1 required the macOS version of the computer that built them (they did not open on older systems). Unzip the files you need and copy them to these locations:
- Standalone app:
SourceSampler.appto/Applications. - Audio Unit:
SourceSampler.componentto~/Library/Audio/Plug-Ins/Components(or/Library/Audio/Plug-Ins/Componentsto install it for all users). - VST3:
SourceSampler.vst3to~/Library/Audio/Plug-Ins/VST3(or/Library/Audio/Plug-Ins/VST3).
The builds are not notarized by Apple, so macOS will block them the first time. To allow them, open System Settings > Privacy & Security and click Open Anyway after trying to open the app (or after the DAW fails to load the plugin), or remove the quarantine attribute from the Terminal:
xattr -dr com.apple.quarantine /Applications/SourceSampler.app
xattr -dr com.apple.quarantine ~/Library/Audio/Plug-Ins/Components/SourceSampler.component
xattr -dr com.apple.quarantine ~/Library/Audio/Plug-Ins/VST3/SourceSampler.vst3
Then restart your DAW (or rescan plugins) so that it finds SOURCE.
Linux (untested)
There are builds for x86_64 (SOURCE-<version>-linux-x86_64-*.zip) and ARM computers like the Raspberry Pi 4/5 (SOURCE-<version>-linux-arm64-*.zip). They are built on Ubuntu 22.04 and need glibc 2.35 or newer (Ubuntu 22.04, Debian 12, Fedora 36 or newer distributions) and these libraries (Ubuntu/Debian package names):
sudo apt-get install libasound2 libcurl4 libfreetype6 libfontconfig1 libx11-6 libxext6 libxinerama1 libxrandr2 libxcursor1 libgl1
Unzip the files you need and copy them to these locations:
- Standalone app:
SourceSampleranywhere (e.g.~/.local/bin), and run it. It uses ALSA, or JACK if it is running (select the audio device in the Settings tab). - VST3:
SourceSampler.vst3to~/.vst3(or/usr/lib/vst3). - LV2:
SourceSampler.lv2to~/.lv2(or/usr/lib/lv2).
Windows (untested)
The Windows builds (SOURCE-<version>-windows-x64-*.zip) run on 64-bit Windows 10 and 11. Unzip the files you need and copy them to these locations:
- Standalone app:
SourceSampler.exeanywhere (e.g.C:\Program Files\SOURCE), and run it. Select the audio device in the Settings tab. - VST3:
SourceSampler.vst3toC:\Program Files\Common Files\VST3.
The builds are not signed, so Windows SmartScreen may show a warning the first time you open the app: click More info and then Run anyway. Then restart your DAW (or rescan plugins) so that it finds SOURCE.
iPad
SOURCE also runs on iPad, as a standalone app and as an AUv3 plugin for hosts like AUM or Cubasis, but it is not distributed in the App Store: it has to be built and installed from Xcode (see building SOURCE for iPad). On iPad, SOURCE can send its audio to Ableton Live or other apps through the network with Ableton Link Audio (in the "Settings" tab). Panels scroll by dragging up or down, also over sliders and knobs: they only change when dragged sideways (knobs too), relative to where the finger starts (tapping them changes nothing), and they ignore two-finger touches, so scrolling never changes a parameter by accident.
Building from source
See the instructions for developers to build SOURCE yourself (macOS, Linux, Windows and iPad).
For particular compilation instructions and notes for development, please see the DEVELOPERS file.
There is an experimental version of SOURCE which incorporate an open source MIDI sequencer in which I've also been working named Shepherd. This integrates with SOURCE to provide sequencing capabilities using a grid of MIDI clips a la Ableton Live. The functionalities of the sequencer are rather basic, but when used in combination with SOURCE can work a stand-alone music making machine. As a user interface, the combination of SOURCE + Shepherd uses Ableton's Push2. More information about this combination and how to make it work can be provided upon request.
SOURCE is released under the GPLv3 open source software license (see LICENSE file) with the code being available at https://github.com/ffont/source. Source uses the following open source software libraries:
- juce, available under GPLv3 license (@2f98020, v6.1.6)
- ff_meters, available under BSD 3 clause license (@711ee87, I use a fork I made with a small patch for compatibility with Elk)
- twine, available under GPLv3 license (@1257d93)
- asio, available under Boost Sofrware License] (@f0a1e1c)
- Simple-WebSocket-Server, available under MIT license (@a091e7c)
- Simple-Web-Server, available under MIT license (@bdb1057)
- shepherd, available under GPLv3 license (@9adc415)
- signalsmith-stretch, available under MIT license (@37db3a7)









