Sample Instrument Builder

Sample Instrument Builder

Play this sample instrument in your browser only. Lower your device volume before previewing and use samples you are allowed to use.

1. Choose original samples

Browser-decodable WAV, MP3, OGG, FLAC, M4A, and similar audio. Up to 8 files, 4 MiB each, 20 MiB total; decoded length 0.03–10 seconds.

Choose samples or load the two WAV examples.

2. Note and velocity zones

MIDI 60=C4 and 72=C5. Low ≤ root ≤ high, velocity 1–127, within ±36 semitones from root. Every sample needs at least one zone.

3. Play the on-screen keyboard

Press and hold a key, then release it. When a key has focus, Space or Enter works too. One-shot samples stop when their audio ends.

Load samples and press a key to play.

4. Save mapping and originals

JSON records exact original SHA-256 hashes and zones. ZIP includes the JSON and original audio bytes; it is not automatically converted to SFZ or SF2.

Comments & questions

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

  1. Select sample files or load the two C4 WAV examples split by velocity.
  2. Adjust root note, note and velocity limits, gain, attack, and release for each zone; add more zones where needed.
  3. Move the velocity slider, then press and release the keys to hear the layers and pitches.
  4. 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.

Related Tools

Audio Waveform EditorPitch Recognition PracticeAudio Loop Seam FinderImage Super ResolutionHDR Exposure MergerPhoto Colorization LabPanorama StitcherSheet Nesting PlannerEdit Decision WorkbenchTeleprompter StudioBilingual Video Study PlayerChord Progression LabMusic Score EditorSubtitle WorkbenchSpatial Audio DesignerMusic Chord Candidate AnalyzerMIDI Piano Roll EditorImpulse Response LabDTMF Signal LabSpectrogram Sound PainterAudio Spectrum AnalyzerAudio DenoiserAudio Source SeparatorSound Effect SynthesizerMultitrack Audio MixerAudio Transient SlicerAudio Loudness AuditorAudio Pitch Tempo StudioStereo Anaglyph MakerPhoto Mosaic MakerImage Frequency SpectrumSimilar Photo FinderLenticular InterlacerPBR Texture Map LabPanorama Tour BuilderImage Calibration TargetsImage Steganography LabVector Morph EditorDocument Perspective CorrectorImage Inpainting StudioKnitting Chart EditorSVG Boolean WorkbenchSVG Path EditorSeamless Pattern MakerScreenprint Separation StudioQuilt Layout PlannerPerspective Mockup StudioLow Poly Mesh MakerFont Subset BuilderFocus Stacking LabImage Depth EstimatorCross Stitch Chart MakerAnimation Timeline EditorPixel Paint StudioImage Difference HeatmapImage Quality LabID photo makerBarcode scannerVideo to GIFVideo Chroma KeyerVideo StabilizerVideo Reframe StudioStop Motion StudioVideo Timecode ConformerVideo Quality ComparatorHLS and DASH Manifest ValidatorVideo Speed Ramp EditorVideo Container InspectorVideo Storyboard MakerVideo Privacy MaskerRotoscope Mask EditorVideo Motion TrackerVideo Frame InterpolatorAudio Description EditorVideo Audio Sync LabVideo TrimmerGIF Frame ExtractorSVG to PNG / JPEGImage to SVG VectorPixel Art ConverterCircle Profile CropPhoto and Polaroid FrameRound Image CornersJPEG EXIF Viewer and RemoverImage Color Vision SimulatorImage to ASCII ArtPhoto CollageInstagram 9-Tile SplitterLong Image SplitterImage CropRotate and Flip ImagesImage FiltersMeme GeneratorScreenshot BeautifierBarcode GeneratorQR Code GeneratorImage CompressorImage ResizeImage ConverterFavicon GeneratorYouTube Thumbnail ExtractorHEIC to JPGSignature & Stamp MakerImage WatermarkGIF MakerImage Color PickerImage to Text (OCR)Merge ImagesPhoto Blur & MosaicQR Code ScannerMP4 to MP3 ConverterVideo CompressorBackground Remover
Explore all Image/Media tools →Text/Convert →Life/Fun →Dev Tools →