One-shot is a free, minimalist one-shot sample player triggered by MIDI notes. It is a Pd (Puredata) patch so it will run on Mac, Windows and Linux. It is useful for triggering a folder of sound effects from a MIDI keyboard within a minimum of setup. Includes safety features such as adjustable debounce and “all notes off”.
Samples are stored in a folder named
samples. They are mapped to MIDI notes in a text file called
keymap.txt and settings are stored in
settings.txt. Since One-shot is configured using only text files, the GUI is not required. In fact, this makes it rather well suited to running on a single-board screen-less computer such as a Raspberry Pi, if only Pd 0.48 would run on such a computer (currently, Pd 0.47 is the latest version of Pd that is available for the Raspberry Pi).
One-shot preloads samples into RAM on startup for responsive triggering.
Download One-shot from the One-shot GitHub page.
First download and install Pd if you don’t already have it. Then download and unzip the One-shot files from the One-shot GitHub page.
One-shot x.x.pd) in Pd (File menu -> “Open”).
If you update “keymap.txt” or “settings.txt”, or change any samples whilst One-shot is running, click “Reload” or restart the patch.
keymap.txt defines the mapping between incoming MIDI notes and samples.
Each line has two elements separated by a space: MIDI note number (middle c = 60) and sample file name. The sample file name must not include any spaces. The sample file will be played when the corresponding note on message for that number is received.
60 pings1.aiff 62 pings2.aiff 64 pings3.aiff 65 pings4.aiff 67 stereo_a.wav
Each line contains a setting name and a setting value separated by a space.
settings.txt file contents:
all_off_key 59 fade_dur 250 midi_channel 0 velocity_sensitive 0 debounce 0 same_key_twice 1 voice_stealing 0
||Note number||All notes are faded out in
||Duration in milliseconds||Fade out time after all_off_key has been received.|
||MIDI channel number 0 - 16||Channel 1 to 16 or 0 = all channels received.|
||1 = yes, 0 = no||Enable/disable velocity sensitivity.|
||Debounce duration in milliseconds||Avoid double-triggers within debounce duration, 0 = debounce off.|
||1 = yes, 0 = no||Allow/disallow the same key to trigger its sample twice in succession.|
||1 = on, 0 = off||If all voices are busy, allow/disallow new MIDI notes to steal voices.|
One-shot is copyright 2017, 2018 Jonathan Green.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.