Sample Instrument Builder
A single sample stretched across every key cannot capture differences between an instrument's range and playing strength. Import up to eight local samples, then set each sample's root MIDI note, playable note range, velocity range, gain, attack, and release. The keyboard selects the matching sample and shifts pitch by changing playback speed at a ratio of 2^(semitones/12). Play up to eight voices together and save the original bytes, SHA-256 hashes, and zones as a ZIP. This is not an SFZ/SF2 converter; it does not add loops, crossfades, or time stretching.
Key features
- Decode up to eight browser-supported local WAV, MP3, OGG, FLAC, or M4A samples and hash the exact original bytes with SHA-256.
- Set a root note, note range, velocity range from 1 to 127, gain, attack, and release for up to 16 sample zones.
- Press and release a 24-note on-screen keyboard by pointer or keyboard, with up to eight simultaneous voices.
- Report overlapping zones and resolve matches by narrower note range, narrower velocity range, then list order.
- Export a mapping JSON or a ZIP containing that mapping and unchanged original audio files.
How to use
- Select sample files or load the two C4 WAV examples split by velocity.
- Adjust root note, note and velocity limits, gain, attack, and release for each zone; add more zones where needed.
- Move the velocity slider, then press and release the keys to hear the layers and pitches.
- Save mapping JSON or the ZIP with original samples and hashes for later use.
Use cases
- Map different impact samples to soft and hard key presses.
- Assign separate recordings to an instrument's low and high registers.
- Keep exact zone settings and SHA-256 hashes with the original recordings for another production environment.
Frequently asked questions
Which sample plays when zones overlap?
Of zones matching both MIDI note and velocity, the narrowest note range wins. A tie uses the narrowest velocity range; another tie uses the earliest zone in the screen and JSON order. Overlaps are shown so you can check the result by ear.
How does the root MIDI note affect playback?
The root note plays at original speed; each semitone shifts speed by 2^(difference/12). A zone is limited to 36 semitones from its root. Playback duration changes with pitch because no time stretching is applied.
What happens if the sample ends before I release the key?
These are one-shot samples. The sound cannot continue after its file ends. If still playing when you release the key, gain fades during the zone's release time. Leaving the tab or pressing Stop all clears active voices.
What are the file limits?
Import up to eight files, each at most 4 MiB and 20 MiB total. Decoded samples must be 0.03 to 10 seconds, mono or stereo, 8–96 kHz, and at most 960,000 frames. Codec support varies by browser.
What is inside the ZIP?
The samples folder preserves original audio bytes. instrument-map.json records each original file's name, archive path, byte length, SHA-256 hash, decoded information, and every note/velocity zone. It is not a universal instrument format; other software needs to apply the mapping rules.
Are my files uploaded?
No. Reading, decoding, SHA-256 hashing, playing, and ZIP creation happen in this browser. Files are saved to your device only when you choose an export button.
Privacy
Selected audio remains in browser memory and is never uploaded. The mapping JSON contains hashes and metadata but no audio data. The ZIP includes original bytes only when you choose to save it. Closing the page clears the audio graph and temporary download URLs.
Comments & questions