- Notifications
You must be signed in to change notification settings - Fork19
Convert hardware MIDI instruments into software instruments from the command line.
License
NotificationsYou must be signed in to change notification settings
psobot/SampleScanner
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
SampleScanner is a command-line tool to turn MIDI instruments (usually hardware) into virtual (software) instruments automatically. It's similar toRedmatica's now-discontinuedAutoSampler software (now part of Apple'sMainStage), but open-source and cross-platform.
- Uses native system integration (via
rtmidi
andpyAudio
) for compatibility with all audio and MIDI devices - Outputs to the open-sourcesfz 2.0 sample format, playable bySforzando (and others)
- Optional FLAC compression (on by default) to reduce sample set file size by up to 75%
- Flexible configuration options and extensive command-line interface
- Experimental looping algorithm to extend perpetual samples
- Clipping detection at sample time
- 100% Python to enable cross-platform compatibility
- Has been known to work in Windows, Mac OS and Linux
Requires a workingpython
(version 2.7),pip
, andffmpeg
to be installed on the system.
git clone git@github.com:psobot/SampleScannercd SampleScannerpip install -r requirements.txt
Run./samplescanner -h
for a full argument listing:
usage: samplescanner [-h] [--cc-before [CC_BEFORE [CC_BEFORE ...]]] [--cc-after [CC_AFTER [CC_AFTER ...]]] [--program-number PROGRAM_NUMBER] [--low-key LOW_KEY] [--high-key HIGH_KEY] [--velocity-levels VELOCITY_LEVELS [VELOCITY_LEVELS ...]] [--key-skip KEY_RANGE] [--max-attempts MAX_ATTEMPTS] [--limit LIMIT] [--has-portamento] [--sample-asc] [--no-flac] [--no-delete] [--loop] [--midi-port-name MIDI_PORT_NAME] [--midi-port-index MIDI_PORT_INDEX] [--midi-channel MIDI_CHANNEL] [--audio-interface-name AUDIO_INTERFACE_NAME] [--audio-interface-index AUDIO_INTERFACE_INDEX] [--sample-rate SAMPLE_RATE] [--print-progress] output_foldercreate SFZ files from external audio devicesoptional arguments: -h, --help show this help message and exitSampling Options: --cc-before [CC_BEFORE [CC_BEFORE ...]] Send MIDI CC before the program change. Put comma between CC# and value. Example: --cc 0,127 "64,65" --cc-after [CC_AFTER [CC_AFTER ...]] Send MIDI CC after the program change. Put comma between CC# and value. Example: --cc 0,127 "64,65" --program-number PROGRAM_NUMBER switch to a program number before recording --low-key LOW_KEY key to start sampling from (key name, octave number) --high-key HIGH_KEY key to stop sampling at (key name, octave number) --velocity-levels VELOCITY_LEVELS [VELOCITY_LEVELS ...] velocity levels (in [1, 127]) to sample --key-skip KEY_RANGE number of keys covered by one sample --max-attempts MAX_ATTEMPTS maximum number of tries to resample a note --limit LIMIT length in seconds of longest sample --has-portamento play each note once before sampling to avoid portamento sweeps between notes --sample-asc sample notes from low to high (default false)Output Options: output_folder name of output folder --no-flac don't compress output to flac samples --no-delete leave temporary .aif files in place after flac compression --loop attempt to loop sounds (should only be used with sounds with infinite sustain)MIDI/Audio IO Options: --midi-port-name MIDI_PORT_NAME name of MIDI device to use --midi-port-index MIDI_PORT_INDEX index of MIDI device to use --midi-channel MIDI_CHANNEL MIDI channel to send messages on --audio-interface-name AUDIO_INTERFACE_NAME name of audio input device to use --audio-interface-index AUDIO_INTERFACE_INDEX index of audio input device to use --sample-rate SAMPLE_RATE sample rate to use. audio interface must support this rate.Misc Options: --print-progress show text-based VU meters in terminal (default false, can cause audio artifacts)
tl;dr: SampleScanner is © 2015-2018Peter Sobot, and released under the MIT License.Many contributors have helped improve SampleScanner, including:
The MIT LicenseCopyright (c) 2015-2018 Peter Sobot https://petersobot.com github@petersobot.comPermission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS INTHE SOFTWARE.